IMAP flags and dovecot-keywords not working as expected

Peter Chiochetti pch at myzel.net
Sat Jul 30 09:26:09 UTC 2016


Am 2016-07-30 um 08:00 schrieb Mark Foley:
…
>
> However, none of the tags show up correctly in Thunderbird.  If I manually set a message to
> have a tag of 0, the corresponding IMAP file gets a flag of 'm', not 'a' and the following is
> added to the dovecot-keywords files:
>
> 12 $label1
>
> How can I fix this? Where is "$label1" text defined? Why did Thunderbird not snag the text for
> '0' from the dovecot-keywords file and give the IMAP file a tag of 'a'?

Thunderbird flags are stored in the users prefs.js, eg:
- user_pref("mailnews.tags.$label1.tag", "Important");
- user_pref("mailnews.tags.$label1.color", "#FF0000");

A kind of key->value assignment. The "$label[1-9]" keys are special, 
where the number magically corresponds to the keyboard shorcut to tag 
messages, 0 meaning clear all tags.

There can be more than nine tags, but they wont have a shortcut then:
- user_pref("mailnews.tags.ten.tag", "ten");

1) The server will only ever see the key. The user will only ever see 
the value.

2) If you rename a label in TB, then only the value will change and the 
server will still see the same key as before.

3) If you rename a key in dovecot, TB will not create a label for it and 
the affected messages will no longer appear tagged, if TB does not know 
about the key.

4) Dovecot adds to the keywords as it receives requests from clients: 
Very likely there is a limit of 26 (letters of the alphabet) per 
account; a-d=0-3 are already taken for internal use, so 22 remain.


> My current theory is that the "Default" Thunderbird Tags corresponding to IMAP flags are not
> changeable and if new tags are create in Tbird, they get new flag letters.  That would, of
> course, mean that if a user changes Thunderbird tag name, they would lose all tag settings on
> existing message.  That doesn't seem right and I hope my theory is wrong.

I think you are mostly wrong: as long as you only use TB to work and as 
long as you do not exceed the limit you should be save.

Notice that tags are a scarce resource: any key you ever created counts 
toward the limit - reusing old tags requires you to text-edit both 
dovecot-keywords and TB prefs.js.

-- 
peter


More information about the dovecot mailing list