Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Nested IMAP Mail folders with the Dovecot mail server Apps
If you use IMAP with Apple's Mail, but are using Dovecot as your mail server (standard with Fedora and many Linux distros), you may have noticed a huge problem in making nested folders work. This is primarily because Dovecot uses a different separator from most mail servers, and the 10.4 version of Mail simply won't let you make nested mail folders.

There's an easy fix though. Simple open up a Terminal window and log into your Linux account. (Presumably this is the same with BSD, Solaris or other Unix variants running Dovecot, but I've only tested on Linux) There is a directory with your IMAP mail, typically named mail. In it there are files representing your mailboxes.

First create the mailboxes you plan on using via Apple's Mail (via the plus button on the lower left -- make sure you create an IMAP mail box). Mail will create them on the top level. In Terminal in your Linux mail directory, create a directory with mkdir with the name of the "mother" directory you wish to use. Then move (mv) the directories you created with Mail into this directory. Mail.app should now show your mother directory in white, and then your moved mail directories as nested in it.

Note that some other IMAP clients may have trouble with this if you don't also modify .subscriptions. This is in the top level of your mail directory on your Linux home directory. But it is hidden, so it won't show up with ls unless you do a ls -a. (In Unix all directories starting with a period are hidden.) Simply open this up with your favorite editor (I usually use vi), and make sure that the mailboxes you created in Mail.app have the right paths -- they should be of the sort mother/daughter.

I hope this helps, as I'd searched the internet trying to figure out how to do this and arrived at this by trial and error. I'm sure a lot of other people who use Fedora as their server were getting frustrated with Mail.
    •    
  • Currently 2.75 / 5
  You rated: 4 / 5 (4 votes cast)
 
[16,686 views]  

Nested IMAP Mail folders with the Dovecot mail server | 5 comments | Create New Account
Click here to return to the 'Nested IMAP Mail folders with the Dovecot mail server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Nested IMAP Mail folders with the Dovecot mail server
Authored by: gerti on Sep 07, '07 08:26:29AM

Odd, no such problem here with Dovecot as server: Using Mail.app create two mailboxes 'a' and 'b', drag 'b' on top of 'a', and 'a' will now be a mailbox folder.



[ Reply to This | # ]
Nested IMAP Mail folders with the Dovecot mail server
Authored by: BillCole on Sep 07, '07 10:47:40AM
This is a reckless hint. The "problem" is not universal, but rather is configuration issue with some installations of Dovecot and some configurations of Mail.app. There is a fairly high likelihood that if you have the described problem with Mail.app but not with other clients using the same server, you will break the other clients by performing this "fix" and you may not even get success with Mail.app. BEWARE!

[ Reply to This | # ]
Nested IMAP Mail folders with the Dovecot mail server
Authored by: ClarkGoble on Sep 09, '07 08:31:06PM

I can but say it is a common problem and, after doing considerable Googling there were no good suggestions. I found this one and have tested the configuration with quite a few mail clients to make sure there were no "gotchas." I also discussed this at a few forums like Ars soliciting feedback.

As best I can make out it is do to this version of Dovecot using a different separator from most other IMAP servers.



[ Reply to This | # ]
Nested IMAP Mail folders with the Dovecot mail server
Authored by: davipt on Sep 08, '07 08:10:09AM

Why not simply use maildirs? It works wonderfully with Apple Mail!



[ Reply to This | # ]
Nested IMAP Mail folders with the Dovecot mail server
Authored by: Bertrand Leboeuf on Sep 10, '07 06:34:41AM

Try this, it works: you just need to create the folder/mailbox in one step, this creates the folder + mailbox all at once, then you can create the other mailboxes as normal. You can also go deeper: folder/sub-folder/mailbox, this creates folder folder + sub-folder + mailbox. The one restriction is that a folder can't hold messages, only sub-folders and/or mailboxes.
Have fun.



[ Reply to This | # ]