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
|
else
|
||||||
cat <<EOF >> /etc/postfix/main.cf 2> $log_file
|
cat <<EOF >> /etc/postfix/main.cf 2> $log_file
|
||||||
|
|
||||||
# Milter configuration
|
# ======= Milter configuration =======
|
||||||
|
|
||||||
# OpenDKIM
|
# OpenDKIM
|
||||||
|
|
||||||
milter_default_action = accept
|
milter_default_action = accept
|
||||||
|
|
||||||
# Postfix ≥ 2.6 milter_protocol = 6, Postfix ≤ 2.5 milter_protocol = 2
|
# Postfix ≥ 2.6 milter_protocol = 6, Postfix ≤ 2.5 milter_protocol = 2
|
||||||
milter_protocol = 6
|
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
|
non_smtpd_milters = local:/opendkim/opendkim.sock
|
||||||
EOF
|
EOF
|
||||||
postfix_needs_restart=true
|
postfix_needs_restart=true
|
||||||
@ -478,7 +492,7 @@ else
|
|||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat $log_file)"
|
error "$(cat $log_file)"
|
||||||
fi
|
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
|
_found=false
|
||||||
_changed=false
|
_changed=false
|
||||||
tmp_master_file="/tmp/postfix_master.cf"
|
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
|
while IFS='' read -r _line || [[ -n $_line ]] ; do
|
||||||
|
|
||||||
if $_found && ! echo "$_line" | grep -i -q -E "^\s*-o" 2> /dev/null ; then
|
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
|
_changed=true
|
||||||
_found=false
|
_found=false
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user