Writing DKIM signature just befor sending out, after passing through AmaVIS.
This commit is contained in:
parent
9752d17985
commit
c2eae912ad
@ -437,12 +437,26 @@ if grep -q -E "milter_default_action\s*=\s*accept" /etc/postfix/main.cf ; then
|
||||
else
|
||||
cat <<EOF >> /etc/postfix/main.cf 2> $log_file
|
||||
|
||||
# Milter configuration
|
||||
# ======= Milter configuration =======
|
||||
|
||||
# OpenDKIM
|
||||
|
||||
milter_default_action = accept
|
||||
|
||||
# Postfix ≥ 2.6 milter_protocol = 6, Postfix ≤ 2.5 milter_protocol = 2
|
||||
milter_protocol = 6
|
||||
smtpd_milters = local:/opendkim/opendkim.sock
|
||||
|
||||
# Note:
|
||||
# We will sign AFTER sending through AmaVIS, just befor sending out. So
|
||||
# set 'smtpd_milters =' to an emty string here and add to localhost:10025
|
||||
# section in master.cf: 'smtpd_milters=local:/opendkim/opendkim.sock'
|
||||
#
|
||||
# If you want sign mails before sending through AmaVIS, set
|
||||
# 'smtpd_milters = local:/opendkim/opendkim.sock' here and add to
|
||||
# localhost:10025 section in master.cf: 'smtpd_milters='
|
||||
#
|
||||
#smtpd_milters = local:/opendkim/opendkim.sock
|
||||
smtpd_milters =
|
||||
non_smtpd_milters = local:/opendkim/opendkim.sock
|
||||
EOF
|
||||
postfix_needs_restart=true
|
||||
@ -478,7 +492,7 @@ else
|
||||
echo_failed
|
||||
error "$(cat $log_file)"
|
||||
fi
|
||||
echononl " Adjust /etc/postfix/master.cf to prevent setting DKIM Header twice.."
|
||||
echononl " Adjust /etc/postfix/master.cf. Set DKIM after sending throuh AmaVIS.."
|
||||
_found=false
|
||||
_changed=false
|
||||
tmp_master_file="/tmp/postfix_master.cf"
|
||||
@ -486,7 +500,7 @@ tmp_master_file="/tmp/postfix_master.cf"
|
||||
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=" >> "$tmp_master_file"
|
||||
echo " -o smtpd_milters=local:/opendkim/opendkim.sock" >> "$tmp_master_file"
|
||||
_changed=true
|
||||
_found=false
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user