On 22/02/17 07:19, Dirk Stöcker wrote: > I did setup separate entries for localhost and external IP. Now with > IPv4 and IPv6 that results in 4 lines of SMTP in master.cf. > > Is this the way to go or can it be reduced to 2 lines?
Yes, at least for a linux box and possibly other unix hosts. You will want to make sure that /etc/host.conf has the setting, "multi on", then you can list multiple IPv4 and IPv6 addresses for the same name in /etc/hosts and use those names in your master.cf file instead of the IP addresses, so for example: /etc/host.conf: multi on /etc/hosts: 127.0.0.1 localhost ::1 localhost 172.31.1.100 external 2a01:4f8:c17:15d5::1:40 external master.cf: localhost:smtp inet ... ... external:smtp inet ... ... > main.cf: > inet_interfaces = localhost, mail.stoecker.eu Just remove the above, so it defaults to, "all". > inet_protocols = ipv4, ipv6 Same, just remove this and let it default to, "all". > In case you wonder - The local IPv4 is not equal to the external visible > one for mail.stoecker.eu. In this case postfix will see the connection on and need to bind to the local address. Peter