This commit is contained in:
Casper 2023-02-13 00:05:52 +01:00 committed by GitHub
parent ac1df91181
commit 26861ddf92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -634,16 +634,8 @@ function _setup_SRS
function _setup_dkim_dmarc
{
if [[ ${ENABLE_OPENDMARC} -eq 1 ]]
if [[ ${ENABLE_OPENDKIM} -eq 1 ]]
then
_log 'trace' "Adding OpenDMARC to Postfix's milters"
# shellcheck disable=SC2016
sed -i -E 's|^(smtpd_milters =.*)|\1 \$dmarc_milter|g' /etc/postfix/main.cf
fi
[[ ${ENABLE_OPENDKIM} -eq 1 ]] || return 0
_log 'debug' 'Setting up DKIM'
mkdir -p /etc/opendkim/keys/
@ -680,6 +672,15 @@ function _setup_dkim_dmarc
_log 'trace' "Nameservers added to '/etc/opendkim.conf'"
fi
fi
if [[ ${ENABLE_OPENDMARC} -eq 1 ]]
then
_log 'trace' "Adding OpenDMARC to Postfix's milters"
# shellcheck disable=SC2016
sed -i -E 's|^(smtpd_milters =.*)|\1 \$dmarc_milter|g' /etc/postfix/main.cf
fi
}
function _setup_postfix_vhost