Force to use ipv6 when sending emails

sheshman

Member
Jan 16, 2023
55
4
13
Hi,

Using mail gateway 8.1.2 both ipv4 and ipv6 defined in network, AAA record points to my ipv6 address and i can reach to interface through ipv6, when sending emails most of the time it uses ipv6 address but in some mails it sends through ipv4, is there any way that i can for pmg to don't use ipv4 and use ipv6 address when sending mails.

I've tried to remove ipv4 address from configuration->interfaces->delete ipv4 and it's gateway, so when i do that i can reach to the admin gui(both fqdn & ipv6 address) without any problem but when i send emails it says that "Cannot connect to host, Remote-Host: alt4.gmail-smtp-in.l.google.com" strange thing is server has proper internet connection, i can telnet through port 25 to alt4.gmail-smtp-in.l.google.com through cli but proxmox can not send emails.
 
Why would you want to disable ipv4 completely on your mailserver?

In any case - https://www.postfix.org/IPV6_README.html is the upstream documentation - that might contain relevant pointers

Else - share the actual logs of the issue - maybe they show some more relevant information.

I hope this helps!