diff options
author | Jonas Smedegaard <dr@jones.dk> | 2014-09-23 19:51:43 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2014-09-23 19:51:43 +0200 |
commit | 42504c14a8038bad59c8e89f92619e7154c922e1 (patch) | |
tree | 077ff86bc0ddc995f381cb84ae42ee14b2d1a696 /postfix | |
parent | 7136c4baf6b1cc06efe533cb7df205feedff247d (diff) |
Fix suppress dkimproxy restriction when not used (and tidy loop while at it).
Diffstat (limited to 'postfix')
-rwxr-xr-x | postfix/postfix.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh index edf5d08..2860cdc 100755 --- a/postfix/postfix.sh +++ b/postfix/postfix.sh @@ -191,17 +191,20 @@ getlinesfromfile() { replacements= for subparam in $@; do case "$subparam" in + *=) + oldparam="`echo $subparam | awk -F= '{print $1}'`" + replacements="$replacements;s/$oldparam[^,]*,\?//" + continue + ;; *=*=*) oldparam="`echo $subparam | awk -F= '{print $1}'`" newparam="`echo $subparam | awk -F= '{print $2}'`" newparamfile="`echo $subparam | awk -F= '{print $3}'`" - shift ;; *) oldparam=$subparam newparam=$subparam newparamfile=$subparam - shift ;; esac newparamvalues="`getlinesfromfile $newparamfile | sed -e 's/.*=[ ]*//' -e 's/,/ /g'`" @@ -245,7 +248,7 @@ $postconf -c "$tempdir" -e "`getlinesfromfile permit_mx_backup_networks`" $postconf -c "$tempdir" -e "maps_rbl_domains =" $postconf -c "$tempdir" -e "`getlinesfromfile smtpd_client_restrictions reject_rhsbl_client`" $postconf -c "$tempdir" -e "`getlinesfromfile smtpd_helo_restrictions`" -$postconf -c "$tempdir" -e "`getlinesfromfile smtpd_sender_restrictions reject_rhsbl_sender`" +$postconf -c "$tempdir" -e "`getlinesfromfile smtpd_sender_restrictions reject_rhsbl_sender ${dkimproxy:-check_sender_access=}`" $postconf -c "$tempdir" -e "`getlinesfromfile smtpd_recipient_restrictions reject_maps_rbl=reject_rbl_client=maps_rbl_domains`" $postconf -c "$tempdir" -e "`getlinesfromfile smtpd_data_restrictions`" |