Hi there, I know this is the postfix list, not the postfwd list, I’ve asked on there too, but this list is busier and hopefully someone can help.
I have postfix v2.6.6, and postfwd v1.3.5. I have configured the following rule set in postfwd: [root@monitoringtest ~]# /usr/local/postfwd/sbin/postfwd -f /etc/postfix/postfwd.cf -C Rule 0: id->"davelimit001"; action->"rate(recipient_domain/10/1800/421 4.7.1 - Sorry, exceeded 10 messages in 30 minutes.)"; recipient_domain->"=;dave-byrne.co.uk" Rule 1: id->"STRESS"; action->"dunno"; stress->"==;yes" Rule 2: id->"WL_001"; action->"dunno"; client_address->"=;127.0.0.1/32" [root@monitoringtest ~]# I am trying to limit the number of mails destined for one specific domain to a very small amount, 10 within 30minutes. Any other mails past 10 within 30mintes get rejected (not delayed, I don’t want them to send later on, I want them to be discarded). I integrated with postfix: [root@monitoringtest ~]# cat /etc/postfix/main.cf | tail -n 4 smtpd_recipient_restrictions = permit_mynetworks, ..., reject_unauth_destination, check_policy_service inet:127.0.0.1:10040 #postfwd [root@monitoringtest ~]# I then use another external test server, and telnet, to manually send 10, 15, 20 emails TO: ad...@dave-byrne.co.uk, and they all send… It never rate limits them. Why is this? Interestingly, in /var/log/maillog, I can see this: Oct 19 09:01:58 monitoringtest postfwd[20426]: [STATS] postfwd 1.35: up since 0 days, 13:30:00 hours Oct 19 09:01:58 monitoringtest postfwd[20426]: [STATS] Requests: 0 overall, 0 last interval, 0.0% cache hits, 0.0% rate hits Oct 19 09:01:58 monitoringtest postfwd[20426]: [STATS] Averages: 0.0 overall, 0.0 last interval, 0.0 top Oct 19 09:01:58 monitoringtest postfwd[20426]: [STATS] Contents: 2 rules, 0 cached requests, 0 cached dns results, 0 rate limits It says 2 rules, and 0 rate limits… It should be 2 rules and 1 rate limit. Have I configured my rate limit wrong? Below is my rate limit config in postfwd.cf: #Dave - 10 messages in 1800 seconds (30mins) id=davelimit001 recipient_domain=dave-byrne.co.uk action=rate(recipient_domain/10/1800/421 4.7.1 - Sorry, exceeded 10 messages in 30 minutes.) Any help is greatly appreciated. Thanks. Best Regards, Dave Byrne Head of Technical Projects Office: 01622 524 200 The Maidstone Studios | Vinters Business Park | New Cut Road | Maidstone | Kent | ME14 5NZ This communication and any attachments contain information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please return it with the title 'received in error' to david.by...@vooservers.com then delete the email and destroy any copies of it. Email communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept liability for any such matters or their consequences. Anyone who communicates with us by email is taken to accept the risks in doing so. Opinions, conclusions and other information in this email and any attachments which do not relate to VooServers are neither given nor endorsed by it.