[Dovecot] Funky quota things
Timo Sirainen
tss at iki.fi
Mon Jul 27 12:04:40 EEST 2009
On Jul 27, 2009, at 4:55 AM, Guy wrote:
> We have the users total quota in MySQL along with a number of grace
> days (counts up to 7). The amount of space used is stored in
> maildirsize in the users maildir.
> What we currently some bits of voodoo which allow the user to go up to
> 200% of their quota. When they go over 100% they start receiving
> warnings and their grace days start counting down. If the account is
> still using over 100% of quota after the 7 days then the 100% quota is
> enforced so no new mail will be accepted.
> So is something like this "burst" quota possible in the Dovecot
> plugin?
Well, you could probably do something with quota_warning settings.
Maybe have the "quota" setting returned from userdb lookup (MySQL I
suppose?) so that it initially returns "quota=maildir:noenforcing" and
then when user goes over 100% quota have the script start the day
counting, and when it reaches 200% drop the ":noenforcing" part.
Although in that setup it's still possible for the same session to
keep using over 200% usage. Also I've no idea if quota_warning
settings can handle >100% values.
Another thing I thought of was to have two quota roots. The first one
maildir:noenforcing and the second one enforcing quota with limit
being 200% of the first one's quota. That would guarantee that user
can't go over 200%, but I don't really know how clients show multiple
quota roots.
More information about the dovecot
mailing list