VMware Cloud Community
vmuser625
Contributor
Contributor

vCSA 5.0 and not getting notification emails

I want to share this information, as it may help others.

I installed Virtual Center Server Appliance 5.0 (vCSA), the pre-packaged appliance with vCenter Server installed in guest OS Suse Linux.

I installed and configured it all correctly, set the SMTP details and but was not receiving notification emails to external addresses.

The problem I was getting was notifications go to a distribution group and a contact in their has an email address that is external, and no emails were getting to him.

After spending quite a few days investigating.  I found the vCenter Server in the vCSA uses Sendmail in the guest Suse Linux to relay out emails.  vCenter Server uses the root account.

As the vCSA belongs to a local domain, eg. hostname of vCSA is vcs.domain.local, Sendmail sends emails and uses reply address in the format <alias>@domain.local.  This meant the the reply address was root@domain.local, and when this gets sent to external email servers they drop it as it is not a valid email domain.

So the first step was to get Sendmail to replace the 'domain.local' bit with the proper email domain, eg. domain.com (this is known as masquerading), and secondly also to let the root account be able to do this.

Steps to doing this:

1. SSH onto vCSA (or logon to console)

2. Edit Sendmail configuration file 'sendmail.cf' using editor, eg. type command vi /etc/sendmail.cf

3. Find section as below:

# class E: names that should be exposed as from this host, even if we masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
# class N: domains that should not be converted to $M
#CL root

Edit the line beginning

C{M}

append proper email domain and you have

C{M}domain.com

4. In same section

Edit the line beginning

C{E}root

remove word ‘root’ and you have

C{E}

This allows the root account to make use of masquerade domain

5. Restart Sendmail by typing

/etc/init.d/sendmail restart

Also see link http://www.cyberciti.biz/tips/sendmail-masquerading-configuration-howto.html for further understanding of Sendmail.

0 Kudos
2 Replies
hotline22
Contributor
Contributor

Don't work for me
Configuring sendmail is a calamity
I  try http://communities.vmware.com/message/2101666#2101666, i try vmware support during longs hours (level 2) but i always "ctladdr=<root@localhost.localdomain>"
Configuration of sender adress with vSphere Client is useless

We can't change the script in VCenter himself to bypass sendmail and use another mail client ?

0 Kudos
vmuser625
Contributor
Contributor

Hi,

I am currently out the office on business. I will be back in the office on Friday 1st March 2013

I will have no access to my emails and will respond to your email on my return.

If your email is urgent please call Clicks on 020 7278 2300

Kind regards,

0 Kudos