From 167bda3d46619342d80751dd0c93abd951f0755a Mon Sep 17 00:00:00 2001 From: phil Date: Mon, 20 Mar 2023 21:38:30 +0100 Subject: [PATCH] Insert submission restrictions only if necessary --- templates/postfix/main.cf.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/postfix/main.cf.j2 b/templates/postfix/main.cf.j2 index 46a7e97..1ef3067 100644 --- a/templates/postfix/main.cf.j2 +++ b/templates/postfix/main.cf.j2 @@ -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,