[Dovecot] Re: Maildirquota

Bill Boebel bill at webmail.us
Tue May 30 15:15:44 EEST 2006


On Tue, May 30, 2006 8:08, Timothy White said:
> > > I'm returning the quota size from database, why then does it need to
>> be
> > > in the maildirsize file?
> >
> > The logic is:  use the values in maildirsize whenever possible since
>> that
> > contains the current space used in addition to the quota limit, then if
> > maildirsize does not exist or is too old or known to be wrong, recreate
>> it
> > by scanning the maildir and querying the database.  Dovecot should
>> always
> > create it if it does not exist, but it is not.
>
> How does it define "too old"???
> As in, what if I set a 10Mb limit on my users, then get some new
> drives, and upgrade the limit in the database to 100Mb. How then does
> dovecot 'upgrade' the users quota's? How would someone force an
> upgade? Delete all the maildirsize files (when dovecot creates them
> properly)?

If the file size exceeds 5120 bytes it will be recreated.  maildrop had
some logic such as if the file is over 2 hours old recreate it (or
something like that).  Most importantly though, Dovecot knows the quota
value from your DB because it got that in the auth query, and if Dovecot
sees a different quota value in maildirsize that what the DB reported,
Dovecot will recreate the maildirsize file - because at that point the
maildirsize file is known to be wrong.  So your quota changes should take
effect immediately.

The only missing piece to the puzzle is handling the case where the
maildirsize file doesn't exist when GETQUOTAROOT is called.

Bill




More information about the dovecot mailing list