From b1875c7eb53819da0260c2697b05c7122b557af6 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 14 Oct 2014 21:19:29 +0200 Subject: Fix enable/reset submission and pickup services when dkimproxy disabled. --- postfix/postfix.sh | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'postfix') diff --git a/postfix/postfix.sh b/postfix/postfix.sh index 5ac8f3e..2a5754a 100755 --- a/postfix/postfix.sh +++ b/postfix/postfix.sh @@ -399,26 +399,24 @@ EOF EOF if [ -n "$dkimproxy" ]; then $postconf -c "$tempdir" -e 'content_filter = smtp-amavis:[127.0.0.1]:10028' -# FIXME: needs multiline replacementroutine (using perl?) -# addoroverwritewithindents $tempdir/master.cf '^submission\h' << EOF -#submission inet n - n - - smtpd -# -o smtpd_etrn_restrictions=reject -# -o smtpd_enforce_tls=yes -# -o smtpd_sasl_auth_enable=yes -# -o content_filter=dkimsign:[127.0.0.1]:10028 -# -o receive_override_options=no_address_mappings -# -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject -#EOF -# addoroverwritewithindents $tempdir/master.cf '^pickup\h' << EOF -#pickup fifo n - - 60 1 pickup -# -o content_filter=dkimsign:127.0.0.1:10028 -#EOF - addoroverwritewithindents $tempdir/master.cf '^dkimsign\h' << EOF + addoroverwritewithindents $tempdir/master.cf '^submission\h' << EOF +submission inet n - n - - smtpd + -o syslog_name=postfix/submission + -o smtpd_tls_security_level=encrypt + -o smtpd_sasl_auth_enable=yes + -o smtpd_client_restrictions=permit_sasl_authenticated,reject + -o content_filter=dkimsign:[127.0.0.1]:10028 +EOF + addoroverwritewithindents $tempdir/master.cf '^pickup\h' << EOF +pickup fifo n - - 60 1 pickup + -o content_filter=dkimsign:127.0.0.1:10028 +EOF + addoroverwritewithindents $tempdir/master.cf '^dkimsign\h' << EOF dkimsign unix - - n - $dkimproxy_maxproc_out smtp -o smtp_send_xforward_command=yes -o smtp_discard_ehlo_keywords=8bitmime,starttls EOF - addoroverwritewithindents $tempdir/master.cf '^127\.0\.0\.1:10029\h' << EOF + addoroverwritewithindents $tempdir/master.cf '^127\.0\.0\.1:10029\h' << EOF 127.0.0.1:10029 inet n - n - - smtpd -o content_filter= -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks @@ -431,6 +429,17 @@ EOF EOF else $postconf -c "$tempdir" -e 'content_filter = smtp-amavis:[127.0.0.1]:10024' + addoroverwritewithindents $tempdir/master.cf '^submission\h' << EOF +submission inet n - n - - smtpd + -o syslog_name=postfix/submission + -o smtpd_tls_security_level=encrypt + -o smtpd_sasl_auth_enable=yes + -o smtpd_client_restrictions=permit_sasl_authenticated,reject +EOF + addoroverwritewithindents $tempdir/master.cf '^pickup\h' << EOF +pickup fifo n - - 60 1 pickup + -o content_filter=dkimsign:127.0.0.1:10028 +EOF fi fi -- cgit v1.2.3