install_postfix_advanced.sh: fix error checcking if 'policy-spf' is already present in master.cf file.

This commit is contained in:
2026-02-13 14:59:58 +01:00
parent 6d516ed25a
commit abb2941e4b

View File

@@ -4164,7 +4164,7 @@ EOF
# - Add support for policyd-spf service # - Add support for policyd-spf service
# - # -
if ! $(grep -iq -E "^policyd-spf\s+" "$postfix_master_cf" 2> /dev/null) ; then if ! grep -iq -E "^policy-spf\s+" "$postfix_master_cf" 2> /dev/null ; then
cat <<EOF >> $postfix_master_cf cat <<EOF >> $postfix_master_cf
policy-spf unix - n n - 0 spawn policy-spf unix - n n - 0 spawn
@@ -4175,7 +4175,7 @@ EOF
# - Add transport definitions for only sending over IPv4/IPv6 # - Add transport definitions for only sending over IPv4/IPv6
# - # -
if ! $(grep -iq -E "^smtp-ipv4-only\s+" "$postfix_master_cf" 2> /dev/null) ; then if ! grep -iq -E "^smtp-ipv4-only\s+" "$postfix_master_cf" 2> /dev/null ; then
cat <<EOF >> $postfix_master_cf cat <<EOF >> $postfix_master_cf
smtp-ipv4-only unix - - n - - smtp smtp-ipv4-only unix - - n - - smtp
@@ -4183,7 +4183,7 @@ smtp-ipv4-only unix - - n - - smtp
EOF EOF
fi fi
if ! $(grep -iq -E "^smtp-ipv6-only\s+" "$postfix_master_cf" 2> /dev/null) ; then if ! grep -iq -E "^smtp-ipv6-only\s+" "$postfix_master_cf" 2> /dev/null ; then
cat <<EOF >> $postfix_master_cf cat <<EOF >> $postfix_master_cf
smtp-ipv6-only unix - - n - - smtp smtp-ipv6-only unix - - n - - smtp