From b09baa144ced0a6dfc339436ac0f4d6349776875 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 7 Jan 2026 00:12:17 +0100 Subject: [PATCH] install_opendmarc.sh: forgot changing also master.cf. --- install_opendmarc.sh | 81 -------------------------------------------- 1 file changed, 81 deletions(-) diff --git a/install_opendmarc.sh b/install_opendmarc.sh index 43a9142..d2d91bc 100755 --- a/install_opendmarc.sh +++ b/install_opendmarc.sh @@ -876,87 +876,6 @@ EOF fi -echo "" - - -# - Prevent Postfix from setting the DMARC Header twice (one befor -# - and one after processing amavis -# - -# - To disable milter processing after amavis, add to your master.cf in -# - the after-amavis section: -# - 127.0.0.1:10025 inet n - - - - smtpd -# - [...] -# - -o smtpd_milters= -# - -# - If you want to run the milter after amavis, set in main.cf -# - smtpd_milters= -# - to an empty string and add the smtpd_milters configuration to master.cf -# - (after-section amavis) instead: -# - -o smtpd_milters=local:/opendmarc/opendmarc.sock -# - -echononl " Backup file '/etc/postfix/master.cf'.." -cp -a /etc/postfix/master.cf /etc/postfix/master.cf.${backup_date} 2> $log_file -if [[ $? -eq 0 ]] ; then - echo_ok -else - echo_failed - error "$(cat $log_file)" -fi - -echononl " Adjust /etc/postfix/master.cf. Set DMARC after sending throuh AmaVIS.." -_found=false -_changed=false -tmp_master_file="/tmp/postfix_master.cf" -> $tmp_master_file -while IFS='' read -r _line || [[ -n $_line ]] ; do - - if $_found && ! echo "$_line" | grep -i -q -E "^\s*-o" 2> /dev/null ; then - echo " -o smtpd_milters=local:/opendmarc/opendmarc.sock" >> "$tmp_master_file" - _changed=true - _found=false - fi - - if $_found && echo "$_line" | grep -i -q -E "^\s*-o\s+smtpd_milters=\s*" ; then - _found=false - if ! echo "$_line" | grep -i -q -E "^\s*-o\s+smtpd_milters=\s*local:/opendmarc/opendmarc.sock\s*$" ; then - echo " -o smtpd_milters=local:/opendmarc/opendmarc.sock" >> "$tmp_master_file" - _changed=true - continue - fi - - fi - - if echo "$_line" | grep -i -q -E "^\s*(localhost|127.0.0.1):10025\s+inet\s+" 2> /dev/null ; then - _found=true - fi - - echo "$_line" >> "$tmp_master_file" - -done < "/etc/postfix/master.cf" - -if $_changed ; then - cp $tmp_master_file /etc/postfix/master.cf 2> $log_file - postfix_needs_restart=true - if [[ $? -eq 0 ]] ; then - echo_ok - else - echo_failed - error "$(cat $log_file)" - fi -else - echo_skipped - info "Postfix (master.cf) was not changed - seems already be configured right." - echononl " Delete previosly saved file '/etc/postfix/master.cf'.." - rm /etc/postfix/master.cf.$backup_date 2> $log_file - if [[ $? -eq 0 ]] ; then - echo_ok - else - echo_failed - error "$(cat $log_file)" - fi -fi -rm -f $tmp_master_file - echo "" echononl " Enable OpenDMARC Service"