diff --git a/install_postfix_base.sh b/install_postfix_base.sh index 38617d4..1d305bd 100755 --- a/install_postfix_base.sh +++ b/install_postfix_base.sh @@ -674,12 +674,25 @@ mydestination = ## - mynetworks = 127.0.0.0/8 - ${IPV4}/32 +EOF -smtp_bind_address = $IPV4 -smtp_bind_address6 = $IPV6 + if [[ ${IPV4} =~ ^127 ]] ; then + + cat <> /etc/postfix/main.cf + +smtp_bind_address = +smtp_bind_address6 = EOF + else + cat <> /etc/postfix/main.cf + ${IPV4}/32 + +smtp_bind_address = $IPV4 +#smtp_bind_address6 = + +EOF + fi fi cat <> /etc/postfix/main.cf