In the mailbox list underneath an IMAP account's header, you'll find a list containing an inbox, any mailboxes you create, and any mailboxes Mail.app creates in order to support some of its own special features.
An IMAP server abstracts all a user's new and otherwise unsorted mail into a single mailbox called inbox, so you'll always have at least this mailbox available to you.
Mail.app's commands for creating and organizing mailboxes and folders, found under the Mailbox menu, remains consistent across all its account types, IMAP included. When you create, rename, and delete mailboxes through the commands in this menu, or move mailboxes around by dragging their icons in the mailbox list drawer, Mail.app echoes these actions on your IMAP account's structure. Thus, all the changes you make in one session with Mail.app will carry across to any future connections you make to this IMAP account with any mail client.
While Mail.app takes full advantage of IMAP's ability to let you create and organize mailboxes any way you like, the application also has the ability to map its own functionality onto some special server-side mailboxes, if you let it. In all of the following cases, Mail.app will create these mailboxes on the server as necessary.
By default, messages that you save as a draft (through File->Save As Draft (-S), or the message window's Save As Draft toolbar button) stay in Mail.app's special Outbox mailbox, stored only on your Mac. If you wish, you can instead store unfinished messages on an IMAP mailbox, so they'll be available to choose and complete from other machines.
To do this, call up the Composing tab of Mail->Preferences as seen in Figure 5, and select one of your IMAP mailboxes from the Save unsent mail in: pull-down menu.
As you can see in Figure 4, I gave my drafts mailbox a
leading exclamation point in its name, for the simple reason
!drafts will always appear at the
top of the alphabetically-sorted list of server-side
mailboxes, and I didn't want it mixed in with that list. (Of
course, I did that before I got around to sorting all my
other mailboxes into their own folders, which makes them all
stand apart anyway. Oh well. It made sense at the
It's worth noting that Mail.app does not keep its Sent Messages mailbox on the IMAP server; it's only on your Mac. Mail.app stores copies of all the mail you send through all your accounts, IMAP and otherwise, here.
If you want to keep server-side copies of sent mail, choose an IMAP mailbox from the Save sent mail in: pull-down menu found under the Preference panel's Composing tab (Figure 5).
If you have the Move deleted mail to a folder named: checkbox set under the Viewing tab of Mail-->Preferences..., then Mail.app will create a folder on the server to serve as a trashcan, where deleted mail will move itself. It will name this folder either Deleted Messages, Deleted Items, or Trash, depending on your selection from that checkbox's attached pull-down menu (Figure 6).
You don't need to have a special folder for maintaining deleted messages since IMAP lets you store deleted mail in any mailbox, as described in the section called "Deleting Messages." However, Mail.app doesn't let you see any deleted messages except for ones in this special mailbox, and only if you have this checkbox activated.
An email message sitting in an IMAP mailbox can have some number of message flags set on it, recording the actions performed on this message, such as the user's reading, replying to, or deleting it. When you reply to a message on your office PC, for example, and then later connect to your mailbox at home, that message will "remember" the fact you already replied to it, and be able to report this to you.
Mail.app works with most flags in a fairly straightforward
fashion, but gets a little squirrelly when it comes to IMAP's
Deleted flag, as we shall see.
Note: There's nothing particularly magic about how message flags work; they exist simply as headers the IMAP server adds to the messages on its end as their status changes.
Mail.app displays IMAP flags through symbols in the Flag and Status columns of a mailbox's message list, as shown in Figure 7. The following list uses the flag names as they're defined by the IMAP standard, and explains how Mail.app represents them.
A message gets a
Recentflag if the current IMAP connection is the first to have seen it. Mail.app places a blue dot in this message's status column, marking it as a new, unread message. Mail.app unsets this flag once the user reads a message.
A message with a
Seenflag has been read.
Mail.app reacts to the absence of this flag; a message lacking a
Seenflag (which all
Recentmessages do, by definition) gets a blue dot. Mail.app does not distinguish between unread mail that arrived since the current session started (and has a
Recentflag) and unread mail carried over from a previous IMAP session (and therefore has no message flags).
Selecting Message-->Mark As Unread (Option--M) removes this flag from selected messages, and Message-->Mark As Read (Option--M) sets it. (One of these two commands appears in the Message menu, depending upon the status of the selected messages.)
Replying to an IMAP message prompts Mail.app to set its
Answeredflag. Mail.app displays such messages with a little U-turn arrow in its status column, unless the message lacks a
Flaggedflag can mean whatever you want. Generally, it's meant to signal that a message requires urgent attention.
In Mail.app, you can toggle this flag for the selected message(s) through Message-->Mark As (Un)Flagged (Option--G).
Flaggedmessages receive little flag icons in the message list's flag column (see Figure 7).
Mail.app sets a message's
Draftflag if it's an unfinished, unsent message you're storing in an IMAP mailbox, as described in the section called "Drafts".
Mail.app gives messages
Deleteflags when you delete them (through the Delete key, or Message-->Delete, or dragging them into your dock's Trash icon). This seems fairly straightforward, and it does more or less what you want, but this flag's actual implications are convoluted enough that this article dedicates a whole section to the topic: see the section called "Deleting Messages".
IMAP uses a two-step process for deleting messages. Any
message can set a
Deleted flag on itself,
which marks it as susceptible to actual deletion, but doesn't
actually get rid of it or even move it out of its original
mailbox. A separate IMAP command purges a mailbox of all the
deleted messages it contains.
Different mail clients have different ways of representing deleted (but not yet erased) messages to the user. Mail.app chooses to simply not show deleted mail at all, unless it's inside the designated "trash" mailbox, as described in the section called "Trash Mailbox".
Mail.app's IMAP response to deleting mail changes
depending upon how you've set the Move deleted mail to
a folder named: checkbox seen in Figure 6. If you've checked it, then
deleting a piece of mail will cause Mail.app to move it to your
chosen trash mailbox, rather than setting its
If you've instead left that checkbox
unchecked, then Mail.app will set the message's
Deleted flags, but otherwise leave them
be. Since Mail.app refuses to display deleted mail in mailboxes
other than the trash mailbox, this action will also make the
message vanish from sight, even though it continues to exist on
the server (and perhaps remain visible to other mail
That same checkbox also dictates Mail.app's behavior with
actually erasing deleted messages. If checked, then Mail.app gives
you a Mailbox-->Empty
Mailbox (-K) command. This will have Mail.app send the IMAP EXPUNGE
command to its trash mailbox, and since it contains only
messages with the
Deleted flags set,
they'll all go away (unless you've been weird and snuck other
mail in there through sneaky means; those would stick
around). Deleted messages in other mailboxes, however, simply
remain present and invisible to you, at least so long as you use
Mail.app as your client.
If you leave this box unchecked, then Mail.app instead offers the Mailbox-->Compact Mailbox (-K) command. This will simply expunge the selected mailbox, permanently erasing all its unseen deleted messages, and seeming to shrink the mailbox's size without affecting any of its visible messages. ("Compact", in this case, is Mail.app's positive way of spinning the fact that it doesn't have a way of dealing with deleted mail in arbitrary IMAP mailboxes, and so they appear as so much dead weight.)
Note that both these commands share the -K keybinding, so hitting this combo will always erase deleted mail, one way or another.
Like POP, IMAP offers no built-in security mechanisms, meaning that network eavesdroppers may be able to obtain your account password when you fetch mail. Depending upon the services your mailhost provides, though, you may be able to avoid this attack by using IMAP over a secure, encrypted network connection. See my earlier article, Secure Mail Reading on Mac OS X, for details.
The IETF maintains the RFC documents that define the standards of POP and IMAP (and most every other technology the Internet uses).
Version 3 of the Post Office Protocol is defined in IETF RFC 1939.
Version 4 of the Internet Message Access Protocol is defined in IETF RFC 2060.
The IMAP Connection at the University of Washington (IMAP's alma mater, where the protocol was first drafted and implemented by Mark Crispin) serves as a comprehensive information repository regarding all things IMAP.
Thanks to Jason Lavoie for assistance with this article.
Return to MacDevCenter.com.
BIG PROBLEM WITH POP
2010-03-26 20:16:21 jchoa [View]
Help. Get me back to POP.
2006-02-27 14:42:29 noodlehead [View]
POP vs IMAP
2006-01-12 14:44:42 Fingerman [View]
Latest mas mail app removes some IMAP options?
2005-03-17 12:14:49 gregorycarpenter [View]
Where does Mail.app store the local email?
2005-03-14 22:07:23 AnthonyDavid [View]
Mail.app and Unexisting rule regarding sent messae
2005-01-06 00:49:25 pedroNMR9 [View]
IMAP, Mac OS X and Yahoo! Mail
2004-02-22 22:57:33 openart2001 [View]
IMAP server on Mac box
2004-01-24 16:08:31 nduchastel [View]
2003-08-25 19:50:19 anonymous2 [View]
Mail app wont access IMAP folders
2003-03-30 00:52:09 anonymous2 [View]
Mail app wont access IMAP folders
2003-04-29 18:39:06 anonymous2 [View]
2003-03-01 19:41:01 anonymous2 [View]
2003-01-27 07:47:06 anonymous2 [View]
2003-01-24 12:16:28 anonymous2 [View]
2003-01-24 11:31:57 anonymous2 [View]
2003-01-21 12:23:48 anonymous2 [View]
2003-03-06 21:28:01 anonymous2 [View]
2002-12-04 09:58:40 anonymous2 [View]
2002-09-18 20:15:49 anonymous2 [View]
2002-10-11 00:50:44 carloscheng [View]
2002-09-16 16:54:24 anonymous2 [View]
2004-01-02 22:33:46 anonymous2 [View]
2003-07-23 23:45:10 anonymous2 [View]
2002-07-11 13:11:14 monsma [View]
2002-06-04 11:14:31 mdahlquist [View]
2002-06-02 07:44:18 snfettig [View]
2002-06-01 05:24:51 cwrowley [View]
2002-05-29 12:09:00 mkinzie [View]
Using Entourage and Mail.app
2002-06-04 11:20:32 tylerkelly1 [View]
2002-05-24 17:01:51 allenwatson [View]
2002-05-24 21:45:05 carloscheng [View]
2002-05-21 22:45:04 loopless [View]
2002-06-04 11:14:56 tylerkelly1 [View]