Last active
October 2, 2025 18:04
-
-
Save michael-o/9665e29a759d1a37ceaec25a6b534e27 to your computer and use it in GitHub Desktop.
Revisions
-
michael-o revised this gist
Oct 2, 2025 . 1 changed file with 47 additions and 22 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,65 +1,90 @@ # Mapping Flags (Tags, Labels) Between Open-Xchange (OX) App Suite (Webmail) UI and Mozilla Thunderbird Both Thunderbird (TB) and OX App Suite (OX AS) provide message flagging features. While OX AS has only ten predefined flags named by colors, Thunderbird allows an arbitrary number of flags. The flags in OX AS cannot be customized by the user and are localized for display, but their underlying values are well defined and language agnostic. Through reverse engineering via IMAP, I discovered that these flags are named from `$cl_0` through `$cl_10`. IMAP allows querying the `FLAGS` set in addition to the standard IMAP flags. All additional flags are custom and **not** standardized. Here’s an example of probing via IMAP (`C:` denotes client, `S:` denotes server): ```bash $ openssl s_client -connect imap.example.com:993 -crlf ... C: a login [email protected] PASSWORD S: a OK User logged in (47) C: a select inbox S: ... C: a fetch {message-id} (FLAGS) S: * 20 FETCH (FLAGS (\Seen $cl_9)) ``` The following tag mappings can be compiled for Thunderbird's `user.js`: ```js user_pref("mailnews.tags.$cl_0.color", "#ffffff"); user_pref("mailnews.tags.$cl_0.key", "$cl_0"); user_pref("mailnews.tags.$cl_0.tag", "Keine"); user_pref("mailnews.tags.$cl_1.color", "#ff0000"); user_pref("mailnews.tags.$cl_1.key", "$cl_1"); user_pref("mailnews.tags.$cl_1.tag", "Rot"); user_pref("mailnews.tags.$cl_2.color", "#0000FF"); user_pref("mailnews.tags.$cl_2.key", "$cl_2"); user_pref("mailnews.tags.$cl_2.tag", "Blau"); user_pref("mailnews.tags.$cl_3.color", "#008000"); user_pref("mailnews.tags.$cl_3.key", "$cl_3"); user_pref("mailnews.tags.$cl_3.tag", "Grün"); user_pref("mailnews.tags.$cl_4.color", "#808080"); user_pref("mailnews.tags.$cl_4.key", "$cl_4"); user_pref("mailnews.tags.$cl_4.tag", "Grau"); user_pref("mailnews.tags.$cl_5.color", "#800080"); user_pref("mailnews.tags.$cl_5.key", "$cl_5"); user_pref("mailnews.tags.$cl_5.tag", "Violett"); user_pref("mailnews.tags.$cl_6.color", "#90EE90"); user_pref("mailnews.tags.$cl_6.key", "$cl_6"); user_pref("mailnews.tags.$cl_6.tag", "Hellgrün"); user_pref("mailnews.tags.$cl_7.color", "#FFA500"); user_pref("mailnews.tags.$cl_7.key", "$cl_7"); user_pref("mailnews.tags.$cl_7.tag", "Orange"); user_pref("mailnews.tags.$cl_8.color", "#FFC0CB"); user_pref("mailnews.tags.$cl_8.key", "$cl_8"); user_pref("mailnews.tags.$cl_8.tag", "Pink"); user_pref("mailnews.tags.$cl_9.color", "#00FFFF"); user_pref("mailnews.tags.$cl_9.key", "$cl_9"); user_pref("mailnews.tags.$cl_9.tag", "Cyan"); user_pref("mailnews.tags.$cl_10.color", "#FFFF00"); user_pref("mailnews.tags.$cl_10.key", "$cl_10"); user_pref("mailnews.tags.$cl_10.tag", "Gelb"); ``` Although my tags are in German, you can replace the labels with any translation or naming convention you prefer. --- ### Quick Note on OX AS Behavior While OX AS allows you to "remove" flags, what actually happens is that it purges custom flags but then adds the `$cl_0` flag to `FLAGS`. You may or may not want to map `$cl_0` into Thunderbird. --- ### How to Apply 1. Open your Thunderbird profile directory. 2. Check `profiles.ini` to identify which profile is active. 3. Create or edit a `user.js` file in the active profile directory. 4. Paste the above preferences listing into `user.js`. 5. Restart Thunderbird. 6. Open the tags/flags interface in Thunderbird. All your custom tags will appear. 7. When you start using these tags, Thunderbird will issue the appropriate IMAP commands, and these flags will synchronize across Thunderbird clients on different machines. -
michael-o created this gist
Oct 2, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,65 @@ # Mapping Flags (Tags, Labels) between Open-Xchange (OX) App Suite (Webmail) UI and Mozilla Thunderbird Both Thunderbird (TB) and OX AppSuite (OX AS) offer flagging of messages. While OX AS has only ten prefined ones named by colors, TB allows arbitrary amount of flags. The flags in OX AS cannot be changed by the user and are localized in display, though the actual values are well defined and language agnostic. Through reverse engineering via IMAP I was able to figure out that they are named from `$cl_1` through `$cl_10`. IMAP lets you query the `FLAGS` set additionally to the ones defined by IMAP. All additional flags are custom and _not_ standardized. Probing via IMAP (`C:` denotes client, `S:` denotes server) ``` $ openssl s_client -connect imap.example.com:993 -crlf ... C:a login [email protected] PASSWORD S:a OK User logged in (47) C:a select inbox S:... C:a fetch {message-id} (FLAGS) S:* 20 FETCH (FLAGS (\Seen $cl_9)) ``` The following list can be compiled: ``` user_pref("mailnews.tags.$cl_0.color", "#ffffff"); user_pref("mailnews.tags.$cl_0.key", "$cl_0"); user_pref("mailnews.tags.$cl_0.tag", "Keine"); user_pref("mailnews.tags.$cl_1.color", "#ff0000"); user_pref("mailnews.tags.$cl_1.key", "$cl_1"); user_pref("mailnews.tags.$cl_1.tag", "Rot"); user_pref("mailnews.tags.$cl_2.color", "#0000FF"); user_pref("mailnews.tags.$cl_2.key", "$cl_2"); user_pref("mailnews.tags.$cl_2.tag", "Blau"); user_pref("mailnews.tags.$cl_3.color", "#008000"); user_pref("mailnews.tags.$cl_3.key", "$cl_3"); user_pref("mailnews.tags.$cl_3.tag", "Grün"); user_pref("mailnews.tags.$cl_4.color", "#808080"); user_pref("mailnews.tags.$cl_4.key", "$cl_4"); user_pref("mailnews.tags.$cl_4.tag", "Grau"); user_pref("mailnews.tags.$cl_5.color", "#800080"); user_pref("mailnews.tags.$cl_5.key", "$cl_5"); user_pref("mailnews.tags.$cl_5.tag", "Violett"); user_pref("mailnews.tags.$cl_6.color", "#90EE90"); user_pref("mailnews.tags.$cl_6.key", "$cl_6"); user_pref("mailnews.tags.$cl_6.tag", "Hellgrün"); user_pref("mailnews.tags.$cl_7.color", "#FFA500"); user_pref("mailnews.tags.$cl_7.key", "$cl_7"); user_pref("mailnews.tags.$cl_7.tag", "Orange"); user_pref("mailnews.tags.$cl_8.color", "#FFC0CB"); user_pref("mailnews.tags.$cl_8.key", "$cl_8"); user_pref("mailnews.tags.$cl_8.tag", "Pink"); user_pref("mailnews.tags.$cl_9.color", "#00FFFF"); user_pref("mailnews.tags.$cl_9.key", "$cl_9"); user_pref("mailnews.tags.$cl_9.tag", "Cyan"); user_pref("mailnews.tags.$cl_10.color", "#FFFF00"); user_pref("mailnews.tags.$cl_10.key", "$cl_10"); user_pref("mailnews.tags.$cl_10.tag", "Gelb"); ``` Though my tags are in German, you can pick any translation/label suits you. QUICK: Altough OX AS allows to "remove" flags it actually purges custom flags, but adds `$cl_0` to `FLAGS`. You may or not may to map this into TB. Open up your Thunderbird profile, check `profiles.ini` which one is active and paste the listing above in `user.js`. Start Thunderbird and open the flags listing. All of your custom tags will appear. As soon as you start using them an IMAP command will be issued and TB on another machine will display them.