Postfix tries to connect to IPV6 servers and gets "Network unreachable" error

To disable ip6, please try:

# check ipv6
ifconfig -a | grep inet6

# make folder for template
mkdir -p /etc/e-smith/templates-custom/etc/sysctl.conf

# create template-file
nano /etc/e-smith/templates-custom/etc/sysctl.conf/99sysctl

# content of 99sysctl
net.ipv6.conf.all.disable_ipv6 = 1

# expand template
expand-template /etc/sysctl.conf

# To reflect the changes
sysctl -p

# check ipv6 again
ifconfig -a | grep inet6
1 Like