mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-08 16:34:49 +02:00
scripts: make policyd-spf
configurable (#3246)
This commit is contained in:
parent
bbe1d2da31
commit
9ee33a81b7
6 changed files with 35 additions and 3 deletions
|
@ -84,3 +84,21 @@ function _setup_opendmarc
|
|||
_log 'debug' 'Disabling OpenDMARC'
|
||||
fi
|
||||
}
|
||||
|
||||
# Configures the SPF check inside Postfix's configuration via policyd-spf. When
|
||||
# using Rspamd, you will likely want to turn that off.
|
||||
function _setup_policyd_spf
|
||||
{
|
||||
if [[ ${ENABLE_POLICYD_SPF} -eq 1 ]]
|
||||
then
|
||||
_log 'debug' 'Configuring policyd-spf'
|
||||
cat >>/etc/postfix/master.cf <<EOF
|
||||
|
||||
policyd-spf unix - n n - 0 spawn
|
||||
user=policyd-spf argv=/usr/bin/policyd-spf
|
||||
EOF
|
||||
else
|
||||
_log 'debug' 'Disabling policyd-spf'
|
||||
sedfile -i -E 's|check_policy_service unix:private/policyd-spf, ||g' /etc/postfix/main.cf
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue