How do I synchronize Thunderbird tags with Gmail labels?

25

11

I have Thunderbird connecting to a Gmail account via IMAP, so Gmail labels show up as folders in Thunderbird. Moving items to folders in Thunderbird causes labels to be applied in Gmail.

However, Thunderbird also has its own tagging mechanism where you can apply a color code and tag by pressing keys 1-5 on a message. Is there any way to propagate these tags to corresponding Gmail labels?

Brad Payne

Posted 2009-09-29T16:30:25.077

Reputation: 445

can't this be achieved with a plugin? – None – 2011-02-28T23:02:05.137

2The fundamental difference is that gmail provides a many-to-many relationship between emails and labels. And what a concept. Very smart. A label could be a path (a folder), a degree of urgency (important), to-do, to-follow up, to trash, to archive or any concept. It is just a label or attribute of an email object. Then you can query based on such labels. – None – 2012-01-11T02:30:02.797

Answers

6

It seems more people wanted this feature, but you should realize Thunderbird's folders are Gmail labels. Therefore Thunderbird's tags are not the same as the labels, in other words: there is no Gmail counterpart.

So as of yet I don't think this feature is available. I will check to see if I can find a way to filter your inbox for tags (moving them into folders).


From the Thunderbird Knowledge Base on filters

Filtering based on Tags

Thunderbird doesn't have explicit support for filtering by tags but you can select Custom Headers from the leftmost list box while editing the filter rule and add support for X-Mozilla-Keys, and then test whether it "contains" that tag. Thunderbird uses that header to store tags. For example, X-Mozilla-Keys: forum fyi indicates the message has the forum and fyi tags.

IMAP accounts store tags using message attributes instead, so its not possible to do that with messages stored in remote folders. If you copy the message to a local folder it currently doesn't add a X-Mozilla-Keys header with the tags, though it will add a empty X-Mozilla-Keys header when you compact it

Here's a link to the Knowledge Base on tags

Thunderbird has limited support for tags in message filters. It just supports set a tag as a action. However, if you add a custom header for the tag, or specify it using "Customize" in the leftmost list box you can test for tags. Since you can have multiple tags for a message its recommended you test whether X-Mozilla-Keys: "contains" a tag rather than using "is".

View -> Sort by -> Tags can sort the messages in a folder based on the tag. View -> Messages -> Tags can be used to display just the messages with the selected tag. The View list box has a similar menu command but it is not visible in the toolbar in version 2.x. Right click on the toolbar, drag and drop the View control to the toolbar, and press OK to add it. You can also create a custom view using View -> Messages -> Customize that displays just the messages with the desired tags.

Ivo Flipse

Posted 2009-09-29T16:30:25.077

Reputation: 24 054

2What happens to emails that have more than one label? How is this handled in Thunderbird? – felideon – 2010-10-28T13:05:37.583

I fear I don't know the answer to that @felideon and I don't use Thunderbird myself, so I can't verify – Ivo Flipse – 2010-10-28T17:58:56.983

2"Thunderbird's folders are Gmail labels" not exactly as labeled messages can be found within the inbox of each account. I want some messages to be in my inbox, and yet still be labeled. – James Mertz – 2011-09-19T01:26:40.787

2Short version: can't be done! – Ivo Flipse – 2009-09-29T17:11:59.517

That's too bad. The color-coded tags are nice for visually flagging disposition of messages, even if they aren't really essential. – Brad Payne – 2009-09-30T14:33:21.577

5

In principle, it really could be done. See the IMAP extensions that Google added for their servers:

http://code.google.com/apis/gmail/imap/

If Mozilla would use these extensions, you could pull the GMail labels down and apply them to a message as tags. You can then use the popular "Conversation view" addon to essentially get GMail's web interface without the web interface.

TedPavlic

Posted 2009-09-29T16:30:25.077

Reputation: 151

2

I was also looking for a way to syncronize gmail labels and thunderbird tags.
I (sortof) found a way ...
The gmail label to a message gets applied from my imap gmail filter. And I create an like-named tag in Thunderbird.

  • In gmail in a browser: Settings >> Filters >> Create a new Filter:
    eg: Matches: subject:([nbusers])
    Do this: Skip Inbox, Apply label "[Gmail]/nbusers"

  • In Thunderbird:

    1. Create a new Tag with the same name as the gmail label.
    2. Tools >> Message Filters >> Select from "Filters for:" dropdown box >> New...
      Add your criteria (eg: Subject contains [nbusers])
      Add your actions (eg: "Tag Message", and select the new tag you created.)
    3. To apply to existing messages, in the "Message Filters" window,
      Highlight your new filter,
      Select the gmail folder in the "Run selected filter(s) on" dropdown box at the bottom of the window
      (eg: [gmail/nbusers]), and
      Click the "Run Now" button.

I said "sortof" above, because it's not really synchronized in an automatic sense. You've got to set it up in both tools.

An update: I tried the mozilla-x-keys method for my thunderbird filter. It didn't work.
Also in my above example, my gmail filter has "skip inbox". This negates the thunderbird filter. It causes the thunderbird filter to not see the incoming message and so it doesn't act on it. It works if you take off the "skip inbox" criteria.

Russ

Posted 2009-09-29T16:30:25.077

Reputation: 21

1The algorithm you describe could make a good extension – PPC – 2012-07-06T17:24:45.523

1

If you right-click on the email and choose Copy to <folder> where <folder> is the folder matching your desired label name, it will apply the <folder> label to the email in Gmail.

pyrospade

Posted 2009-09-29T16:30:25.077

Reputation: 257

This seems to be working well for me too. – Shubham Chaudhary – 2019-01-10T14:11:10.903

1

There is an extension allowing basic support for Gmail Labels:

https://addons.mozilla.org/en-US/thunderbird/addon/gmailbuttons/

You need version 0.7.0b1 of this add-on: you can find it at the bottom of the page in the "Development Channel" block.

The labels will appear at the top of the mail. You can remove them by clicking on the small cross "x".

Tristan CHARBONNIER

Posted 2009-09-29T16:30:25.077

Reputation: 218