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).

Tags:

Comments 1-50 of 152 to “Restore Deleted Email in Thunderbird”

Pages: 1 2 3 4
  1. 1 · Maike says:

    Thank you so much for your description!!!!
    In Mozilla 1.4, there also is this Inbox file. Mine was 340 MB.
    This is at the same time a very good archiving feature.
    Maike from Hamburg

  2. 2 · Spike says:

    What do you do if you deleted the folder, and then emptied the trash?

  3. 3 · blogger says:

    It doesn’t matter if you empty the trash as long as you don’t compact the folders. However I’m not sure what to do if you deleted the folder, but I think it should still restore it and make it showup in your inbox.

  4. 4 · Dayan says:

    Thanx

  5. 5 · WannaBee_Blu says:

    If I do aht you wrote my folders are clear. There is no single mail in it, Not even the mails that still are in my inbox if I open thunderbird. What’s wrong there? Or did I do something wrong…?

  6. 6 · blogger says:

    Do you mean your folder is empty? Or that the “Inbox” file is empty?

    Make sure you open the file in the right folder

    In Windows 2000 and XP
    X:\Documents and Settings\YOURWINDOWSLOGINORUSERNAME\Application Data\Thunderbird\Profiles\YOURPROFILENAME\Inbox

    (Be sure to open up the file just called “Inbox” Don’t open up Inbox.msf)

  7. 7 · WannaBee_Blu says:

    Ok, I got my mistake but now I have another problem. If I want to open the file in any text editor (I tried ms word and notepad) it does not work. word says the file has to many mbs for this programm. Notepad tries to load oit but then says …”notepad recognized a server mistake and has to be close…” not exanct the same but from the meaning. I guess it is because the file is to big for notepad also…?

    So what can I do now?

    P.s. I tried it with my trash folder and it works. but i recogniezed that it onlly shows me the mails which where in it today. (I have not compressed the folder.) Is it normal that you only got the mails from “today”?

  8. 8 · blogger says:

    Don’t open it in Word, it will put extra formatting in the file. You’ll need to use Crimson Editor, Notepad++ or some text editor that can handle very large files without putting formating into the file. I thought Notepad in WinXP could handle big files but maybe not, I know it can handle bigger files than Notepad in Win98 could. I wouldn’t bother with the trash folder, only modify the file called Inbox.

  9. 9 · Anonymous says:

    my thunderbird account was deleted. I don’t know who was deleted it. All message both income and outcome were deleted. How to restore my account and all my messages??
    Thank you
    Triyana from Indonesia

  10. 10 · blogger says:

    Did you restore from a backup?

    I recently setup a new install of XP and I noticed that when I setup my new XP machine I had a different login name (it was different from the last one I had) and so I had to update what Thunderbird was looking for.

    If so goto Tools -> Account Settings and go under the account you had setup and look under Server Settings and see what Local Directory is pointing at.

    It maybe pointing to an old login or another login you had. If its one that doesn’t exist Thunderbird will try to create that folder and if it can it will all be blank. It could also be pointing to another profile folder (the ones with wierd names).

  11. 11 · Trevor says:

    Hey there,

    Thanks for the really helpful article.

    My inbox had 100 messages and was corrupted. I looked at the file and found that it’s almost 3gb (I’ve never compressed it). I’ve tried to open it with TextPad, copy it, burn to DVD, etc. and it errors out at 46%. I also tried to edit with TextPad without opening it — same thing.

    Any thoughts on how I can repair the file so I can restore the missing emails?

    Thanks for your time!
    Trevor

  12. 12 · blogger says:

    If your using Thunderbird 2.0 you might try this to fix the corrupted inbox folder:
    Right-click on that inbox folder and select Properties -> General Information, then click on Rebuild Index. That may fix the file, I’m not sure if it will keep the deleted emails or not though.

  13. 13 · Anonymous says:

    i deleted a contact years ago can i still get his e-amail address

  14. 14 · blogger says:

    If one of the deleted emails is from him you can get it.

  15. 15 · MozUser says:

    People like you make the web what it is.

    Many thanks.

  16. 16 · Jakal says:

    Excellent post mate. life saver. thanks so much

  17. 17 · paeisls says:

    Hi,

    I did compact folders and all mails in my Inbox are all gone. I really need to restore them back to my Inbox. How could I do that? I desperately need your helpl.

    Thank you very much.

  18. 18 · paeisls says:

    oh, by the way, I need to restore emails from my Inbox that I have not deleted them yet. But after doing “compact folders” they are all gone.

    Where would they go after we do compact folders? How could we restore them?

    Thank you very very much.

  19. 19 · blogger says:

    I’ve never heard of emails disappearing from the inbox if you compact the folder but never deleted them. Where they flagged as spam? Do you have a backup of your Inbox?

  20. 20 · paeisls says:

    Unfortunately, I do no have any backup. Today is my first time to use Thunderbird and I just messed up.

  21. 21 · Paolo G. says:

    Real Lifesaver.
    Thanks, I’m automatically processing my father’s folder right now!

  22. 22 · Kahuna says:

    Thanks for this.I was able to restore an email and attachments which were very important to my work. One thing though,it would not restore to my name folder,only to the Local Folder.From here it was a simple matter to restore to my inbox and problem solved.I also downloaded Notepad++ to edit the file with and this program is now my editor of choice.Again thanks very much.

  23. 23 · Josh says:

    I am having some trouble with this I’m going to the right directory and everything else for what i need but the email folders have all the msf files but there is no files like inbox or trash or any of them that are not .msf files yet the msf files show that there is file size to them could the inbox file be deleted?

  24. 24 · blogger says:

    It might be in another Windows Username folder or another Thunderbird profile.
    (On Win 2000 and XP)
    X:\Documents and Settings\WINDOWSUSERNAME\Application Data\Thunderbird\Profiles\THUNDERBIRDPROFILE\Mail

    The easiest way is to check the settings in Thunderbird so you know where to look.

    Go to Tools -> Account Settings and go under the account you have setup and look at Server Settings and see what Local Directory is pointing at.

  25. 25 · lakshman says:

    I deleted unknowingly in my trash folder, how to find out my mails

  26. 26 · Søren Larsen Pedersen says:

    I accidently deleted my account and therefore also the folders I created in my “Inbox”. I can get some of the e-mails back in the “inbox”, but how do I get the folders back? :)

  27. 27 · blogger says:

    lakshman, the trash file should still exist for you to restore the emails, trash.msf, I believe is just the trash folder for Thunderbird to use and not the file with all the data. Open up trash in your Thunderbird’s profile folder and open in a text editor and make the changes I mentioned in the tutorial.

    Søren, in your Thunderbird’s profile folder you should see a file named whatever your folder was called without an extension. For example if you had a folder called personal, you should see 2 files: one called personal and another personal.msf. The one without the extension is the one you want to open in a text editor and make the changes I mentioned in the tutorial, (treat it like its the inbox file).

  28. 28 · Matt says:

    Hi. I switched hosting packages which screwed up my email. The moment I put in a password, all files and subfolders were gone. I am using IMAP and i think that was why it removed all the emails as they were no longer on the server. Thing is… I’ve browsed the INBOX file which resides in the account folder along with INBOX.msf. I suppose that is the new file created. The INBOX file is big and I opened it and changed at least one message to a 0. Well I don’t see how thunderbird will bring this back considering the file doesn’t have an extension and a newer one is being used.

    So I’ve tried deleting the new Inbox.msf file and renaming the old one. Once thunderbird is open, it keeps clearing out that file.

    Any ideas?

  29. 29 · blogger says:

    Matt, goto Tools -> Account Settings and go under the account you had setup and look under Server Settings and see what Local Directory is pointing at. Is it pointing at a new folder or perhaps one similar to what you had before but with a number 2 at the end? I’ve changed ISPs once and I think I remember Thunderbird making a new folder, due to that.

  30. 30 · Søren Larsen Pedersen says:

    Can you please tell me, what has gone totally wrong with the hierarchy of the folders and subfolders in my thunderbird? – Try to look at the place with two “Inbox” :S

    http://img337.imageshack.us/img337/1203/faultsr4.jpg

  31. 31 · blogger says:

    Søren, can you post a picture of what’s inside the folder with the file extensions turned on (not from inside Thunderbird, but from your OS)?

  32. 32 · Søren Larsen Pedersen says:

    I don’t understand what to post :)
    Can you please specify?

  33. 33 · blogger says:

    A screenshot from Windows Explorer of the folder that Thunderbird uses for that account with all the .msf and other files in there.

  34. 34 · Rasmus says:

    Hello. I deleted all my e-mails from Inbox by mistake. It is quite annoying and consumes a lot of time to edit over 300 MB text file. Is there some other way to recover all Inbox mails? (No compacting made).
    PS. Deleting Inbox.msf didnt help.

  35. 35 · blogger says:

    Rasmus, you shouldn’t delete Inbox.msf, perhaps you got confused by the other comments made.

    The only way to restore the emails is to edit the text file. You can try using Find and Replace to make it go a little faster, especially if your text editor allows for RegEx Find and Replace, but be sure to backup the file first.

    If you are using Notepad++ try this:
    Go to Search->Replace
    In the Find What: textfield type in

    X-Mozilla-Status: [0-9]+

    In the Replace With: textfield type in

    X-Mozilla-Status: 0

    Be sure Regular Expression is checked and then click Replace All and that should do it.

    I’d recommend to start backing up your profile folder so you can restore things in the future if you ever need to.

  36. 37 · blogger says:

    Søren, Thunderbird should let you drag the folders to the main Inbox? If you do that and start Thunderbird again, are there any emails in the second inbox? If not you should be able to delete the second one and the second trash folder from inside Thunderbird.

  37. 38 · Søren Larsen Pedersen says:

    Thunderbird doesn’t allow me dragging the folders to the main inbox – unfurtunately. :)

  38. 39 · blogger says:

    Søren you might try the Thunderbird forums on MozillaZine. I’m not sure what happened.

  39. 40 · Dianne says:

    After my husband did some computer maintenance today,
    we lost all current messages in the Thunderbird inbox, sent. trash, etc……..
    AND the sub folders disappeared! Those sub folders had important Emails in them to use as reference. How can we get all Email back on our Thunderbird Email display?

  40. 41 · blogger says:

    What kind of maintenance did your husband do? Did you get a new login to Windows? If so, its possible that Thunderbird is still looking for the for profile folder under the old Windows login that it can’t find or doesn’t have permission to see.

  41. 42 · Relieved Business Owner says:

    Thank you SO MUCH for this post. You saved me from a coronary. I’d like to add something that may be useful:

    – In Windows Vista, be sure to check the path your Inbox file is stored in by going to Server Settings for that particular account. It will likely be different than XP.

    – If you deleted a message by holding Shift + Del to bypass the “Trash” folder, the X-Mozilla-Status will be 0009. So be sure to change those to 0 as well. I originally missed a lot of messages because of this.

    Everything looks restored now. Thanks again!

  42. 43 · Whiggles says:

    This article really saved my bacon. This evening I managed to delete the entire contents of my Inbox (five years’ worth of emails) due to somehow accidentally selecting every single message before hitting Shift+Delete. My previous backup was nearly a year old, so as you can probably imagine I’m incredibly relieved. Note to self: make backups more often.

  43. 44 · Kirsten says:

    This tip is a lifesaver! I just accidentally deleted an account from Thunderbird because I accidentally set it up as a POP account rather than IMAP. When I re-set it up as an IMAP account, all my existing Inbox mail that I’d read had disappeared.

    I had to do a quick workaround to your tip to restore the mail. instead of copying the ‘edited; Inbox file to my original profile, I copied it to the Local Folders and all of my deleted email appeared. Thanks!

  44. 45 · Kris says:

    Hi, I just opened my Thunderbird and everything has disappeared: mails, folders, account information. I did not do anything. Is there a magic button somewhere to get everythin back? The software asks me to install a new email account. Thanks.

  45. 46 · blogger says:

    Did you get a new login to Windows? If so, its possible that Thunderbird is still looking for the for profile folder under the old Windows login that it can’t find or doesn’t have permission to see.

  46. 47 · Kris says:

    Thanks. No, no new login. I did not do anything, I did not change anything. It’s very weird. But, I guess the files must be still around somewhere, it’s hard to believe they vanished completely. Any idea what I should look for?

  47. 48 · blogger says:

    See if you can find your Thunderbird Profile Folder. If so, in Thunderbird goto Tools -> Account Settings and go under the account you had setup and look under Server Settings and see what Local Directory is pointing at. It maybe looking for it somewhere else, even though your data is in another location.

  48. 49 · 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…

  49. 50 · blogger says:

    I’m guessing it’s not pulling in the some setting from what you’re saying, but I can’t tell without several screenshots of settings in Thunderbird. You might also try the Thunderbird forums on MozillaZine.

Comments 1-50 of 152

Pages: 1 2 3 4

Leave a Comment

Comments are reviewed before publishing to prevent spam.