I can’t work out why Apple’s applications don’t utilise Spotlights ability when it comes to searching for items within them. Take this as an example. If I search for Saft inside Mail, so that I can find my registration details, it returns nothing.

Saft Mail search

If I then do exactly the same search via Spotlight, it shows four results under the email messages.

Saft Spotlight search

I’m just wondering why one of Apples own applications would have such a discrepancy when it comes to searching?


Over at Hawk Wings, they’ve posted a neat AppleScript to help optimize Mail.app
I ran the command line version yesterday to see if it sped Mail up, and it did.

ell application "Mail" to quit
set sizeBefore to do shell script "ls -lah ~/Library/Mail | grep -E 'Envelope Index$' | awk {'print $5'}"
do shell script "/usr/bin/sqlite3 ~/Library/Mail/'Envelope Index' vacuum"
set sizeAfter to do shell script "ls -lah ~/Library/Mail | grep -E 'Envelope Index$' | awk {'print $5'}"
display dialog ("Mail index before: " & sizeBefore & return & "Mail index after: " & sizeAfter & return & return & "Enjoy the new speed!")
tell application "Mail" to activate

If you save the above code down as an AppleScript, you can then call that file in an iCal alert. I’ve set one up to run monthly to keep Mail perky and running smooth.

lotsa emails this way!