"Within each subdirectory there's an empty file, maildirfolder. Its
existence tells the mail delivery agent that this Maildir is a really a
folder underneath a parent Maildir++."
and
"Make sure to create the maildirfolder file in any new folders created
within the Maildir++."
Also, GETQUOTAROOT on a folder (with messages in it) will always return
the entire usage, not the usage in the folder itself. For example:
INBOX - really has 100 mb of messages.
Sent - has a few messages totalling 1mb.
Drafts - no messages
A GETQUOTAROOT on INBOX will return 101 mb, 100mb for INBOX and 1mb for
Sent. Drafts will show zero, because there's nothing. Unfortunately,
Sent will also show 101 mb, not 1mb.
While Dovecot shouldn't be creating maildirsize files in each folder (the
maildirfolder file is there to tell clients to look in .. for a
maildirsize) ... it should still be able to answer queries about the
number of messages (count of files in the folder) as well as the total
size of all messages in that folder (sum of S=xxxx or by stat() on
individual message files).
Steve