1. Thanks for this. I was going to set up my own, but now I don’t have to! :)

    Comment by Kevin Donahue — March 3, 2007 @ 11:03 am

  2. Wish your workflow included quitting and reopening Mail around the sqlite command.

    Comment by Ben — March 3, 2007 @ 12:48 pm

  3. Oops, I had uploaded the wrong version. The correct one is up, with quit/relaunch Mail. Sorry about that.

    Comment by Steve — March 3, 2007 @ 4:46 pm

  4. Automator complained about a missing Quit Application (or something like that). So I replaced it with another Run Shell Script using:

    osascript -e ‘tell app “Mail” to quit’

    I suppose this could be added to the part that runs the sqlite3 command.

    Comment by Jim — March 4, 2007 @ 1:49 pm

  5. Jim – I had removed the Quit action for that reason (which I didn’t realize was a 3rd party action, available here), and replaced it with the same Applescript step you posted.

    Comment by Steve — March 4, 2007 @ 1:57 pm

  6. Wonderfull, wonderfull!! my was getting soooo slow I was thinking of trying other email applications. Thought Mail couldnt handle that many emails…. Now, after using this Mail runs as smooth as when i started using it. No more waiting 15 secs when looking into another folder. And after this cleanup the envelope file is still +50 MB which, i get the impression, is quite big…


    Comment by Edo — March 5, 2007 @ 2:28 pm


    Holy cow… this is the greatest little app I’ve ever seen.

    Why doesn’t apple just make my mac do this on its own?

    The improvement in speed was INSTANT and AMAZING.

    Comment by JC — November 15, 2007 @ 2:42 am

  8. Wow! Nice. Finally, I can use mail without fumbling around for the terminal and the vacuum script! SWWEEEEET.

    Comment by Shauna Kinney — July 20, 2008 @ 5:40 am

  9. […] has created a clever Automator (based on an AppleScript no longer available) workflow “Mail¬†Vacuum“¬†that cleans out the Mail storage database thereby improving the performance of the Mail […]

    Pingback by Power up your Mail experience | Smoking Apples — December 8, 2008 @ 4:30 am

  10. Is this safe also with current Mail in Leopard? I see that this is quite a while ago and perhaps there are updates?

    Comment by Jorritsma — February 20, 2009 @ 9:18 am

  11. […] I also got a tip from #macosx to google around for “mail vacuum sqlite3″ and found an automator script to take care of that for […]

    Pingback by Daily Review #7 | The Queue Blog — October 19, 2009 @ 10:26 pm

  12. […] want to tie it to a Calendar event to run every month or so. The Automator script can be downloaded here. From what I can tell, it simply runs the “vaccum;” command on everything. To set up […]

    Pingback by Fix Search Issues and Speed Up Apple Mail with This Simple Script | HighTechDad Blog — January 4, 2010 @ 1:23 pm

  13. My Mail problems are fixed, thanks on the programmer.

    Comment by Gottfried Auer — June 29, 2010 @ 12:21 pm

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>