Insert submission restrictions only if necessary

This commit is contained in:
phil 2023-03-20 21:38:30 +01:00
parent 11b84aa872
commit 167bda3d46

View file

@ -184,6 +184,7 @@ smtpd_sender_restrictions =
#check_sender_access hash:/etc/postfix/conf.d/sender_checks_domain,
permit
{% if postfix_submission is defined and postfix_submission %}
# Restrictions for submission port
mua_sender_restrictions =
check_sasl_access cdb:/etc/postfix/conf.d/permit_sasl_login_mismatch,
@ -193,6 +194,7 @@ mua_sender_restrictions =
reject_unknown_sender_domain,
reject_sender_login_mismatch,
permit_sasl_authenticated
{% endif %}
permit_login_mismatch =
permit_mynetworks,
@ -200,8 +202,10 @@ permit_login_mismatch =
reject_unknown_sender_domain,
permit_sasl_authenticated
{% if postfix_submission is defined and postfix_submission %}
submission_bad_smtp_user_check =
check_sasl_access cdb:/etc/postfix/conf.d/bad_smtp_auth_users
{% endif %}
smtpd_relay_restrictions =
permit_mynetworks,