diff --git a/install_postfix_advanced.sh b/install_postfix_advanced.sh index 46ec482..699ca52 100755 --- a/install_postfix_advanced.sh +++ b/install_postfix_advanced.sh @@ -1219,7 +1219,26 @@ else fi echononl " Create file \"transport\"" -echo > /etc/postfix/transport +cat < /etc/postfix/transport +# - Force sending through IPv4 +# - +# - Take care your master.cf file (/etc/postfix/master.cf) contains: +# - +# - smtp-ipv4-only unix - - n - - smtp +# - -o inet_protocols=ipv4 +# - +#example.com smtp-ipv4-only: + +# - Force sending through IPv6 +# - +# - Take care your master.cf file (/etc/postfix/master.cf) contains: +# - +# - smtp-ipv6-only unix - - n - - smtp +# - -o inet_protocols=ipv6 +# - +#example.net smtp-ipv6-only: + +EOF postmap btree:/etc/postfix/transport if [[ $? -eq 0 ]] ; then echo_ok @@ -1425,6 +1444,17 @@ EOF done < "${postfix_master_cf}.$backup_date" + # - Add transport definitions for only sending over IPv4/IPv6 + # - + cat <> $postfix_master_cf + +smtp-ipv4-only unix - - n - - smtp + -o inet_protocols=ipv4 + +smtp-ipv6-only unix - - n - - smtp + -o inet_protocols=ipv6 +EOF + echo_done warn "Please check file \"$postfix_master_cf\" !" else