About this site's lack of design: Yes, it's supposed to look this way — I'm helping create a new sandbox theme for WordPress (see it on GitHub).

Dan Rubin's SuperfluousBanter

Design, random musings, and the Web. Since 1977


Setting up IMAP in Apple Mail

Note: These instructions still work under Mac OS X Leopard (10.5)

It has been brought to my attention that a surprisingly large number of people don’t know all the steps involved in properly configuring an IMAP account in Apple’s Mail.app. Though this has been covered elsewhere I’m sure, I thought I’d share the steps in a quick-start way to help reduce the frustration that results from assuming some things are done by default (know the basics already? skip to the last step »).

The Basics

Most of the IMAP setup process is identical to creating a POP account. Within Mail.app:

  1. Go to Preferences (Mail → Preferences)
  2. On the Accounts tab, click the [+] at the bottom left to start the account setup process
  3. Change the Account Type to IMAP and fill in your details
  4. Set the Incoming Mail Server and Outgoing Mail Server details

Many people stop at this point and assume they are finished. This is where problems arise, and why I’m writing this little tidbit.

IMAP Folders

IMAP allows all mail (including your Sent, Drafts, Spam and Trash folders, as well as custom folders) to live on the server. This is one of the main benefits of IMAP, since your account is identical whether accessing your mail from any workstation or webmail. The problem is that hosts create different sets of default folders when you create a new account, and that Mail.app doesn’t automatically connect the folders on the server to its local functions (most importantly, Sent mail and Drafts).

For example, MediaTemple only creates your Inbox and Spam folders; Dreamhost creates your Inbox, Sent, Drafts and Trash folders, but since Mail.app doesn’t automatically assign those functions to the folders on the server, it doesn’t actually matter in this case. This means if you don’t follow these next steps, you won’t have any sent mail or drafts saved anywhere; this can be an annoyance or a major problem, depending on your specific needs.

Creating IMAP Folders

Creating new folders is simple:

  1. Control-click (or right-click if you have a multi-button mouse) on the Inbox for your account (if you have multiple accounts within Mail.app, you’ll see sub-Inboxes in the left sidebar that have the names you’ve assigned each account), and select “New Mailbox…”
  2. In the resulting dialog, make sure that the correct account is selected in the drop-down menu, and enter a name for the mailbox (e.g. “Sent” if you’re on MediaTemple).

The mailbox is created on the server, and Mail.app updates its folder list for that account. Do this as many times as you want, whenever you need a new folder to help organize your messages (for our purposes, make sure your create whatever function-related folders are missing).

Setting Mail.app Straight

Now that you’ve made sure the folders exist, in order for Mail.app to save your drafts or copies of your sent messages it needs to know where to put them, so this final step is the most important:

  1. Click the folder name that matches the function you want to assign (e.g. “Sent”) so it is highlighted in the list
  2. Go to Mailbox → Use This Mailbox For → [function name] (e.g. “Sent” again)

That’s all there is to it—your folder will disappear from the list, and reappear as a sub-folder beneath the function you specified, with the same name as the account it’s connected to. So, if your account name is “My IMAP Account”, the “Sent” folder will now be located under “Sent → My IMAP Account” in the Mail.app sidebar.

Hopefully this will ease some of the frustration of setting up an IMAP account for the first time. After you’ve gone through the steps once, you’ll remember them for the future and never be without your drafts and sent messages again.

Update: Check out the comments below for some extra tips and tricks.

This item was posted by Dan Rubin on Saturday, April 21st, 2007.


You can follow comments on this item via the RSS 2.0 feed.

Comments are closed.

