ZhangHuangbin wrote:You should enable iredapd in smtpd_end_of_data_restrictions and smtpd_recipient_restrictions. For example:
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:7777
smtpd_recipient_restrictions = reject_unknown_recipient_domain reject_non_fqdn_recipient reject_unlisted_recipient check_recipient_access pcre:/etc/postfix/recipient_access.pcre check_recipient_access pcre:/opt/iredmail/custom/postfix/recipient_access.pcre check_policy_service inet:127.0.0.1:7777 permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service inet:127.0.0.1:12340
Dear Zhang,
- smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:7777 - is already in main.cf by default.
i added the below entry under (smtpd_recipient_restrictions)
-reject_unlisted_recipient check_recipient_access
pcre:/etc/postfix/recipient_access.pcre
-check_recipient_access pcre:/opt/iredmail/custom/postfix/recipient_access.pcre
-reject_unauth_destination check_policy_service inet:127.0.0.1:12340
after restarting the iredapd, nginx, mysql and postfix then login and start sending 4 messages in 1 minute and throttle let me sent 4 message within a minute
please see below /etc/postfix/main.cf
smtpd_sender_restrictions =
#ADDED JUNE 16, 2026
check_policy_service inet:127.0.0.1:7777
#TILL HERE
permit_mynetworks
permit_sasl_authenticated
#ADDED JUNE 15, 2026 FOR THROTTLE
reject_unauth_destination
#check_policy_service inet:127.0.0.1:7777
#TILL HERE
check_sender_access pcre:/etc/postfix/sender_access.pcre
# To check outgoing messages
#Added August 28, 2023
# add entry in /etc/postfix/internal_clients_filter - check
#check_client_access cidr:/etc/postfix/internal_clients_filter
##
reject_non_fqdn_sender
reject_unlisted_sender
#Added August 28, 2023
reject_unknown_sender_domain
reject_sender_login_mismatch
reject_unknown_reverse_client_hostname
reject_unknown_client_hostname
# Recipient restrictions
smtpd_recipient_restrictions =
#ADDED JUNE 16, 2026
check_policy_service inet:127.0.0.1:7777
#TILL HERE
#orig entry (when disabled and enable the permit_mynetworks and permit_sasl_authenticated below - i am not able to send email)
permit_mynetworks
permit_sasl_authenticated
#TILL HERE
reject_non_fqdn_recipient
#ADDED JUNE 16, 2026
reject_unknown_recipient_domain
check_recipient_access pcre:/etc/postfix/recipient_access.pcre
check_recipient_access pcre:/opt/iredmail/custom/postfix/recipient_access.pcre
#TILL HERE
reject_unlisted_recipient
reject_unauth_destination
#Added August 28, 2023
reject_invalid_hostname
#reject_unknown_recipient_domain
reject_unauth_pipelining
#Added Augst 29, 2023
reject_non_fqdn_recipient
reject_non_fqdn_sender
#reject_unKown_sender_domain
#ADDED JUNE 16, 2026
#permit_mynetworks
#permit_sasl_authenticated
#TILL HERE
check_policy_service inet:127.0.0.1:12340
#Added December 1, 2024
reject_rbl_client zen.spamhaus.org=127.0.0.[2..11]
reject_rbl_client b.barracudacentral.org=127.0.0.2
# END-OF-MESSAGE restrictions
smtpd_end_of_data_restrictions =
check_policy_service inet:127.0.0.1:7777