Especially with IMAP Apple's Mail program tends to maintain an awful lot of obsolete mail envelopes cache, leading to an enormous waste disc and RAM memory, and slows down the application considerably.
To avoid this, every now and then one should do this:
+ end Mail
+ open a Terminal
+ paste'n'copy this to it:
sqlite3 ~/Library/Mail/Envelope Index vacuum
+ press enter and wait till the command ends, i.e. the next prompt shows up.
This information is as of Mac OS X 10.4.8 aka Tiger, let's hope Apple is some day gonna teach Mail.app to do this garbage collection by itself.
Thanks to Lexx and Lukas for these hints.
More details can be found at Hawk Wings:
From: IBCL BLog.
Originally posted: 2007-03-10