Current situation

July 2011: Still no public information on the file formats. However Michal Kocarek's wrote a Thunderbird Extension named Bird Import partially based on the information found on this page. You might want to check the source as his extension is able to handle also newer versions of The Bat!.

August 2005: There is no public information about the file formats which are used by The Bat!. Ritlabs does not disclose any useful information. Several recovery tools exist but they are all closed source and their authors were not willing to share informations.

Existing Tools

Alexey N. Vinogradov is the author of a plugin for The Bat! called BayesIt! which was integrated into the offical The Bat! version some time ago. In a posting on tbdev in July 2003 he mentioned an open source program which can parse TBB files. Even with thorough searching I couldn't find this open source program. Alexey didn't answered my emails yet. Although I have already decoded most of the information inside a TBB file it would be nice to have access to another TBB parser.

DeBat!: no working email address (cracker group?).

Mail Password Viewer: Got some source code which should be able to decrypt passwords stored in ACCOUNT.CFG. Thanks a lot to puky (this author created "The Bat! Password Viewer", too).

tb2kmail is a tool Gregor Fellenz mentioned to me. It uses IPC calls to control a running The Bat! instance so that it will export all mails automatically. This tool does not include a specification of the file format.

The Bat! Filter Commander: The author did only decrypt some structures of the filter file format and used mostly the raw data as a black box for his tool. Unfortunately the source code for this tool was lost during a hard disk crash.

My own reverse engineering attempts

I started my own reverse engineering attempts. I did not disassemble or decompile any program files. All information was gathered by looking at the data files and the registry, making changes with The Bat! and comparing the new files with the previous state.

So far I was able to extract most of the mails out of the TBB files. The information I have so far are summarized in the TBB file format specification.

TODO

Import Mails

Color groups: Internally The Bat! uses the unique short name to map a configuration in COLORS.INI to a specific mail. Unfortunately I didn't know yet how to map this short name to a four byte identifier. They are using a hash algorithm but I don't know which one... AFAIK Thunderbird is limited to five predefined color groups. Therefore I think importing color groups will be probably impossible.

Exact format for external attachments. How to parse a message efficiently to extract all references to external attachements?

Import Address Books

Import Accounts

I was able to write a specification of the ACCOUNTS.CFG file format - at least for the major parts of it. Some parts such as password decryption are missing though. I wrote a small decoder for this file but it is really, really LOW quality!