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.
Nicole J. LeBoeuf-Little
July 3, 2007 at 10:06 am
Hello
Great book. I just want to say what a fantastic thing you are doing! Good luck!
G’night
tovorinok
July 5, 2007 at 7:51 pm
[...] lots of mails from a specific very dear folder…I panicked but my faith in the birdy never wavered.read more | digg [...]
kristinpowell.com.au » Blog Archive » Recover corrupted/deleted LOCAL emails in Thunderbird.
September 27, 2007 at 5:28 am
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.
paeisls
October 5, 2007 at 7:07 am
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.
geek-o-pedia
October 5, 2007 at 11:27 am
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!!
Holly
January 4, 2008 at 7:07 am
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?
gokul
June 5, 2008 at 6:34 am
Did you compact the folder ? That might be the reason.
upnishad
June 6, 2008 at 2:01 pm
@paeisls, compacting the folder does permanent damage. You can not recover anything now.
upnishad
June 6, 2008 at 2:03 pm
@Nicole J. LeBoeuf-Little : Sorry for a very late reply, I just missed your comment, Thanks for appreciating this post.
upnishad
June 6, 2008 at 2:04 pm
i want my mail back some emportent mails deleted today
shweta.puja
June 23, 2008 at 6:48 pm
@shweta, Try following the exact steps as per this article. Chances are that you will be able to recover those important mails.
Cheers !
Geek
June 24, 2008 at 10:15 am
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
August 4, 2008 at 7:37 am
@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
upnishad
August 4, 2008 at 10:27 am
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
blackrhino
September 11, 2008 at 8:08 pm
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.
Igor
October 17, 2008 at 2:11 pm
@blackrhino : Might work..have to give it a shot
@Igor : If you compact your folder in Thunderbird, you can not recover them.
Geek
December 29, 2008 at 12:20 pm
I tried today and it worked . Thanks a lot for the article .
Shekhar Ganji
January 15, 2009 at 12:08 pm
I could Kiss you
Thank you so much for this article….
Greg
May 31, 2009 at 1:58 pm