On Sat, Aug 04, 2001 at 01:39:32AM +0200, Przemyslaw Wegrzyn wrote:
>
> Finally, I've done my qmail-ldap + maildrop + courier-IMAP
> installation. So far, works great.
>
> However, I don't like the way quota is supported.
> I know it's not exactly qmail-ldap's problem, rather courier's. However I
> hope someone here will help (I tried to solve this problem on
> courier-list, with almost no answer).
>
> I tweaked maildrop a little, to make it read HOME and QMAILQUOTA from
> enviroment. It works great with qmail-ldap now :)
>
> The problem is with Courier-IMAP. This one, instead of getenv'ing quota
> definition (like maildrop does), reads the definition from ./maildirsize.
> Such method is good as long as we don't need to change user's quota.
>
> If we do so - maildrop reacts perfectly, as it always read env var. But
> ./maildirsize's first line doesn't update immediately, so IMAP still uses
> old definition.
>
> The only (ugly) solutions I can see right now are:
>
> 1. Patch IMAP to use getenv("QMAILQUOTA") instead of maildir_getquota
> I'm not yet sure what will happen if ./maildirsize is missing
> 2. Recreate ./maildirsize by hand after every change of users quota
>
> BTW, there's no tool to manualy revalidate ./maildirsize :| The only good
> way I've found - create new file with, for example:
>
> 100000S
> 100000 1
>
> AFAIK this will force both courier-imap and maildrop to revalidate quota.
>
> Any better solutions ?
>
qmail-ldaps qmail-local will recalculate the maidirsize file when the
quota get's changed. When you read the maildir++.README of courier-imap
you will see that the quotasupport is not perfect. When multiple agents
accsess the maildir (and modifing it) concurrent the maildirsize file will
be deleted (to avoid a racecondition).
It is also so that neither pop nor imap need the possibility to get the
quota settings from ldap. They do not need it because normaly you will not
inject messages with imap or pop.
It should also be clear that the maildir quota is not an absolute quota
and that it is possible to get over the forced quota (the absolute upper limit is
2*quota but normaly it is much less).
--
:wq Claudio
tail -22 QLDAPINSTALL