Sender rate limit, x mails/hour

jmjosebest

Renowned Member
Jan 16, 2009
192
39
93
Hello, I use PMG as a relay/smarthost to filter emails sent from my network. PMG takes care of scanning these mails and if there is no spam or virus they are sent to the recipients.

The problem I have is that I don't have a total capacity to limit the number of mails per hour that a sender or domain can send.

However, in my PMG relay no one else has access and this is where I have the real control of the amount of emails being sent.

My question is, how can I limit the amount of emails/hour that the same sender or domain can send?

Thank you very much!
 
Last edited:
This is my config with postfwd (/etc/postfix/postfwd.cf)
Rule1: 100 email/hour (from one address) except one IP (mailing list server)
Rule2: 200 email/hour (recipient based)
Rule3: if the from and to address are the same reject the email

id=RULE-01 client_address=!!(10.174.0.7/32) action=rate(sender/100/3600/421 4.7.1 - Sorry, exceeded 100 messages in 60 minutes.) # 200 email/óra max címzettenként id=RULE-02 action=rate(recipient/200/3600/421 4.7.1 - Sorry, exceeded 200 messages in 60 minutes.) # Ha a feladó ugyanaz mint a címzett eldobjuk id=RULE-03 sender==$$recipient action=REJECT not allowed