F.A.Q.
If your question is not answered on this page or you do not understand the answer, you can contact the Helpdesk for technical help.
Mac OS X
-
Mac Mail.app is locked

Email clients, like Mail.app and Thunderbird, like to know that they’re the only program accessing email stored on the local machine. This avoids potential email file corruption.
Sometimes, however, these email clients get confused and insist that another program is writing to their files. If this happens to you, you can assure Mail.app that its files are okay by removing a lock file.
From the command line, run this command:
rm ~/Library/Mail/Envelope\ Index.lock
From Finder, navigate from your home directory, to Library, to Mail and drag the Envelope Index.lock file to the Trash.
Of course, sometimes Mail.app files really do get corrupted. If you continue to experience problems, you can reset Mail.app and wipe out all of its settings and start fresh*.
From the command line, run this command:
rm -rf ~/Library/Mail ; rm ~/Library/Preferences/com.apple.mail.plist
Now open Mail.app and (re)create your mail account.
* Sometimes a fresh start is a bad thing. If you use POP to grab your email from the server, you should not do this. If you have spent lots of time writing client side email filter/rules, you should not do this.