VMware Cloud Community
unsichtbare
Expert
Expert

VCSA 6 Email alerts not working

I am trying to get email alerts from VCSA 6 working - to no avail. I am hoping someone here knows the solution?

<rant>I have opened a case with VMware support, but in most every aspect, the support representatives seem to know less about the VCSA than I do! Moreover, some of the KB articles they have suggested have blatant and obvious mistakes! Take for example VMware KB: Emails sent from VMware vCenter Server Appliance are rejected , the sendmail.mc file is mis-represented and not valid in the format VMware presents it! It is missing quotes FEATURE(genericstable)dnl which render the remainder of the file invalid!</rant>

Does anyone have an idea what's going on, or have email successfully configured on VCSA?

I have the following situation: VCSA 6 with open-relay SMTP (no authentication, any email address from my IP). On the VCSA 6, all /var/log/mail* log files are empty.

I have tested port connectivity to smtp-relay.gmail.com with :  curl -v telnet://target ip address:desired port number (VMware KB: Using Curl to test port connectivity in VMware vCenter Server Appliance‌)

Here is the redacted transcript of a failed email from: /var/mail/root

From MAILER-DAEMON@vcsa1.mydomain.tld.com  Sat Mar 19 07:42:09 2016

Return-Path: <MAILER-DAEMON@vcsa1.mydomain.tld.com>

Received: from localhost (localhost)

        by vcsa1.mydomain.tld.com (8.14.3/8.14.3/SuSE Linux 0.8) id u2J7cxis029065;

        Sat, 19 Mar 2016 07:42:09 GMT

Date: Sat, 19 Mar 2016 07:42:09 GMT

From: Mail Delivery Subsystem <MAILER-DAEMON@vcsa1.mydomain.tld.com>

Message-Id: <201603190742.u2J7cxis123465@vcsa1.mydomain.tld.com>

To: Postmaster@vcsa1.mydomain.tld.com

MIME-Version: 1.0

Content-Type: multipart/report; report-type=delivery-status;

boundary="u2J7cxis029065.1412343329/vcsa1.mydomain.tld.com"

Subject: Postmaster notify: see transcript for details

Auto-Submitted: auto-generated (postmaster-notification)

This is a MIME-encapsulated message

--u2J7cxis029065.1458373329/vcsa1.mydomain.tld.com

The original message was received at Mon, 14 Mar 2016 07:15:15 GMT

from localhost [127.0.0.1]

   ----- The following addresses had permanent fatal errors -----

<notification@tld.com>

   ----- Transcript of session follows -----

<notification@tld.com>... Deferred: Connection timed out with gmail-smtp-relay.l.google.com.

Message could not be delivered for 5 days

Message will be deleted from queue

--u2J7cxis029065.1234373329/vcsa1.mydomain.tld.com

Content-Type: message/delivery-status

Reporting-MTA: dns; vcsa1.mydomain.tld.com

Arrival-Date: Mon, 14 Mar 2016 07:15:15 GMT

Final-Recipient: RFC822; notification@tld.com

Action: failed

Status: 4.4.7

Remote-MTA: DNS; gmail-smtp-relay.l.google.com

Last-Attempt-Date: Sat, 19 Mar 2016 07:42:09 GMT

--u2J7cxis029065.1234373329/vcsa1.mydomain.tld.com

Content-Type: text/rfc822-headers

Return-Path: <root@vcsa1.mydomain.tld.com>

Received: from vcsa1.mydomain.tld.com (localhost [127.0.0.1])

        by vcsa1.mydomain.tld.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id u2E7FFiq025735

        for <notification@tld.com>; Mon, 14 Mar 2016 07:15:15 GMT

Received: (from root@localhost)

        by vcsa1.mydomain.tld.com (8.14.3/8.14.3/Submit) id u2E7FEJ7025730;

        Mon, 14 Mar 2016 07:15:15 GMT

Date: Mon, 14 Mar 2016 07:15:15 GMT

Message-Id: <201603140715.1234FEJ7025730@vcsa1.mydomain.tld.com>

To: notification@tld.com;

From: admin@tld.com

Subject: [VMware vCenter - Alarm alarm.DatastoreDiskUsageAlarm] alarm.DatastoreDiskUsageAlarm changed status from Yellow to Red

Content-type: text/plain

Target: mydomain009-vol002

--u2J7cxis029065.1234373329/vcsa1.mydomain.tld.com--

+The Invisible Admin+ If you find me useful, follow my blog: http://johnborhek.com/
9 Replies
Halninek
Contributor
Contributor

I had a similar issue with VCSA 6.5, although mine was configured to use one of our internal Linux SMTP open relays, not gmail.

