Email Alerts not sending in vCenter 6.5
- vCenter (in my case VCSA 6.5 ) is not sending alert emails even though the mail server appears to be configured properly (in the vSphere Web Client this is on the vCenter node under Configure, Settings, General).
- Network connectivity between vCenter and port 25 on the SMTP server is fine and has been tested.
- The logs on the SMTP server show no evidence of emails beings sent.
- When connecting via SSH to the vCenter Server Appliance the sendmail logs are showing errors such as:
1 22018-07-14T04:24:46.569978+00:00 my-vc sendmail: ……: 3 email@example.com, firstname.lastname@example.org (0/0), 4 delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30528, relay=[127.0.0.1] [127.0.0.1], 5 dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] 6
Connection refused by [127.0.0.1] in the logs is the giveaway here- the settings in the client have not been applied to the sendmail service and vCenter is trying to connect to the localhost as the SMTP server.
Go to the client and reconfigure the mail server to point at something else (it doesn’t have to be a real hostname). Then change it back to the correct settings. Normal alerts will be resumed automatically straight away. You can test if it works by temporarily adding an additional trigger with a very low threshold to an existing alert with notification action.
Thanks to vExpert Laurens van Duijin for sending me down the right path with this issue.