Basics: Taming the Mail library

by Milind Alvares
Thursday November 12, 2009

Basics: Taming the Mail library

by Milind Alvares on November 12, 2009

Post image for Basics: Taming the Mail library

mail-library

I’m sure every Mac user (who doesn’t have an irrational adoration for the Gmail web interface) is a Mail user. Apple has created one of the most simple, beautiful, and powerful applications on the Mac. Coupled with a few enhancements, it’s a joy to use Mail. Except when it misbehaves. I’ve had my fair share of problems with Mail, and while it’s better in Snow Leopard, there are still frustrations that come about. Okay it’s not as bad as I make it sound, but if you ever run into trouble with the Mail app, here’s a post that will most probably sort it out for you. Fair warning: beginners only.

Understanding how the Mail Library works.

Because without that understanding, you’re at the mercy of Apple’s ingenuity. Mail stores its database in the ~/Library/Mail folder. This is the folder that contains almost everything, from mailboxes, signatures, rules, etc. If you ever need to move your emails from one Mac to another, this is what you’re looking for. The account settings and other preferences however are stored in the Plist file inside the ~/Library/Preferences folder. It’s easily an easily identifiable “com.apple.mail.plist”. This file contains your account information, account specific settings, as well as general preferences.

Restoring a Mail library

Say you lost everything but the Mail folder from your ~/Library. Painting a grim scenario here, but it happens sometimes. First step, make a backup of that Mail folder, lest it should get overwritten while doing something. Then, launch Mail, and add your accounts in. This makes sure Mail has got its library organised, and is ready to be replaced. Quit Mail. Then, drop the backed up Mail folder into your ~/Library folder, replacing the newly created Mail folder.

The main step here: delete the “Envelope Index”. This file contains all the information of which file goes where, and needs to be reset. Launching Mail the next time will prompt you to upgrade the library, and voila, your emails with all their folders will be ready and waiting.

Restoring just a folder

Occasionally Mail has a habit of crashing on launch. It’s usually if you cancelled out on a large attachment, or something like that. You have a Time Machine backup, but to go back in time you need Mail open. So, navigate into your Mail backups in your Time Machine backup, prior to when this crashing started. Copy the folder in question (inbox, usually), and paste it over the respective folder in your ~/Library.

Restoring your account settings

Say you’re traveling abroad, and need to access your email. However, you have no idea what the settings are, and there’s no access to webmail. Just copy the “com.apple.mail.plist” file from the Library/Preferences folder, and launch Mail. It should load all the settings, and then sync down the mail depending on whether you’ve configured it for POP or IMAP access.

Hopefully that covers the meat of what needs to be covered about the Mail library. If you have any handy Mail troubleshooting tips, don’t hesitate in letting us and our readers know. Next is the big one—the iTunes library. Just a few more tests and I’ll be done with that one as well.

[Header img by Brian Burns]

Reader Comments

brnmbrns November 13, 2009 at 12:02 am twitter.com/brnmbrns

I read a lot of complaints from people about Mail about how it doesn’t do this or that.
I don’t know what else I’d use on a mac?

Mail’s rules, smart folders, load time, simplicity and stability are what keep me from even looking at other clients out there.

Def worth a #1 spot left of finder on my dock. :)

   

Tony November 16, 2009 at 11:35 pm

I have a great deal of dislike for how mail handles attachments, everything else is great.

   

fidel November 20, 2009 at 8:44 pm macfidelity.de

I’m sure every Mac user (who doesn’t have an irrational adoration for the Gmail web interface) is a Mail user.

wrong ;)

Some even use crazy clients like Thunderbird ;)

Best regards
fidel

   

Leave a Comment

Previous post:

Next post: