MJ Ray said:
Think what you like, but at least Dovecot seems to share the requirement. As you note, basic maildir seems not to allow folders at all. The Python class seems to be using Courier maildir. It wouldn't be the first time mutt coped with stuff that doesn't follow specs.
There's a common restriction on IMAP servers that a folder can contain subfolders or messages, but not both. Is that related?
Certainly Dovecot doesn't use true subfolders: it fakes them by prefixing the folder name you asked for with its ancestors, dot-separated.
Matthew