install_postfix_advanced.sh: add SPF sender whitelist configuration
This commit is contained in:
@@ -2932,6 +2932,7 @@ if [[ -n "$(which policyd-spf)" ]] ; then
|
||||
cat <<EOF >> /etc/postfix/main.cf
|
||||
# Check Postfix policy service ..
|
||||
#
|
||||
check_client_access btree:/etc/postfix/spf_sender_whitelist
|
||||
check_policy_service unix:private/policy-spf
|
||||
EOF
|
||||
fi
|
||||
@@ -3495,6 +3496,25 @@ else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
if [[ -n "$(which policyd-spf)" ]] ; then
|
||||
_file="/etc/postfix/spf_sender_whitelist"
|
||||
echononl " Create file \"${_file}\""
|
||||
cat <<EOF > ${_file}
|
||||
# (Sender) Whitelist from SPF (polidy-spf)
|
||||
|
||||
# All mails from domain 'domain-robot.org' (including subdomains)
|
||||
domain-robot.org OK
|
||||
EOF
|
||||
|
||||
postmap btree:${_file}
|
||||
if [[ $? -eq 0 ]] ; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
echononl " Create file \"client_allow_relay\""
|
||||
if [[ ! -f "/etc/postfix/client_allow_relay" ]]; then
|
||||
cat <<EOF > /etc/postfix/client_allow_relay
|
||||
|
||||
Reference in New Issue
Block a user