OK. It looks like manually getting rid of the offending
*.emlx file and re-creating the index will be necessary here. Here are two alternate procedures that should allow you to fix the problem. Let me know which do you find more convenient and/or works better for you:
* PROCEDURE A *
1. Select the offending message in Mail.
2. Copy the following script, open
/Applications/AppleScript/Script Editor, paste the script there, and click
Run:
set theFileList to {}
tell application "Mail"
set theSelection to the selection
repeat with aMessage in theSelection
set aFileName to (id of aMessage as string) & ".emlx"
copy aFileName to the end of theFileList
end repeat
end tell
get theFileList
The
*.emlx file associated with the offending message should appear in the script’s
Result pane (and in Script Editor’s
Window > Result History).
3. Quit Mail.
4. In the Finder, go to
~/Library/Mail/. Make a backup copy of this folder, just in case something goes wrong, e.g. by dragging it to the Desktop while holding the
Option (Alt) key down. This is where all your mail is stored.
5. Locate
Envelope Index and move it to the Trash. If you see an
Envelope Index-journal file there, delete it as well.
6. (Optional) In the Finder, go to
~/Library/Mail/POP-username@mailserver/. Locate
Deleted Messages.mbox, and move it to the Trash if there is nothing to be preserved there.
7. In the Finder, go to
~/Library/Mail/POP-username@mailserver/INBOX.mbox/Messages/. Locate the offending
*.emlx file and move it out of there, e.g. to the Desktop. You can view its contents with a text editor to check that it does indeed correspond to the offending message before getting rid of it.
8. Open Mail. It will tell you that your mail needs to be “imported”. Click
Continue and Mail will proceed to re-create
Envelope Index -- Mail says it's “importing”, but it just re-creates the index if the mailboxes are already in Mail 2.x format.
* PROCEDURE B *
1. In Mail, create a new custom “On My Mac” mailbox.
2. Select the
Inbox of the account that contains the offending message, then select all the messages it contains (i.e.
Edit > Select All (⌘A)), and deselect the offending message by Command-clicking (⌘-click) on it. That is, select all the messages in that mailbox
except the offending one.
3. Do
Message > Move To, and select the mailbox created is step 1. That is, move to another mailbox all the messages that should be preserved and that are stored in the same mailbox as the offending one.
4. Quit Mail.
5. In the Finder, go to
~/Library/Mail/. Make a backup copy of this folder, just in case something goes wrong, e.g. by dragging it to the Desktop while holding the
Option (Alt) key down. This is where all your mail is stored.
6. Locate
Envelope Index and move it to the Trash. If you see an
Envelope Index-journal file there, delete it as well.
7. In the Finder, go to
~/Library/Mail/POP-username@mailserver/. Move
INBOX.mbox and
Deleted Messages.mbox to the Trash.
8. Open Mail. It will tell you that your mail needs to be “imported”. Click
Continue and Mail will proceed to re-create
Envelope Index -- Mail says it's “importing”, but it just re-creates the index if the mailboxes are already in Mail 2.x format.
Note: For those not familiarized with the ~/ notation, it refers to the user's home folder, i.e. ~/Library is the Library folder within the user's home folder.