[Dovecot] Quota and Trash
Bernhard Schmidt
berni at birkenwald.de
Mon Mar 12 21:42:19 EET 2007
On Mon, Mar 12, 2007 at 06:01:05PM +0100, Robert Schetterer wrote:
Hi Robert,
> > Currently they use maildir++ quota format. Mails moved to Trash get not
> > included in the Quota calculation (standard "feature" of Courier IMAP)
> > and get expunged after a certain period of days (IMAP_EMPTYTRASH).
> use ignore trash parameter, this should do the job, read the wiki
It does a similar job, I've read the wiki very thoroughly, but it does
not do the same, at least according to the documentation
Courier ignores Trash for Quota calculation, means that when I move a
mail from "INBOX" to "Trash" my used quota is decreased.
Dovecot does not ignore the Trash for Quota calculations. When I move
(delete) mail the quota is decreased (delete from INBOX), then increased
by the same value (append to Trash). The ignore option only allows
Dovecot to ignore quota _violations_ when appending to Trash.
> > This issue is directly related with the second one. Deleting old mails
> > in Trash could be archieved with the expire-plugin, but that does not
> > work with Dovecot v1.0, and I'd definitely want to run this. So I have
> > to use "find", which deletes the mail from the folder. However, those
> > mails are still included in the Quota calculation, so that will very
> > likely become incorrect.
> perhaps you might try trash plugin, which deletes mail i.e trash
> folder if the the mailbox would run over quota by incomming mail
> this seems to me a better koncept, than simply delete mail by their age
> read the wiki about it.
It is not the same. The mailservers and the storage would explode
horribly if all ~15k users would be able to keep their Trash filled
until they reach their Quota. Allowing them to reclaim accidentally
deleted mails from Trash for three days has proven to be a good solution
here.
> cant say what you mean by quota calculation, i use quota in mysql , so i
> have realtime quotas with thunderbird imap
Well, I guess you have the same issue then.
As explained above, when I move a message to Trash in Dovecot it is
still counted on the used space in the quota calculations, thus included
in the maildirsize. When I remove mails manually now on the filesystem
(e.g. using the "find . -mtime ..." listed in the wiki), they get
removed from the storage, but since find does not touch maildirsize they
are still counted in there. So after some iterations the quota in
maildirsize would be used to 100%, while the user would only be using a
fraction of it on the disc.
I think the problem appears whenever you use tools on the maildir
backend that do not handle quota. Whether the value is stored in
maildir++ or dict should not make any difference, as long as the value
is stored somewhere. Quota backends like fs or dirsize don't suffer from
this, but fs is not usable in our environment and dirsize has a heavy
performance penalty.
So having a solution for my first problem (ignoring Trash in Quota
calculations, _not_ violation processing) would solve the second, since
mails deleted (or not deleted) there are not in quota anymore.
Regards,
Bernhard
More information about the dovecot
mailing list