VMware Cloud Community
clamaz
Contributor
Contributor

vCenter 6.7 Email Alerts smtp uses localhost 127.0.0.1 instead of specified server

Hallo, I'm trying to setup email alerts from vcenter 6.7.
I set up right mail server  (internal lan hmailserver with ip 192.168.8.103) no auth required (limited to vcenter ip)
If I use win tool like SMTPDiagTool, I can see that hmailserver works and it reaches to deliver test email.

but... vcenter doesn't send email alert.

I tried to simulate smtp connection with putty:

echo "subject: sendmail test" | sendmail -v mymail@mydomain

It seems it tries to connecto to itself 127.0.0.1 instead of connetting to my specified server (hmailserver 192.168.8.103)

mymail@mydomain... Connecting to [127.0.0.1] via relay...
220 192.168.8.18 ESMTP Sendmail 8.15.2/8.15.2; Mon, 1 Feb 2021 14:47:00 +0100
>>> EHLO 192.168.8.18
250-192.168.8.18 Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH GSSAPI CRAM-MD5
250-STARTTLS
250-DELIVERBY
250 HELP
>>> STARTTLS
220 2.0.0 Ready to start TLS
>>> EHLO 192.168.8.18
250-192.168.8.18 Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH GSSAPI CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<root@192.168.8.18> SIZE=23 AUTH=root@192.168.8.18
250 2.1.0 <root@192.168.8.18>... Sender ok
>>> RCPT To:<mymail@mydomain>
>>> DATA
250 2.1.5 <mymail@mydomain>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 111Dl0mX027619 Message accepted for delivery
repoer@mconsult.it... Sent (111Dl0mX027619 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 192.168.8.18 closing connection

 

 

I have also followed article: https://kb.vmware.com/s/article/49725 and edited /etc/mail/submit.cf

# "Smart" relay host (may be null)
DS 192.168.8.103

no results. Vcenter tries to send via itself and doesn't care of specified mail server

Thank you for suggestions

 

0 Kudos
0 Replies