Email notification can be configure for vCenter alerts as per documentation
However when you do any schedule activity such as snapshot / power on-off and give email address for this activity it may not go to relay server configured in the vCenter server as per above documentation.
As per the network traces you may see vCenter trying to contact email server as per MX record instead of going directly relay server configured as per vCenter.
To fix this issue we need to follow below steps.
- Take snapshot of vCenter VM.
- Take SSH session to vCenter VM, change to the /etc/mail folder:
- Make a backup copy of submit.cf
cp submit.cf submit.cf.orig
- Edit submit.cf using vi, WinSCP, or any other preferable method and find these lines:
# "Smart" relay host (may be null) DS
- After the “DS”, enter the FQDN of your SMTP server like this:
# "Smart" relay host (may be null) DS smtpserver.domain.edu
- Restart the sendmail service by running the below command:
systemctl restart sendmail.service
Now vCenter should send email to relay server configured in your environment.