VMware Cloud Community
michele_distasi
Enthusiast
Enthusiast
Jump to solution

Vcenter 6.5 U1 doesn't email . Mail sever receive null field RECEIVED: MAIL From:<> SIZE=2961"

Hello guys. I have a customer with the office365 mail server that only accepts authenticated mail with STARTTSL. As I know, vsphere does not use STARTTLS. The customer does not want to make changes to the Office365 mail server. So I installed hmailserver, a mail server within the infrastructure that acts as a relay. There are many infrastructure equipment that send alerts via hmailserver without problems. I VCA (6.5 U1 Build 5973321) instead fail. The message is the usual Alarm 'Test Alarm' on Test Mail can not send email to mxxxx@gmail.com. I opened the Hmailserver logs and I see that it has received emails from the Vcenter but there is something wrong with data  sent by Vcenter, the "RECEIVED: MAIL From:<> SIZE=2961" is empty while it should contain the SENDER (riscpacs @ xxx .xx.it), the RCPT should contain the person who must receive the email (mxxxxx@gmail.com) and instead contains rispacs@xxx.xx.it. "RECEIVED: RCPT To:<rispacs.alert@xxx.xx.it>". Office365 sends an error: RECEIVED: 550 5.7.60 SMTP; Client does not have permissions to send as this sender .Strange problem. I attach a document that contains the test logs of two virtuacenter with errors and logs of two machines that send the mail without problems. Thanks in advance for the help

0 Kudos
1 Solution

Accepted Solutions
michele_distasi
Enthusiast
Enthusiast
Jump to solution

I am surprised that, over many years working on vmware, this is the first time I haven't received answers to my post or that I cannot find solutions in the community. However this is the solution to the problem: https://benedikts.blog/2017/12/13/my-vcsa-6-5-does-not-send-emails/

Sometimes a VCSA is not able to send emails, as it is not able to validate the sender domain. For example.

The vCenter is configured to send an email as server+bfr-vcsa-01@int.bens.systems over the mail server 10.7.42.23.

Screenshot from 2017-12-13 13-40-56

As sendmail cannot get the correct MX Record for the domain int.bens.systems the from-field in the email header will stay empty and the /var/log/messages.log will show something like this.

2017-10-23T10:48:59.567720+02:00 vcenter sendmail[55361]: v9N8mxa7055361: v9N8mxa8055361: DSN: Data format error

2017-10-23T10:48:59.592809+02:00 vcenter sendmail[55362]: v9N8mxkl055362: from=<server+bfr-vcsa-01@bens.systems>, size=429, class="0", nrcpts=0, proto=ESMTP, daemon=MTA, relay=photon-machine [127.0.0.1]

2017-10-23T10:48:59.607661+02:00 vcenter sendmail[55362]: v9N8mxkm055362: from=<>, size=2421, class="0", nrcpts=1, msgid=<201711020900.v9N8mxa8055361@vcenter.example.com>, proto=ESMTP, daemon=MTA, relay=photon-machine [127.0.0.1]

2017-10-23T10:48:59.644144+02:00 vcenter sendmail[55361]: v9N8mxa8055361: to=admin@bens.systems, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31453, relay=[127.0.0.1], dsn=2.0.0, stat=Sent (v9N8mxkm055362 Message accepted for delivery)

2017-10-23T10:49:03.964029+02:00 vcenter sendmail[55364]: v9N8mxkm055362: to=<admin@bens.systems>, delay=00:00:04, xdelay=00:00:04, mailer=relay, pri=122421, relay=mail-int.bens.systems [10.7.42.23], dsn=2.0.0, stat=Sent (Ok: queued as A5EA0B40C3)

To solve the issue we can help the sendmail daemon to find the right mail server for domain int.bens.systems.

For this we need to edit the /etc/hosts file and add something like this.

# email workaround;

# vCenter Email Address: server+bfr-vcsa-01@int.bens.systems

# Smarthost IP: 10.7.42.23

10.7.42.23      int.bens.systems

After this, we have to remove the Mail Settings in the vSphere Web Client, and after saving the changes, add them again.

Now the vCenter should be able to send emails again.

View solution in original post

0 Kudos
1 Reply
michele_distasi
Enthusiast
Enthusiast
Jump to solution

I am surprised that, over many years working on vmware, this is the first time I haven't received answers to my post or that I cannot find solutions in the community. However this is the solution to the problem: https://benedikts.blog/2017/12/13/my-vcsa-6-5-does-not-send-emails/

Sometimes a VCSA is not able to send emails, as it is not able to validate the sender domain. For example.

The vCenter is configured to send an email as server+bfr-vcsa-01@int.bens.systems over the mail server 10.7.42.23.

Screenshot from 2017-12-13 13-40-56

As sendmail cannot get the correct MX Record for the domain int.bens.systems the from-field in the email header will stay empty and the /var/log/messages.log will show something like this.

2017-10-23T10:48:59.567720+02:00 vcenter sendmail[55361]: v9N8mxa7055361: v9N8mxa8055361: DSN: Data format error

2017-10-23T10:48:59.592809+02:00 vcenter sendmail[55362]: v9N8mxkl055362: from=<server+bfr-vcsa-01@bens.systems>, size=429, class="0", nrcpts=0, proto=ESMTP, daemon=MTA, relay=photon-machine [127.0.0.1]

2017-10-23T10:48:59.607661+02:00 vcenter sendmail[55362]: v9N8mxkm055362: from=<>, size=2421, class="0", nrcpts=1, msgid=<201711020900.v9N8mxa8055361@vcenter.example.com>, proto=ESMTP, daemon=MTA, relay=photon-machine [127.0.0.1]

2017-10-23T10:48:59.644144+02:00 vcenter sendmail[55361]: v9N8mxa8055361: to=admin@bens.systems, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31453, relay=[127.0.0.1], dsn=2.0.0, stat=Sent (v9N8mxkm055362 Message accepted for delivery)

2017-10-23T10:49:03.964029+02:00 vcenter sendmail[55364]: v9N8mxkm055362: to=<admin@bens.systems>, delay=00:00:04, xdelay=00:00:04, mailer=relay, pri=122421, relay=mail-int.bens.systems [10.7.42.23], dsn=2.0.0, stat=Sent (Ok: queued as A5EA0B40C3)

To solve the issue we can help the sendmail daemon to find the right mail server for domain int.bens.systems.

For this we need to edit the /etc/hosts file and add something like this.

# email workaround;

# vCenter Email Address: server+bfr-vcsa-01@int.bens.systems

# Smarthost IP: 10.7.42.23

10.7.42.23      int.bens.systems

After this, we have to remove the Mail Settings in the vSphere Web Client, and after saving the changes, add them again.

Now the vCenter should be able to send emails again.

0 Kudos