Email from vcenter 6.7 fails to deliver

sendmailvmware-vcenter

Desired end state: I would like to receive alert email from vcenter 6.7.

Specific problem: After configuring vcenter 6.7 (in the UI) with an SMTP server that works as tested from the vcenter shell, mail does not get delivered.

Specific error in /var/log/vmware/messages:

2019-11-15T02:20:02.582561+00:00 vcenter sendmail[1181]:
xAE99Q0S013190: to=foo@bar.com, delay=16:49:55,
xdelay=00:00:00, mailer=esmtp, pri=1562265,
relay=aspmx3.googlemail.com., dsn=4.0.0, stat=Deferred: Connection
timed out with aspmx3.googlemail.com.

SMTP test from vcenter shell: created a text file with SMTP commands and used nc to send them port 25 of the SMTP server, it worked.

Attempted solution: vmware kb article

Solution does not work as the binary SuSEconfig doesn't exist in version 6.7.

Best Answer

You need to edit /etc/mail/sendmail.mc and add the following line:

FEATURE(`nocanonify`)

this will stop sendmail from looking up the mail server via MX records and just use the one you specified.

Restart sendmail after you've made the change.

Related Topic