Two systemd test servers running postfix 3.5.8 with IPv4 and IPv6. Servers run own bind and resolv.conf points to 127.0.0.1 Not sure if im reading the manual wrong but this is what I have observed.
If using [ ] around IPv6 smtp_bind_address6 = [<redacted_ipv6>] And using submission over port 587, when postfix tries to send the email onward to the recipient at another server i get these errors, most of the time. Strangely if i keep flushing the mailq -q then once in a while it will go through and deliver the email over the IPv4 address. I have repeated this test sending multiple emails and it always errors on the first try, then after many flushes will sometimes work. postfix/smtp[373401]: fatal: smtp_connect_addr: bad smtp_bind_address6 parameter: [<redacted_ipv6>]: Name or service not known postfix/qmgr[373314]: warning: private/smtp socket: malformed response postfix/qmgr[373314]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description postfix/master[373312]: warning: process /usr/libexec/postfix/smtp pid 373401 exit status 1 postfix/master[373312]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling If I remove the [ ] around the IPv6 the error goes away. The manual says [ ] is supported. Is my version is too old? Im okay with not using [ ]. --- NEXT ISSUE --- If i use these settings inet_interfaces = all inet_protocols = all smtp_bind_address = <redacted_ipv4> smtp_bind_address6 = <redacted_ipv6> smtp_address_preference = any (* Not actually included in main.cf, relying on 'any' as the default) Then most of the time email being sent out to another server will be delivered over IPv6. It rarely uses IPv4. However, if I supply the IP's instead of using "all" for interfaces then it mostly sends out over IPv4 and used IPv6 only once out of 10 emails sent. I tried both ways, putting the IPv4 first, then tried putting IPv6 first. And no not both config lines at the same time. inet_interfaces = <redacted_ipv4>, <redacted_ipv6> inet_interfaces = <redacted_ipv6>, <redacted_ipv4> Any idea on what is happening? More tweaks that can be made? I would prefer to specify the public IP's so submission isn't listening on localhost and would prefer IPv6 to be always used (if the destination also supports it).