Timo Sirainen tss@iki.fi wrote:
On Fri, 2009-03-20 at 18:47 +0100, floss@pBartels.info wrote:
Yes. It's too much work for Dovecot to try to figure out all the different things you might be doing under it. You can anyway easily make Dovecot recalculate the quota: delete the user's quota usage row from the database.
Well, thats a very simple solution. Also for my example. If I copy some mailboxes to the server I just remove the quota usage row and dovecot recalculates it. I can do this too, if I remove some spam messages or purge the trash...
If you removed spam messages and purged trash via IMAP you wouldn't have to worry about updating quota.
I mean if you do this directly on the server using a "croned" script.
What did you mean with too much work?
I mean that currently quota is updated only while changes are actually done. To be able to figure out when mailbox changes were done outside Dovecot it would need to keep some kind of state which messages/mailboxes were added to quota and which weren't. Index files help somewhat in implementing that, but it's still a lot of extra code.
Yes as I see it quota usage is only done if something is done via
IMAP, or perhaps if you fetch mail via POP?! (not tested). And then it
is not recalculated, it's just updated like if you remove a file the
quota is decreased of filesize, etc.
That's ok if you're only using IMAP and if you can trust that all works fine.
But there is also the behavior that dovecot calculates the usage if
its not yet set and that is useful. I think the best solution for me
is just to remove the row after I made some changes in the mailbox and
then dovecot will recalc. the quota usage at the next action, like
reciving a mail...
So you just have to know that you have to remove the quota usage
informations after you did something in the mailbox and then dovecot
recalculates it for you.
(I thought I must write a script that summarizes the usage and update
the database...)
Thank you