39 comments on “Setting up IMAP in Apple Mail”

  1. Posted by Oliver Charles on Saturday, April 21st, 2007.

    IMAP is a brilliant idea, that I’ve somehow only just discovered. It’s a GODSEND if you use multiple computers.

    Good guide :)

  2. Posted by Adam Schilling on Sunday, April 22nd, 2007.

    Nice one, Dan.

    In the case of Media Temple (and perhaps a few other IMAP service providers) you can also access (and sync) your custom, custom folders (the ones that don’t correlate to a specific Mail function).

    Create a custom folder (eg. Dad or Project X). Note that some people have found their first custom folder needs to be created within their webmail client first — Apple Mail seems to get the hang of things after that (may require relaunch).
    Go to Preferences (Mail → Preferences).
    Click the Accounts tab and select your IMAP account, on the left.
    Select the Advanced tab, on the right.
    Tick Automatically synchronize changed mailboxes.
    Set the IMAP Path Prefix* to INBOX
    Leave the Port / Authentication defaults (eg. 143 / Password).
    Save your changes and note the addition of a new ‘at’ symbol ( @ ) in your list of Mail folders. It now contains (and should sync) your custom, custom folders.

    * Refer to your IMAP service provider if INBOX doesn’t do the trick. ;-)

  3. Posted by Steve on Sunday, April 22nd, 2007.

    Hey Dan-
    Thanks for the de-mystification… I’ve been using POP3 with Media Temple and have wanted to convert to IMAP but have had a concern for what would happen to my current POP folders and organization on my Mac, etc. I also use a Treo religiously for sending and receiving so I know that IMAP would help with keeping that synced with my Mac… Do you use a handheld for mail as well? Did you convert to IMAP from POP3? Any issues or road blocks you experienced along the conversion road?

  4. Posted by Dan Rubin on Sunday, April 22nd, 2007.

    @ Adam: Thanks for the tip, it’s a great add-on, I’m definitely going to make use of it myself :)

    @ Steve: From what I understand, the (mt) email accounts can be accessed via POP3 or IMAP, so you should be able to create a new IMAP account within Mail.app, using the same settings as your POP3 account, and then just copy (drag-n-drop) your local folder structure into your IMAP inbox.

    I also access my IMAP account from my Treo650, which works like a charm.

  5. Posted by Jonathan E on Monday, April 23rd, 2007.

    Thanks for the tips Dan! I’ve been wondering about how to get this working properly for a while now.

  6. Posted by Ian Lloyd on Monday, April 23rd, 2007.

    That was *very* timely, sir. I was having great difficulty working out what I was doing wrong with some Imap accounts, despite having set it up numerous times before!



  7. Posted by Tom on Monday, April 23rd, 2007.

    While this definitely works, what about multiple IMAP accounts? I still haven’t found a way to configure multiple Sent, Drafts, Junk folders for each account.

  8. Posted by Dan Rubin on Monday, April 23rd, 2007.

    @Tom: If you mean configuring a separate Sent, Drafts, and Junk folder for each IMAP account, the process is the same (see the subheading “Creating IMAP Folders”). You create a new folder for each function, within each IMAP account’s “Inbox” (which isn’t actually called “Inbox”, but rather the name you assigned the account when you created it). Then just follow the process for each folder under each account (Mail.app does automatically recognize which IMAP account it should associate with the function).

  9. Posted by Frank 'viperteq' Young on Monday, April 30th, 2007.

    This was a great tip Dan. But I’ve got an advanced scenario that I could use some help with:

    I currently have my IMAP account hosted on Joyent’s Connector application. But I’ve decided that since I host all of my sites on MediaTemple, it would just be easier to manage everything from there (not to mention cheaper on the wallet). So my question is this….how do you transfer IMAP hosted email from one server to another? I don’t have root access to the Joyent server obviously, but I do have root access to my MediaTemple server. Is there an easy to do this?

  10. Posted by Dan Rubin on Monday, April 30th, 2007.

    @Frank: That should be pretty simple: leave your existing IMAP account/inbox in Mail.app as-is, and create a new account with your (mt) settings, and a unique name.

    This should create a second inbox structure in the left pane within Mail.app, and then you can just drag and drop the folders/messages from your Joyent account inbox into the (mt) inbox. The messages will copy over (it may take a while depending on how much mail you have to transfer) and you should be set.

  11. Posted by Frank 'viperteq' Young on Tuesday, May 1st, 2007.

    Dude, you rock!!!!

  12. Posted by Curtis Carmack on Tuesday, May 1st, 2007.

    Dan, This definitely helped. I may even move to Mail.app from Thunderbird if I can resolve my last issue. I have several aliases that I use from a single IMAP account. I also receive e-mail at these various aliases/accounts into the same IMAP account. Currently server-side rules dump the incoming e-mails into the appropriate folders. However, to get the outgoing e-mails into the right folders, I bcc myself (using a setting in Thunderbird) and use a combination of server rules and Thunderbird configuration to make sure that I have the right sent mails in each of four separate subfolders of the Sent folder. The server rules work fine with Mail.app, but the subfolders of the Sent folder are not recognized as containing sent items, so they display the “from” (me) but not the “to” identities in the message list. Any ideas on how to change this?

  13. Posted by Gregg Rudolph on Tuesday, May 1st, 2007.

    Thank you. I have been living with the Apple Mail IMAP problem for weeks. Your solution will make my life MUCH easier! Much appreciated!

  14. Posted by Sam on Friday, May 4th, 2007.

    Thanks for this bit:
    “Tick Automatically synchronize changed mailboxes. Set the IMAP Path Prefix* to INBOX”

    That info was absolutely crucial in getting folders working, before that, they weren’t working properly. Thanks!!

  15. Posted by Vale on Thursday, May 10th, 2007.

    Your site is very interesting! yeeah! Good work!

  16. Posted by iTristan on Wednesday, May 23rd, 2007.

    Great tutorial – so here’s one for ya.

    I’ve got a UW IMAP server we’re breaking in for use by clients, I’m making myself the guinea pig by moving one of our accounts onto it.

    Even with the IMAP Path Prefix set, Mail.app still reads about a half dozen server-use “mailboxes” that are nonsense for real use. There include:

    and the list goes on. Suffice to say, the fact that the account is reading all these server-messages bloats my mailbox with irrelevant crud.

    I can still create my own mailboxes in here, but the others don’t leave.

    I have a feeling that this has to do with UW, but nothing I do changes the presence of these utility-use mailboxes.

    Thoughts? Cheers

  17. Posted by Brandy on Saturday, June 9th, 2007.

    Dreamhost users may find this link useful: http://wiki.dreamhost.com/Mac_OS_X_Mail_10.4

  18. Posted by Jeff Hartman on Saturday, June 9th, 2007.

    Why do Dreamhost and mediatemple like the Inbox as the root folder? Textdrive allows subfolders at the root of the mailbox where it is more convenient. I happen use all 3 hosts at the moment. :(

  19. Posted by Colin Miller on Wednesday, July 11th, 2007.

    I have now set up my IMAP account with Apple Mail, fantastic!

    My main reason was so that I could use email on my mobile phone and it works great, however SPAM is a real problem as I get hundreds per day.

    Here is a fantastic work around that has reduced the SPAM on my mobile to almost zero

    Get hold of SpamSieve, its the best SPAM filter OSX by far


    Disable the SPAM filters in Apple Mail and use SpamSieve.

    Now here is the important thing…

    Set up SpamSieve to remove any SPAM from your IMAP folder and move into your SPAM folder on your local hard drive.

    Set up your email to check every minute or two minutes, this then continues to remove SPAM from your IMAP Inbox, keeping it squeeky clean.

    You may (on the odd occasion) happen to check your email via mobile just prior to SpamSieve doing its its thing, but in general this workaround will make your mobile life a lot easier… Thanks to IMAP!

  20. Posted by Steve on Thursday, July 19th, 2007.

    Hey Dan (or anyone else)-
    What app do you use on the Treo (if you’re not now on the iPhone…) I was using versamail and after it crashed twice without reason or warning and no support from Verizon or palm, I’m now on SnapperMail. It doesn’t seem to support IMAP per se but it does talk about folder synchronization… just curious what people are using on the Treo (700p).

  21. Posted by Scott on Wednesday, July 25th, 2007.

    I’m struggling to have IMAP mail boxes I’ve created with other clients appear in my MAC mail system. They’re there when I use Thunderbird. The big one is my “Read Mail” folder. Server is a Linux dbmail system that works with other clients. Ideas?
    Thanks to all in advance


  22. Posted by Micah on Thursday, July 26th, 2007.

    Thanks a bunch for this essay – so many tutorials online that just suck and don’t focus on how to have copies of your messages! Right on!

  23. Posted by duus on Wednesday, August 29th, 2007.

    thanks. useful post & conversation. “imax path” as “INBOX” made some accounts work that weren’t before…


  24. Posted by Nidia on Friday, August 31st, 2007.

    Hello! Just to notify you I recommended your blog for the BlogDay that is today! Congratulations and keep up the good work…!!!

  25. Posted by Dave on Wednesday, September 12th, 2007.

    Dan. Thanks for the article!
    It was difficult to get this working properly

  26. Posted by Nick on Saturday, September 22nd, 2007.

    Thanks for the tips Dan, a well thought out and comprehensive tutorial.

  27. Posted by Randy on Monday, October 1st, 2007.

    I’ve been using IMAP for a long time but didn’t try the “Use This Mailbox For” step until yesterday. Now that I’ve done this, my whole Mail.app has become maddeningly slow. I have 4 accounts set up, and did this for both of the IMAP accounts. Now, no matter which account I’m moving between folders in (the other two are Hotmail accounts accessed via HTTPmail), Mail.app takes 30-40 seconds to populate the list of emails. Any fixes for this? Or, how do I “undo” the “Use This Mailbox For” step (I only did it for Sent Mail so that they’d be available from another computer even if I wrote the email from my own computer). It’s so slow that it’s not worth the sync!

  28. Posted by michel on Sunday, October 21st, 2007.

    man i can’t believe how badly apple supports imap its just horrible

    worst of all in mail.app 3.0 they have messed it up even worse
    the use folder as option is no longer there so now in my fastmail accounts i have both apple folders and fastmail folder for sent and drafts, just awful

    i like how easy mail is to set-up, but i hate the limited functionality,

    back to mulberry (http://www.mulberrymail.com/) for me, awfully complicated to set up, but at least once set up everything works as imap should work

  29. Posted by Julian Schrader on Tuesday, October 30th, 2007.

    @Michel: Of course the “use folder as” option is there in Mail.app 3.0! I just used it on my new Leopard installation…

    Thanks for this post — I had a problem with SpamSieve: It’s using a local folder called “spam”. On the IMAP server (MediaTemple) was another “spam” folder, but they didn’t sync, so I deleted the local one and changed the “SpamSieve” rule in Mail.app to use the IMAP folder. Works great!

  30. Posted by Frank Tollenaar on Sunday, November 4th, 2007.

    Thanks man. I’ve been using IMAP for web-mail for ages, but never found a way to designate my Inbox.sent as Sent-mailbox in Mail.app
    I kept searching in the preferences and context-menus (ctrl-click). Never thought it would be right up there in the main menu.

  31. Posted by Rene Rodriguez on Thursday, November 8th, 2007.


    Thanks for this post. I’ve been pulling my hair out trying to properly set-up IMAP on my multiple Macs. Argh. Your post, and some of the subsequent comments from your bright readership, have helped clear up a few mysteries.

    I do have one question, that I hope you can answer (eh, promptly!):

    I have multiple company email account (rene@, info@, etc.), and in my pre-IMAP world, I had three folders set-up (Clients, Freelancers, and Vendors) at the same level as my inbox. I also had a few SmartFolders set-up.

    Now, to keep those sync’d, it’s my understanding that I’d have to recreate those folders under a specific email account (i.e., rene@). But my ‘Client’ folder will have 20 or 30 active clients (in subfolders), and I need to drop emails in to them from various accounts (I’ve vacillated between using rules for this and leaving them in my Inbox until I’ve dealt with them).

    How can I have the same folder structure and sync w/IMAP?

    Your help is appreciated,


  32. Posted by Boris on Wednesday, June 25th, 2008.

    Thanks for the Mailbox -> Use mailbox for…. heads up… I’ve been looking for something like this for a loooong time. You rock.

  33. Posted by javier on Wednesday, July 2nd, 2008.

    Can i delete one folder like “trash” “spam” “all” (pre defined folders) in my IMAP account?.. if yes, HOW!?!?!?… Thanks!