Stan, thank you for the reply,

But I believe I obey this rule: I create "folder with ONLY folders inside", 
then in it another "folder with ONLY folders inside", and the into this second 
folder I create "folder with ONLY messages inside" (the path is 
"oldmail/lists/dovecot", and oldmail and lists are folders in filesystem, while 
dovecot is mbox container in filesystem).

My problem is I can not understand which way should I create "folder with ONLY 
folders inside", and which way to create messages-only folder, going down to 
IMAP protocol commands. PHP for example looks like use only one command to 
create a mailbox, no difference what type of it I need. 

I understand PHP isn't the only script language to deal with IMAP, so I seek 
for advice how IMAP works with on protocol level.

24.12.2011, в 13:31, Stan Hoeppner <s...@hardwarefreak.com> написал(а):

> 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
> 

Reply via email to