Saturday, February 14, 2009

Fixing A Corrupt Thunderbird Address Book

I had a little scare this afternoon while trying to add my new blogger email address to my Thunderbird address book; I got a message claiming my address book was corrupt.

Fortunately, the good people at Mozilla didn't delete the corrupt address book. I was able to find and open in Notepad the file abook.mab.bak

Most of the file looks to be in a format similar to this:

@$${D7{@
<(310=c7)(311=4995d940)>[-C:^80(^83^B5)(^84^B6)(^85=)(^86=)(^87^B7)
(^88=)(^89^B8)(^8A^B8)(^8B=)(^8C=)(^8D=)(^8E=0)(^8F=c7)(^90=0)(^91=)
(^92=)(^93=)(^94=)(^95=)(^96=)(^97=)(^98=)(^99=)(^9A=)(^9B=)(^9C=)
(^9D=)(^9E=)(^9F=)(^A0=)(^A1=)(^A2=)(^A3=)(^A4=)(^A5=)(^A6=)(^A7=)
(^A8=)(^A9=)(^AA=)(^AB=)(^AC=)(^AD=)(^AE=)(^AF=)(^B0=)(^B1=)(^B2=)
(^B3=)(^B4=)(^B5=)(^B6=)(^B7=)(^B8=)(^B9=)(^BA=)(^BB=)(^BC^311)
(^BD=d)]
@$$}D7}@

@$${D8{@
@$$}D8}@

@$${DA{@


At the end of my file, though there was a bunch of gibberish, like the following

c-a066-debd8d26faf6},,application/x-mozilla-static,,nsMailModule
{a1b72850-a999-11d2-9119-006008a6edf6},,application/x-mozilla-static,,nsI18nModule
{a33982d3-1adf-4162-9941-f734bc45e4ed},,application/x-mozilla-static,,nsComposerModule
{214c48a0-b57f-11d4-959c-0020183bf181},,application/x-mozilla-static,,docshell_provider
{ba6151a2-1dfa-11d3-b3bf-00805f8a6670},,application/x-mozilla-static,,nsUConvModule
{e350e6d0-9dd0-11db-b606-0800200c9a66},,text/javascript,,abs:U:\PortableApps\ThunderbirdPortable\Data\profile\extensions\{3c8e8390-2cf6-11d9-9669-0800200c9a66}\components\nsDomainData.js
{c5339442-303f-11d3-9e13-00a0c92b5f0d},,application/x-mozilla-static,,nsMailModule
{5cbb0700-04bc-11d3-a50a-0060b0fc04b7},,application/x-mozilla-static,,nsMailModule
{3a9cd622-264d-11d4-ba06-0060b0fc76dd},,application/x-mozilla-static,,nsLayoutModule
{dccbe7e4-7750-466b-a557-5ea36c8ff24e},,application/x-mozilla-static,,necko_core_and_primary_protocols
{1f59b001-02c9-11d5-ae76-cc92f7db9e03},,application/x-mozilla-static,,embedcomponents
{5eb7c3c1-ec1f-4007-87cc-eefb37d68ce6},,application/x-mozilla-static,,nsToolkitCompsModule
{ba6151b1-1dfa-11d3-b3bf-00805f8a6670},,application/x-mozilla-static,,nsUConvModule
{a4bd2161-7892-4389-8d5a-3111a6d17ec7},,application/x-mozilla-static,,PKI
{e197cc01-cfe1-11d4-8eb0-87ae406dfd3f},,application/x-mozilla-static,,nsEditorModule
{6b8bdffc-3394-417d-be83-a81b7c0f63bf},,application/x-mozilla-static,,docshell_provider
{495eca46-0a5c-11d4-a135-005004832142},,application/x-mozilla-static,,nsUConvModule
{8852ab1f-0aa2-46ef-a147-a908896e0d0b},,application/x-mozilla-static,,nsLayoutModule
{0e6892c1-a9ad-11d2-b3ae-00805f8a6670},,application/x-mozilla-static,,nsUConvModule
{0c4f1ddc-1dd2-11b2-9d95-f2fdf113044b},,application/x-mozilla-static,,NSS
{8510876a-1dd2-11b2-8253-91f71b348a25},,application/x-mozilla-static,,nsMailModule
{63e11d52-3c9b-11d6-b7b9-00b0d06e5f27},,application/x-mozilla-static,,nsMailModule
{c6584cee-8ee8-4b2c-8dbe-7dfcb55c9c61},,application/x-mozilla-static,,nsMailModule
{ac6c518a-09b2-1


On a whim, I deleted all of the superfluous lines at the end of my file, and saved the edited file as abook.mab. I was able to open up my address book and get all of my old contacts back.

UPDATE
This is one of the most popular posts on my site, but I never get any feedback from it. I'd love to hear in the comments section if this works for anyone else or not. I'd hate to leave bad information out there.

5 comments:

  1. Cheers, I had a major panic, I ended up with a totally fcuked thunderbird profile, recovered the abook.mab, and got told it was corrupted, did what you suggested and it worked straight away, you are a life saver, thanks

    ReplyDelete
  2. Yes, thanks very much. I had the same problem with a corrupted thunderbird abook.mab. Your fix fixed the problem and allowed me to open & use the address book in Thunderbird again.

    ReplyDelete
  3. This is the second time this is happening to me. I found another solution the other time, but I could not recall nor find on the web what it was, so I resolved to this brutal method.

    I had to adopt your approach because the corrupted gibberish at the end of my file looked complete different (including text of a whole email, WTF?), but I concluded from your post, that whatever comes after the "@$${DA{@" is crap.

    I deleted all there was after this and...
    ...it worked for me too!

    So thanks a lot!

    PS: My TB does not create any .bak version of the *.mab, which is why I could not use the backup.
    PPS: I recommend copying the mab-file regularly - that's the easiest way to backup.

    ReplyDelete
  4. I frankly have absolutely no idea what you all are discussing but after finding my Tbird address system of well above 2500 addresses gone and later to find the new one of yet only 600 the same way, I was bloody angry and then extremely happy to have a son who fully understands your gibberish, applied it and I have at least my 600 back !
    paul

    ReplyDelete
  5. I never saw that kind of "gibberish" in a *.mab file. But if you find again all your addresses your procedure is OK. But what can I do with a *.mab containing a lot of zeroes with just 3 or 4 readable addresses instead of 400?

    ReplyDelete