Osmany Goderich wrote: >>Set the period to 86400 , set the limit to 1 000 000 . Send 3 x 2Mb emails. >>You will see the second and third will get blocked. >> >>You never tried to send a second message above once the limit was exceeded. >>And if your period was set to 20s, it means in 20s the sender can send >>another 1Mb of email.
>Nope, the messages still get delivered: <snip> You really could do with trying to help yourself here - by not making it artificially hard for people to read your messages You are now bottom posting, but you aren't trimming unnecessary quoted material, you aren't properly quoting what you've quoted (ie your text appears the same as the text you've quoted), and when posting logs like that, it's very hard to read when their wrapped and not broken up at all. Just breaking the lines apart helps enormously : Aug 2 07:53:33 tauro cbpolicyd[80910]: module=Quotas, mode=update, host=10.25.80.8, helo=mail.domain.com, [email protected], [email protected], reason=quota_update, policy=5, quota=3, limit=4, track=Sender:[email protected], counter=MessageCumulativeSize, quota=247340/1000000 (24.7%) Aug 2 07:53:44 tauro cbpolicyd[73545]: module=Quotas, mode=update, host=10.25.80.8, helo=mail.domain.com, [email protected], [email protected], reason=quota_update, policy=5, quota=3, limit=4, track=Sender:[email protected], counter=MessageCumulativeSize, quota=2576224/1000000 (257.6%) Aug 2 07:53:44 tauro postfix/qmgr[45088]: 52CE3B845: from=<[email protected]>, size=2329065, nrcpt=1 (queue active) Aug 2 07:53:49 tauro postfix/qmgr[45088]: 81EB1B8B0: from=<[email protected]>, size=2329510, nrcpt=1 (queue active) Aug 2 07:53:49 tauro amavis[80915]: (80915-06) Passed CLEAN, [10.25.80.8] [10.25.80.8] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: PYP0YjUkKmsB, Hits: -2.47, size: 2329065, queued_as: 81EB1B8B0, 5138 ms Alternatively, I prefer that you turn off line-wrap and I can stretch my window out wide for reading logs - but I know some users hate that as their mailer doesn't line wrap when they are viewing inbound messages. That aside, your logs still don't show you hitting the quota limit and rejecting messages ! quota=247340/1000000 (24.7%) quota=2576224/1000000 (257.6%) quota=999873/1000000 (100.0%) quota=3329745/1000000 (333.0%) quota=999687/1000000 (100.0%) quota=3329559/1000000 (333.0%) In each case, when the decision is made wether to proceed to receive the message, or to reject it, the quota counter **at that time** is not greater than 100% Yes it goes higher when the message has been received, but in your logs it has dropped down to 100% or less by the time the next message is handled. Since you still don't appear to understand how the quota policy works, I'll recap : 1) If your Postfix setup is correct, then each message results in TWO calls to Policyd per recipient - one when the connection is opened and the message headers are being exchanged, and again AFTER the message body is received. Quota restrictions are applied at the first stage so you can avoid processing messages **WHILE** the user is over quota. As I mentioned earlier, quotas are not applied AFTER processing the message body as by then all the costly work has been done. 2) Quotas are applied based on what has happened in the past, the size of the current message does not play a part in deciding whether to accept/reject the message. Again, the size of the message is not known (reliably) until it's all been passed - and it's wasteful to process the message (transfer it using bandwidth, possibly scan it for malware and spam) and then throw it away. You can see in your logs above, AFTER processing each message, the message size is used to increase the current quota count. In each case, your messages are making the user go over quota AFTER the message is processed. By the time the next message is passed, the quota has been reduced enough that the next message is accepted - which takes the quota count over limit again. Looking at the timestamps, it looks like you still have a very short time period set. The quota count drops by about 160% in 11 seconds and then by 233% in 27s. Is the time set in the order of 10s by any chance ? -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Users mailing list [email protected] http://lists.policyd.org/mailman/listinfo/users
