vCenter appliance won't use mail relay server
Posted
by
Safado
on Server Fault
See other posts from Server Fault
or by Safado
Published on 2012-11-28T20:14:28Z
Indexed on
2012/11/28
23:05 UTC
Read the original article
Hit count: 1277
sendmail
|vmware-vcenter
tl;dr: - sendmail is configured to use a relay server but still insists on using 127.0.01 as the relay, which results in mail not being sent.
We have the open source vCenter appliance (v 5.0) managing our ESXi cluster. When connected to it via vSphere Client, you can configure the SMTP relay server to use by going to Administration > vCenter Server Settings > MAIL
. There you can set the SMTP Server value. I looked through their documentation and also confirmed on the phone with support that all you have to do to configure mail is to put in the relay IP or fqdn in that box and hit OK.
Well, I had done that and mail still wasn't sending. So I SSH into the server (which is SuSE) and look at /var/log/mail and it looks like it's trying to relay the email through 127.0.0.1 and it's rejecting it. So looking through the config files, I see there's /etc/sendmail.cf
and /etc/mail/submit.cf
. You can configure items in /etc/sysconfig/sendmail
and run SuSEconfig --module sendmail
to generate those to .cf files based on what's in /etc/sysconfig/sendmail.
So playing around, I see that when you set the SMTP Server value in the vCenter gui, all that it does is change the "DS" line in /etc/mail/submit.cf to have DS[myrelayserver.com]
.
Looking on the internet, it would appear that the DS line is really the only thing you need to change in order to use a relay server. I got on the phone with VMWare support and spent 2 hours trying to modify ANY setting that had anything to do with relays and we couldn't get it to NOT use 127.0.0.1 as the relay. Just to note, any time we made any sort of configuration change, we restarted the sendmail service.
Does anyone know whats going on? Have any ideas on how I can fix this?
© Server Fault or respective owner