Sometimes a VCSA is not able to send emails, as it is not able to validate the sender domain. For example.

The vCenter is configured to send an email as over the mail server


As sendmail cannot get the correct MX Record for the domain the from-field in the email header will stay empty and the /var/log/messages.log will show something like this.

2017-10-23T10:48:59.567720+02:00 vcenter sendmail[55361]: v9N8mxa7055361: v9N8mxa8055361: DSN: Data format error
2017-10-23T10:48:59.592809+02:00 vcenter sendmail[55362]: v9N8mxkl055362: from=<>, size=429, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=photon-machine []
2017-10-23T10:48:59.607661+02:00 vcenter sendmail[55362]: v9N8mxkm055362: from=<>, size=2421, class=0, nrcpts=1, msgid=<>, proto=ESMTP, daemon=MTA, relay=photon-machine []
2017-10-23T10:48:59.644144+02:00 vcenter sendmail[55361]: v9N8mxa8055361:, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31453, relay=[], dsn=2.0.0, stat=Sent (v9N8mxkm055362 Message accepted for delivery)
2017-10-23T10:49:03.964029+02:00 vcenter sendmail[55364]: v9N8mxkm055362: to=<>, delay=00:00:04, xdelay=00:00:04, mailer=relay, pri=122421, [], dsn=2.0.0, stat=Sent (Ok: queued as A5EA0B40C3)

To solve the issue we can help the sendmail daemon to find the right mail server for domain

For this we need to edit the /etc/hosts file and add something like this.

# email workaround;
# vCenter Email Address:
# Smarthost IP:

After this, we have to remove the Mail Settings in the vSphere Web Client, and after saving the changes, add them again.

Now the vCenter should be able to send emails again.