LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mail configuration related query. (https://www.linuxquestions.org/questions/linux-newbie-8/mail-configuration-related-query-868834/)

pinga123 03-16-2011 12:28 AM

mail configuration related query.
 
How do i configure my linux machine to send mail.

I have two server out of which one is configured to send mails. However The other is still not sending mails .I have installed sendmail rpms and modified
sendmail.mc file to include following parameter.

Code:

dnl define(`SMART_HOST', `xxx.xxx.com')dnl
where xxxx: Mail server

following rpms are already installed.

Code:

]# rpm -qa | grep mail
mailcap-2.1.23-1.fc6
procmail-3.22-17.1.0.1
fetchmail-6.3.6-1.1.el5
sendmail-cf-8.13.8-2.el5
mailx-8.1.1-44.2.2
sendmail-8.13.8-2.el5

My Distribution is.
Code:

# lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: EnterpriseEnterpriseServer
Description:    Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)
Release:        5.2
Codename:      Carthage


bathory 03-16-2011 01:20 AM

Hi,

You should take a look at mail logs (/var/log/maillog) to see why it fails

Regards

pinga123 03-16-2011 01:47 AM

Quote:

Originally Posted by bathory (Post 4292214)
Hi,

You should take a look at mail logs (/var/log/maillog) to see why it fails

Regards

Getting following error in log file.
Code:

Mar 16 10:58:12 XXX sendmail[5219]: p2G5SCgA005219: from=root, size=73, class=0, nrcpts=1, msgid=<201103160528.p2G5SCgA005219@XXX.XXX.com>, relay=root@localhost
Mar 16 10:58:13 XXX sendmail[5220]: p2G5SCCf005220: from=<root@XXX.i-XXX.com>, size=389, class=0, nrcpts=1, msgid=<201103160528.p2G5SCgA005219@XXX.XXX.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Mar 16 10:58:13 XXX sendmail[5219]: p2G5SCgA005219: to=XXX@XXX.com, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30073, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p2G5SCCf005220 Message accepted for delivery)
Mar 16 10:58:15 XXX sendmail[5222]: STARTTLS=client, relay=XXX.XXX.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Mar 16 10:58:16 XXX sendmail[5222]: p2G5SCCf005220: to=<XXX.XXX@XXX.com>, ctladdr=<root@XXX.XXX.com> (0/0), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=120389, relay=XXX.XXX.com. [XXXX], dsn=5.1.8, stat=User unknown
Mar 16 10:58:17 XXX sendmail[5222]: p2G5SCCf005220: p2G5SHCf005222: DSN: User unknown
Mar 16 10:58:17 XXX sendmail[5222]: p2G5SHCf005222: to=<root@XXX.XXX.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31656, dsn=2.0.0, stat=Sent


bathory 03-16-2011 03:07 AM

Well, I don't see any error, apart from the "User unknown" response you get.

pinga123 03-16-2011 06:20 AM

I figured it myself as i was trying to contact internal mail server i was not having my own machine registered in dns so it was not resolving hostname from ip address. I made an entry in DNS and now i m getting the mail transferred.
More details can be found on my blog.


All times are GMT -5. The time now is 10:44 PM.