Apple Mail Shows Home Directory

Here’s something I just figured out a year+ too late. If you’re using Apple Mail (at least in version 2.0, but probably others as well) to access an IMAP server for a Unix account with shell access, it will treat your home directory (i.e. ~) as the mail folder. This is almost always wrong. It may work for mail only accounts, but regular shell accounts usually place the mail somewhere else; for instance in ~/mail.

To tell Apple Mail where the mail folder is, place the relative path to the mail folder (starting fromn your home directory) in the Advanced tab of the Accounts pane of the Preferences dialog:

IMAP Path Prefix: mail

Personally I think Apple should have asked me for this information when I set up the account instead of forcing me to hunt it down. Perhaps they figure few people have real shell accounts any more.

Now if I can just figure out where or what the equivalent preference is in Thunderbird I’ll be good to go.

Thunderbird Solution

It looks like Thunderbird is hiding the same thing in an Advanced preference as well. To find it you have to open the account’s Properties, then select “Server Settings”, then click the “Advanced” button. That shows you this dialog:

IMAP server directory: mail

In the last text field, enter the relative path to your mail directory.

You’ll also want to uncheck “Show only subscribed folders” since everything in your mail directory is in fact a mail folder. This preference is how Thunderbird avoided Apple Mail’s problem of showing me everything in my home directory. Consequently the bad configuration was less obvious and bothersome than it otherwise would have been.

I’m conflicted as to whether or not this was a good idea. If the problem had been more obvious and apparent, I might have been able to fix it sooner. As it was, I could only figure out how to fix Thunderbird once I figured out how to fix the more obviously broken Apple Mail. Generally I prefer to spot my mistakes as early and obviously as possible. That way they do less damage over time, and are easier to fix when I find them.

One practical impact of this flaw: I had inadvertently accumulated almost a gigabyte of random email in my home directory on IBiblio, just wasting space.

Conclusion

I can’t help but think that there’s a hole in IMAP here. Apparently the IMAP server is smart enough to tell the client where the INBOX is, since I was always able to find that without telling Thunderbird or Mail to look in the mail directory. However, it’s not smart enough to tell the client that the other folders are in the same place; nor are the clients smart enough to figure this out on their own.

One Response to “Apple Mail Shows Home Directory”

  1. Amy! Says:

    Not an IMAP (protocol) problem, but an implementation (probably UW-IMAP) problem.

    The protocol definition is (arguably) ambiguous on the location of folders (older versions of UW-IMAP didn’t do this; there was some squalling when it changed defaults). So far as I know, the only IMAP server that does this is UW-IMAP; since it was the first and one of the most complete implementations for a long time, it is also nearly ubiquitous for IMAP deployments.

    Suggest to your providers that they consider installing a different IMAP server, preferably one with more attention to security issues (and this *is* a security issue). I don’t want to provoke a flamewar by making recommendations, but I’d recommend dovecot (which is nearing its 1.0 release, and probably does the things that you need it to do). Definitely switch if this is *your* server; if it’s ibiblio’s, then all you can do is ask, prolly.

    Amy!

Leave a Reply