Recover corrupted/deleted LOCAL emails in Thunderbird.
I have always loved Thunderbird…but my love crossed all bounds today. Somehow in the morning, somehow (dont blame the birdy) my local folders got corrputed and I missed lots of mails from a specific very dear folder…I panicked but my faith in the birdy never wavered.
I remembered that birdy never actually deletes any mails until I compact the folders. I tried to google and found this superb article..
In a nutshell, you can recover those long gone mails as follows :
(Disclaimer : This will work only if you have not compacted the folder)
– Turn off Thunderbird, do not compact.
– Using your OS, locate the file without an extension and with the same name as the Thunderbird folder where the messages were last (might be Trash) in your profile folder http://kb.mozillazine.org/Profile_folder#Thunderbird
For example, the Inbox file rather than inbox.msf or inbox.sbd.
– Open this file with a simple text editor.
– Change the digits after X-Mozilla-Status all to zero for those messages you wish to undelete if they still exist.
– Save the file
– Turn off the text editor
– Delete the file of the same name with the extension .msf. Example Trash.msf. This will rebuild the message index.
– If you are religious, say a prayer to the deity or saint of your choice
– Say a prayer to Murphy
– Restart Thunderbird
This works like a charm….
Technorati tags: Thunderbird, Tips
How do I love thee? Let me count the ways…
ClamWin (free antivirus software) just now told me I had the Kakworm in one of my Thunderbird account’s Inbox file. I knew this posed no real threat, as Kakworm only exploits a long-patched hole in Outlook or Outlook express… but I didn’t want to have to hear about the Kakster every time I ran ClamWin.
So I found the text “kak.hta” in the Inbox file, paged up to find the (six-year-old) email it was associated with, went into Thunderbird and deleted that email, emptied the trash… and *still* the dang email was hanging around! Couldn’t find it in Thunderbird, but it was still there in the Inbox file. GahhH!
And then I found your blog post and realized why: I hadn’t compacted folders since deleting the infected email!
Although you were trying to recover email and I was trying to trash it, your discovery was just as useful here today as it was for you when you posted this. So thank you, thank you, thank you. All credit will be given you (and the MozillaZine forums) when I blog today’s little worm-hunting adventure. Thank you.
Hello
Great book. I just want to say what a fantastic thing you are doing! Good luck!
G’night
Hello,
Thanks for your useful posting. But my case is a bit different and I cannot find a solution yet.
After doing “compact folders” all emails in my Inbox are gone. I just do not know where they are
kept, but I really need to restore all of them back to my Inbox.
How could I do that? I have been searching for how to restore emails back to the Inbox in
Thunderbird, but I could not find anything.
I am using Thunderbird 2.0.0.6 (20070728) on Windows Vista. And I guess I did compact folders more
than once and hope that it did not make my case even worse.
I desperately need all the emails back before my boss finds out and fire me.
Thank you very much.
Yes, if you compact a folder in Thunderbird, there is no way to get the emails back. Compacting a folder means that they are deleted permanently.
This was really useful to read — not only in getting my emails back but in figuring out how to delete the spam w/viruses permanently. Thanks!!
I accidently deleted this folder. And I am trying to follow your steps but I am not able to locate any file without any extentsions. My folder is named as MeetingMinutes but I am seeing only MeetingMinutes.sbd and MeetingMinutes.msf and not anything without extensions. Any help?
You can use Stellar Phoenix Mac File Recovery software demo version which is absolutely free which will show you the recovered files and data…gud luck
Did you compact the folder ? That might be the reason.
@paeisls, compacting the folder does permanent damage. You can not recover anything now.
@Nicole J. LeBoeuf-Little : Sorry for a very late reply, I just missed your comment, Thanks for appreciating this post.
i want my mail back some emportent mails deleted today
@shweta, Try following the exact steps as per this article. Chances are that you will be able to recover those important mails.
Cheers !
I’m trying to recover my deleted inbox files but every time I try and open that inbox file to change the numbers, it will never open. The kb for the file is massive so I don’t think any of my text editors can withstand it. What should I do?
@holl :
1. You need to use : Textpad to handle large files.
2. You must change the message numbers in the inbox files as described in the article.
“Change the digits after X-Mozilla-Status all to zero for those messages you wish to undelete if they still exist.”
This will definitely work
thanks!
my two pennies:
I’ve found (I don’t remember where) an easy way to do this with an text editor and e regex. As the text editor doesn’t work for a 800MB file… I went with sed in linux.
0001 is for ‘read messages’.
sed -e ‘s/X-Mozilla-Status: [a-z0-9]\{4\}/X-Mozilla-Status: 0001/g’ Inbox > Inbox2
gene_x
HELLO. CAN ANYBODY HELP ME PLEASE?
I have compacted my folder in Thunderbird. Now my messages are corrupted. They are in strange code – ASCII – some of my emails are empty when opened, even when there is a size of message showed. for example 1Mb or so.
@blackrhino : Might work..have to give it a shot
@Igor : If you compact your folder in Thunderbird, you can not recover them.
I tried today and it worked . Thanks a lot for the article .
I could Kiss you 😛
Thank you so much for this article…. 🙂
Is the same applicable on a MAC ? The corrupted folder is a disaster for me.. help…
@Vince – This is not specific for windows and this is not an application. This is an approach to recover lost emails from Thunderbird (and only Thunderbird)
Bagi teman – teman yang pernah mengalami harddisk rusak
– no detect- partisi hilang- terformat- fdisk- virus- corrupt
– delete- hidden..dll…..bisa dikonsultasikan atau di recovery data
bisa datang ke ertech komputer.
Alamat nya: jl.karang rejo x/36 surabaya (daerah ketintang)
Hub : 031 72357968/081330029001
Saya dulu pernah menyelamatkan harddisk no detek
Disini memang benar ok banget.masalah harga bisa di nego,
Trims ertech berkat ertechcom dataku kembali normal.
Semoga sukses…..teman2…!!
Thanks a million for this post, it has just helped me recover some emails, with attachments, that had vanished themselves from my inbox!!!! Strangely, when I tried out changing just one of the “X-Mozilla-Status” parameters as a test (I’m so cautious) it brought back all of the 8 emails that had gone missing.
I am going to review the settings for compacting folders so that it does this less frequently from now on!
Thanks. This Work
Thank you! On my mac, I used UltraEdit text editor to open the file because it was huge. Then at first it didn’t work, the emails wouldn’t show up in Inbox when I reopened Thunderbird.
But when I made a copy of my Inbox and put it in Local Folders, then redid the procedure described above, only copying the edited inbox file and replacing it with the one in the Local Folders file, Voila! There’s my 50 thousand emails I was looking for!
I just lost two folders entirely by losing the actual files, I did some research, here is the result. The global-messages-db.sqlite exists in all profiles and is a database with the text of all emails optimised for searching. The actual email data including attachments are usually in the “Mail” folders. I lost two folders and managed to recreate all emails by fetching them out of the global-messages-db.sqlite with this command:
sqlite3 -line ~/.thunderbird/xf5qyjk5.default/global-messages-db.sqlite “select date,id from messages where folderID = 52”
You need to check what your folder number is and there you go.
You then just have to do some reformatting (check other email files) and then put the file into your “Mail” folder.
I know this is an really old thread but I am struggling. Thunderbird & WIndows.
Lost 3 months of emails, I can search them & see the start of the message but simply not in the normal list or on iMap. So from what I have learnt, some if not all is still in the search index as above.
I have installed sqlite3 (all new to me) & trying to do as Lee says.
Not sure about the ~/.thunderbird .. location, says database not found, tried dozens of combinations of \ or / so used full directory location.
sqlite3 -line C:\Users\GregReed\AppData\Roaming\Thunderbird\Profiles\cwk2td7c.Karen\global-messages-db.sqlite “select date,id from messages where folderID = 52″
This gives Syntax near error “!select” the ! is actually a little o with a upside down v on top.
If I do the same command once opened a new DB I just get …> which I assume means unknown command & can;t do anything from here, have to ctrl C to exit.
I have tried to learn a bit sqlite but not really sure where to start if I am NOT loading “global-messages-db.sqlite” in the first place.
Should the above sqlite -line …. command be direct from the CMD prompt or once I have open a new .db.
I do not know how to find what folderID mine is but figured something should load, there are not tables or anything.
Sorry a really basic starter is needed.
I can program MS Access Database, visual basic etc & many years ago some DOS stuff but don’t have time to learn this now so hope someone could give me a short cut.
I can load the file into excel & sort of see some of the messages but very mixed up, no dates or structure.
These are truly wonderful ideas in concerning blogging.
You have touched some good points here. Any
way keep up wrinting.
Help. My Inbox was full and I deleted some files and then tried compact folder. Then all messages disappeared from the Inbox. Other folders are fine, Sent is intact, etc. I exited out of TB, found my profile file, located the Inbox. There is a file named Inbox without extension with 1,379,912 kb. I tried copy and paste this onto another place but got an error message saying I need to be administrator to do it. I even log in as the hidden administrator in Windows 7 and still can’t copy or rename this file. Is there still hope to recover my Inbox. When I open Thunderbird again, it still says my Inbox is full.
Dear Monnie, were you able to solve this problem? I had the same one today and I have no ideas what to do now 😦 With greetings
In July, 1887, a credit card applicatoin was heard inside the Clermont Warden’s Court for any reef claim 200 yards west of Hurley’s Dam, and the ‘Telegram’ states:.
After targeting about two minutes and a half, he pulled the trigger.
Good fishing ended up being to be been on this river all of the year round, during flood-time, so when
water was clear fish may be seen taking the bait with a depth of 10 feet.
As such, it really should not be too difficult to spend some time constructing a database
of tables similar to what is suggested at where they’ve provided a sample database spec for use in a college accommodation reservation application. Virus Barrier X5 is often a popular virus scanner designed for Mac computers. The Vi – O comes pre set most abundant in widely used cellular devices, such as Blackberry, i – Pod, i – Phone amongst others.
HI,
Thanks for sharing Informative article in your blog, Above tips are working for my situation. But if you are unable to recover your deleted email using above tips then you could be try another solution as a tool which can also recover your deleted email from Thunderbird email application. I would like to suggest such type of tool Stellar Phoenix email recovery. It also works for some other email application. Check yourself
Howdy! Do you know if they make any plugins to protect against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any recommendations? bdcbccegdcek