Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

Aki Tuomi aki.tuomi at open-xchange.com
Thu May 20 13:31:33 EEST 2021


> On 20/05/2021 13:16 Eirik Rye <rye at trojka.no> wrote:
> 
>  
> > On 10 May 2021, at 11:52, Timo Sirainen <timo at sirainen.com> wrote:
> > 
> > S= is the "physical size", W= is the "virtual size". quota=count / vsize calculations should be using the W= value, not the S= value.
> 
> 
> I renamed all messages containing S= and W= values in a user's mailbox (Trash) which had the incorrect quota calculation, stripping these from the filenames to ensure they were not causing incorrect calculations.
> 
> Then, I deleted every single dovecot* file in the user's mailbox (all indexes and control files, including dovecot-uidlist):
> 
>   root at server:~# find /mail/<username>/Maildir/ -type f -name 'dovecot*' -delete
> 
> Running `doveadm mailbox status -u <username> 'vsize' 'Trash'` -still-, even after all this, returns a vsize calculation that is off by a factor of about two:
> 
> root at server:~# du -bs /mail/<username>/Maildir/.Trash
> 7200481589      /mail/<username>/Maildir/.Trash
> root at server:~# doveadm mailbox status -u <username> 'vsize' 'Trash'
> Trash vsize=14584428026
> 
> (The user was not logged in during any of this testing)
> 
> I am at a bit of a loss at what is causing this issue now. I have tested against 2.3.13 and 2.3.14 now. Any chance I may have hit a bug in these versions?
> 
> It is worth mentioning that I have only encountered a small handful of users (out of about 100k) where the quota calculation is wildly incorrect. For the most part it appears to be right.
> 
> - Eirik

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.

Aki


More information about the dovecot mailing list