Hi, I am having trouble with the quotas module for policyd 2.0.10,
I have the following configuration as policies, basically throttle SASL authenticated users: Policy: Name Default Ext SASL auth Source Members: $*,!%internal_ips,!%whitelisted I have the quotas set as: Policy: Default Ext SASL auth Name: Quote SASL USER Track: SASLUsername Period: 600 Verdict: DEFER And the limit for the above quota set to: Type Counter Limit MessageCount 5 MessageCumulativeSize 10485760 When a email comes in, MessageCount works fine, but the MessageCumulativeSize not as expected. When I test user, during the protocol status RCPT I get the normal stuff: Apr 19 23:17:24 juan cbpolicyd[15109]: module=Quotas, mode=update, host=60.234.162.14, helo=[192.168.0.37], [email protected], [email protected], rea son=quota_update, policy=7, quota=3, limit=4, track=SASLUsername:[email protected], counter=MessageCount, quota=2/5 (38.9%) Apr 19 23:17:24 juan cbpolicyd[15109]: module=Quotas, mode=update, host=60.234.162.14, helo=[192.168.0.37], [email protected], [email protected], rea son=quota_update, policy=7, quota=3, limit=5, track=SASLUsername:[email protected], counter=MessageCumulativeSize, quota=656667/10485760 (6.3%) But when the protocol reaches END-OF-MESSAGE I get: Apr 19 23:20:56 juan cbpolicyd[4995]: module=Quotas, mode=update, host=60.234.162.14, helo=[192.168.0.37], [email protected], [email protected], reas on=quota_update, policy=7, quota=3, limit=5, track=SASLUsername:[email protected], counter=MessageCumulativeSize, quota=7645098/10485760 (72.9%) If I send another email, just behind this one: Apr 19 23:23:55 juan cbpolicyd[4992]: module=Quotas, mode=update, host=60.234.162.14, helo=[192.168.0.37], [email protected], [email protected], reason=quota_update, policy=7, quota=3, limit=4, track=SASLUsername:[email protected], counter=MessageCount, quota=3/5 (33.5%) Apr 19 23:23:55 juan cbpolicyd[4992]: module=Quotas, mode=update, host=60.234.162.14, helo=[192.168.0.37], [email protected], [email protected], reason=quota_update, policy=7, quota=3, limit=5, track=SASLUsername:[email protected], counter=MessageCumulativeSize, quota=701667/10485760 (6.7%) END-MESSAGE Apr 19 23:26:37 juan cbpolicyd[15109]: module=Quotas, mode=update, host=60.234.162.14, helo=[192.168.0.37], [email protected], [email protected], reason=quota_update, policy=7, quota=3, limit=5, track=SASLUsername:[email protected], counter=MessageCumulativeSize, quota=7633962/10485760 (72.8%) It like MessageCumulativeSize gets updated to the latest message size, in the two stages, instead of work like MessageCount. What could be the problem? Should I expect this from Quotas Module, or use the Accounting in the RC version? How good is the latest RC version for a production enviroment? Regards Juan.- _______________________________________________ Users mailing list [email protected] http://lists.policyd.org/mailman/listinfo/users
