Discussion:
Postfix can't open AF_INET6 socket when IPV6 is disabled
(too old to reply)
w***@turnitin.com
2017-02-23 18:06:43 UTC
Permalink
Our hosts have ipv6 enabled but do not have any ipv6 routing out of their subnet. Because of some problems with postfix looking up AAAA records, we disabled ipv6 in our postfix with "inet_protocols = ipv4" (replacing "inet_protocols = all") while leaving IPV6 enabled on the host. Immediately smtpd began failing with the error "postfix/smtpd[12616]: fatal: cannot handle socket type AF_INET6 with "inet_protocols = ipv4"

Why would postfix try to create AF_INET6 sockets with ipv6 disabled?

We're running postfix 2.6.6 which is the most recent version that ships with CentOS 6.8. Is this a bug that has been fixed in a later release?

Thanks -w
w***@turnitin.com
2017-02-23 22:15:37 UTC
Permalink
Could this be because the default /etc/host file in CentOS 6 when IPV6 is enabled contains two entries for localhost?

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Burkhard Ott
2017-02-24 02:16:15 UTC
Permalink
Post by w***@turnitin.com
Could this be because the default /etc/host file in CentOS 6 when IPV6
is enabled contains two entries for localhost?
127.0.0.1 localhost localhost.localdomain localhost4
localhost4.localdomain4 ::1 localhost localhost.localdomain
localhost6 localhost6.localdomain6
inet_interfaces = <IP's>
or
inet_protocols = ipv4
in your main.cf

cheers
w***@turnitin.com
2017-02-23 22:15:37 UTC
Permalink
Could this be because the default /etc/host file in CentOS 6 when IPV6 is enabled contains two entries for localhost?

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Isaac
2017-09-17 06:38:09 UTC
Permalink
as Burkhard pointed out, make sure the below file has the text uncommented,

file -> /etc/postfix/main.cf
text -> inet_protocols = ipv4


Then just restart postfix,
# systemctl restart postfix

should work!

Have a great Day!

Loading...