How to disable IPv6 in Postfix MTA

 

You probably just need to disable IPv6 stack in Postfix on purpose or you are getting the following messages in /var/log/mail.log file

Jul  6 00:29:18 tx120 postfix/master[3447]: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol

Jul  6 00:29:18 tx120 postfix/postsuper[12370]: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol

Jul  6 00:29:18 tx120 postfix/qmgr[12374]: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol

Jul  6 00:29:18 tx120 postfix/pickup[12373]: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol

 

Actually, to disable IPv6 stack in Postfix, you just need to perform few steps

root@server:~# mcedit  /etc/postfix/main.cf

change the following line in that file

inet_protocols = all

to

inet_protocols = ipv4

 

Restart Postfix

root@server:~# systemctl restart postfix

and check if it works well with new configuration file

root@server:~# systemctl status postfix
● postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/lib/systemd/system/postfix.service; enabled; vendor preset: enabled)
   Active: active (exited) since Fri 2018-07-06 01:04:46 CEST; 12s ago
  Process: 5447 ExecReload=/bin/true (code=exited, status=0/SUCCESS)
  Process: 12768 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 12768 (code=exited, status=0/SUCCESS)

Jul 06 01:04:46 tx120 systemd[1]: Starting Postfix Mail Transport Agent...
Jul 06 01:04:46 tx120 systemd[1]: Started Postfix Mail Transport Agent.

 

PS

Postfix is well known replacement for sendmail

 

Disclaimer

Image of the article is taken from the Postfix project website http://www.postfix.org

 

 

 

Leave a comment