Double quota calulation when special folder is present

Bernd Wurst bernd at bwurst.org
Wed Mar 13 13:45:54 EET 2019


Hello,

we're operating dovecot on a small server. Some years ago, we migrated
from courier IMAP to dovecot. Therefore, we defined our default
Namespace "inbox" with prefix "INBOX." to have this compatible. I found
this in some migration docs those days. Generally, everything worked as
expected.

Our only namespace is configured like this:

namespace inbox {
 separator = .
  prefix = INBOX.
  inbox = yes
}

Regularly, there is no folder named INBOX or .INBOX in the file system,
I suppose this is correct.  But I found a special corner case today when
it comes to quota calculation.

When - for whatever reason - a folder .INBOX.foo (for arbitrary values
of foo) exists, the whole mailbox is counted twice in quota
recalculation. Just creating .INBOX does nothing but a subfolder
triggers the problem.

This is my shell view (replaced username and file path and deleted
unnecessary debug output)

$ cat maildirsize
268435456S
14697 17
$ maildirmake .INBOX.foo
$ sudo doveadm -D quota recalc -u <user>
[...]
doveadm(<user>): Debug: Namespace inbox: type=private, prefix=INBOX.,
sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes
location=maildir:/home/.../test
doveadm(<user>): Debug: maildir++: root=/home/.../test, index=,
indexpvt=, control=, inbox=/home/.../test, alt=
doveadm(<user>): Debug: Namespace : type=private, prefix=, sep=,
inbox=no, hidden=yes, list=no, subscriptions=no location=fail::LAYOUT=none
doveadm(<user>): Debug: none: root=, index=, indexpvt=, control=,
inbox=, alt=
doveadm(<user>): Debug: quota: quota_over_flag check: quota_over_script
unset - skipping
doveadm(<user>): Debug: Quota root User quota: Recalculated relative
rules with bytes=268435456 count=0. Now grace=26843545
doveadm(<user>): Debug: Namespace INBOX.: Using permissions from
/home/.../test: mode=0700 gid=default

$ cat maildirsize
268435456S
29394 34


So the used quota has exactly been doubled by just creating an empty
subfolder.

Do you have any pointers for fixing my configuration or is this a bug in
dovecot?


regards,
Bernd



More information about the dovecot mailing list