1. Quit Mail if it’s running.
2. In the Finder, go to
~/Library/. Move (not copy) the entire
Mail folder out of there, to the Desktop -- rename if you don’t want to overwrite the copy you made before.
3. In the Finder, go to
~/Library/Preferences/. Locate
com.apple.mail.plist and move it to the Desktop.
4. Open Mail and set it up again from scratch. If given the option to import existing mailboxes or something like that,
don’t. Just enter the account information and check that everything works fine.
5. You’ll have to re-configure all your settings in
Mail > Preferences. For spam-related security reasons, the first thing you should do is go to
Preferences > Viewing and disable
Display remote images in HTML messages if it’s enabled.
6. If Mail works fine now and you had any messages stored in local mailboxes, do
File > Import Mailboxes, choose
Mail for Mac OS X as the data format, and follow the instructions to import your mail from the old Mail folder that’s now on the Desktop. Import the
Mailboxes folder first, then each of the
POP-username@mailserver account folders.
Mail will probably be unable to import one or more mailboxes, just like it couldn’t re-create
Envelope Index before. The problem is almost certainly a malformed message somewhere -- Mail’s import/reindex function isn’t very robust; that’s why it’s important to make a backup copy of the Mail folder first.
If you can identify which mailbox has the problem and which are the
*.emlx files that Mail chokes on, you could try getting rid of the offending
*.emlx files and importing again. Alternatively, you may try using something like
emlx to mbox Converter or
Emailchemy to convert the
*.emlx files to standard mbox format, then import that in Mail as
Other.
Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder. You can easily locate any of the folders referred to in this post by copying the folder path here, doing Go > Go to Folder in the Finder, and pasting the folder path there.