I have multiple CentOS servers which all have sendmail setup with the masquerade_domain option. Our email server is Gmail; thus, each of these servers send mail to our domain on Gmail. I have whitelisted each of the server's IP addresses in our gmail domain. It has worked for years...literally years.
Suddenly one of my server's nightly emails stopped working.
With my setup, when an email is sent using the command line from a server, such as:
echo "Hello World" | mutt -s "Test Hello World Email" myname@mydomain.com
...or...
echo "Hello World" | mail -s "Test Hello World Email" myname@mydomain.com
...the maillog shows it being relayed by localhost then to gmail. A successful send looks like this:
from=<root@server.domain.com>, size=483096, class=0, nrcpts=1, msgid=<201806051845@server.domain.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
to=myname@mydomain.com, ctladdr=root (0/0), delay=00:02:00, xdelay=00:00:00, mailer=relay, pri=512775, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Message accepted for delivery)
STARTTLS=client, relay=aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
to=<myname@mydomain.com>, ctladdr=<root@server.domain.com> (0/0), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=603096, relay=aspmx.l.google.com. [74.125.124.27], dsn=2.0.0, stat=Sent (OK)
However currently, on the server that stopped working, I see this:
from=<root@server.domain.com>, size=483096, class=0, nrcpts=1, msgid=<201806051835@server.domain.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
to=myname@mydomain.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30006, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Message accepted for delivery)
STARTTLS=client, relay=aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=AES128-SHA, bits=128/128
to=<myname@mydomain.com>, ctladdr=<root@server.domain.com> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120317, relay=aspmx.l.google.com. [108.177.112.27], dsn=5.0.0, stat=Service unavailable
DSN: Service unavailable
Losing ./: savemail panic
SYSERR(root): savemail: cannot save rejected email anywhere
The two /var/log/maillog lines that stand out are:
DSN: Service unavailable
...and...
SYSERR(root): savemail: cannot save rejected email anywhere
I originally assumed the latter log entry (cannot save rejected email) was due to the relay not working; however, since this issue originated, I have tried switching my sendmail configuration to allow local delivery of a few accounts and I updated my /etc/aliases to point many aliases to one of the accounts with local delivery per the virtusertable. ...but I have been failing miserably at making any progress.
It is worth noting that I have double-checked my /etc/hosts file as well as /etc/resolv.conf. Nslookups all appear to be functioning fine and my hostname matches the /etc/hosts file. Further, the public DNS entries for this server match the server's hostname and IP address.
Any help is greatly appreciated.
ClientCertFile
setting may be relevant to look at in your*.cf
configuration file(s) (orconfCLIENT
in your*.mc
files)