On 05/28/10 20:32, Philippe Ratté wrote:
> Hi,
>
> I am using policyd (cluebringer-snapshot-200912140631)
>
> Everything works fine so far; however there is something that I don't 
> understand.
>
> Basically, I want to setup a PHP web page that will allow my users to see the 
> status of their account (quota info)
>
> This is the part that I don't understand:
>
> quota=2/6 (27.4%)
>
> 2/6 does not equal 27.4%, should be 33.33% ?
>
> Taken from:
>
> May 28 16:14:16 slacksmtp cbpolicyd[6953]: module=Quotas, mode=update, 
> host=192.168.0.107, helo=winblows, [email protected], 
> [email protected], reason=quota_update, policy=2, quota=3, limit=4, 
> track=SASLUsername:testsmtp2, counter=MessageCount, quota=2/6 (27.4%)
>
> Thanks for your help :)

Quotas use deltas which in short in this case is the amount of mail
being transmitted per time period based on the last update time, the
last value and the current time.

Delta = (1 - (Now - LastUpdate) / Period)  * LastCount + 1

I think its something like that, off the top of my head (don't take my
word for it). Its not whole numbers being worked with, it just displays
as a integer ;)

-N




Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users

Reply via email to