We have 3 AWS-hosted web servers all configured (as far as I can tell) identically. Each server has a copy of a web feedback form that submits to a PHP script that ultimately calls the php mail()
function to send an email to us.
This works fine on 2 of the 3 web servers. On the third, the php mail()
function returns 1
(indicating that the mail was sent), /etc/maillog
on the web server shows the message as accepted for delivery, and then transferred-on to Google's MX which also accepts the message.
Example mail log for delivery to gmail:
Nov 7 00:40:18 ip-[redacted] sendmail[18499]: sA70eHGI018497: to=<[recipient]>, ctladdr=<apache@ip-[redacted]> (48/48), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=121194, relay=aspmx.l.google.com. [[redacted]], dsn=2.0.0, stat=Sent (OK 1415320818 q110si8698921qgd.122 - gsmtp)
That looks good to me. But the message never shows up in my inbox.
Things I've checked:
- domain MX records are sane
- same version of sendmail on all 3 hosts
- /etc/mailname is set identically on all 3 hosts
Any suggestions?
The last part of that log excerpt confirms that the message was accepted by the recipient mail server at gmail:
The portion in parenthesis is part of the confirmation that the remote server gave back so if you had a support contact at google, they could presumably use that to trace what they did with the message. Considering that it's a free mail service though, getting them to do that is unlikely.
How about checking spam/junk mail folders? Anything there?