Apple Mail.app and Courier IMAP Server

Overall, Apple's Mail.app has pretty lousy IMAP support. Mail.app can be pleasing to use for basic needs. POP accounts fare well. But get it into a situation where you need some control, like subscribing to particular mail folders, and you're going to be disappointed. Also, if you really stress it with multiple IMAP accounts, you may be staring at a SPOD more than you'd like. However, I was able to pass on the following tip recently.

If you use Mail.app to connect to an IMAP server based on Courier, you'll notice a few things right away. First, all of your folders will be subordinate to the INBOX - that's just the way Courier does things. This tends to make Mail.app flip out: you won't be able to store your 'Sent' or 'Drafts' on the server, for one. A major point for IMAP!

Go check out the Advanced tab for this account, though:

Mail.app Advanced Tab

Figure 1: Mail.app's Advanced tab

For your Courier based mail accounts, you'll need to set the "IMAP Path Prefix" to "INBOX". This way, since everything is prefixed by INBOX, Mail.app will be able to find the structure that it's looking for. It does find the INBOX nicely, as that's part of the IMAP RFC - there will always be an inbox named "INBOX" found at "INBOX".

I've been asked this a number of times now, and suspect that it's very prevalent, as many, many ISPs use Courier. It's a good POP/IMAP server and was one of the earlier ones to support users outside of system accounts. It just tends to give Mail.app fits in its default configuration.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The completely brain dead

The completely brain dead thing is that for all the vaunted ease of use of Mail.app, this is something it gets SO wrong, and it's completely unnecessary, as the IMAP spec includes *how* to find out what the prefix should be.


nigelkersten@zombie: ~ $ telnet mail.somewhere.org 143
Trying 149.171.20.30...
Connected to mail.somewhere.org.
Escape character is '^]'.
* OK mail.somewhere.org Cyrus IMAP4 v2.2.12-OS X 10.3 server ready
1 LOGIN someuser withapassword
1 OK User logged in
1 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE LOGINDISABLED AUTH=CRAM-MD5 AUTH=GSSAPI
1 OK Completed
2 NAMESPACE
* NAMESPACE (("" "/")) (("Other Users/" "/")) (("Shared Folders/" "/"))
2 OK Completed

If you try the same thing with Courier, you should see INBOX as the user prefix in the NAMESPACE result.

I get particularly frustrated with Mail.app in these situations as it seems like if you've created at least one folder before you change the path prefix, Mail.app never quite gets it right... and you have to trash the account and set it up again.

I've gotten into the habit of deliberately making such accounts with an incorrect password, then setting the path prefix, then setting the correct password, just so Mail.app doesn't get confused.

Sigh. I've spent the last few days trying to give Thunderbird a serious go. I do enjoy having a mail client that doesn't beachball so regularly, but I really really do miss the polish and integration of Mail.app... ;)

Other MUAs

Frankly, I still like Entourage a lot, too. However, being a devotee of Daylite and Marketcircle's very nice DMI (Direct Mail Integration) plug-in, I'm tied to Mail.app. Of course, just about every other MUA handles IMAP better than Mail.app. Here's hoping for improvements in 10.5!

Worse

It's actually even more bizarre than that - there's no problem saving Drafts or Sent, etc. on the server without a prefix (I've been doing so since 10.0 IIRC). The catch is that you have to have *two* IMAP accounts - once you do, everything works normally (e.g. subfolders show up correctly, you can select them for use as one of the special folders, etc.)

Apple has closed numerous IMAP-related bugs which I've filed as "Duplicate" so there is apparently some work going on but it's not enough. The sad thing is that it's still by far the best IMAP client I've used - even looking past the UI Thunderbird is glacially slow in comparison (try getting it to cache mail locally without having to use an offline sync as a substitute for "Get new messages"), and as for Entourage or Outlook . . . well the less said the better. Of course, when I need speed or features I still end up having to resort to mutt - apparently real searches are beyond the ken of GUI users.

Not sure about that

Hmm. You shouldn't have to have two accounts?

I tend to just set the prefix for INBOX style IMAP accounts, and then choose the folder I want as a special folder. It then disappears from the normal mailbox view, and appears within the Drafts etc view.

I just spent the last two weeks trying out Entourage and Thunderbird, and have come back to Mail.app.

The sad conclusion I have is that I simply had too much email, even though most of it was list mail that was stored locally. Once I deleted around 100,000 messages from local folders, Mail.app became much zippier again (and I have about 2.5 Gb of IMAP mail)

Weird

acdha - First, great use of the word 'ken'.

It's bizarre to need two accounts to make one work properly. I wouldn't have thought of that. It must also require two IMAP accounts, as the person I helped already had other accounts, albiet POP. But you hit the nail on the head - the problem was saving sent and drafts. Checking and sending mail was just fine.