[Dovecot] Wrong quota calculation

Daniel Parthey daniel.parthey at informatik.tu-chemnitz.de
Mon Sep 10 00:30:52 EEST 2012


Cibest ML wrote:
> On 08/09/2012 01:38, Daniel Parthey wrote:
> >Cibest ML wrote:
> >>We've a strange quota behavior on our dovecot servers.
> >>It seems that it's somehow doubling the real used storage (or could
> >>be something like twice the inbox size + size of other folders, hard
> >>to know for sure).
> >>It was initial setup with the maildir++ system. Now it's been
> >>configured with dict and mysql table but the result is the same.

> Here are some tests to show the problem. The test mailbox is
> initialy empty. All described actions are done in a sequencial way
> (test mail with an attachement of ~2MB)
> 
> - Message delivered by LMTP
> Quota name Type    Value  Limit
> User quota STORAGE  2653 524288
> User quota MESSAGE     1      -

Seems ok.

> - quota recalc
> Quota name Type    Value  Limit
> User quota STORAGE  5307 524288
> User quota MESSAGE     2      -

Strange. There must be some issue with quota recalculation.
Maybe there are two instances of the message in the maildir?
How large is the actual maildir measured by diskusage (du)
command and where are the messages stored in the filesystem?

> - move to draft + compact
> Quota name Type    Value  Limit
> User quota STORAGE  2653 524288
> User quota MESSAGE     1      -

Seems absolutely correct. Message is copied,
deleted and removed from the old directory.

> - recalc
> Quota name Type    Value  Limit
> User quota STORAGE  2653 524288
> User quota MESSAGE     1      -

Seems after compacting the folders there is
only one instance of the message.

> - move to subfolder "test" in inbox
> User quota STORAGE  2653 524288
> User quota MESSAGE     1      -

> - move message back to inbox
> Quota name Type    Value  Limit
> User quota STORAGE  5306 524288
> User quota MESSAGE     2      -

The message gets copied and deleted,
so there are 2 messages.

> - compact
> Quota name Type    Value  Limit
> User quota STORAGE  2653 524288
> User quota MESSAGE     1      -

After compaction the "copied+deleted"
message gets finally removed.

> - recalc quota
> Quota name Type    Value  Limit
> User quota STORAGE  5306 524288
> User quota MESSAGE     2      -

Very strange. The removed message "reappeared"?
Are you using some network filesystem
and possibly experience filesystem caching effects?
In this case a dovecot director would help.

Regards
Daniel
-- 
https://plus.google.com/103021802792276734820



More information about the dovecot mailing list