When Mail in OS X detects a problem with an e-mail message, it may attempt to recover the message in a special mailbox called "Recovered Messages"; however, sometimes this recovery process may hit a snag and result in multiples of the same message being recovered. This issue can sometimes result in other problems, including Mail not being able to get new mail, and also having the hard drive fill up and lead to slowdowns and other problems if the message has a large attachment associated with it.
The recovered message may be a previously sent message, or even could be a spam message that has not been properly dealt with; regardless, the repeated message may be marked as spam by Mail. This problem has happened with past versions of Mail as well as with more-recent ones, and is a problem with how Mail manages its cached files for offline viewing.
To clear the problem, you will need to remove Mail's offline cache for the affected e-mail account, which can be done with the following steps:
- In the Finder go to the user's Library folder, which is available in the Finder's Go menu, though Lion and Mountain Lion users will have to hold the Option key for the Library to appear in the menu.
- In the Library, go to the /Mail folder, and if a subdirectory called "V2" exists, then open this.
- Locate the main folder for your e-mail account, which should be called something like "IMAPemail@example.com"
- Next open the Terminal utility (in the /Applications/Utilities/folder).
- Type "cd" followed by a single space, and then drag the "IMAPfirstname.lastname@example.org" folder to the Terminal window, followed by pressing Enter.
- Now run the following command to remove the cache folder and its contents:
rm -rf .OfflineCache
Another option instead of the above command is to reveal this hidden folder in the Finder by running the following command to open it:
When this is done, right-click the revealed folder (its name should be dimmed gray), and choose the option to move it to the Trash.
After this is done, quit and relaunch Mail, and then remove the "Recovered Messages" mailbox to delete any leftover recovered files. Mail should now properly retrieve new messages and no longer replicate the recovered ones.