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 101-150 of 158 to “Restore Deleted Email in Thunderbird”

  1. 101 · Anonymous says:

    problem is all thunderbird mail have been deleted
    to virus how to recover it

  2. 102 · Anonymous says:

    · Kris says:

    Great, Thanks a lot, I have located my mails !
    They are in Application data > Thunderbird > Profiles

    But, next, when I go to Thunderbird > Tools > Account settings there is nothing to see or adapt, it’s just an empty screen

  3. 103 · TZ-Security says:

    Program Hjsplit on can split big file to lot of smaller files , for example 50 Mb , and later is easy to manipulate data.

    Make a copy of big file in one folder ( if something goes wrong original is safe) , split on smaller files and put extension .txt on every file.


  4. 104 · RB says:

    These instructions are really great – I accidentally deleted all of my emails….

    However, I’ve just spent a good couple of hours changing the codes for all of the emails I need and have gone to save the notepad file, but it tells me that there is not enough storage to complete this. I have a hard drive with 150GB on my computer – I’m sure the file isn’t that big!

    Can anybody advise on how to save this file?

    Thanks a lot

  5. 105 · Petri says:

    Very useful tip indeed. Thank u very many…

  6. 106 · MadMan says:

    Hello all. Is there any way to retrieve mail from a deleted T’bird profile? Or restore the profile? I tried several file undelete programs but they do not seem to find the deleted profile.

    The profile was deleted using profile manager and is not in the profile folder now at all (of course).


  7. 107 · Nik says:

    I cannot edit the Inbox file tht I open in Notepad++. However, other files such as Trash, sent etc are editable
    Please help!

  8. 108 · Dale says:

    Thanks for the tip on how to recover a file. I thought I could fix any problem by deleting the .MSF index file.

    I had a user that deleted all his old emails, but kept them in his inbox so he could refer back to them. We had to wipe his hard drive and when we restored his inbox, nothing showed up.

    Your tip to change the X-Mozilla-Status: to 0 solved the problem. But Notepad ++ cannot open a 600 meg file. Textpad can.

    thanks again

  9. 109 · Anup says:

    I lost my mails while moving the mails from inbox to local folder. now as per your suggestion when i check inbox file, it does not contain anything, except 2 new mails.

    Does it mean I cant recover them??

  10. 110 · Taher ALAMI (STAR) says:

    First of all thanks !
    I have the same problem as Brian and Brando !
    My Inbox mbox file is corrupted. It’s 3.95GB and i when i open it with editor all i can see inside is hex with 00 00 00 00 00
    Any help please? I have more than 14000emails on that inbox !

  11. 111 · Mihira Karra says:

    I’m using Mozilla Thunderbird version (20090812).
    I deleted my mails accidentally from my Inbox – I did a Shift+delete

    I checked the approach you suggested for recovering them back.
    But I do not see any files without .msf extension in my Profile folders.
    Please help . How do I recover deleted emails.

  12. 112 · Konran U. Gerber says:

    Hi all,
    unfortuantely there are rare answers on IMAP … what I did yesterday was very paneful: with one IMAP account in Thunderbird of a friend’s computer we switched to a new mail address in server settings of TB in assumption it was a POP account locally and remote. After pressing Enter with the mail address changed TB synchronized the local mail account data with the new empty server account. So the local side got empty as well. Unfortunately before realizing what happened we deleted the old mail account on the ISP’s server side. So all what we have is a backup of some hours before the sh*t was done.
    But the backup files only contain lots of .msf files and not a single one with no extension! It seems to be that TB administrates mail data different on IMAP accounts. When I look into such a .msf file I see index data and mail data as well.
    One hack I tried is: putting one .msf file in place of the mail profile within an existing subfolder and TB closed before that action … I reopen TB and create a folder parallel to the Inbox with the name I had before containing the .msf file copied – TB (sometimes) shows the contents of the subfolder now, but it is not accessible because there is an IMAP error raised from mail server on non-existing folder … so I can’t copy the mails in there to elsewhere. Closing TB in this situation deletes the .msf file copied.

    Any ideas to recover from that?


  13. 113 · Martin says:

    Thank you so much for that discription!!! It really saved my life. Almost 1000 e-mails are restored. THANK YOU

  14. 114 · Ken in Saint Louis says:

    Full virus scan found two in an inbox of Thunderbird.
    OK… BUT, when they were moved to quarantine it really messed up the inbox database. Most of the hundred or so show blank. Some are crossed up between what shows in header and what is in body. (I recognize both but they don’t go together)

    This is the second time my monthly scan has found the “DHL package waiting for you” which I thought I avoided opening and removed completely.

    Tonight I took the Thunderbird->Profiles…->Mail out of the scan list. I don’t like to skip looking at Mail like this but I don’t like to lose good emails either.

    Any suggestions?

  15. 115 · George infoaml says:


    We have a problem with a months worth (December 2009) of lost Thunderbird emails. My wife deleted some for her small business and seemed to have wiped out all the (important) last month’s. December’s “in” emails. I found “Inbox” and got a text editor that would gobble up the 2.4Gb of “Inbox” and display it, but I can’t seem to find any of the files. This may not be Blog protocol, but do you ever, for a professional fee (PayPal or CC or check in the mail) help people out with this (for us) serious problem? We stuck right now. Thanks, George D.

  16. 116 · George infoaml says:

    That’s George D. at

  17. 117 · George infoaml says:


    Maybe you’ve seen this before… and will post an answer…
    Deleted a months worth of IN emails for a small business, in our Thunderbird. Went to “Inbox” and opened it in a text editor that could (slowly) show its 2.4 GB worth of Inbox text. Found the emails from January which were OK, but working backwards in the text reader, where you would expect the deleted files to start to be, is nothing but what looks like garbage ascii text, pages and pages.

    It’s like the emails that are deleted are there, but there is no “X-Mozilla-Status” like in the following files in the text reader, or readable text, just scrambled nonsense, maybe ? zipped ? data with the emails hidden inside them? With no “X-Mozilla-Status” with its zero to be reset. Can this scrambled ascii text be my zipped and missing December emails? Can I still save them? How to do this? All I need is Dec. worth of emails. Any help is appreciated. Thanks,


  18. 118 · blogger says:

    I believe the “wierd ascii” you mention are attachments and since they are in binary format they appear all wierd. They will be quite long also. Although I’m doing this from memory. Sorry for not answering everyone’s questions on here but there were too many and a lot of them I would have to research or test my thunderbird install out with.

  19. 119 · George infoaml says:

    Thanks for the answer, I really appreciate it. These garbage files are attachments (jpgs, etc) like you say, but when I look for the lost month of December 2009, these “junk ascii” begin (going backwards in time) in the TBird “Inbox” file, exactly where the lost files would be (i.e. Dec 31st back to Dec 1 are all gone in the app.) So the missing month can not be found in a text search, whereas Dec 1, 2008 can be found in the same Inbox file, with its attendent X-Mozilla-status string. But no where can I find any Dec 2009 days with the X-Mozilla-status in any kind of search. And that month was all my wife deleted in the program three days ago!

    I don’t want to be so concerned but it’s a real problem now, would there be anybody we could pay you might know to check in over the phone or via email to give us kind of techadvice, I’m pretty tech aware and can follow directions like a rocket. If they’re gone we have to live with it, but I don’t think these emails are gone. Thanks, George

  20. 120 · blogger says:

    You might try looking at the “Trash” file also (make sure its the one with no extension on it). Or if it was filtered into a folder, look for a file with the name of that folder. So if you have a folder called “Family” in Thunderbird and it was in there, look for a file with that name and without an extension.

    If that doesn’t work you might post a message on the mozillaZine forums for Thunderbird.

  21. 121 · Miramax says:

    Hello, I can not restore my whole backup profile folders in Thunderbird. Yesterday I try open my Thunderbird to read my emails and I was supprise that thunderbird open but ask me about brand new setup. All accounts and email folders (Inbox, sent, junk and so) was missing. After I backup in AppData Thunderbird Folder and I reinstall Thunderbird software. After i rename new Thunderbird folder in AppData and paste there old backup back. I try open Thunderbird but is happen same problem. I was asked to creating new account and so. I exit from this setup and check what is in Thunderbird. And again same problem. There was not any folders on left top window where there usably are. I mean folders with my old emails. But in AddressBook was all old contacts,emails addresses and so. This mean AdressBook was restored fine. But emails not. Than I go to AppData, Thunderbird,my old profile folder and go to Mail folder. I see in Mail folder all this missing folders (Inbox, send, junk and so). The size of those mail files is over 4 GB, this mean all those old emails are there. Now I need to know what to do now. How can i fix this problem. I need those old Emails again back to work. Please, Please help me. Thank you.

  22. 122 · Anonymous says:

    I can only see emails from 2008…nothing from 2010. Any idea at how to solve this problem?

  23. 123 · Anonymous says:

    All I have to say is UltraEdit. Forget about using any other text editor. It’s amazing.

  24. 124 · sw0rd says:

    Thanks.. it really works

  25. 125 · Mihaela says:

    I deleted some folders from my account, also from Trash (ADM_SCM_DOORS is one of them). I did not compact folders.
    And the only trace that I have is the .sbd directory an the .msf file

    Is there any chance to recover my emails ?
    Thanks for any advice

  26. 126 · blogger says:

    The .sbd and .msf files do not have email messages in them.

  27. 127 · Soggy says:

    I followed your procedure and it worked fine using Notepad++ until I got to the point in the Inbox file wheremy wife had upgraded to Thunderbird 3.0+ and everything from that point on became unreadable! The problem was that 6 months of my wife’s emails in her Inbox had mysteriously disappeared for reasons unknown! One of my sons who has had similar problems with Thunderbird 3.0+ said to delete the file Inbox.msf in the users profile and restart Thunderbird and low and behold everything that disappeared was back! Alleluia!

  28. 128 · JDT says:

    I had a power outage yesterday and when it came back, after chkdsk, my inbox file was gone. I don’t know how big it was but probably quite big. Any ideas on how to get it back?



  29. 129 · Deb Y says:

    This works perfectly and I strongly advise using the Crimson Editor. Works a charm!

  30. 130 · Ana from Guatemala! says:






  31. 131 · David says:

    Thanks for this. Odd that there’s not more information out there on this.

    I was able to find my missing messages in my “All Mail” mailbox following your directions. However, when I changed the “X-Mozilla-Status:” from 0001 to 0000, saved, then opened Thunderbird, the messages still don’t show up.

    Any chance it has something to do with the fact that it’s in an IMAP gmail account?


  32. 132 · David says:

    I was able to retrieve the messages!

    I copied and pasted the entire message text (with headers) into a new Notepad file.

    Then I renamed the Inbox file (in my primary profile) to Inbox.old, and saved the new Notepad file as “Inbox” in my primary profile.

    Opened Thunderbird, waited for the indexing process to complete, and voila! there they were.

    Thanks again!

  33. 133 · Mark says:

    I’m using Vista and inadvertently deleted all messages in my inbox. I followed the tutorial and got every message back. Having read over almost all the posts here there’s two things that are stated many times as problems: program won’t open the Inbox file and the Inbox file is missing.
    1. My Inbox file is 232MB and the default Notepad did just fine opening it up……BUT IT TOOK ALMOST 5 MINUTES!!! Once you click OK when choosing Notepad from the list of programs to open Inbox, don’t click on anything else and leave it alone…EVEN IF YOU GET THE MESSAGE (NOT RESPONDING)! Let it run.
    2. Get the program called “Everything” from It’s small (334KB) and it’s free! It is a search tool that will index every single file and folder on your computer. If Inbox is anywhere on your computer, Everything will identify it and show you where it is. I’m guessing those missing and empty Inbox files are the wrong files. Hint: When searching for Inbox in Everything, click on Size in the header and look for the biggest file. That’s the one you want.

  34. 134 · sagar says:

    Hi ,
    I have followed the same procedure in the appropriate path.When I open the INBOX(614mb) file with notepade2 but found it’s just blank.Pleze help me to get my whole inbox mails.

  35. 135 · Mark says:

    Notepad may be blank for a long, long time with 614MB of information. When you open Notepad and have the cursor inside the Notepad window is it a spinning hourglass or some other cursor indicating that it is busy/working? If so, then it’s trying to load and the best thing to do is go to a movie, go shopping or something else to pass the time. Just leave it alone as long as the cursor indicates that Notepad is trying to load the file.

  36. 136 · Sakky says: EditPadeLite opened this file in an amazingly fast 2 seconds.

    I had actually deleted the account in Thunderbird so I had to change the file AND move the new Inbox to my new account folder. 21707 messages to go through but DAMMIT some of them I really need!! ^o^ SO HAPPY! THANK YOU SO MUCH! <3

  37. 137 · Sakky says:

    P.S. I was saved folders that I had accidentally deleted from Thunderbird. I was able to restore all of the folders and the emails in the same manner, I just opened them with editpadlite and changed 0001 to 0 then copied the folders and their respective .msf files to my new profile folder.


  38. 138 · Dan says:

    I get my email on my phone and in thunderbird. On my Phone I have it set to not delete from server; however, I have noticed that emails that are on my phone and in my thunderbird are then gone from thunderbird once I delete from my phone. I opened my inbox file and I can see emails that I need back in my thunderbird inbox. I changed the X-Mozilla-Status: to 0 and saved. When I open Mozilla the emails still do not show??

  39. 139 · recuperar mis carpetas locales says:

    Por error ,cambie el directorio de mi carpetas locales de mi cuenta y se perdieron mis carpetas compactadas y lo mismo los correos en ella.Esto me paso porque me pedía bandeja de entrada lleno y no dejaba descargar los correos , lo que hice es cambiarlo el directorio de carpetas locales por otro nombre y ahora cuando quiero volver a poner en configuracion de cuenta ,directorio local no se ve las carpetas que antes estaban por defecto.
    ayuden les agradezco.

  40. 140 · TSC says:


  41. 141 · blogger says:

    Unless you have a backup from the old laptop they are gone, but you must of realized once you changed laptops they weren’t there. Unless you got a new laptop because of the hard drive failure. Only thing to do is try to recover the data on the old hard drive.

  42. 142 · mpegyna says:

    I have about 1+ GB of mail in my Thunderbird Inbox and I did some combo missclick yesterday and all my mail in Inbox vanished. I’ve been searching for the solution since then. I didn’t found the solution here, but bits by bits on the Internet and my friend helped me a lot.

    But here is the well-written merit of the problem with lots of comments, so I’ll post my solution here.

    The corruption of my Inbox was that TB signed all emails as deleted (X-Mozilla-Status: last digit +8). So all I needed to do is to substact 8 from the last digit in X-Mozilla-Status in my 6500-mail 1+GB Inbox file.

    I knew the solution, but I haven’t the neccessary tool for doing this. And then my friend El helped me.

    I got Cygwin (, because the fix is a unix script.
    It’s 2 files: “sedscript” and “”

    content of sedscript:
    s/\(X-Mozilla-Status: …\)8/\10/
    s/\(X-Mozilla-Status: …\)9/\11/
    s/\(X-Mozilla-Status: …\)a/\12/
    s/\(X-Mozilla-Status: …\)b/\13/
    s/\(X-Mozilla-Status: …\)c/\14/
    s/\(X-Mozilla-Status: …\)d/\15/
    s/\(X-Mozilla-Status: …\)e/\16/
    s/\(X-Mozilla-Status: …\)f/\17/

    content of
    sed –file=’./sedscript’ -b $1 > $2

    I moved my “inbox-corrupted” file to the “home” folder of cygwin
    and run the script in cygwin console by entering this command:
    ./ inbox-corrupted inbox-fixed

    I’ve waited for some time and the script made me fixed “inbox-fixed” file (it has the same file size as the original file! if not, something is wrong), which I put into my TB mail folder. Started TB and voila, I got all my mails with forward/read/reply signs and with my color tags!

    So big thanks to my friend El, who is the author of the script.!The minor problem is that I also restored all spam and removed mails, so I’m going to make some order in it now.

    PS: I tried to write the solution in a manner that even non-unix comuter user can fix his corrupted Thundebird mail.

  43. 143 · blogger says:

    I am trying to back up and email I deleted out of my trash bin. I have used the compact folder once in the past but it was before the email I am looking for. When I go into my profiles for Thunderbird I see exactly what the forum told me to find “Inbox” without the extension but the file says 0 KB for both the “Trash” and “Inbox” files. I have tried opening both of them using notepad anyway but there is nothing there which would makes sense as to why it says 0 KB. I haven’t compacted the folders at all recently and the email I am looking for that I deleted from trash is only a week old. Am I missing something here? Please advise…your help is greatly appreciated as I am in the middle of a proof game with my landlord/lawyer. Thank you! (:

  44. 144 · blogger says:

    One this I just thought of…..earlier this week or end of last week I did an update on my Thunderbird…..could this be why there are no emails in the “Inbox” or “Trash” files? And if so is there a way to go back to the old one to get that email I sent beginning of last week? It is just one email I am looking for, and it is fairly recent. Thank you again!

  45. 145 · premnath says:

    yesterday i scan my system. in my system i have symantec antivirus. but after scannig my all inbox mail automatically deleted.
    please give me solution i am in very truble.

  46. 146 · patrick says:

    thanks to these thread .. it helped me a lot .. now i can sleep soundly tonight

  47. 147 · Derek says:

    All my emails have vanished after accidentally compacting my messages, I cannot find anything, I must have clicked yes on something. I didn’t mean to do this and Im not sure what nor where they have gone.

    Please help me with this.

  48. 148 · JAM says:

    What I”ll do when i deleting the mail it is not going to trash, and then trash is empty.

  49. 149 · Akash says:

    Thanks … Ur post was very helpful …. it saved my life :))

  50. 150 · Anonymous says:

    I just did the very foolish thing of hitting the home key and delete key almost simultaneously while holding down shift (saves the effort of emptying from trash if you shift delete) meaning that it first selected every single email from the one highlighted to the first in my inbox, and then deleted all of them >_> So this really is a lifesaver! Thanks so much! (Even though it’s going to take a long time to do…)

Comments 101-150 of 158

Leave a Comment

Comments are reviewed before publishing to prevent spam.