A faster way to speed up Mail.app

SpeedymailUPDATE: A number of posters in the comments have pointed out that it is possible to run this command on just one line in the Terminal and to leave some of it out. See the comments if you are interested in more fancy ways to get the job done.

As everyone knows, it is possible to get quite a speed boost out of Mail.app by stripping all the bloat out of its Envelope index, an SQLite database Mail uses to store senders, recipients, subjects and so on.

In a past Hawk Wings tip , I suggested that quitting Mail, deleting the Envelope file and restarting Mail would force a rebuild that produces a leaner, faster email experience.

In October last year Dallas noticed a faster way to get the same result and posted it in the comments to that tip.

And there it remained until I noticed that Shaun Inman (an iCelebrity and developer of Mint which counts the peeps on Hawk Wings) had noticed it.

Here it is.

1. Quit Mail.

2. Open Terminal.

3. Type the following:

cd ~/Library/Mail
sqlite3 Envelope\ Index

An sqlite> prompt will appear.

At that prompt, type vacuum subjects;.

After a short delay, the prompt will return. Type Control-D to exit.

4. Restart Mail and enjoy the extra speed.

The first time he tried this, Rob Griffiths of macOSXHints reduced his Envelope index from 25.9MB to 4.5MB. My result was less dramatic (21.6MB -> 17.6MB) but Mail.app still felt a lot more zippy.

Some anecdotal evidence suggests that POP users don’t see the same reductions. Can any POP user out there confirm this?

UPDATE: It is easy to automate this using iCal and an applescript. See “Automating the Envelope speed trick“.

  • Digg
  • Facebook
  • Delicious
  • StumbleUpon
  • Evernote
  • Share/Bookmark
Tags: , , , , , , ,

Related posts


253 Responses to “A faster way to speed up Mail.app”

  1. Jim says:

    Hi, does this tip work in Snow leopard?
    Many thanks

  2. Patrick says:

    Yes, works in 10.6.

  3. [...] in the Terminal which helps to optimize your email subject lines. In fact, after reading through some of the comments on this post which talks about the process, you can run the same command of “vacuum” on a variety of [...]

Leave a Reply