Apple Mail Crashes on startup
If Apple’s mail app crashes on startup, then force a rebuild of its database by removing this file and any other files with the same prefix :
There may be multiple Envelope Index temp files present. This delete command will remove all of them.
rm -f ~/Library/Mail/V2/MailData/Envelope\ Index*