Encoding of Thunderbird mailboxes with ":" in name

Thunderbird mailboxes with “:” in the name have a strange encoding: “mehr:test” becomes “mehrb93587c9”. It’s not hex as far as I can see. It’s also not UTF7, what would make more sense.

Does anyone have a clue what this is?

Bump. Nobody has an idea?

Could it be that http://tools.ietf.org/html/rfc3501#section-5.1.3 ?

By convention, international mailbox names in IMAP4rev1 are specified
using a modified version of the UTF-7 encoding described in [UTF-7].
Modified UTF-7 may also be usable in servers that implement an
earlier version of this protocol.

In modified UTF-7, printable US-ASCII characters, except for “&”,
represent themselves; that is, characters with octet values 0x20-0x25
and 0x27-0x7e. The character “&” (0x26) is represented by the
two-octet sequence “&-”.

All other characters (octet values 0x00-0x1f and 0x7f-0xff) are
represented in modified BASE64, with a further modification from
[UTF-7] that “,” is used instead of “/”. Modified BASE64 MUST NOT be
used to represent any printing US-ASCII character which can represent

I have been using Thunderbird for many years. None of the mailboxes files has a colon in their name. Would you be able to post one ?

@Michel: just edit the name and add a “:”. It used to be impossible to have “:” or “/” in the names. But even Mail nowadays allows “/” and makes “//” on the harddisk as far as I remember.

@Joann: no, it’s not UTF7. Then the text would either need to contain a “&” or a “+”. Wikipedia has an example: “£1” is encoded as “+AKM-1”. That doesn’t fit the data I have.

Alright. I have created a mailbox with : in the name and indeed, only the first part is used, then the rest looks like some hash. Could be some sort of proprietary file name creation scheme.

Inside the msf file seems to be a description of the structure where the original name appears :

<(82=toto08ef5070)(83=0)(84=54a169e7)> ../ <(85=toto:wizard)>[1:^9F(^AE^85)]

I created two different files, and 85 is definitely the key to the name in clear.

Maybe the file name is just the result of an irreversible hash, and the program manages the files with the help of the reference to the chosen name inside ?

@Michel: Thanks! You are correct. The msf file - unfortunately - is in a format called Mork like “Mork and Mindy” the TV series. The format is about as sane as the Mork alien.