mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-30 15:44:56 +02:00
config/ENV: improve Postfix config for spoof protection (#3127)
This commit is contained in:
parent
aa4d4fe315
commit
5ec6845c96
6 changed files with 17 additions and 15 deletions
|
@ -6,10 +6,6 @@ function _setup_spoof_protection
|
|||
then
|
||||
_log 'trace' 'Enabling and configuring spoof protection'
|
||||
|
||||
sed -i \
|
||||
's|smtpd_sender_restrictions =|smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch,|' \
|
||||
/etc/postfix/main.cf
|
||||
|
||||
if [[ ${ACCOUNT_PROVISIONER} == 'LDAP' ]]
|
||||
then
|
||||
if [[ -z ${LDAP_QUERY_FILTER_SENDERS} ]]
|
||||
|
@ -28,5 +24,7 @@ function _setup_spoof_protection
|
|||
fi
|
||||
else
|
||||
_log 'debug' 'Spoof protection is disabled'
|
||||
# shellcheck disable=SC2016
|
||||
postconf 'mua_sender_restrictions = $dms_smtpd_sender_restrictions'
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue