On 5. May 2021, at 15.42, Eirik Rye <r...@trojka.no> wrote: > > Afterwards, for a couple users, we received reports that mail delivery had > failed because they were over quota. When looking into it for a specific > user, we noticed that the vsize reported for a particular folder (with 47k > messages) was reported as being nearly 50 times larger than it's on-disk size: > > root@mail02:~# doveadm mailbox status -u anonymized_user 'messages recent > unseen vsize' 'anonymized/folder/name' > [...] > anonymized/folder/name messages=47338 recent=0 unseen=0 vsize=14335366070 > > However, the filesystem itself reports a much smaller size (but correct > message count): > > root@mail02:~# du -hd1 /home/anonymized_user/Maildir/.anonymized.folder.name/ > 313M /home/anonymized_user/Maildir/.anonymized.folder.name/cur > 36K /home/anonymized_user/Maildir/.anonymized.folder.name/tmp > 4.0K /home/anonymized_user/Maildir/.anonymized.folder.name/new > 320M /home/anonymized_user/Maildir/.anonymized.folder.name/ > > root@mail02:~# ls /home/anonymized_user/Maildir/.anonymized.folder.name/cur | > wc -l > 47338 > > I have tried: > > - `doveadm force-resync -u anonymized_user` > - deleting the index files in the specific folder, and running `doveadm > index -u anonymized_user '*'` as well as `doveadm mailbox status -u > anonymized_user vsize '*'` > - deleting all `*index*` files in maildir, and running `doveadm index -u > anonymized_user '*'` as well as `doveadm mailbox status -u anonymized_user > vsize '*'` > - comparing all maildir-sizes (S=) with their actual sizes to see if there > are discrepancies. There are none.
S= is the "physical size", W= is the "virtual size". quota=count / vsize calculations should be using the W= value, not the S= value. > Even after deleting the list index (dovecot.list.index) as well as the > mailbox indexes, recalculating the vsize seems very quick so I feel like the > incorrect vsize is being fetched from a cache somewhere instead of being > recalculated..? The sizes can also be stored in dovecot-uidlist.