Restore Deleted Email in Thunderbird

After using Thunderbird for several years I noticed my backup of it kept increasing. It had always seemed bigger than it should be as I only keep a few emails archived in it. Eventually I saw an extension called XPunge which stated that Thunderbird does not delete your emails (even if you empty the Trash folder) unless you compress the folders (which is what that extension does by clicking on the button they provide). This made me realize that this was why my email backup was becoming so big. So as long as you don’t use the compress folder option in Thunderbird, you have the ability to restore your deleted email, including the attachments.

Go into Thunderbird’s profile folder then inside the Mail folder. Now depending on how many email address you have setup in Thunderbird it could be in several folders, but it will be named with either Local Folders or with the POP address you are using. (You can find out easily by going to Tools >> Account Settings and then going under the account you want to restore email address for and look under its Server Settings and at the bottom look at the path for Local directory). I’d recommend closing Thunderbird once you know where to go. Make a backup of the file called Inbox (Note: it’s the one with out an extension, Inbox.msf is for something else). Now open up Inbox in your favorite Text Editor (Notepad, Crimson Editor, Notepad++, etc.), it may take a few minutes to load depending on how big the file is, some of mine were over 90MB. Don’t open it in WordPad, since it will add formatting to the file, also keep in mind Notepad on Windows 98 has a file size limit and won’t handle really huge files. Now you can search for whatever emails you are looking to restore, or have fun looking at really old emails. When you find one you want to restore, scroll up and change number after X-Mozilla-Status: to be a 0 (zero). It’s okay to just make it a single zero rather than a four digit number. Don’t bother changing the X-Mozilla-Status2. Do that for each email you want to restore. Then save the file. Open up Thunderbird and it should now be in your Inbox marked as Unread (Note: it may take awhile for it to read that Inbox).


