Super Duper! Backup Mail Script
Posted by Jason Crane on August 07, 2007 at 10:50 PM
Backing up "is a good thing". A few friends sent around the link to sqlite3 command to compact a mailbox:
/usr/bin/sqlite3 ~/Library/Mail/Envelope\ Index vacuum index;
I wanted to take it to the next level, so I wrapped some other smarts around it: basically, check to see if Mail was running, shut it down if it was, run the script, the fire up mail when finished.
Of course - it doesn't check to see if I've got a compose window open but I'm secretly hoping I'm not awake and writing email at 1:30am in the morning (when my backup kicks off)
Here is the entire script - download it at your peril
I have it in the following directory:
~/Library/Application Support/SuperDuper!/Copy Scripts/Pre and Post Scripts