When Mail.app has too many messages, it can take a few seconds to start. One great way to reduce this load time is by stripping out unnecessary information. Open Terminal.app and type the following command:
sqlite3 ~/Library/Mail/Envelope\ Index vacuum subjects;
To get out of the SQLite command interface, press
To see how much space your saving, run the following command before and after:
ls -lah ~/Library/Mail/Envelope\ Index
You can also run the following command if you’d like to try and gain even more performance:
sqlite3 ~/Library/Mail/Envelope\ Index vacuum body;
Mail.app should now start much faster than it previously did.

macuser
Or get VacuumMail from http://www.musingsfrommars.org/ (not compatible with Leopard as of this writing)
;-) December 12th, 2007 at 3:11 am
Brad Jasper
Charlie
s -lah ~/Library/Mail/Envelope\ Index
but terminal says command not found. Why is this and is there another way to see the size of my envelope index without running the command. Keep it simple guys, tell me step by step like I am a 5 year old...lol.
Thanks. December 12th, 2007 at 12:05 pm
Brad Jasper
There was an error when I was copying the command, it should be "ls" instead of "s".
Please try again, the command's been updated.
Thanks for bringing this to my attention. December 12th, 2007 at 12:35 pm
Charlie
Last login: Wed Dec 12 16:38:03 on ttyp1
Welcome to Darwin!
user-0cdf283:~ charlesdale$ ls -lah ~/Library/Mail/Envelope\ Index
-rw-r--r-- 1 charlesd charlesd 1M Dec 12 16:24 /Users/charlesdale/Library/Mail/Envelope Index
user-0cdf283:~ charlesdale$
But when I looked it up the longer way it says the size is 1.1 Mb Now 1 and 1.1 is not that big of a difference but I thought that the terminal.app would be just as accurate. December 12th, 2007 at 3:47 pm
heinz
if you enter "man ls" in terminal window, you get the answer:
"-h When used with the -l option, use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte in order to reduce the number of digits to three or less using base 2 for sizes."
If you use
macbook:~ hr$ ls -la ~/Library/Mail/Envelope\ Index
you'll get the size in bytes.
Regards
Heinz December 12th, 2007 at 5:12 pm
Trackback
[...] wrote last week about how to speed up mail by stripping out unnecessary information. If you do not care about [...]
December 16th, 2007 at 9:59 amTrackback
[...] Mail.app can get bloated with too many messages. SpeedMail is the easy way to trim down the index so it starts faster. If you don’t want to use an application, the following terminal command accomplishes the same thing: sqlite3 ~/Library/Mail/Envelope Index vacuum subjects; [Via Drastically Speed up Mail.app] [...]
December 23rd, 2007 at 4:20 pmPaul Foraker
http://www.versiontracker.com/dyn/moreinfo/macos/33717 March 13th, 2008 at 8:28 pm