sendmail configuration
Hi,
I wanna configure sendmail in centos 6. I want to enable forward mails to mail relay. how to do it? |
Look in your sendmail.cf
Look for the lines: Code:
# "Smart" relay host (may be null) If you are using an IP put it in [] Restart sendmail |
Quote:
|
He was asking you to look into sendmail.cf though I would like to disagree on changing sendmail.cf manually.
In sendmail.mc file, you should have something like this Code:
define(`SMART_HOST', `[RELAY_HOST_IP]')dnl |
Quote:
|
Quote:
i have done it but still not able to send mail. |
Quote:
|
have you restarted the sendmail service?
how are you testing it? |
Quote:
for sending mail using mailx, i have configured sendmail. installed sendmail and then define('SMART_HOST', '192.168.0.X')dnl and dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl Please tell me if i have to change something else also. |
Below are the logs if i am trying to send mail using mailx. when i have configured sendmail in one system.
note:- i am using only one system to configure sendmail and sending the mail. mail relay is configured in remote host and i have done the entry in my sendmail.mc define('SMART_HOST', '192.168.0.125')dnl Please suggest something to work around this. Nov 14 16:02:54 GAIDL-5001 sendmail[16907]: rAEAWs7v016907: from=root, size=1099, class=0, nrcpts=1, msgid=<201311141032.rAEAWs7v016907@GAIDL-5001.gai.net>, relay=root@localhost Nov 14 16:02:54 GAIDL-5001 postfix/smtpd[16908]: connect from localhost[127.0.0.1] Nov 14 16:02:54 GAIDL-5001 postfix/smtpd[16908]: C97FE1A05AF: client=localhost[127.0.0.1] Nov 14 16:02:54 GAIDL-5001 postfix/cleanup[16911]: C97FE1A05AF: message-id=<201311141032.rAEAWs7v016907@GAIDL-5001.gai.net> Nov 14 16:02:54 GAIDL-5001 postfix/qmgr[2614]: C97FE1A05AF: from=<root@GAIDL-5001.gai.net>, size=1578, nrcpt=1 (queue active) Nov 14 16:02:54 GAIDL-5001 sendmail[16907]: rAEAWs7v016907: to=sachin.davra@gmail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31099, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as C97FE1A05AF) Nov 14 16:02:54 GAIDL-5001 postfix/smtpd[16908]: disconnect from localhost[127.0.0.1] Nov 14 16:02:56 GAIDL-5001 postfix/smtp[16912]: connect to gmail-smtp-in.l.google.com[2a00:1450:4008:c01::1b]:25: Network is unreachable Nov 14 16:02:56 GAIDL-5001 postfix/smtp[16912]: connect to gmail-smtp-in.l.google.com[74.125.129.27]:25: Connection refused Nov 14 16:02:56 GAIDL-5001 postfix/smtp[16912]: connect to alt1.gmail-smtp-in.l.google.com[2a00:1450:4008:c01::1b]:25: Network is unreachable Nov 14 16:02:56 GAIDL-5001 postfix/smtp[16912]: connect to alt1.gmail-smtp-in.l.google.com[74.125.142.27]:25: Connection refused Nov 14 16:02:56 GAIDL-5001 postfix/smtp[16912]: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:4002:c01::1a]:25: Network is unreachable Nov 14 16:02:56 GAIDL-5001 postfix/smtp[16912]: C97FE1A05AF: to=<sachin.davra@gmail.com>, relay=none, delay=1.3, delays=0.08/0/1.3/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:4002:c01::1a]:25: Network is unreachable) |
Please check the last line in the logs. It says network is unreachable.
|
Quote:
|
Quote:
|
Post the line that begins
Code:
DS |
I just noticed this:
Quote:
I do believe that CentOS 6, like RHEL 6, uses postfix as the default MTA. |
All times are GMT -5. The time now is 04:00 PM. |