Thunderbird stores five special tags as $label1, $label2, ..., $label5 and then internally associates a (somewhat fixed) name to those (Important, Work, ...). In an IMAP context, it syncs these as IMAP keywords named $label1, $label2, ..., $label5. For further tags beyond these five, these are both stored and IMAP-synchronized with their real, user-chosen, name.
I have quite a number of messages tagged with these $label1-5. For interoperability reasons, I would like to make them into real tags that sync their true name with IMAP. How can I rename the $label1-5 tags accross all my messages (I have a small number of folders, but a very large number of messages) and ‘deactivate’ $label1-5, and only use ‘real’ tags?