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).
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
What do you do if you deleted the folder, and then emptied the trash?
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.
Thanx
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…?
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)
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”?
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.
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
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).
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
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.
i deleted a contact years ago can i still get his e-amail address
If one of the deleted emails is from him you can get it.
People like you make the web what it is.
Many thanks.
Excellent post mate. life saver. thanks so much
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.
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.
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?
Unfortunately, I do no have any backup. Today is my first time to use Thunderbird and I just messed up.
Real Lifesaver.
Thanks, I’m automatically processing my father’s folder right now!
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.
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?
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.
I deleted unknowingly in my trash folder, how to find out my mails
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?
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).
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?
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.
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
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)?
I don’t understand what to post
Can you please specify?
A screenshot from Windows Explorer of the folder that Thunderbird uses for that account with all the .msf and other files in there.
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.
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
In the Replace With: textfield type in
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.
http://img329.imageshack.us/img329/1231/63925353mp2.jpg There you go
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.
Thunderbird doesn’t allow me dragging the folders to the main inbox – unfurtunately.
Søren you might try the Thunderbird forums on MozillaZine. I’m not sure what happened.
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?
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.
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!
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.
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!
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.
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.
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?
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.
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…
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.