This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

After running new filter, messages gone. Message file there, but repairing does not rebuild MSF. How to recover

  • 2 replies
  • 1 has this problem
  • 18 views
  • Last reply by Matt

more options

Created a new filter, ran it on an existing local folder. Thunderbird crashed. When I restarted thunderbird, it picked then to automatically install updates. When I was done, the folder I ran the filter on was empty.

I went to the the folder ddirectory, and there is the msssage file itself, about 153MB worth (which is about right), and the msf file for it is only 3 kB (comparable size local folders are 100 times beigger, at least).

Tried all known methods to repair this, including going to the properties for the folder and clicking repair, or stopping thunderbird, manually deleting the msf file and restarting thunderbird. In all cases, I end up with an empty folder, and an msf file being either 0 kb or 3 kb.

How do I recover this folder?

Created a new filter, ran it on an existing local folder. Thunderbird crashed. When I restarted thunderbird, it picked then to automatically install updates. When I was done, the folder I ran the filter on was empty. I went to the the folder ddirectory, and there is the msssage file itself, about 153MB worth (which is about right), and the msf file for it is only 3 kB (comparable size local folders are 100 times beigger, at least). Tried all known methods to repair this, including going to the properties for the folder and clicking repair, or stopping thunderbird, manually deleting the msf file and restarting thunderbird. In all cases, I end up with an empty folder, and an msf file being either 0 kb or 3 kb. How do I recover this folder?

All Replies (2)

more options

cartchunk said

Created a new filter, ran it on an existing local folder. Thunderbird crashed. When I restarted thunderbird, it picked then to automatically install updates. When I was done, the folder I ran the filter on was empty. I went to the the folder ddirectory, and there is the msssage file itself, about 153MB worth (which is about right), and the msf file for it is only 3 kB (comparable size local folders are 100 times beigger, at least). Tried all known methods to repair this, including going to the properties for the folder and clicking repair, or stopping thunderbird, manually deleting the msf file and restarting thunderbird. In all cases, I end up with an empty folder, and an msf file being either 0 kb or 3 kb. How do I recover this folder?

Well, being a little adventurous AND having a lot of experience with awk, I first was able to determine that bit 3 of the X-Mozilla-Status was asserted, signalling that all these messages were marked for delete. Once I knew that, and also knew that all 1357 messages were in the mailbox, I wrote a simple awk script that went through, read each line, and on the ones holding the value of X-Mozilla-Status, I read the value in, converted it to an int, cleared bit 3, and wrote the line back out. All other lines were written exactly as found.

Took me an hour to design, write and debug the script. Ran it a few times to work out the final kinks, then ran it for real, with Thunderbird not running. It took maybe 10 seconds to go through the entire mailbox (about 2 million lines).

I then restarted Thunderbird, right-clicked on the busted mailbox and selected Properties, clicked the Repair button, and about 3 seconds later, the number of messages went from 0 to 1370, and it seems nothing was lost.

more options

perhaps next time you will just use the undelete add-on. https://freeshell.de//~kaosmos/index-en.html#recDelMsg