I am trying to compress the Mail database by running the sqlite3 vacuum
command. But I get the following error:
SQL Error: file is encrypted or is not a database
I was running Mac OS 10.6 and I upgraded to 10.7. Now, it's running 10.7.4. I found that the Mail data folder is placed under the folder ~/Library/Mail/V2/MailData
instead of ~/Library/Mail/MailData
on my machine.
So I use the following command:
sqlite3 ~/Library/Mail/V2/MailData/Envelope\ Index vacuum
Best Answer
You should just move that file to trash and re-start Mail.
There is a 'PRAGMA integrity_check' option, but why risk a bad index, the file will be rebuilt when Mail senses it's missing.