VCSA 6.5 not sending mail alerts via SMTP
search cancel

VCSA 6.5 not sending mail alerts via SMTP

book

Article ID: 306386

calendar_today

Updated On:

Products

VMware VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • VCSA 6.5 not sending mail alerts via SMTP
  • Running service sendmail status returns the sendmail service as inactive.

  • Manually starting this service appears to be successful, but soon later it is no longer running.

  • Sending a test mail to using sendmail (sample command below) fails/times out:

    echo "Subject: sendmail test" | sendmail -v [email protected]

  • In the /var/log/messages file you see errors similar to the below:

    vcenter##### sendmail[16887]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon Daemon1: cannot bind: Address already in use
    vcenter##### sendmail[16887]: daemon Daemon1: problem creating SMTP socket
    vcenter##### sendmail[16887]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon Daemon1: cannot bind: Address already in use
    vcenter##### sendmail[16887]: daemon Daemon1: problem creating SMTP socket
    vcenter##### cli: twisted "127.0.0.1" - - [DD/MM/YYYY:HH:MM:SS+0000] "POST /api HTTP/1.1" 200 2783 "-" "vAPI http client"
    vcenter##### sendmail[16887]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon Daemon1: cannot bind: Address already in use
    vcenter##### sendmail[16887]: daemon Daemon1: problem creating SMTP socket

 

Environment

VMware vSphere ESXi 6.0
VMware vCenter Converter Standalone 6.x
VMware vCenter Server Appliance 6.0.x
VMware Update Manager 6.0
VMware vCenter Server 6.0.x

Cause

The issue is caused by the DeamonPortOptions values being spread over two lines in the sendmail.cf file.

Resolution

This issue is been fixed in vCenter Server 6.5 Update 2d 

Workaround :-

To resolve the issue follow the below steps:

  1. cd to /etc/mail/
  2. Backup the sendmail.cf file
  3. Edit the sendmail.cf file using vi or nano
  4. locate the line beginning with: # SMTP daemon options
  5. Edit the line to concatenate the DaemonPortOptions onto one line

Before Change:


# SMTP daemon options
O DaemonPortOptions=Name=MTA
O DaemonPortOptions=Addr=127.0.0.1,Port=smtp

 

After Change:


# SMTP daemon options
O DaemonPortOptions=Name=MTA,Addr=127.0.0.1,Port=smtp
#O DaemonPortOptions=Addr=127.0.0.1,Port=smtp

 

6. Start the sendmail service and the issue should now be resolved.