Recover deleted or corrupted Thunderbird messages
It sometimes happens that I delete a mail by accident because it does look like spam or like a message that I do not longer need access to. Thunderbird does not display that message anymore if it is completely deleted from the mail client. While it is first moved to the trash folder if you delete it from the inbox, deleting it from the trash or the spam folder removes it permanently from the client.
Unknown to many is that Thunderbird does not delete messages right away when that is happening, but flags them only which means it is relatively easy to recover corrupted or deleted mails as long as the mail folder has not been compressed in the meantime.
So, even if you delete the trash or remove spam, the messages are still stored in the index files that Thunderbird uses.
Compressing removes flagged emails, those that you have deleted, from the mailbox so that you can't recover them anymore once that has happened.
Recover deleted emails in Thunderbird
Open the Thunderbird Application Data folder which is located in your document and settings folder in Windows.
The easiest way to get there is to click on Help > Troubleshooting Information and click on the show folder button on the new page that opens up.
Select the appropriate Thunderbird profile if there is more than one and click on Mail in that profile. You get a listing of all your email addresses. If you setup Thunderbird to have different mail folders for every email address you have to click on the folder of the email address of the message that you want to recover. Otherwise Local Folders is the way to go.
The important files are those without extensions (Trash, Sent, Inbox ..) - locate the one that contained the mail(s) that you have deleted or are corrupted (do not show up anymore). Open it in an text editor, you could use notepad2 for instance for this purpose. Some folders may be rather big so choose a text editor that can handle large files.
Thunderbird needs to be closed completely while you are editing the files.
All mails are basically stored in that file. The important part for us are the lines X-Mozilla-Status which defines a certain state of a message such as Read, Unread or Deleted. Search for the message(s) that you want to recover, the easiest way to do so is to search for its subject or the sender's email address, and edit the X-Mozilla-Status: XXXX line into X-Mozilla-Status: 0000 for unread or X-Mozilla-Status: 0001 for read messages.
Recovered messages will appear at the bottom of the folder and should be there after you start up Thunderbird the next time. You sometimes have to delete the .msf file to make this work. If you edit the file Trash you will have to delete the file Trash.msf afterwards if the mails do not re-appear after a new start of Thunderbird.
Update: Please note that you find the Mail folder under C:\Users\username\AppData\Roaming\Thunderbird\Profiles\random.default\Mail\ in newer versions of the Windows operating system.Advertisement