What finally fixed it for me was this:

SSH to the VCSA server

if the default appliance shell is enabled, type "shell" to switch to the BASH shell

Change to the /etc/mail folder:

cd /etc/mail

Make a backup copy of submit.cf:

cp submit.cf submit.cf.orig

Edit submit.cf using vi, WinSCP, or whatever method you prefer and look for 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 mailserver.domain.com

Then restart the sendmail service by running:

systemctl restart sendmail.service

To return your VCSA back to the appliance shell, type "appliancesh"

If you have VCSA configured for HA, you will need to do a failover and then repeat the above steps to make that change on the other VCSA node (this setting doesn't replicate between the two).

Note that I am not a Linux or sendmail expert by any stretch of the imagination so this may or may not be the best way to fix this issue but I'm just passing along what worked for me.

rock425
Enthusiast
Enthusiast

Halninek- Thank you for this!

Question - on this VCSA, was it a migration from windows or was it a "new" install of VCSA?     The reason I ask is that I have multiple VCSAs and it seems to be an issue with the ones that were migrated from windows.

Regards,

Jim.

Reply
0 Kudos
Halninek
Contributor
Contributor

rock425 These were fresh installs of VCSA 6.5.  I deployed 5 of them in different datacenters and all 5 had the same issue and required the same fix.  Although we did eventually migrate the inventory over from Windows vCenter 6.0 instances, the e-mail testing/troubleshooting was done prior to that.  This was using the original VCSA 6.5 release.  Versions 6.5a and 6.5b have been released since then.  I haven't yet built one using the latest ISO to see if the behavior might have changed.

Reply
0 Kudos
clack198706
Contributor
Contributor

Great! Thanks Halninek. It fix my problem with the fresh VCSA6.5a VMware HA environment. I don't know if it is a bug for this VCSA version.I am looking for the VMware KB for this issue.

Reply
0 Kudos
EstherP
Enthusiast
Enthusiast

Thanks a lot   Halninek.

I had the same problem migration from vCenter window version 6.0 to VSCA 6.5U1. In the version 6.0. After the migration, SMTP stop working, and I couldn´t receive any mail anymore.

After implement your workaround, SMTP is working again

Regards

Reply
0 Kudos
San4263
Contributor
Contributor

Thanks Halninek.  We upgraded Vcenter 5.5 Windows version to 6.5.0 appliance and noticed e-mail alerts stopped working.  Applied your fix and problem resolved.  Thanks once again.

Reply
0 Kudos
AbdulAlim
Contributor
Contributor

Hi,

It's known bug in VCSA 6.5, quick resolution what I applied is - redefining the mail server @ vCenter settings and it’s Done Smiley Happy

Steps:

    1. Open the Web Client
    2. Click on vCenter (Left Pane) -> Select the Config tab -> General Settings -> Click Edit -> Mail Server
    3. Modify the Mail server to any Random IP/FQDN and click OK to save.
    4. Again go to edit and put the actual Mail server IP/FQDN and click OK to save.
    5. Enjoy the Alerts ! Smiley Happy

pastedImage_4.png

Thanks, A.Alim Momin Return Excellence.....
Reply
0 Kudos
vmwaresbrf
Contributor
Contributor

Thank you Halninek !

Editing /etc/mail/submit.cf

with DS mailserver.domain.com is working for VSCA 6.0 Update 3g too !

Only one difference is in VSCA 6.0 need to do

/etc/init.d/sendmail restart

instead of

systemctl restart sendmail.service

Reply
0 Kudos
Raudi
Expert
Expert

Can't believe, this is still a problem in VCSA 7.0c!

Today i was wondering, because i see a internal mail from the Lifecycle Manager on my external mail gateway.

Why? I have entered in the general config on the VCSA my internal mail server. Why is this not used?

I made some research and found this in the /var/log/vmware/dnsmasq.log file:

Aug 22 16:51:33 dnsmasq[1272]: query[MX] mydomain.de from 127.0.0.1

Aug 22 16:51:33 dnsmasq[1272]: forwarded mydomain.de to 192.168.99.11

Aug 22 16:51:33 dnsmasq[1272]: query[A] smtp.mydomain.de from 127.0.0.1

Aug 22 16:51:33 dnsmasq[1272]: forwarded smtp.mydomain.de to 192.168.99.11

Aug 22 16:51:33 dnsmasq[1272]: reply smtp.mydomain.de is 1xx.1xx.2xx.81

The VCSA is doing a MX query and isn't using my mail host.

And the solution here is still working with a VCSA 7.0c!

But before editing the file it must be writeable:

chmod 644 sendmail.cf

Reply
0 Kudos