09.29.05
IMAP and Apple Mail
Recently I decided to switch from a POP3 email setup to IMAP. Fortunately, most of the pieces were already in place: when setting up my server I followed the Gentoo Linux Virtual Mailhosting System with Postfix Guide, which includes both POP3 and IMAP servers, and I knew the IMAP server was working because SquirrelMail worked. What I wanted was for SquirrelMail to contain all of my old email, rather than just the new stuff. This was partly because I’m planning on upgrading to Tiger soon and want the transition to be as quick and easy as possible, and partly because every time I tell someone who’s using my server for email how to access the webmail client, I have to explain again that they won’t be able to access email they downloaded a month ago. Before I suggested that anyone else use IMAP, I had to try it myself.
For the most part, the switch was completely unremarkable. I set up a new account for the IMAP server in Apple Mail, using the same settings as the POP3 version, and then disabled the POP3 account. I also clicked a few boxes in the settings of the IMAP account to save Drafts, Sent Items, Junk Mail, and Trash on the server (and to delete the latter two categories after a week). I hit send and receive, and got no errors. I sent a test message to myself, and received it. I logged into SquirrelMail and saw the message. I deleted the message in Apple Mail, refreshed SquirrelMail, and saw that the message was gone. Next I dragged all my folders of archived mail on top of the IMAP server entry in the Apple Mail mailboxes drawer and watched Mail copy all my old messages to the server. I refreshed again in SquirrelMail and saw that all my folders were there, and the messages within them were accessible.
The only problem was that my sent test message wasn’t showing up in the Sent Messages folder of the IMAP account, and deleted messages weren’t showing up in the IMAP Trash. In fact, I couldn’t find them anywhere at all. A little digging revealed that once you’ve chosen to store these items on an IMAP server, you have to tell Mail where to store them — it won’t just use a pre-existing folder with a correct-sounding name. In the Mailboxes drawer, I selected each appropriate folder and chose the appropriate category from the Mailbox -> Use this mailbox for… menu. Now my Trash, Sent Items, Junk Mail, and even Drafts are saved on the server for me so I can use them from anywhere via webmail.
If you have an email account on my server, you can do the same — feel free to ask if you need help.

Jim Said:
September 29, 2005 at 8:21 pm
Nice to know I wasn’t the only person who tripped on this!
Hawk Wings » Blog Archive » Two stories of Apple Mail and IMAP Said:
September 30, 2005 at 2:01 am
[...] So it’s encouraging to read two stories with a more positive ending. Bruno Rodrigues at Litux and at whoever blogs at Acetylene.net tell stories of setting up and using IMAP accounts in Apple Mail. [...]
Andrew Said:
October 25, 2005 at 6:03 pm
thanks, you just saved me any further looking for my answers !
Philippe Said:
December 18, 2005 at 6:25 am
Thanks for your last comment! that was exactly what I was looking for.
Jack Said:
December 19, 2005 at 3:04 pm
You know, I’ve wondered about the problem with Sent mail not getting filed properly for the longest time. Found your solution through Google – many thanks!
Doug Said:
February 14, 2006 at 8:39 am
I am having the same problem. However, when I select the mailbox the use this mailbox for menu is grayed out. Is there another setting that I’m missing? Thanks for your help.
Nick Said:
April 7, 2006 at 1:20 pm
Wow. After a lot of headaches I found your post and it was just what I needed.
ipodmechanic.com