sendmail is timing out on one of our CentOS servers. Here is my test
[root@testserver ~]# echo "Subject: test" | /usr/lib/sendmail -v email@example.com
Here is the output:
firstname.lastname@example.org... Connecting to [127.0.0.1] via relay... 220 testserver.ourdomain.com ESMTP Sendmail 8.13.8/8.13.8; Thu, 23 Jun 2011 14:32:18 -0600 >>> EHLO testserver.ourdomain.com 250-testserver.ourdomain.com Hello localhost.localdomain [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-AUTH DIGEST-MD5 CRAM-MD5 250-DELIVERBY 250 HELP >>> MAIL From:<email@example.com> SIZE=14 AUTHfirstname.lastname@example.org 250 2.1.0 <email@example.com>... Sender ok >>> RCPT To:<firstname.lastname@example.org> >>> DATA 250 2.1.5 <email@example.com>... Recipient ok 354 Enter mail, end with "." on a line by itself >>> . 250 2.0.0 p5NKWInQ008636 Message accepted for delivery firstname.lastname@example.org... Sent (p5NKWInQ008636 Message accepted for delivery) Closing connection to [127.0.0.1] >>> QUIT 221 2.0.0 testserver.ourdomain.com closing connection
And then a minute later,
/var/log/maillog shows the following:
Jun 23 14:32:18 testserver sendmail: p5NKWICR008635: email@example.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30014, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p5NKWInQ008636 Message accepted for delivery) Jun 23 14:33:00 testserver sendmail: p5NKWInQ008636: to=<firstname.lastname@example.org>, ctladdr=<email@example.com> (0/0), delay=00:00:42, xdelay=00:00:42, mailer=esmtp, pri=120313, relay=ourdomain.com. [173.201.XXX.XXX], dsn=4.0.0, stat=Deferred: Connection timed out with ourdomain.com.
In that second log entry, it appears to be trying to use our external company website to try to relay the email... I have no idea why its trying to do that. Another it guy setup this server recently so I'm not sure if he changed the sendmail configuration or what. Where should I be looking to remedy this?
(obviously names, domain names and IP addresses have been changed in the above logs to protect the innocent)