Help please! Shift-deleted my entire inbox! :(

User Help for Mozilla Thunderbird
antic
Posts: 671
Joined: December 12th, 2004, 8:40 am
Location: Oz

Help please! Shift-deleted my entire inbox! :(

Post by antic »

omg.. I've never done this in all the years I've used TB.

I was at the first message in my inbox of over 100 emails. I had the SHIFT key down and accidentally touched the END key just prior to the DELETE key.... so all my emails were selected then shift-deleted. This is Bad News.

Is there any way of recovering shift-deleted emails? Please say yes and tell me how.. :~

*holding breath prior to hitting panic button*
User avatar
SK.
Moderator
Posts: 20814
Joined: October 18th, 2007, 1:28 pm
Location: Third Rock From The Sun
Contact:

Re: Help please! Shift-deleted my entire inbox! :(

Post by SK. »

Try Ctrl-Z.
John 3:16 and Philippians 4:13
antic
Posts: 671
Joined: December 12th, 2004, 8:40 am
Location: Oz

Re: Help please! Shift-deleted my entire inbox! :(

Post by antic »

No, shift-delete is supposed to be permanent - I tried ctrl-z, it doesn't work.

Surely there must be a way to recover them...?
User avatar
SK.
Moderator
Posts: 20814
Joined: October 18th, 2007, 1:28 pm
Location: Third Rock From The Sun
Contact:

Re: Help please! Shift-deleted my entire inbox! :(

Post by SK. »

If you have not compacted your folder since - DON'T!

1. Exit Thunderbird.
2. Traverse to your profile. Check this page for information on Thunderbird profiles - files, location, etc.
3. Find the folder you deleted - it may still exist. Ignore the *.MSF file for the folder.
4. Rename the folder.
5. Restart Thunderbird.
John 3:16 and Philippians 4:13
antic
Posts: 671
Joined: December 12th, 2004, 8:40 am
Location: Oz

Re: Help please! Shift-deleted my entire inbox! :(

Post by antic »

^ Thanks SK but I shift-deleted the messages, not the folder itself.

I found the solution, thank Dog! Here are instructions on how to un-delete any emails that were permanently (shift-del) deleted. I personally used TextPad to edit the mail file, as it handles big files very quickly (mine was 180MB).
http://home.att.net/~cherokee67/restoredelmail.html

From the page:

If you deleted Mail, but the Mail folder has NOT been compacted, follow the below steps to restore messages. If you have compacted your files, then the Mail is not recoverable, and this workaround will not restore the deleted mail.

Close Mozilla/Netscape, and Quick Launch
VERY IMPORTANT: BACK UP THE MAIL FOLDER BEFORE STARTING THIS EDIT

1. Open Windows Explorer
2. Copy the file, without the MSF extension, from which you deleted the Mail, to another location
3. Rename the file: e.g., restoreSent or restoreInbox, etc.
4. Open the renamed file in a text editor (preferably one with "Find and Replace" capabilities)
5. Find: X-Mozilla-Status: 0009 Replace with: X-Mozilla-Status: 0000
Based on information from sample mail header above (this will restore the message to "unread")
6. Find: X-Mozilla-Status: 0019 Replace with: X-Mozilla-Status: 0011
Based on information from sample mail header above

Continue the above steps:

Find: X-Mozilla-Status: 001b Replace with: X-Mozilla-Status: 0013
Find: X-Mozilla-Status: 000b Replace with: X-Mozilla-Status: 0003
Find: X-Mozilla-Status: 1019 Replace with: X-Mozilla-Status: 1011
Find: X-Mozilla-Status: 101b Replace with: X-Mozilla-Status: 1013

Though I have not tried ALL combinations, I beleive that you can replace the last digit and restore the message to again display.
E.G.:
Find: X-Mozilla-Status: nnn9 Replace with: X-Mozilla-Status: nnn0
Find: X-Mozilla-Status: nnnb Replace with: X-Mozilla-Status: nnn3

When you have made all the edits, save the renamed file (without any extension)
Copy the edited renamed file ( with no extension) back to the original Mail Account folder:
C:\.......\Application Data\Mozilla\Profiles\profilename\xxxxxxxx.slt\Mail\mailaccount

Open Netscape/Mozilla
The recovered messages should be displayed in the renamed folder
Drag the recovered messages from the renamed folder to the folder from which they were originally deleted
When all files have been placed in their original folder, and you are satisfied that the deleted mail has been restored:
Compact the original folder in order to release unused space
You can then delete the renamed folder


As a note to the above, I found that TB does not refresh the display of the updated mail file if the related .MSF file is present. If you delete the .MSF file before running TB, then click on the folder, TB re-evaluates the contents of the mail file and then shows the emails which have been un-deleted. If you follow the above steps, you end up with a copy of your folder which doesn't have an .msf file. But if you repeat the above, the .msf file may be left over from before and so you'll have to delete it to force TB to recognise your edits.

Because I hadn't compressed my Inbox for ages, I had 800 un-deleted emails to prune (things which had been moved to different folders, marked as spam, etc.) before the job was done, but it worked! Thank you TB!!!

[ed] I will certainly be compacting my Inbox regularly after this, in case I do it again one day. And I'll stop using shift-delete, as it doesn't free up physical disk space anyway as I assumed it would, being a "permanent" delete option. I thought it would at least delete the space used by attachments, but not so.

Now I know how the system works, shift-delete doesn't serve any real purpose. It probably should be removed as an option to reduce the chance of user mishaps like this. ;)
User avatar
SK.
Moderator
Posts: 20814
Joined: October 18th, 2007, 1:28 pm
Location: Third Rock From The Sun
Contact:

Re: Help please! Shift-deleted my entire inbox! :(

Post by SK. »

Deleting the MSF file is a lot easier than the method you describe, but I am glad you found a solution. You should familiarize yourself with Thunderbird's folder compacting process: Check this page for information on compacting folders.
John 3:16 and Philippians 4:13
antic
Posts: 671
Joined: December 12th, 2004, 8:40 am
Location: Oz

Re: Help please! Shift-deleted my entire inbox! :(

Post by antic »

Well, kind of.. The basic process is:
1. Make a copy of your Inbox file (or whichever one you want to edit)
2. Edit the copy
3. Start TB and the un-deleted emails will appear in the copied folder (ie. TB will construct the MSF file).

But if you then want to make further edits, you need to delete the MSF file before restarting TB, or those edits won't appear.
User avatar
SK.
Moderator
Posts: 20814
Joined: October 18th, 2007, 1:28 pm
Location: Third Rock From The Sun
Contact:

Re: Help please! Shift-deleted my entire inbox! :(

Post by SK. »

What I meant is that instead of your process, delete the appropriate MSF file. Not in addition to....
John 3:16 and Philippians 4:13
antic
Posts: 671
Joined: December 12th, 2004, 8:40 am
Location: Oz

Re: Help please! Shift-deleted my entire inbox! :(

Post by antic »

I guess I'm not certain what part of the process you mean. The idea is not to edit the original file for safety's sake. If you mean simply edit the original and delete the .msf file, yes that should work but you still need to make a backup copy beforehand.
User avatar
SK.
Moderator
Posts: 20814
Joined: October 18th, 2007, 1:28 pm
Location: Third Rock From The Sun
Contact:

Re: Help please! Shift-deleted my entire inbox! :(

Post by SK. »

No, what I mean (and what I have written), is that you should not need to edit the message file at all, if you just delete the MSF file.
John 3:16 and Philippians 4:13
antic
Posts: 671
Joined: December 12th, 2004, 8:40 am
Location: Oz

Re: Help please! Shift-deleted my entire inbox! :(

Post by antic »

SK wrote:No, what I mean (and what I have written), is that you should not need to edit the message file at all, if you just delete the MSF file.


But how does that restore deleted emails, which is what this is all about?
User avatar
SK.
Moderator
Posts: 20814
Joined: October 18th, 2007, 1:28 pm
Location: Third Rock From The Sun
Contact:

Re: Help please! Shift-deleted my entire inbox! :(

Post by SK. »

Go back and read the link on compacting that I provided. It is key to this topic.
John 3:16 and Philippians 4:13
antic
Posts: 671
Joined: December 12th, 2004, 8:40 am
Location: Oz

Re: Help please! Shift-deleted my entire inbox! :(

Post by antic »

I did read it. It says nothing about recovering deleted emails. On the contrary, compacting a folder will remove deleted emails from the file (that's what it's for) so they cannot be recovered. Instead of being coy, can you please explain, directly and clearly, exactly what you mean by "you should not need to edit the message file at all, if you just delete the MSF file" and how that is supposed to recover deleted emails?

Sorry but I just don't see what you are getting at. It is not the "key" to this topic at all as far as I can see. If you compact a folder, you will not be able to recover anything at all, as all deleted email data will have been removed from the file. The key to this topic is editing the mbox file. If I'm missing something here, please explain clearly in what way you disagree.
User avatar
SK.
Moderator
Posts: 20814
Joined: October 18th, 2007, 1:28 pm
Location: Third Rock From The Sun
Contact:

Re: Help please! Shift-deleted my entire inbox! :(

Post by SK. »

When you delete a message, it is only "marked" as deleted. The MSF file (the folder index file) notes this and prevents the message from being displayed. If you delete the MSF file, Thunderbird rebuilds it using the messages that remain in the folder. My experience is that messages that you have "deleted" will reappear in the folder if you exit Thunderbird and delete the corresponding MSF file.
John 3:16 and Philippians 4:13
antic
Posts: 671
Joined: December 12th, 2004, 8:40 am
Location: Oz

Re: Help please! Shift-deleted my entire inbox! :(

Post by antic »

Ah I see, thanks for explaining. I was given to believe the deleted status was managed by the attribute "X-Mozilla-Status:" in the main mbox file. I have had complete success using the method I found above, but I'll test your method too. I'll create a test folder, delete some items and try deleting the msf file and see what happens. It would certainly be easier if that works.
Post Reply