Timo Sirainen
2021-May-20 11:44 UTC
Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders
On 20. May 2021, at 13.08, Eirik Rye <rye at trojka.no> wrote:> > > >> On 20 May 2021, at 12:31, Aki Tuomi <aki.tuomi at open-xchange.com> wrote: >> >> Hi! >> >> Quota will count only virtual size of mails (and not directories) and that will likely never match with du -bs, which counts for things more than just the mail contents. > > Right, but the quota/vsize of the folder in my example is calculated by Dovecot to be ~14GB, while the real physical size of the whole directory is ~6.8GB. Dovecot thinks the folder is twice as big than it actually, physically is. :/You can also look at the folder-level vsizes to see which one is causing the differences (or are they all doubled?) doveadm mailbox status -u user vsize '*'
Eirik Rye
2021-May-20 12:12 UTC
Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders
> On 20 May 2021, at 13:44, Timo Sirainen <timo at sirainen.com> wrote: > > You can also look at the folder-level vsizes to see which one is causing the differences (or are they all doubled?)In this user's case, it is only the Trash-folder that has the wrong vsize calculation: # doveadm mailbox status -u <username> 'messages vsize' '*' Drafts messages=0 vsize=0 Sent messages=0 vsize=0 Trash messages=14870 vsize=14584428026 Spam messages=3 vsize=227701 INBOX messages=1866 vsize=1640766021 The other mailboxes (INBOX and Spam) are both within what I consider reasonable in terms of differences in virtual/physical sizes: # du -bs /mail/<username>/Maildir/cur 1603071610 /mail/<username>/Maildir/cur # du -bs /mail/<username>/Maildir/.Spam 241489 /mail/<username>/Maildir/.Spam But the Trash mailbox is physically HALF the size of what Dovecot reports: # du -bs /mail/<username>/Maildir/.Trash 7200481589 /mail/<username>/Maildir/.Trash The message count reported by dovecot (14870) is correct, however: # ls /mail/<username>/Maildir/.Trash/cur | wc -l 14870 With the other users I have noticed the same issue, it's a different mailbox and not Trash. One user has a mailbox reported by Dovecot as being ~13.7GB while it is actually physically only around 0.3GB. For this user I haven't tried stripping W= sizes or deleting dovecot control files, though. - Eirik