sendmail fails with “daemon MTA-v6: problem creating SMTP socket”

sendmail status shows:

sendmail dead but subsys locked

When restarting sendmail, /var/log/maillog shows the following:

May 01 10:08:07 ayl sendmail[35176]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA-v6: cannot bind: Cannot assign requested address
May 01 10:08:07 ayl sendmail[35176]: daemon MTA-v6: problem creating SMTP socket

Issue found as IPV6 smtp daemon port was enabled in sendmail where as IPV6 not enabled on network interface.

Solution:

Disable IPV6 smtp port in sendmail configuration

Edit the file “/etc/mail/sendmail.mc”.
Search for similar line “DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6′)dnl”
Comment it adding dnl at the beginning

dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl

Run the macro

m4  /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

And restart sendmail

/etc/init.d/sendmail restart