diff --git a/install_amavis.sh b/install_amavis.sh index 5bca502..5481b98 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -5006,19 +5006,6 @@ EOF EOF fi - if ${listen_on_additional_smtp_port} ; then - cat >> $postfix_master_cf << EOF -${additional_smtp_port} inet n - y - - smtpd - -o smtpd_proxy_filter=127.0.0.1:10024 - -o content_filter= -EOF - if [[ "$SASL_AUTH_ENABLED" = "no" ]] ; then - cat >> $postfix_master_cf << EOF - -o smtpd_sasl_auth_enable=no -EOF - fi - fi - if ! $submission_present && ! $smtps_present && ! $localhost_10025_present ; then cat >> $postfix_master_cf << EOF localhost:10025 inet n - y - - smtpd @@ -5046,8 +5033,26 @@ EOF continue fi + if ${listen_on_additional_smtp_port} \ + && echo "$_line" | grep -i -E "^\s*${additional_smtp_port}\s+inet" > /dev/null 2>&1 ; then + _found=true + cat >> $postfix_master_cf << EOF +${additional_smtp_port} inet n - y - - smtpd + -o smtpd_proxy_filter=127.0.0.1:10024 + -o content_filter= +EOF + if [[ "$SASL_AUTH_ENABLED" = "no" ]] ; then + cat >> $postfix_master_cf << EOF + -o smtpd_sasl_auth_enable=no +EOF + fi - if $submission_present && echo "$_line" | grep -i -E "^^submission\s+" > /dev/null 2>&1 ; then + continue + + fi + + + if $submission_present && echo "$_line" | grep -i -E "^submission\s+" > /dev/null 2>&1 ; then _found=true cat >> $postfix_master_cf << EOF submission inet n - y - 20 smtpd