sendmail is timing out on one of our CentOS servers. Here is my test
[root@testserver ~]# echo "Subject: test" | /usr/lib/sendmail -v firstname.lastname@example.org
Here is the output:
email@example.com... 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:<firstname.lastname@example.org> SIZE=14 AUTHemail@example.com 250 2.1.0 <firstname.lastname@example.org>... Sender ok >>> RCPT To:<email@example.com> >>> DATA 250 2.1.5 <firstname.lastname@example.org>... Recipient ok 354 Enter mail, end with "." on a line by itself >>> . 250 2.0.0 p5NKWInQ008636 Message accepted for delivery email@example.com... 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: firstname.lastname@example.org, 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=<email@example.com>, ctladdr=<firstname.lastname@example.org> (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)