PROBLEM
How is calculated the Quota Counter on messages? I see decimal values on counters tracking message count, how is it possible?
SOLUTION
The counter is incremented as follows, as a new message is tracked:
1. Read actual Counter value from DB
2. ElapsedTime = Now - LastUpdate
3. IF ElapsedTime > Period (the one defined for the quota rule) THEN CurrentCounter = 0 ELSE CurrentCounter = ( 1 - (ElapsedTime / Period) ) * Counter
4. Delta = CurrentCounter - Counter
5. Increment CurrentCounter
6. IF CurrentCounter > Limit THEN
7. DBValue += Delta (+1)
Consider the following example, starting from a DB Counter of 8 with a time frame of 300 sec :
Counter = 8 ElapsedTime = 13:29:57 - 13:26:22 = 215 CurrentCounter = ( 1 - (215 / 300) ) * 8 = 2.27 Delta = 2.27 - 8 = -5.73 * * allow mail .... CurrentCounter (+1) < Limit * * DBValue += -5.73 (+1) = 3.27