Tech request

Thunderbird seems to have deleted my inbox. I’m following the intstructions from Mozilla, and, well, they’re not working. I only seem to have the emails sent after 9:00 this morning.

Any tips on how to rebuild my inbox? I’ve been regularly deleting and compacting and transferring, but of course, it had a huge number of messages. I’m a packrat, and email makes me an e-packrat.

It errored out before deleting all my messages, so I’m wondering where they’re hiding. I also seem to have duplicate folders, one dated january 2006 and one dated today, so I don’t think that fits under their duplicate-folder error. I tried rebuilding the index. No luck. I tried deleting inbox.msf. No luck.

The files are there. Inbox has 79 megs in it. But inbox.msf is 2k. Something’s wrong.

Anyone have any ideas?

This entry was posted in Computers. Bookmark the permalink.

9 Responses to Tech request

  1. John M says:

    Clueless. Like a total corporate tool, I use Outlook.

  2. jja says:

    Have you tried closing TBird, deleting (or relocating) inbox.msf, then opening TBird to let it rebuild the index file?

  3. jja says:

    Yeah, you did. Sorry about that. This link has a program that recovers corrupted TBird files, but it’s a pay program. I’ll look for other ones.

  4. jja says:

    I assume you’ve gotten to this page:

    If you’ve deleted the .msf files for both folders, the next step may be to open the mail file in a text editor and check the end of the file to see if your messages are actually in there. If they are, either follow the instructions on that page for editing the header, or cut them out of that file and into another file, which may assist in recovery. It’s possible that you have a corrupted message and that could help you to narrow it down.

  5. Ah. Didn’t delete for both folders, but one is way older than the other. Think that matters?

    Anyway, let me go try.

  6. I think they’re gone. The 79 meg file I’m looking at is dated March 12, and titled “”. I use my first name as my profile name. I’m not quite sure where came from.

    I think I just lost the last few years’ worth of emails. I mean, the good news is a few days ago, I moved a bunch of mail to other folders. The bad news is there are things I didn’t move and need to refer to.

    I don’t have a recent backup, of course. Sigh.

  7. A Steve says:

    :( This happened to me before, and I’m trying to remember what I did to fix it.

    Meryl, my Inbox.msf file is 2k, too, and I’ve got several thousand in there. I don’t think they’re stored there. Be careful and don’t do anything rash.

    Are you using IMAP or POP3?

  8. I’m not sure how much of this will help, but here’s some info on Thunderbird mailboxes.

    In your Thunderbird profile directory, under Mail, there is a directory for each mail account you have configured. Plus any leftover from deleted accounts.

    Within each account, a mail folder consists of two files – one with a name matching the folder’s name, and a “.msf” file. A folder that contains other folders will also have a directory with the folder’s name and a “.sbd” suffix.

    For each mail folder, the msf file contains Mozilla-proprietary database data, indexing all the key fields of each message. It is not something you are likely to make sense of on your own.

    The other file (with no suffix) contains the mail data itself. It is in Berkely-standard mailbox format (the same one invented decades ago for BSD UNIX.) All of the messages are run together in a single, potentially huge, text file. The start of each message is indicated by a line beginning with the string “From ” (without the quotes, but with the trailing space character.) The message consists of all the text from there up to the start of the next message. Binary data, like attachments, are in the original form they were received in (typically a text-encoding, with MIME headers to identify it.)

    When you delete a message, Thunderbird removes its index data from the .msf file, and marks it as deleted by adding/modifying “X-Mozilla-Status:” and “X-Mozilla-Status2″ headers in the mail data file. The message is not removed from the mail data file until you compact the mailbox.

    If you delete the .msf file, Thunderbird will reconstruct it from the mail data file when you try to view the contents of the folder.

    Given all this, assuming the messages haven’t been compacted out of existence, here’s how you can bring them back:

    1: Quit Thunderbird. Don’t attempt any of this while the program is running or it will all end in tears. Make a backup of everything. If this procedure doesn’t work, you’d like to be able to undo all this.

    2: Delete the .msf files for every folder you want to try and recover

    3: Pull the corresponding data files into a good text editor. One that won’t alter the line-endings or change the character encodings. I use emacs for this, but you might not have that.

    4: Go through the data files and delete every header line that begins with “X-Mozilla-Status:” and “X-Mozilla-Status2:”. This should remove the data that Thunderbird uses to mark messages as “read” or “deleted” (or flagged, or other similar things.)

    5: Restart Thunderbird. The folder list won’t show any messages (because you deleted the .msf files). That data will appear when you click on each folder, to view its contents. With luck, you’ll have all your messages in there. Now you can delete what you wanted to keep deleted (and duplicate messages – things that had already been moved to other folders) and organize the rest.

    Good luck.

  9. One more thing: My previous post assumes you are using POP3. If you’re using IMAP, then your messages may not exist on your hard drive at all. If they’re not available from the server, then the server admin may have to do something (perhaps restore from a backup) to get them back.

Comments are closed.