diff options
-rwxr-xr-x | postfix/postfix.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh index 3d40cc8..beed3af 100755 --- a/postfix/postfix.sh +++ b/postfix/postfix.sh @@ -238,19 +238,18 @@ $postconf -c "$tempdir" -e "`getlinesfromfile smtpd_recipient_restrictions rejec $postconf -c "$tempdir" -e "`getlinesfromfile smtpd_data_restrictions`" # FIXME: clear only specific line (not whole file) when dkimproxy unused -if [ -n "$dkimproxy" ]; then - [ -f "$tempdir/sender_access_regex" ] \ - && grep -q -F '/^/ FILTER dkimsign:[127.0.0.1]:10026' "$tempdir/sender_access_regex" \ +if [ -f "$tempdir/sender_access_regex" ]; then + if [ -n "$dkimproxy" ]; then + grep -q -F '/^/ FILTER dkimsign:[127.0.0.1]:10026' "$tempdir/sender_access_regex" \ || echo '/^/ FILTER dkimsign:[127.0.0.1]:10026' >> "$tempdir/sender_access_regex" -else - if [ -f "$tempdir/sender_access_regex" ]; then + else if grep -q -F '/^/ FILTER dkimsign:[127.0.0.1]:10026' "$tempdir/sender_access_regex"; then echo "echo '' > \"$confdir/sender_access_regex\"" >> "$tempdir/COMMANDS" rm "$tempdir/sender_access_regex" fi fi + postmapfiles="$postmapfiles sender_access_regex" fi -postmapfiles="$postmapfiles sender_access_regex" # Support exceptions to default response # (Day Old Bread (dob) lists need to reject only temporarily) |