On 27.06.24 08:15, Gilgongo via Postfix-users wrote:
I have some simple postfwd rules that count the number of emails being sent
per hour/day  per sasl account (and reject once a limit is reached).

I'm not sure how best to implement that though, Should I just have the
following in master.cf? So if an account sent a CC to [n] addresses, the
rules would be evaluated [n] times?

smtpd_recipient_restrictions is evaluated for each recipient.
If you only want limit the number of e-mail sent, you can put that into smtpd_data_restrictions or smtpd_end_of_data_restrictions
(the latter knows the e-mail size).

submission inet n       -       n       -       -       smtpd
 ... current configs here...
 -o { smtpd_recipient_restrictions =
       check_policy_service inet:127.0.0.1:10040
       permit_sasl_authenticated
       }

this should work, although I'd prefere defining mua_recipient_restrictions in main.cf and in master.cf use something like:

  -o smtpd_recipient_restrictions=$mua_recipient_restrictions

this way you can define the same for "submission" and "smtps" (or "submissions") service.

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"One World. One Web. One Program." - Microsoft promotional advertisement
"Ein Volk, ein Reich, ein Fuhrer!" - Adolf Hitler
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to