Comments 51-100 of 158 to “Restore Deleted Email in Thunderbird”

  1. 51 · Kris says:

    Thanks a lot, Blogger, I found what I needed. It was far from easy for a low-tech guy like me, but everything is solved.

  2. 52 · Anonymous says:

    Thank you so much for this article! I accidently lost my e-mails when I deleted my POP3 account. With your article, I was able to get them all back onto Thunderbird and the mail server!

  3. 53 · Dave says:

    Very much appreciated, I had found the folder/files but had no idea what to do with them, my trash file was 47mb so I knew there was something in it. Thanks a lot, saved me a massive headache.

  4. 54 · TK says:

    Excellent stuff – accidentally deleted mail which contained concert tickets in pdf-form.


  5. 55 · CB says:

    Lifesaver. You’re a total legend.

  6. 56 · boyOz says:

    Can we use this technique in IMAP mode?

  7. 57 · Brian says:

    I accidentally hit shift-delete on my inbox and my messages are gone. I’ve followed the steps to open the inbox file using a text editor. It’s 92MB in size. All I get is:

    00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ……………………
    00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ……………………

    and so on. What am I doing wrong? I don’t see “X-Mozilla-Status” at all.

  8. 58 · blogger says:

    boyOz, I assume it should work for IMAP mode, but I haven’t tested it.

  9. 59 · Brian says:


  10. 60 · blogger says:

    Brian, that looks like Hex. What program did you use to open the inbox file?

  11. 61 · Lisa R says:

    I have 3.0a1 and on reboot today it took me to an email wizard. I didn’t know why and reentered my info. To my dismay I was starting from ground zero with everything gone. I have no idea why or how it happened but I am desperate to fix it. When I open the prefs folder I get an error message windows script something. What can I do as I have an upcoming Court case in a few days and I had important stuff in my inbox and my sent box. Not to mention saved emails,reciepes and pics. Can anyone help please? I have no idea what to do here

  12. 62 · GotGlock says:

    I have been trying to retrieve my sent email, The folder will only display email from 9July08 to present. The Sent folder is 970MB and notepad++ keeps crashing when I try to open the sent folder with it.
    Any suggestions how I can recover these emails.

  13. 63 · GotGlock says:

    Success ! I had tried the importing to Outlook Express but it only gave me the emails viewable in Firefox and Thunderbird( I am using Firefox but downloaded Thunderbird in an attempt to try some of the suggestions I had read). I figured I would try the text editor route after the Netscape Commuicator route also failed. I found a text editor here
    It worked I used blogger’s suggestion to use SEARCH and REPLACE
    I had to change it to (X-Mozilla-Status: 0009) to find any results and REPLACE with (X-Mozilla-Status: 0000) Now I have all my sent emails back.
    I have now split them to local sent folders by year and compacted all my folders.
    Thank You to everyone for your comments and suggestions by pulling them all togeather I got my Mail back.

  14. 64 · Peter says:

    Thanks for this post, it has been useful in the past. Last month though I stumbled across a new problem, and I don’t think there is a fix. It may be handy for people to know. I had thunderbird open and I closed the lid on my Asus Vista Business laptop (never will I do that again!) and the pc didn’t go to sleep like it is meant to. AN hour later it was still on but not – ie the power lights were on and the screen had a glow but was showing black. Needing to leave with the PC I forced it to shutdown. Upon ‘waking’ the computer it decided to check all files before letting me know that it had deleted some bad ones. Going into thunderbird I noticed that it had emptied random mail folders in both my accounts, including both inboxs. They had nothing at all in them. Oddly it kept some of the subfoldes of the inboxes intact. No amount of fiddling got the emails back – they are gone. One foler is still there but corrupted, it won’t open if I delete the .msf and it is too large to open in notepad (odd that it wasn’t large before). Very strange behaviour, and annoying as it gobbled some amazon gift certificates.

    So close thunderbird before you put your computer to sleep. Better yet, always shutdown for faster performance.


  15. 65 · Tim says:

    How about recovering deleted address cards. Is there a way to do that?

  16. 66 · Tim says:

    Somehow the entire folder was deleted. The profile is still in good shape. Just lost that one address book the other are still ok.

  17. 67 · GotGlock says:

    Peter, How large is the folder you are refering to, My sent folder was 978M and I was able to use the text editor I mentioned above to recover it.

  18. 68 · Peter says:

    Hi Gotglock, I tried that – the file was tiny though and already filling with new emails when I realised what was going on. I found my gift certificates though (phew) on the amazon site…

  19. 69 · Angela says:


    I’m currently going through the steps to restore my deleted email, and so far it’s going well, except when I try to open the inbox file in everything but wordpad but nothing works – all that’s appearing is jibberish and a bunch of symbols. Much help is appreciated:)


    Angela from Canada

  20. 70 · Angela says:

    An update:

    I opened up the inbox file in notepad and made all the X-Mozilla-Status to be 0, but when I go to open up Thunderbird, my email doesn’t show up in my inbox. Any thoughts and help would be much appreciated.


  21. 71 · Ben says:

    I installed Thunderbird a few months ago, and then tried importing all my email from Outlook Express. Unfortunately, not all emails were imported, so I uninstalled Thunderbird and continued to use OE. A couple of days ago, I decided to install Thunderbird all over again, not realizing that it would automatically bring up the incomplete file of imported folders from my first import attempt a few months ago. Now my question is this:

    Is there any way to cancel everything out and install Thunderbird with a ‘clean slate’, without bringing up any of those old folders? It is a real ‘pain’ to have those old imported folders. It won’t allow me to do a fresh Import. Does anyone have an answer for this? I would truly appreciate any help.

    Thanks to you all for reading this. I hope to hear from someone soon. Please email me at the following address:

    Enjoy the weekend.


  22. 72 · blogger says:


    The only way to do a fresh install of Thunderbird without all the previous data, is to first uninstall Thunderbird and then delete the Thunderbird Profile Folder. Then you can reinstall and it will be like brand new.

  23. 73 · Ann says:

    Today I discovered ‘compacting’ after using Thunderbird for years (duh), and compacted my main 3 folders…inbox, sent and trash. This gave me 10 additional gig of drive space, by the way!

    I decided to delete some more sent items and after I deleted those from the trash folder, I did another compact. It didn’t take it very long this time and then it said ‘done compacting’. Well, the emails were gone, as though I had emptied the folder.
    The Trash folder in application data…mail/Local Folders also disappeared. The folder in Thunderbird itself was still there, just empty. When I restarted Thunderbird, the Trash folder in Local Folders reappeared (just with file size 0). Perhaps it does NOT like you to compact twice in a row?

    I tried a system restore…didn’t work. I use my trash for storage of emails I may need to refer to, so this bites.
    Are they just gone for good? Would you have any idea if data recovery software would be able to find them?

    GREAT blog by the way…


  24. 74 · ac says:

    a 1000 thank-u’s ‘jivebay’!!! this tutorial of recovering tb’s deleted email works a charm… i deleted one of my wifes emails with attachments for work & thort it was gone for good.

    i used notepad and saved the the new ‘txt’ file to another location (due to administrator restrictions) & subsequentley deleted the ‘txt’ extension on this. finally i dragged the new ‘Inbox’ file back in to the original folder, replacing the old one. when i reopened tb, there it was – the elusive email, including 2x powerpoint attachments!

    1. ensure thunderbird is not running;
    2. make a backup of that ‘Inbox’ incase it all goes pear shaped;
    3. be patient with the file loading in notepad – takes a bit of time due to its size;
    4. you will have to sift thru all the heiroglyphics to find the email you need and look for the subject line/date/time info;
    5. once you have amended the ‘X-Mozilla-Status:’ as 0000 ensure you save the file, as mentioned above.


    …i think i will keep my eye on this blog 🙂

  25. 75 · jak says:

    there is no folder inbox only inbox.msf,what to do?

  26. 76 · LUAAY says:

    hello my friend please please help me!!!
    I happened to accidentally deleted my account in Thunderbird and I need to know how to get my account back. I lost my saved emails, address book, and settings. If anyone knows how to retrieve my deleted account, PLEASE respond or if you have any help PLEASE respond. I heard in Outlook Express there is some way of retrieve deleted accounts, so I think there is a shot of retrieve my deleted account in Thunderbird. Help would be greatly appreciated!note that the ISP from the lost account is no longer current,any way to fix that???in application folder there is only msf inbox file not inbox,not inbox.sbd.PLEASE HELP MAN MILLION THANKS!!

  27. 77 · LUAAY says:

    ok it s isp gave me connection

  28. 78 · Naz says:


    i have no idea about computers my brother deals with this kind of stuff, but now im at uni i have to sort out my own mess…i have lost my emails (i accidently deleted them) and i have no idea of how to get them back, and i read through the other comments and it said something about ‘compacting’ or something, i think the files are compacted, how do i get my deleted files (also deleted from ‘trash’) back? Worse yet how would you explain it to someone who knows very little about IT?


  29. 79 · Anonymous says:

    thank you very much!

    i did it a bit different but from your blog entry i learned how you can do it and thanks to a google search for “X-Mozilla-Status” i found out how to do it preserving other information (like “read”, “replied”, “forwarded”, etc.)
    i just subtracted 8 in the last digit of the status codes (if it was greater or equal 8) “xxx9” became “xxx1”, “xxxb” became “xxx3”, etc.

    oh and i did it with the trash file, not with the inbox, since i wanted to restore mails i accidently deleted from the trash folder..

    it worked perfectly 🙂


  30. 80 · Power Surge says:

    I had a few power outages recently and after the last one, my entire Thunderbird email profile was gone (nothing else on my computer seemed affected). I followed directions to find the profile so I could import it back, but it wasn’t there (even after I changed my folder settings to view hidden files). Any recommendations?

    This happened to me once before and a friend helped me to somehow open my computer as it was before the power outage to retrieve the missing profile, but I can’t remember how we did it now. I use Windows XP.

    Much appreciated,

  31. 81 · Anonymous says:

    how to Restored my deleted e_mail before 2006 because that time i have get DV Final Letter but my friend deleted this e_mail. But i have soo many tried to open not sucess so that i want to restored this e_mails.

  32. 82 · Jonathan says:

    Oh my gosh! Thank you so much! I was just trying to delete the top message that was in my inbox by using Shift-Delete, but my finger slipped and hit End first before hitting Delete. The end result was permanently deleting my entire inbox, some of which I hadn’t read yet. Haha. Fortunately, your little trick worked perfectly.

  33. 83 · Eric says:

    Thank you so very much! I tried lots of other stuff.. MozBackup.. Importing into Outlook… Nothing was working. Changed a couple numbers and it worked like a charm. You made my bad day go away! 🙂

  34. 84 · Bugged says:

    I followed all the above instructions to a T.. however the notepad that opens (355 MB) is blank

    Help. How do i retrieve the emails

  35. 85 · yamz says:

    please help terribly need ur help!!! i want to restore all my sent items folder in my yahoo mail but i dont know how! so pathetic. i really need those message..huhuhuh. please help me,please. if u dont mind, i want step by step how to’s:
    i only knw basic in computer.

    thank u so much…i’l wait. God Bless

  36. 86 · Mr Henderson says:

    Brilliant, brilliant, brilliant!

  37. 87 · Chandan says:

    Thanks for the really helpful article.

    I was able to recover only mails till 2007. Dont know why the mails or last 2yrs are still not appearing.
    Can any one please help me out.


  38. 88 · Somebody says:

    Was able to recover everything I needed from sent and inbox. Thanks so much…

  39. 89 · c4ipp3r says:

    Awessome, Recover all the wnated mail . Excellent procedure .

  40. 90 · classycasi says:

    Your instructions were excellent – and I found the Inbox…however it is so large, I don’t have Notepad large enough to handle the size. Suggesions?

  41. 91 · blogger says:

    You’ll want to download Notepad++ or Crimson Editor. It might take them awhile to load the file if they are very large, but just let it sit there for awhile.

  42. 92 · Ravikanth says:


    I am facing a strang problem in my thunderbird.

    Problem is my inbox file is 200mb but while viewing messages in thunderbird inbox it is showing only 6 messages.

    Please guide me how to resolve the problem.

  43. 93 · christa says:

    Hello. I have email account on my T-bird (the latest version, whatever it is), along with two other accounts (one for gmail, another from my local ISP). The account in T-bird had a “Devlin Project” folder attached and the T-bird message filters activated to have corresponding incoming mail go directly to that folder, bypassing the Inbox. Thinking I was done with that project, I deleted the folder. Then in a hasty moment I decided to delete the account from t-bird. I realized (too late) that the “Devlin” folder had been deleted from the online yahoo… they are not stored on the yahoo server.

    I tried your suggestion pertaining to doc. settings, profile, inbox. I actually looked in every folder (made sure hidden folders were showing). Foraging through various folders, I found all the correspondence I’d sent, but none of the incoming from Devlin herself. I’m sure this has to do with the message filter. Here’s the funny thing, there was a sub-folder to Devlin which did show up, but only with the msf extension (and there was nothing in that subfolder I needed anyhow).

    Suggestions? Thanks.

  44. 94 · christa says:

    PS: I also looked under Local folders. Not there.

  45. 95 · christa says:

    I must have emptied the trash too. Dang!

  46. 96 · Alex says:


    If i have deleted the account within thunderbird is the folder ( with the emails in the INBOX file for example) still in Mail / folder name for example. It was a hotmail account so it will be a localhost folder i figure but i because i deleted the account info, will it automactically delete the information and not the file e.g. Inbox or Trash?

    As i downloaded 500 or so emails, they wouldn;t download, so dowlnlaoded the headers, ( though thunderbird settings) said they were all spam, so deleted. Then realised they wer my emails, but the hotmail sever, due to McAfee Security Centre (i think) which is preinstalled on this new PC must have downloaded from sever and move them to my Laptop and deleted the emails from their end? The biggest file i have is 35kb so that wouldn;t be all 500 emails right?

    Any help or further clarification will be appreciated as i have lost 6 years of emails some i need as contacts i sometimes need to be with but they weren;t saved elsewher.


  47. 97 · SonomaBlue says:

    Okay….I think I found the right folder:

    C:\Documents and Settings\Mhayes\Application Data\Thunderbird\Profiles\1awy1a8o.default\Mail\

    ….but its a 1.7 gb file and I dont know how to open it…I really only need one email thats super critical for a big legal case…I know the exact date it was sent and other details….any suggestions?


  48. 98 · brando says:


    Looks like I am having the same problem as Brian. I open the file and all I get are hex numbers 00 00 00 00 00 00 00………..
    and so on.

    The file I am opening is 3.75 GB (yes, GB) and the only program I could find to open is UltraEdit. I opened the thunderbird trash file and it opened fine, I could see the headers and everything.

    Any suggestions on getting through the hex coding? Thank you!

  49. 99 · Joewalsh63 says:

    Brilliant life saver this is worked like a dream, cheers 🙂

  50. 100 · RC says:

    Not sure if anyone is monitoring this. However, I would appreciate some help on Mozilla Thunderbird 2.0.0…something e-mail client.

    For some reason, my two e-mail profiles in Mozilla Thunderbird were wiped out. I had to re-create the profiles and folders. But no data is now in inbox nor sent folders nor anywhere else visible. I believe data is on my hard drive. How do I find location for each of my 2 profiles and get the data loaded properly such that my e-mail client can now “see” the data in primarily inbox and sent folders–and so I can use it?

    Many thanks.

Comments 51-100 of 158

Leave a Comment

Comments are reviewed before publishing to prevent spam.