MGG Answers - Tips from the Mac Geek Gab
How to Clean Up and Rebuild Apple Mail Data
Question:
Joe writes: My Apple Mail mailboxes appear to have become corrupted; when I click on a mailbox in Mail, no messages appear. Following the instructions in Mail’s help files, I used the Mailbox > Rebuild command on an individual mailbox and it solved the issue.
My problem is that I have hundreds of mailboxes and it would be too time consuming to perform this step on each box individually. Is there a way to perform the rebuild command on all my mailboxes at once?
Answer:

MAIL MAIL MAIL!
There are two methods to rebuild your entire mail library, including all of your mailboxes. The first is to navigate to a folder in your user directory. In Snow Leopard, this folder is ~/Library/Mail and in Lion it’s ~/Library/Mail/V2/MailData. Inside both of these folders is a file called “Envelope Index” that stores all your mailbox data, among other things.
Quit Mail, then delete this file. Once deleted, relaunch Mail and the file will be rebuilt, along with your mailboxes.
The second method involves using Terminal. Open up Terminal and type the following command using the correct path for your operating system. For Lion, it’s:
sqlite3 ~/Library/Mail/V2/MailData/Envelope\ Index vacuum index For Snow Leopard, the command is:
sqlite3 ~/Library/Mail/Envelope\ Index vacuum index Remember, you should only have to perform one of these methods, not both. That should solve your problem and rebuild all of your mailboxes.
Recent Headlines - Updated May 25th
- Thu, 7:56 PM
- News - Jonathan Ive Tells BBC He Wants to Stay at Apple
- 7:44 PM
- News - Apple’s European Head Departs
- 6:01 PM
- News - Apple Pulls Rogue Amoeba’s Airfoil Speakers Touch from App Store
- 5:33 PM
- Product News - Apple Updates Aperture for External Editors, Snow Leopard
- 5:23 PM
- Mac Geek Gab Premium Podcast - MGG 399: Five Questions from Three Scotts
- 5:16 PM
- News - Apple & Others Settle Mobile Lawsuit With Patent Firm SimpleAir
- 4:44 PM
- Editorial - How the Ripples in Apple’s TechSphere Will Influence Us
- 4:02 PM
- News - Microsoft Wins Motorola Android Device Ban in Germany
- 3:14 PM
- News - Jury: Google’s Android Doesn’t Infringe on Oracle’s Java Patents
- 2:41 PM
- Quick Look Review - Casellet: iPhone 4S Case and Wallet Combined
- 1:12 PM
- Deal Brothers - 13” MacBook Air 1.86 GHz Intel Core 2 Duo: $1,099
- 11:18 AM
- News - Sharp Teams with Foxconn for iPhone Display Production
The Mac Observer Reader Specials
Macsales Add 2nd Hard Drive or SSD to Mac mini, MacBook or MacBook Pro. 1TB of Hard Drive or SSD Capacity from $64.99! Video Guides Make it easy - OWC DataDoubler - Macsales.com
Mac RAM Upgrades: MacBook Pro 16GB kits $475, 8GB Kits for $119.99! iMac 16GB RAM Kits (4x 4GB) for $229.99! Mac Pro Memory 32GB Kit for $399.99, 64GB Kit for $889.99! Mac Hard Drives 2TB Seagate SATA II for $249.99! Click Here!
If you're using a Mac, then you've gotta check out PokerOnAMac.com. Online casinos and poker rooms are literally giving away cash and the casino sites at Poker on a Mac do the unthinkable, they actually reward! Join today, the download is free!
Looking to find online casinos for mac? We can help you find the best real money casino sites where you can play your favorite casino games including blackjack and slots.


Jim Tanous
11” MacBook Air 1.6GHz dual-core Intel Core i5: $829.00 Delivered
Samsung S22B300B 21.5” LED Backlit LCD Monitor: $129.99 Delivered
Canon imageCLASS Monochrome Multifunction Laser Printer: $129.99 Delivered
