[Dovecot] mbox, hierarchical folders/folders and IMAP

Stan Hoeppner stan at hardwarefreak.com
Sat Dec 24 12:31:08 EET 2011


On 12/23/2011 10:00 AM, Alexander Chekalin wrote:
> Hello,
> 
> I'm now dealing with funny problem. I try to use Dovecot (2.1.rc1,
> actually) and mbox format to store old mailing, to keep logic of "one
> folder = one file".
> 
> If I'd choose Maildir, I'd be able to create hierarchical folders (like
> "OldMail -> Maillists -> Dovecot"), and in fact on disk such a folders
> would be stored as real folders with dots in their names. In PHP it is
> easy to create with "imap_createmailbox()" function, I'd simple fire it
> 3 times (for "OldMail", for "OldMail.Maillists" and for
> "OldMail.Maillists.Dovecot").
> 
> But when I do the same with mbox, in fact it creates separate files
> (indeed, named "OldMail", "OldMail.Maillists" and
> "OldMail.Maillists.Dovecot") instead of creating filesystem folders
> ("OldMail/Maillists/Dovecot"). PHP is not guilty, Thunderbird won't
> create such folders as well. I can only create folders myself (say, with
> mkdir in the shell), chown it, and the it perfectly works in IMAP.
> 
> Now I just wanted to know, are there any way to create IMAP-folders and
> subfolders using standard IMAP functionality?

Yes.  This has been common knowledge for many years, and is covered by
lots of documentation, including dovecot and tbird docs.  With mbox
storage, an IMAP FOLDER contains only sub folders or it contains only
messages.  It CANNOT contain BOTH.  Thunderbird forces you to answer
this question each time you create a new IMAP FOLDER in the account root
tree.  Surely you've seen the radio buttons in the new folder creation box.

-- 
Stan




More information about the dovecot mailing list