Blog | Admin | Archives

Thunderbird 0.8 and the Big Scare

I decided to upgrade to Thunderbird 0.8 yesterday, since I like doing things like that to keep my life exciting. I was not having any problems with having with 0.7, nor were there any features I needed in 0.8. The universal inbox sounded like it might be worthwhile, although it wasn’t really neccesary, since I do all my email collapsing via aliases before it reaches my server. On the other hand, I’m a big fan of clutter removal, and the unused “Comcast Email” and “Local Folders” did bother me a little bit.

The installation of Thunderbird went very smoothly – much better than the 0.6 -> 0.7 upgrade, which saw me uninstall the new version twice, and then install it again, to get things working correctly (like the about box, which insisted it was version 0.6 for a while after the initial install).

The trouble began when I thought I’d make an experiment out of transfering all my mail from my main account to my local folders. Well, you can’t select multiple folders, so either I had to drag them one by one (or – I didn’t realize this at the time – I could have dragged the entire inbox). Well, after the inbox and all the folders that come with it, I decided to move my sent folder as well – a gargantuan 100mb worth, I later found out. But then I got cold feet, realizing that I would have to edit all my settings, and everything was working fone, so there was really no need. So, I decided to move everything back. Now, dragging folders copies them, apparently, but dragging messages moves them. To only the contents of the root level inbox and my sent items folder, and my deleted items, did I need to drag back. Somehow, I missed the sent items, and after I deleted them from the Local Folders, I realized that they were also gone from my main email account folders – I just just misplaced over 100 millions bytes of data that I didn’t want to loose.

So I began searching for the undelete button. There is no reason they can’t have one, it turns out – all the messages are still there in a very readable form until you “Compact” the folder after deleting the message. But there is no undelete option. Can anyone say “feature request.” But hope was not lost. After all, I’m a TRC h4x0r, and I can deal with this kind of stuff.

After some more searching through the very readable mbox format “Sent” file in my Thudnerbird appication data directory on my computer and on searching for corresponding terms on Google, I came across this little gem of a page: Mozilla X-Mozilla-Status explained.

From this, I learned that deleted (“expunged”) is just a flag set on the message. 0x0008, in fact. So, I subtract 8 from the X-Mozilla-Status header for each message in my Sent folder, and all of the messages undelete. Like magic. Except that I suck at regular expressions (although I’m fairly certain there would be a way to do this one with regular expressions). Instead, I did it a little more manually, finding all the combinations of the X-Mozilla-Status that had the 0x0008 flag set, and replacing it with the same Satus, just not expunged.

Upon restarting Thunderbird and navigating to the Sent folder, Thunderbird had to spend a good amount of time – maybe 30 seconds – rebuilding the contents of the folder. But then, voila, all my email (as far as I can tell) reappeared, just like before.

I think its about time that I started actually backing up some on my data.

Leave a Reply