Mail.app generates multiple copies of email in “Recovered Messages” folder

Screen shot 2009-11-25 at 12.12.20 PM.jpg

After upgrading to SnowLeopard a new bug in Mail.app has appeared. About once a week, one or more emails will decide to reproduce themselves hundreds of times in a folder called “Recovered Messages”. If that email has a large attachment, it can quickly fill up the limited space allotted to my email account.

The temporary fix is to find the invisible folder called .OfflineCache in that mailbox and delete its contents:

~/Library/Mail/IMAP-@domain.com@imap.domain.com/.OfflineCache

Then delete the Recovered Messages folder in Mail.app.
If you do not have the Finder set to display Invisible files, an easy way to find the .OfflineCache folders is to navigate to the Library folder in your Home folder, then use Spotlight to find Invisible files with “Offline” in the file name. For some reason Spotlight will not find Invisible files just anywhere on the disk, as shown here:

Screen shot 2009-11-25 at 11.20.52 AM.jpg

You must select the folder you know they are in, then search for them.

Screen shot 2009-11-25 at 11.27.39 AM.jpg

Select the folder for the account with the issue, and delete the files inside it:

Screen shot 2009-11-25 at 11.28.15 AM.jpg

Then delete the Recovered Mail folder from the “ON MY MAC” area in Mail.app.