Maildir question

With Webmin-Postfix-readUserMail I can see

testuser (201.12 kB in 6)

6 is the number of folders, but there are no messages. Why does it show 201.12 kB?

Status: 
Closed (works as designed)

Comments

Howdy -- well, what we could do is verify from the command line that there aren't any email messages in their account.

If you log into your server as root over SSH, can you browse to the home directory of "testuser", and then type:

find Maildir

That will then show you all the files and directories in the directory "Maildir", where all the email is stored.

You can ignore files that begin with the name "dovecot" -- but do you see any other files underneath that folder?

I run the following command:

find Maildir -type f -exec ls -la {} \;

Without all the dovecot files I only see mailfolderdir files. But they only contain 0 bytes.

Okay. Next, can you test how much space the Maildir directory is taking? You can determine that with this command:

du -sh Maildir

Do any of the folders have messages in them?

None of the folder have messages in them. They only contain maildirfolders or dovecot files. using the webmin interface to 'read mail' doesn't show any messages either.

Here is the output of the above find command:

-rw-r----- 1 testuser testuser 2880 Dec 15  2010 Maildir/.spam/dovecot.index.log
-rw-r----- 1 testuser testuser 144 Dec 15  2010 Maildir/.spam/dovecot.index
-rw-r----- 1 testuser testuser 443 Dec 14  2010 Maildir/.spam/dovecot-uidlist
-rw-r----- 1 testuser testuser 26624 Dec 15  2010 Maildir/.spam/dovecot.index.cache
-rw-r----- 1 testuser testuser 26972 Dec 15  2010 Maildir/dovecot.index.log
-rw-r----- 1 testuser testuser 2396 Dec 15  2010 Maildir/.Sent/dovecot.index.log
-rw-r----- 1 testuser testuser 144 Dec 15  2010 Maildir/.Sent/dovecot.index
-rw-r----- 1 testuser testuser 0 Dec  6  2010 Maildir/.Sent/maildirfolder
-rw-r----- 1 testuser testuser 766 Dec 14  2010 Maildir/.Sent/dovecot-uidlist
-rw-r----- 1 testuser testuser 28672 Dec 15  2010 Maildir/.Sent/dovecot.index.cache
-rw-r----- 1 testuser testuser 28 Dec  6  2010 Maildir/subscriptions
-rw-r----- 1 testuser testuser 4452 Dec 15  2010 Maildir/.Trash/dovecot.index.log
-rw-r----- 1 testuser testuser 24 Dec 10  2010 Maildir/.Trash/dovecot-keywords
-rw-r----- 1 testuser testuser 320 Dec 15  2010 Maildir/.Trash/dovecot.index
-rw-r----- 1 testuser testuser 0 Dec  6  2010 Maildir/.Trash/maildirfolder
-rw-r----- 1 testuser testuser 5010 Dec 15  2010 Maildir/.Trash/dovecot-uidlist
-rw-r----- 1 testuser testuser 10272 Dec 15  2010 Maildir/.Trash/dovecot.index.cache
-rw-r----- 1 testuser testuser 24 Dec  8  2010 Maildir/dovecot-keywords
-rw-r----- 1 testuser testuser 320 Dec 15  2010 Maildir/dovecot.index
-rw-r----- 1 testuser testuser 1229 Dec 15  2010 Maildir/dovecot-uidlist
-rw-r----- 1 testuser testuser 2724 Dec 14  2010 Maildir/.Drafts/dovecot.index.log
-rw-r----- 1 testuser testuser 144 Dec 14  2010 Maildir/.Drafts/dovecot.index
-rw-r----- 1 testuser testuser 0 Dec  6  2010 Maildir/.Drafts/maildirfolder
-rw-r----- 1 testuser testuser 945 Dec 14  2010 Maildir/.Drafts/dovecot-uidlist
-rw-r----- 1 testuser testuser 31744 Dec 14  2010 Maildir/.Drafts/dovecot.index.cache
-rw-r----- 1 testuser testuser 49152 Dec 15  2010 Maildir/dovecot.index.cache
-rw-r----- 1 testuser testuser 104 Dec  6  2010 Maildir/.Junk/dovecot.index.log
-rw-r----- 1 testuser testuser 144 Dec  6  2010 Maildir/.Junk/dovecot.index
-rw-r----- 1 testuser testuser 0 Dec  6  2010 Maildir/.Junk/maildirfolder
-rw-r----- 1 testuser testuser 10272 Dec  6  2010 Maildir/.Junk/dovecot.index.cache

Yeah, chances are the numbers you're seeing are just related to the Dovecot control files, there aren't any hidden emails or whatnot.

Also, directories themselves, even if empty, take up a small amount of space, so just having a few directories would add a small amount of space on top of the Dovecot control files.

Not sure, since the dovecot files are 368K, and if folders are also counted as space, why does VM show only 201K?

It is not a big deal, you can close this message. You have probably more interesting issues :-)

Ok, closing this then .. I wouldn't worry too much about a small discrepancy like that. Especially since the "size" of a file can vary depending on whether you count it in blocks or bytes, if it is a sparse file and so on..