>> I have a outbound policy Track: Sender:u...@domain, Period: 300, >> CounterLimit:8. >> The policy would block if a message with 10 recipients is sent. So >> that's good. However, when I try to send message one by one or >> e-mail with cc, then the quota count would jump around. Sometimes, >> it blocks at the 11th or 12th recipients. Here is the maillog looks >> like, if anyone want the cbpolicyd debug log, please let me know. > > >> Dec 10 05:12:55 ... quota=1/8 (12.5%) >> Dec 10 05:13:08 ... quota=2/8 (24.5%) >> Dec 10 05:13:21 ... quota=3/8 (35.9%) >> Dec 10 05:13:38 ... quota=4/8 (46.4%) >> Dec 10 05:13:45 ... quota=5/8 (57.8%) >> Dec 10 05:13:54 ... quota=5/8 (68.6%) >> Dec 10 05:14:02 ... quota=6/8 (79.2%) >> Dec 10 05:16:19 ... quota=4/8 (55.5%) >> Dec 10 05:16:29 ... quota=5/8 (66.2%) > The calculation isn't done on a basis of "have X messages been sent > in the last Y seconds", that is (in the general case) an expensive > metric to measure/control. AIUI, the calculation is done on a rate > basis along these lines : > > Eg, suppose you set a rate of 10 messages per 60 seconds, and you > sent 1 message every 6 seconds. After the first message, the counter > will be 1, after another 6 seconds, the counter will be 1 - ( 1 * > 6/60 ) + !, which is previous counter less 6/60ths of it's previous > rate because we've gone 6s since the last message, plus 1 for the new > message. So we now have 1.9, not 2. > > After the next message, the rate will be 1.9 - ( 1.9 * 6/60 ) +1, > which is 2.71 and not 3. > > And so it goes on. > > In your case, you've sent those messages over a period of 3 1/2 > minutes, so your counter has been reduced somewhat as a result. The > x/y reported is obviously a rounding of the floating point value (as > you can see where it doesn't change from 5/8 to 5/8 for the 5th and > 6th messages. Then for the 7th message, there is a significant gap in > time and so you can see the counter has reduced somewhat. > > > Hope this helps.
Awesome response Simon :) I'm thinking a little FAQ on the site may be a good idea, or even adding the above to the quota docs page. -N
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Users mailing list [email protected] http://lists.policyd.org/mailman/listinfo/users
