Using IMAP on Mac OS X
Pages: 1, 2, 3
Organizing Mailboxes
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.
Inbox
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.
Creating and Editing IMAP Mailboxes
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.
Special Mailboxes
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.
Drafts
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.
Tip
As you can see in Figure 4, I gave my drafts mailbox a
leading exclamation point in its name, for the simple reason
that !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
time.)
Sent Messages
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).
Trash Mailbox
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.
Organizing Messages
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.
Message Flags
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.
- Recent
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.- Seen
-
A message with a
Seenflag has been read.Mail.app reacts to the absence of this flag; a message lacking a
Seenflag (which allRecentmessages do, by definition) gets a blue dot. Mail.app does not distinguish between unread mail that arrived since the current session started (and has aRecentflag) and unread mail carried over from a previous IMAP session (and therefore has no message flags).Related Reading
Learning Unix for Mac OS X
By Dave Taylor, Jerry PeekSelecting 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.) - Answered
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 aSeenflag.- Flagged
-
The
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). - Draft
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".- Deleted
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".
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
Delete flag.
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
clients).
That same checkbox also dictates Mail.app's behavior with
actually erasing deleted messages. If checked, then Mail.app gives
you a Mailbox-->Empty
Trash
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.
Using IMAP Securely
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.
References
The IETF maintains the RFC documents that define the standards of POP and IMAP (and most every other technology the Internet uses).
POP
Version 3 of the Post Office Protocol is defined in IETF RFC 1939.
IMAP
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.
Jason McIntosh lives and works in and around Boston. He has co-authored two O'Reilly books, Mac OS X in a Nutshell and Perl & XML.
Return to MacDevCenter.com.
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 32 of 32.
-
Help. Get me back to POP.
2006-02-27 14:42:29 noodlehead [Reply | View]
I successfully created an IMAP account but it is so terribly slow (I use Entourage for all my mail) that I can't stand it any more. A simple click on a message causes all this activity where I sit watching the progress window. I want to change back to POP but can't figure out how. Any help, please. Thanks
-
POP vs IMAP
2006-01-12 14:44:42 Fingerman [Reply | View]
My DSL isp shows setup via POP. Is this therefore required in order to use that particular DSL provider?
Thanks in advance.
-
Latest mas mail app removes some IMAP options?
2005-03-17 12:14:49 gregorycarpenter [Reply | View]
Being a new Mac user (well actually I don't use it myself but I got tired of being a windows admin for the rest of the family :-) I was thrilled to find this article. But when I tried to follow the insrtuctions for having sent messages stored on the (.Mac) server I discovered that the "save unsent messages" preference described in the article doesn't show up at all under the "COmpose" tab in may mail preferences.
Does anyone know of this is configurable some other way, or has it just gone away?
-
Where does Mail.app store the local email?
2005-03-14 22:07:23 AnthonyDavid [Reply | View]
Is it stored in a legible form? (strings(1) is fine, I just want the read the "meat" of the message)
I went searching for the "mbox" of Mail.app as I was ssh'd in and wanted to check my mail.
The reason I want to do this is because I left my iBook at home with Mail.app still running, auto-POPing into my mail server. I saw an important message in my maillog but it has ended up on my iBook.
-
Mail.app and Unexisting rule regarding sent messae
2005-01-06 00:49:25 pedroNMR9 [Reply | View]
Hello
I would like that whenever I send an email, MAIL.app offers me to store the sent message Not in the SENT Folder, but in one that I would pick up manually. To me, this is the best way to follow-up conversation.
This is obviously not feasible with a simple RULE
I assume there must be a way using apple script, but I don't know the language.
Can someone help me out on this?
Thanks
-
IMAP, Mac OS X and Yahoo! Mail
2004-02-22 22:57:33 openart2001 [Reply | View]
I just downloaded Mozilla Thunderbird to manage my IMAP mail. It looks nice but I could not access Yahoo Mail because apparently Yahoo blocked the POP access.
On searching the web, I found that PC's have programs that could do a workaround but not for Mac OS..especially Panther. Does anybody know anything about this? Would appreciate any information.
Thanks.
-
IMAP server on Mac box
2004-01-24 16:08:31 nduchastel [Reply | View]
This was a great article.
That said, I want more ;)
What about setting up an IMAP server on my Mac OS X box?
i.e. The deal would be to have this IMAP server download ALL of my emails from my ISP to the Mac OS X box. Then, I could use this same Mac OS X box or my other Windows PCs to connect to my IMAP server and access my email. That way, I control all of my emails and have no storage limits other than what my hard disks can handle.
What do you think?
Specifically, does anyone know of a solution (i.e. would rather buy something than have to download source + compile + become an IMAP guru), for this ?
-
Account type
2003-08-25 19:50:19 anonymous2 [Reply | View]
This was grayed out, so I have not gone beyond Fig 2 in the first paragraph!
Thank you for any advice
Elizabeth Noble
-
Mail app wont access IMAP folders
2003-03-30 00:52:09 anonymous2 [Reply | View]
I had a odd problem on my mac (10.2.4) where my defaults all got reset (probably due to low disk space. Once I cleaned things up I found my Mail app wont access any of my IMAP folders on the server any more. I tried deleting and recreating the account and it accesses In and receives messages, but it doesnt show any of the exisiting folders on the server or let me create them (I use Courier IMAP with QMAIL mailboxes etc). Mozilla fires up and finds them without any problem.. any clues as to what I am missing?
thanks!
-
Old 'Drafts' replys don't set 'Answered' flag when sent
2003-03-01 19:41:01 anonymous2 [Reply | View]
> Mail.app sets a message's Draft flag if it's an
> unfinished, unsent message you're storing in an
> IMAP mailbox, as described in the section called "Drafts".
One problem is that if you're replying to a message, and
save the reply as a draft, then finish and send the draft later, the 'answered' flag doesn't get set on the original message.
This is a real drag for me, as I save skeleton replies as drafts, and flesh them out and send them later (so I can reply to them as they come in); but when I look at my mailbox, I'm missing the 'answered' flags that tell me which messages I've responded to and which ones I haven't.
I wonder if this is a limitation in the asynchronous manner in which I compose and send replies, or if it's a bug in mail.app (and works properly in other mail applications).
-
Thanks - and SMTP question
2003-01-27 07:47:06 anonymous2 [Reply | View]
Hi,
In general, I found "Using IMAP on Mac OS X" extremely clear and helpful.
However, I am still have a little trouble getting this working correctly. I am hoping someone out there might be able to help.
At my current client, I am stuck behind a firewall that blocks almost all ports. However, SSH is allowed. I have successfully configured IMAP to tunnel through SSH so that I can fetch my mail from my ISP. However, I have been unable to send mail. I don't have SMTP on my local laptop, but SMTP would be blocked by the firewall anyway. Without having my ISP do anything is there anyway I can send mail over SSH? Would that mean tunneling SMTP?
If not, I can access SMTP on my local server running in my basement. It has SMTP on it and I have complete control over it. However, if I tried this approach I'd quickly get stuck trying figure out to set things up.
If anyone has any pointers for me I'd appreciate it.
Thanks, Spencer
-
POP-like auto download-and-delete via "Rules" and "Transfer"
2003-01-24 12:16:28 anonymous2 [Reply | View]
One option for keeping the quota low on your IMAP server is to set up a "Rule" in Mail.app (choose "Preferences" and then "Rules") that automatically transfers messages from the server to local directories on your computer.
So, e.g., I can set up a rule that says "If any message is to me (i.e. select "To" and enter my e-mail address), then Transfer the message to this local "Inbox" folder that I created. Then, this local inbox folder is the one I always use, and my new mail automatically appears in that folder instead of the main "Inbox" folder. Thus I ignore the main "Inbox" folder in Mail.app and just use my local directory.
Can do the same thing with the "Sent" folder: Create a rule using the "From" field...
Clearly this not totally ideal, but it's quite adequate for me.
-
How to get Mail.app to download-and-delete (e.g. like POP)?
2003-01-24 11:31:57 anonymous2 [Reply | View]
Thanks for the article, but I didn't see any mention of how to get Mail.app to download messages to a client machine and then delete them from the server. When I check the Help pages, it seems that you can do this with POP accounts, but they never come out and say "Sorry, you can't do this with IMAP Accounts"
Your article seems to indicate that you can use IMAP to work in a POP-like way, "depending on your mail client". So, presumably a fully-featured program like Mail.app can do this, right?
My problem is: My quota on my IMAP server is exceeded, and all along I thought I was keeping it low by downloading messages onto my Mac. I don't want to have to manually select which messages to download and store in some other directory; rather, I just want the program to delete mail from the server as soon as it's been downloaded, so that what I see as my "Inbox" is always the set of mail I received... (I have no interest in accessing my mail from multiple machines; I prefer to access my mail only using my Mac laptop.)
How do I do this?
Thanks very much.
-
IMAP folders
2003-01-21 12:23:48 anonymous2 [Reply | View]
There is no command in Mail.app to retrieve the latest list of IMAP folders. When I create new folders in Outlook Express and Eudora, Mail does not display them or their contents. Though those clients will display new mailboxes I create with Mail.
Any help?
-
Sent folder
2002-12-04 09:58:40 anonymous2 [Reply | View]
I'm using mail.app connecting to a Courier-IMAP server. When I select "Store sent messages on the server" the messages aren't stored anywhere, client or server.
I've tried creating a 'Sent' mailbox on the server but this doesn't help.
I don't know if this is a mail.app issue or a Courier-IMAP problem.
Any suggestions?
-
Storage limits
2002-09-18 20:15:49 anonymous2 [Reply | View]
But the primary difference is who sets the storage limits, not that the message takes up the same amount of space. For example, many educational institutions set server mail levels at 10MBs. That can be a lot of mail when you are just rapidly downloading a days worth of message. But its not that much space, when your thinking 50 messages a day over the course of a week.
POP allows you to comply with server side limits, while storing much more mail. You could say, I have an 80GB drive, and I'm going to allow 2GB be just for mail storage. Not too many vendors are going to give you 2GBs to store you mail on the server. Typically 4MB to 50MB are pretty standard.
This is nothing against IMAP. I'm planning to set-up IMAP access for a fe of our PowerUsers, who require access from four to five locations. I'll be giving them 200MB each for storage. -
Storage limits
2002-10-11 00:50:44 carloscheng [Reply | View]
Well this is an interesting point you point out.
I have been thinking from the perspective that IMAP will be set on a company own mail server.
But for the case of ISPs or hosting environment (e.g. Unversity mail account), I agree you are right: one can effectively 'store' more message with POP without violating the limit. This couples well with the fact that most ISP only offer POP.
Carlos Cheng
-
IMAP Netscape
2002-09-16 16:54:24 anonymous2 [Reply | View]
I have netscape webmail wich supports IMAP, but when i set up the mail.app i get an error -
IMAP Netscape
2004-01-02 22:33:46 anonymous2 [Reply | View]
Like to know as well
Used to have Netscape 6, and Mozilla 1 (?)
And I could down load my email from netscape
but now have Thunderbird and not sure it reacts to
imap.netscape.net but my password does not seem to work, but I can sign on at the same time and look at my email?
Mike
abrigon@yahoo.com
-
msg chunks
2002-07-11 13:11:14 monsma [Reply | View]
Hello
Does anyone know if the message chunk size can be increased. I believe that it is 2k by default and would like to increase it to try and help reduce the server (Exchange5.5, gross) CPU utilization.
Thanks Ian
-
IMAP SSL and Mac.com email
2002-06-04 11:14:31 mdahlquist [Reply | View]
Using the "Mac.com" option in setting up seems to block usage of SSL. The port number snaps back to 143.
However, using the IMAP option and setting up the same account allows 993 to stay active.
Anyone else see this happening?
-
Account Limits -- Bug in Mail.app or OS X?
2002-06-02 07:44:18 snfettig [Reply | View]
I have been an IMAP user for some time now and when I finally moved to the Mac platform from Windows, I found something oddly annoying with all of the mail programs (Eudora, Mail.app, Entourage, Mozilla Mail, etc) - I can only view 4 IMAP boxes at a time. With Mail.app, the other mailboxes always appear offline and I cannot get into them unless I restart the application. With Entourage, the process times out, and I need to wait around 4 minutes before I can open the fifth (6th, 7th, etc) mailbox -- it is always 4 at a time. With Mozilla Mail, it is the same thing... Eudora I couldn't even set up properly. Seeing as I am the designer and administrator of the mail server I use, I know it is not a problem with the Server or improper configuration of the client -- I have many other users with similar setups and they do not have the problem I do. (They are also not using Macs...) I won't go back to POP, but I do see this as an issue with IMAP on Macs for those of us who have many mailboxes that need regular checking.
My 2 cents.
SF
-
Deleting IMAP attachments
2002-06-01 05:24:51 cwrowley [Reply | View]
Is there any way to delete attachments from IMAP messages, while retaining the message text? I know this was possible with Eudora using POP, but I haven't figured it out with Mail.app using IMAP.
-
Using Entourage and Mail.app
2002-05-29 12:09:00 mkinzie [Reply | View]
We use Entourage on one computer and Mail.app on another. They handle sent mail and deleted mail differently. For instance, Entourage puts deleted mail into a "Deleted Items" folder and Mail.app puts it in "Deleted Messages" (or perhaps vice-versa). Also, Entourage couldn't see some of the folders (like "Deleted Messages") that Mail.app had set up. I tried to set it up so they both do the same thing, but ended up messing things up. Does anyone have any advice on a good way to set these up to work well together? (I know, it's challenging to get Microsoft software to play well with others).
Thanks,
Mark -
Using Entourage and Mail.app
2002-06-04 11:20:32 tylerkelly1 [Reply | View]
My experience has been that Mail.app has a better implementation of IMAP than Entourage (which is simply awful), but a much better implmentation is the mail client that comes with the Mozilla browser (open source version of Netscape).
Even the old Netscape 4.7X for Mac OS 9 has a great IMAP implementation. For some reason, Netscape just got IMAP right, which Microsoft doesn't seem to have a clue. In fact, even on Windows, Microsoft Outlook has the only good implementation of IMAP. Outlook Express for both Windows and Mac OS 9 don't work very well.
-
Storage limits
2002-05-24 17:01:51 allenwatson [Reply | View]
The thing that has kept me from trying IMAP is server-side storage limits. I get a lot of mail. When I have travelled in the past I tried setting things to keep messages on the server until I got back. I found that after only 3-4 days, I was getting warnings that my mailbox was full and needed to be cleaned up.
I cannot imagine how IMAP could be of benefit under such circumstances. If I have to download and delete almost every day, why not just use POP? -
Storage limits
2002-05-24 21:45:05 carloscheng [Reply | View]
To me, it seems you'll face the same problem if you use POP3. The only difference is you'll need large disk-space on the server (IMAP) or on the client (POP).
For example, if you accumulate 1MB messages everyday on server using IMAP, you'll also accumulate 1MB messages at your client should you use POP - provided in both ways you do not organize your emails regularly and delete the unnecessary. Using POP doesn't reduce the disk-space required.
Based on this, however, IMAP gives you additional advantage to read your mail from multiple clients.
- Carlos Cheng
-
Entourage
2002-05-21 22:45:04 loopless [Reply | View]
We use Communigate Pro 3.5.x ( a fantastic mail server) that supports IMAP very well. I found Apples Mail.app works great as a IMAP client.
Unfortunately Entourage has many problems with IMAP once you create a hierarchy of mail boxes/folders more than two levels deep. So bad, that unfortunately I had to revert to POP3 if I was to continue to use Entourage. Hopefully MS will fix this in the Office X service pack. I would advise against experimenting with IMAP using Entourage until they do.
-
Entourage
2002-06-04 11:14:56 tylerkelly1 [Reply | View]
Unfortunately, it still appears to be "business as usual" with Microsoft -- their apps do not play well with others. Entourage's IMAP implementation is terrible. I installed the Office X service pack, and it didn't appear to change anything.
The Mozilla browser (open source version of Netscape) has an excellent IMAP implementation. That's the one I use.





