Skip to Content

Mail slowing you down? Rebuild its database

Apple's flagship email client had me banging my head against a wall again when I finally dug up this tip on rebuilding Mail.app's 'Envelope Index' SQLite database at Hawk Wings (If you're wondering what that file is all about, check out Hawk Wing's "What's in your Mail folder?" post). Forcing Mail.app to rebuild this file is as simple as quitting the app, browsing to your ~/Library/Mail/ folder and dragging out the file called 'Envelope Index' to your desktop (I'd recommend making a backup of your Mail support folder before attempting this. Don't say we didn't warn you). Start Mail.app back up and it will give you a message about re-importing or re-indexing all of your messages (sorry, I forgot to screencap the message), and depending on how many you have it could take a couple minutes. I have over 13,000 emails and it didn't take my G4 PowerBook long at all.

My Envelope Index was over 300 MB before I started this, and after it was all said and done that file weighed in at less than 4 MB. Putting Mail.app on this kind of a weight loss program can seriously speed it up and generally improve its performance; no more clicking on a new message 10 minutes after Mail.app notified me about it only to be greeted by "this message has not been downloaded yet..." silliness.

It is also worth mentioning that this tip is probably more of a troubleshooting technique than something you should work into your regular maintenance tasks. A commenter on this tip at Hawk Wings pointed out that this rebuilding operation nullifies a couple of mailbox settings. If you have set any specific IMAP mailboxes to be used for trash or junk, Mail.app will forget those settings after this rebuild. Still, I think the performance gain and all-around less-schizophrenic behavior of Mail.app was worth having to reset a couple of preferences.

[UPDATE: Some commenters have pointed out that Mail also has a Rebuild option under the Mailbox menu (at least in Tiger). I tinkered with this on one of my 4 IMAP accounts and it seems to do the same trick with far less fuss. Thanks for the tip!]

Apple's flagship email client had me banging my head against a wall again when I finally dug up this tip on rebuilding Mail.app's...
 

Add a Comment

*0 / 3000 Character Maximum

23 Comments

Filter by:
giamadrini

Help!! Everytime, I open mail app it crashes. I've tried rebuilding, removing the envelope index and various other online suggestions and nothing has worked. As soon as it goes online it crashes. Replacing the mail app from another computer did not work either. I've got several email accounts and a ton of email (14,000). I hate to think that I will never see it again. Does anyone have any suggestions on what could be causing this and how I can resolve the issue?

April 18 2006 at 3:31 PM Report abuse rate up rate down Reply
Adam Jury

I only use POP accounts -- no IMAP, no wacky corporate networks, nothing beyond a few email accounts and at least six point eight bazillion messages, and the file size reduction was only 4MB, down to 20MB from 24MB, and within a few hours it had grown back up to 23MB.

April 15 2006 at 8:18 PM Report abuse rate up rate down Reply
Marc

OK, it seems the brown labeling is very different from what I thought - my apologies for my reaction then.
I hope you guys will find a solution...

April 13 2006 at 5:08 AM Report abuse rate up rate down Reply
Snaggy

Colt, yep, this is exactly the same brown labeling that I get too when rebuilding. (It's not the spam labels)

The only way I've been able to get rid of the brown is use Mail Labels applesript. Select the message then use the applescript to label it "none."

http://www.twistermc.com/blog/2005/06/03/labels-for-apples-mail-application

April 12 2006 at 5:47 PM Report abuse rate up rate down Reply
Splashman

I have approx. 9,000 messages; Envelope Index is ~3 MB. I agree with earlier poster -- if David's Envelope Index was 300 MB, something was/is wrong with his machine.

To everyone else, if your Envelope Index is less than 500k per thousand messages, don't bother with this "tip".

April 12 2006 at 2:59 PM Report abuse rate up rate down Reply
colt

Nope...I'm not talking about messages in light brown text marked as possible spam, I'm talking about dark brown fully-highlghted messages. Highlighted in the same fashion as related messages are (in my case, related messages are highlighted in a light blue). Here's a pic of my "brown mail" http://www.coltwest.com/brownmail.jpg Anyone know what this is all about? I can't change the color. It hasn't been marked as spam, flagged, etc. It's just brown!

April 12 2006 at 2:49 PM Report abuse rate up rate down Reply
Chris Allbritton

Does anyone know what this will do to MailTags 1.2.1 metadata?

April 12 2006 at 2:23 PM Report abuse rate up rate down Reply
ambimb

FWIW: I did this and rebuilding for over 72,000 messages took over 20 minutes on my 1.2Ghz iBook G4. Envelope file went from 31.9MB to 29.5. I did this b/c Mail seemed to be kind of slow so I thought it might be worth it if I gained some speed. I haven't noticed any speed difference.

April 12 2006 at 2:03 PM Report abuse rate up rate down Reply
Marc

messages in brown, as mentioned by posters #5 and #11, are messages that are considered to be possibly spam. I.e. they fit the spam recognition rules. You can improve these recognition rules by deciding on these brown-marked mails, if they are spam or not. How to do that (open the mail? preview it?) I don't remember, but I do remember it is fairly easy and logical.

I am also really curious if 'Rebuild Mailbox' has the same function as this tip, as mentioned several times before. Does anyone know?

April 12 2006 at 1:05 PM Report abuse rate up rate down Reply
Tyler Jacobson

I had a problem where I couldn't move a message from junk into my inbox without crashing the mail app (unless I set a rule). I seemed to be a lone person with that issue. I followed the above and all works great. Glad to see this posted.

April 12 2006 at 1:03 PM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.