How to send emails over IPv4 with Postfix

“inet_protocols” directive is used to configure what Protocols Postfix should use to accept or make network connections. It also controls what DNS lookups Postfix will use.

On Ubuntu 16.10, we found Postfix(3.1.0) was configured to use both IPv6 and IPv4. See below :

inet_protocols = all        (enable IPv4, and IPv6 if supported)

IPv6 is always tried first and when it fails, it would try to deliver emails over IPv4. You can reconfigure it to listen on ipv4 IPs only :

vim /etc/postfix/

Replace “all” with “ipv4

inet_protocols = ipv4

Restart postfix

systemctl restart postfix.service

Leave a Reply

Your email address will not be published. Required fields are marked *