Drastically Speed up Mail.app

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 Control D

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.


 
 

9 Responses to “Drastically Speed up Mail.app”

  1. 4Avatars
    macuser
    The easy way: http://www.1802.it/speedmail.php (compatible with Leopard)
    Or get VacuumMail from http://www.musingsfrommars.org/ (not compatible with Leopard as of this writing)

    ;-)

  2. macuser, Thanks for the links. If there's a way to do it without an application I'd always prefer none, but this is great for people not comfortable with Terminal.

  3. 4Avatars
    Charlie
    I ran the following command to see the size of my envelope index:

    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.

  4. Charlie,

    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.

  5. 4Avatars
    Charlie
    Yes, ls works but when I tried the command I found out that the size of the envelope index that way is not as accurate as when you look it up in the library/mail/envelope index itself. This is what it said when I ran the command:

    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.

  6. Hi,

    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


  7. Trackback
    Drastically Speed Up Mail.app Part II - MacTips: OS X Tips & Tricks

    [...] wrote last week about how to speed up mail by stripping out unnecessary information. If you do not care about [...]



  8. Trackback
    10 Best Mac Tips of 2007 - MacTips: OS X Tips & Tricks

    [...] 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] [...]


  9. At Version Tracker, there's an AppleScript to do the job:

    http://www.versiontracker.com/dyn/moreinfo/macos/33717

Post a comment to "Drastically Speed up Mail.app"



Support MacTips

MacTips Newsletter


Random Popular Tips

Recent Comments

Recent Discussions

MacTips Poll

What level of tips would you like to see?

View Results

Loading ... Loading ...

Friends of MacTips

Subscribe to MacTips

Site Links