On Mon, Jan 03, 2022 at 10:39:49PM -0500, post...@ptld.com wrote: > smtp_bind_address6 = [<redacted_ipv6>] > > 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 [ ].
Indeed the implementation does not match the documentation, presently only the bare address is supported here. There is no ambiguity wrt. table syntax, ":port" suffixes etc., this field is just an address. > 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) The expected behaviour is that ipv4 and ipv6 addresses will be tried in roughly their relative frequency among the best preference MX hosts of the destination, unless there are enough of them that the weights are skewed by the address limits which try to ensure that at least some of each family are represented. > Then most of the time email being sent out to another server will be > delivered over IPv6. This is not what sufficiently recent Postfix versions are expected to do. > 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. Many destination domains don't have IPv6 MX hosts. > I tried both ways, putting the IPv4 first, then tried putting IPv6 > first. And no not both config lines at the same time. The order does not matter, the only thing that matters is whether either or both are listed. -- Viktor.