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

Eirik Rye rye at
Thu May 20 16:18:12 EEST 2021

> On 20 May 2021, at 14:59, Timo Sirainen <timo at> wrote:
> Well, next step could be to compare individual mail sizes. It would require writing some kind of a script to do the comparison though.

Hello again,

Apologies, I think dovecot is innocent in all of this.

I noticed that `ls -s` reported a completely different size to `du`, but similar to what dovecot reports:

# ls -s | head -1
total 14099016
# du
7050436 .

I assume there are some sparseness or block size related shenanigans going on here instead, causing differences in reported physical usage by `du` (syscall `newfstatat()`) compared to `ls` (syscall `lstat()`) and dovecot.

The filesystem quota system in Linux, which is what we're migrating from, apparently uses the same calculation method as `du`, which adds to the confusion.

- Eirik

More information about the dovecot mailing list