> On 22/07/10 14:16, Matus UHLAR - fantomas wrote:
> > the user is warned daily when his quota is over configured size.

On 22.07.10 15:03, Jani Ollikainen wrote:
> What? When? How?
> 
> I have:
> DEFAULTDELIVERY="|| /usr/lib/courier/bin/dotforward
> | /usr/lib/courier/bin/maildrop -w 90"

Well, the maildrop -w 90 should do it, if it's executed.

> And I really havent seen daily warnings for users.

It may not get executed if dotforward returns zero exit status.

> > that either means that someone's modifying the maildir/maildirsize
> > without synchronizing them, or that the user does NOT have "plenty of"
> > room in the maildir.
>
> > running maildirmake -q causes the size to be recalculated afaik.
> 
> And that someone's could be?

any program that does not update maildirsize, e.g. anything executed by
dotforward.

> As i only have courier handling the maildir 
> or maildir is handled tought imap/pop but those are courier.
> 
> # cat Maildir/maildirsize
> 73400320S
>      65735365          100
>         -2792           -1
>         -2565           -1
> 
> # mailq
> 12.32M           00B14009.4C46BCF2.000008F0          Jul 21 12:26
> 
> # maildirmake -q
> Usage: maildirmake [ options ] maildir
> # maildirmake -q Maildir
> Usage: maildirmake [ options ] maildir
> # which maildirmake
> /usr/lib/courier/bin/maildirmake

please, read maildirmake manual page before (sorry) stupid complaints.
The first line in maildirsize tells the quota was set to 73400320 which
means that "maildirmake -q73400320S" was called. It's 70MB
Other lines tell the curent usage, 65735365 (100 mails) and two mails of
sizes 2792 and 2565 were removed.

The current size is 65730008 B (62.685 MB) which means the available space
is 7670312 B (7.314 MB) which is less than 12.32M needed for the mail.
So the user does NOT have enough of free space in maildir.

> > we have counted the percent for "-w" option to maildrop so when it's
> > reached and the users get warning the time when remaining space falls below
> > maximum message size. It means that customers get warning at the time when
> > big mails may not be delivered due to quota.
> 
>  From my experience that warning is send if that percentage is hit
> and the mail is delivered. But not when the percentage is hit and
> mail is left to mailq as it won't fit in.

my experience saye that the warning mails are stored in the maildir every
day (24h) when the percentage is hit. Which means, if the mail stays in
queue for 5 days, 4-5 warnings get delivered.

> > you can always count the required percent from the quota anx X :)
> 
> Yes, but as the maildirsize tells the maildir's situation, not counting
> the big message in the queue. So I would need to know is there something
> in the queue for the user.

If you know the user has 70MB quota and the maximum allowed mail size is
14MB, it means that if mailbox usage crosses 80% ((70 - 14) / 70 * 100),
there may be a mail that doesn't fit there. In such case you have to use
maildrop -w 80 for this user.

-- 
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
How does cat play with mouse? cat /dev/mouse

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to