I'm trying to rate limit per user based on sasl_username using postfwd. (FWIW, I was using Cluebringer and this worked, but it feels clunky).
I have a rule
id=RULEDEFAULTSASL
sasl_username=~/^(\S+)$/
action=rcpt(sasl_username/200/7200/REJECT only 200 recipients per 2 hours for $$sasl_username)
Postfix is logging the following
postfwd3/policy[13604]: [RULES] rule=1, id=RULEDEFAULTSASL, client=xxx.domain.com[10.1.1.1], user=user@example.com, sender=user@exmaple.com, recipient=user@example.org, helo=<[10.2.2.2]>, proto=ESMTP, state=RCPT, ignoring empty counter
- Can someone advise what ignoring empty counter means?
(Initially I thought that the counter was not working, however when I run
postfwd3 -vv --dumpcache -p 10040 -f /etc/postfix/postfwd.cf
It does indeed appear to show entried with updated counter values as expected.