read thunderbird address mab files content

ⅰ亾dé卋堺 提交于 2019-12-04 03:35:57

I am afraid there is no answer that will give you a proper solution for this question.

MORK is a textual database containing the files Address Book Data (.mab files) and Mail Folder Summaries (.msf files).

The format, written by David McCusker, is a mix of various numerical namespaces and is undocumented and seem to no longer be developed/maintained/supported. The only way you would be able to get the grips of it is to reverse engineer it parallel with looking at source code using this format.

However, there have been experienced people trying to write parsers for this file format without any success. According to Wikipedia former Netscape engineer Jamie Zawinski had this to say about the format:

...the single most brain-damaged file format that I have ever seen in my nineteen year career

This page states the following:

In brief, let's count its (Mork's) sins:

  • Two different numerical namespaces that overlap.
  • It can't decide what kind of character-quoting syntax to use: Backslash? Hex encoding with dollar-sign?
  • C++ line comments are allowed sometimes, but sometimes // is just a pair of characters in a URL.
  • It goes to all this serious compression effort (two different string-interning hash tables) and then writes out Unicode strings without using UTF-8: writes out the unpacked wchar_t characters!
  • Worse, it hex-encodes each wchar_t with a 3-byte encoding, meaning the file size will be 3x or 6x (depending on whether whchar_t is 2 bytes or 4 bytes.)
  • It masquerades as a "textual" file format when in fact it's just another binary-blob file, except that it represents all its magic numbers in ASCII. It's not human-readable, it's not hand-editable, so the only benefit there is to the fact that it uses short lines and doesn't use binary characters is that it makes the file bigger. Oh wait, my mistake, that isn't actually a benefit at all."

The frustration shines through here and it is obviously not a simple task.

Consequently there apparently exist no parsers outside Mozilla products that is actually able to parse this format.

I have reversed engineered complex file formats in the past and know it can be done with the patience and right amount of energy.

Sadly, this seem to be your only option as well. A good place to start would be to take a look at Thunderbird's source code.

I know this doesn't give you a straight-up solution but I think it is the only answer to the question considering the circumstances for this format.

And of course, you can always look into the extension API to see if that allows you to access the data you need in a more structured way than handling the file format directly.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!