Smtp_address_preference - Does anyone know where this is

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.5
Usermin version 2.102
Virtualmin version 7.20.2 Pro
Theme version 21.20.7
Apache version 2.4.52
Package updates 10 package updates are available

https://www.postfix.org/postconf.5.html#smtp_address_preference

I am trying to find this option in the webmin GUI, it might not exist but does anyone know where it is?

I need to set it to IPv4 rather than the default option of IPv6 as my server does not have IPv6.

for those looking it should fix mail errors in postfix such as:

Host or domain name not found. Name service error for name=example.co.uk.mail.protection.outlook.com type=AAAA: Host not found, try again

Thanks

From the website so people don’t have to follow a link.

**smtp_address_preference (default: any)**

The address type ("ipv6", "ipv4" or "any") that the Postfix SMTP client will try first, when a destination has IPv6 and IPv4 addresses with equal MX preference. This feature has no effect unless the [inet_protocols](https://www.postfix.org/postconf.5.html#inet_protocols) setting enables both IPv4 and IPv6.

Postfix SMTP client address preference has evolved. With Postfix 2.8 the default is "ipv6"; earlier implementations are hard-coded to prefer IPv6 over IPv4.

Notes for mail delivery between sites that have both IPv4 and IPv6 connectivity:

* The setting "[smtp_address_preference](https://www.postfix.org/postconf.5.html#smtp_address_preference) = ipv6" is unsafe. All deliveries will suffer delays during an IPv6 outage, even while the destination is still reachable over IPv4. Mail may be stuck in the queue with Postfix versions < 3.3 that do not implement "[smtp_balance_inet_protocols](https://www.postfix.org/postconf.5.html#smtp_balance_inet_protocols)". For similar reasons, the setting "[smtp_address_preference](https://www.postfix.org/postconf.5.html#smtp_address_preference) = ipv4" is also unsafe.
* The setting "[smtp_address_preference](https://www.postfix.org/postconf.5.html#smtp_address_preference) = any" is safe. With this, and "[smtp_balance_inet_protocols](https://www.postfix.org/postconf.5.html#smtp_balance_inet_protocols) = yes" (the default), only half of deliveries will suffer delays if there is an outage that affects IPv6 or IPv4, as long as it does not affect both.
* The setting "[smtp_address_preference](https://www.postfix.org/postconf.5.html#smtp_address_preference) = ipv4" is not a solution for remote servers that flag email received over IPv6 as more 'spammy' (the client IPv6 address has a bad or missing PTR or AAAA record, bad network neighbors, etc.). Instead, configure Postfix to receive mail over both IPv4 and IPv6, and to deliver mail over only IPv4.
> /etc/postfix/[main.cf](https://www.postfix.org/postconf.5.html): [inet_protocols](https://www.postfix.org/postconf.5.html#inet_protocols) = all

> /etc/postfix/[master.cf](https://www.postfix.org/master.5.html) smtp ...other fields... smtp -o [inet_protocols](https://www.postfix.org/postconf.5.html#inet_protocols)=ipv4

These all all settings set in post config and main config so it’s just a matter of changing them respectively there I believe.

Currently inet protocols for mine is set to ipv4

thanks for that, but I knew it was in main.cf I was looking for them in the GUI.

Couldnt find them so did a feature request.

oh sorry
virtualmin on your console
DNS OPTIONS
Allow Sender IPV6 Addresses you can delete the IPV6 address. Only place I know of maybe there is something else.
Hope this helps. It should be what SPF does and is for. Sender Permitted From

also disable it under the server address locally

Which is under manage virtual server > Change IP Address

That should disable IPV6.

Both of these things the previous post and this postmust be done for each Server 1 by 1 in Virtualmin.

Would be cool if there were change external IP for all servers button :slight_smile:

@forlotto there is always this

Addresses and Networking → Change IP Addresses

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.