Filed under: Software, Tips and tricks, Internet Tools
Mail slowing you down? Rebuild its database
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!]

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 2)
Andrew said 10:19AM on 4-12-2006
I don't have an Envelope Index. Weird. I found both Mail folders and I spotlighted it and nothing came up.
Reply
Chris Alford said 10:39AM on 4-12-2006
David, I've got a tip idea to blog. How do I contact you ?
Reply
David Chartier said 10:52AM on 4-12-2006
#2: At the very bottom of our categories column on this page is a "Resources" section. The first link in there is "Send us news tips," and it's a form very much like the comment forms on our posts. Submit it that way and we'll be happy to take a look!
Reply
Wheels said 10:57AM on 4-12-2006
Does what you suggested accomplish the same thing as going to the mailbox menu in mail and clicking on rebuild?
Reply
Snaggy said 11:18AM on 4-12-2006
For your geeky delight....
Before: 1,291,904,272 bytes Mail folder, 10 MB Envelope Index
After : 1,289,159,073 bytes Mail folder, 7.5 MB Envelope Index
other noteable effect... highlighted some of my messages brown. Don't know what is up with that.
I "Rebuild" my mailboxes often though, (and that also highlights random messages in brown)
Reply
Kevin said 11:27AM on 4-12-2006
Is the Mail support folder the whole Mail folder in my home directory?
Reply
Stephen said 11:27AM on 4-12-2006
Or you could use Entourage...
Reply
Tom Twigg said 12:00PM on 4-12-2006
Hmmm. I don't know what was up with your Envelope Index, but mine was only 3.6 MB and I have never "rebuilt" it ... and I have serious mail in numerous mailboxes dating back at least 4 years. Perhaps a setting in Preferences is causing yours to bloat?
Reply
David Chartier said 12:04PM on 4-12-2006
#7: Sure, since Entourage syncs *perfectly* with .Mac and works great with other apps like ecto and Safari and endo and iSale and OS X's Services and - oh wait, it doesn't do any of those things. :P My bad ;)
#6: Yea, that entire Mail folder in your Library is the support folder. It'd be a good idea to back this up before trying any of this rebuild stuff, and also a good idea to back it up as a general practice, especially if you use any POP instead of IMAP email accounts.
Reply
Chris Alford said 12:32PM on 4-12-2006
Thanks David. I sent the tip..
Reply
Tomas Insausti said 12:45PM on 4-12-2006
gentlemen,
lately, i've seen yr posts are getting more and more idiotic, lacking substance, lacking value.
this last one tops it, prompting me to discontinue the tuaw rss feed
and the inclusion of yr site in my mac tab.
check again: mail app has a "rebuild" button in the menu bar, under
"mailbox".
you trying to sell stale fish. get moving!
rgds,
tomas insausti
Reply
Colt said 12:48PM on 4-12-2006
Did this tip and it saved some space. I did have one crazy side effect (as another post mentioned) and this is some of my message are now highlighted in dark brown. Any ideas what that means (it's not the same highlight color as 'similar messages")?
Reply
Bo Moulton said 12:56PM on 4-12-2006
Perfect!
I've been backing up my emails in specific folders for a long time, only problem is getting them back into mail once a re-install is done.
This actually did the trick!
Thanks for the tip, keep up the good work.
Reply
Tyler Jacobson said 1:03PM on 4-12-2006
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.
Reply
Marc-Siebren said 1:05PM on 4-12-2006
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?
Reply
ambimb said 2:03PM on 4-12-2006
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.
Reply
Chris Allbritton said 2:23PM on 4-12-2006
Does anyone know what this will do to MailTags 1.2.1 metadata?
Reply
colt said 2:49PM on 4-12-2006
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!
Reply
Splashman said 2:59PM on 4-12-2006
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".
Reply
Snaggy said 5:47PM on 4-12-2006
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
Reply