From 1101e401e80be9f2a62c85d490a308680a2e009c Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Mon, 9 Aug 2021 14:58:58 +0200 Subject: [PATCH] Apply the restriction on the right port --- core/postfix/conf/main.cf | 3 ++- core/postfix/conf/master.cf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/postfix/conf/main.cf b/core/postfix/conf/main.cf index 428502ac..0c442fb3 100644 --- a/core/postfix/conf/main.cf +++ b/core/postfix/conf/main.cf @@ -99,9 +99,10 @@ smtpd_sender_login_maps = ${podop}senderlogin # Restrictions for incoming SMTP, other restrictions are applied in master.cf smtpd_helo_required = yes +check_ratelimit = check_sasl_access ${podop}senderrate + smtpd_client_restrictions = permit_mynetworks, - check_sasl_access ${podop}senderrate, check_sender_access ${podop}senderaccess, reject_non_fqdn_sender, reject_unknown_sender_domain, diff --git a/core/postfix/conf/master.cf b/core/postfix/conf/master.cf index e45a8ccf..eca0ad77 100644 --- a/core/postfix/conf/master.cf +++ b/core/postfix/conf/master.cf @@ -7,7 +7,7 @@ smtp inet n - n - - smtpd # Internal SMTP service 10025 inet n - n - - smtpd -o smtpd_sasl_auth_enable=yes - -o smtpd_client_restrictions=reject_unlisted_sender,reject_authenticated_sender_login_mismatch,permit + -o smtpd_client_restrictions=$check_ratelimit,reject_unlisted_sender,reject_authenticated_sender_login_mismatch,permit -o smtpd_reject_unlisted_recipient={% if REJECT_UNLISTED_RECIPIENT %}{{ REJECT_UNLISTED_RECIPIENT }}{% else %}no{% endif %} -o cleanup_service_name=outclean outclean unix n - n - 0 cleanup