I have been using the built-in email client from Apple’s Leopard OS (Mail.app) for a couple of months now. This transition has been very good for me and I can tell it has helped increase my work productivity. Currently my computer carries and handles more than 100 000 email messages, which I carry around due to the extremely fast search capabilities built into Mac OS X.

I have worked with this application since February 2008, and it started to go a bit slower: opening the application takes visibly more time, sorting and searching are slower.

The trick to save a few seconds while performing these operations is to rebuild the SQLite database that Mail.app uses to store its index. The file (Envelope Index) is located under ~/Library/Mail/ and all it takes is a simple SQLite command:

cd ~/Library/Mail/
sqlite3 Envelope\ Index vacuum

This rebuilds the internal database of Mail.app and you will be able to see the results right away with large mailboxes.