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: 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