Tags: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(→‎IMAP: How to properly check PERMANENTFLAGS server response.)
(→‎Interoperability: repaired link to X-Mailtags Header)
Line 62: Line 62:
Think twice before using the "Get Suggestions!" button or enabling "Auto Tagging". Both send a digest of your message to the [http://tagthe.net/ tagthe.net] web service in Austria using a secure connection. The web sites [http://www.tagthe.net/privacy privacy policy] states the information is not stored (just cached temporarily) and contains no personal information, and the developer claims nobody reads it. You might consider configuring your firewall to block the connection to the web service if you're worried about accidentally using those features.
Think twice before using the "Get Suggestions!" button or enabling "Auto Tagging". Both send a digest of your message to the [http://tagthe.net/ tagthe.net] web service in Austria using a secure connection. The web sites [http://www.tagthe.net/privacy privacy policy] states the information is not stored (just cached temporarily) and contains no personal information, and the developer claims nobody reads it. You might consider configuring your firewall to block the connection to the web service if you're worried about accidentally using those features.


[http://indev.ca/MailTags.html MailTags] is a tagging plug-in for Mail.App thats gotten a lot of press, and supports IMAP accounts. Neither Thunderbird or MailTags [http://www.indev.ca/forum/viewtopic.php?=&p=1489 support each others concept of tags] due to differences in how each stores tags. Thunderbird uses IMAP flags while MailTags replaces the message with one where it added the tag using a [http://albatross.madduck.net/pipermail/mailtags/2007-August/000038.html X-Mailtags header] .  If you set clear text headers in the MailTags preferences, a search in Thunderbird would find the tag headers but it wouldn't recognize them as tags (they'd just be headers) while MailTags won't find Thunderbirds tags .
[http://indev.ca/MailTags.html MailTags] is a tagging plug-in for Mail.App thats gotten a lot of press, and supports IMAP accounts. Neither Thunderbird or MailTags [http://www.indev.ca/forum/viewtopic.php?=&p=1489 support each others concept of tags] due to differences in how each stores tags. Thunderbird uses IMAP flags while MailTags replaces the message with one where it added the tag using a [http://lists.madduck.net/pipermail/mailtags/2007-August/msg00017.html X-Mailtags header] .  If you set clear text headers in the MailTags preferences, a search in Thunderbird would find the tag headers but it wouldn't recognize them as tags (they'd just be headers) while MailTags won't find Thunderbirds tags .


==External links==  
==External links==  

Revision as of 19:58, 12 December 2009

Tags can be used to tag messages with descriptive colored text in order to organize messages. They can also be used in message filters and searches, though you need to create a custom header to use them with message filters.

Thunderbird before version 2.0 used labels instead of tags. The main difference between labels and tags is that that you can assign multiple tags to a message, and users were limited to five labels due to the way they were stored. There doesn't appear to be a limit on the number of tags you can create since each one is stored by creating two settings for it in prefs.js rather than setting a bit in a bit mask in a X-Mozilla-Status2 header.

You can assign a tag either by right clicking and choosing Tag from the context menu, or using the Tag button in the toolbar. If you don't see a Tag button in your toolbar it might be because you're using a older theme that doesn't support it.

If you created labels using an earlier version of Thunderbird they're still stored in the message, they're just ignored. Tags are stored differently depending upon whether your using a POP account, a IMAP account, or you moved a message from a remote folder to a local folder.

Thunderbird defines tags in prefs.js using two mailnews.tags settings. For example, the following defines a Forum tag with a blue color:

user_pref("mailnews.tags.forum.color", "#3333FF");
user_pref("mailnews.tags.forum.tag", "Forum");

While you normally would create or modify a tag using Tools -> Options -> Display -> Tags you could also do that by modifying the settings using either the the Config editor or by editing prefs.js with a text editor.

Tags are explicitly supported in message searches. Using tags with saved searches can be very useful.

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.

The Tag tools tweak in the MailTweaks extension can change the rank of tags and import/export tags if you want to share the definitions.

POP

A X-Mozilla-Keys: header is added to the message to store any tags, if the message was downloaded from a POP account. For example if a message had a Forum and a FYI tag it would be stored as:

X-Mozilla-Keys: forum fyi

IMAP

Thunderbird tries to store tags on the server using IMAP keywords. If the IMAP server doesn't support that it will store lags locally in the .msf file for the folder. That means that another PC can not see the labels.

A quick and dirty way to test where tags are stored would be to exit Thunderbird and delete the .msf file, and see if the tags disappeared. A more sophisticated way is to log into the IMAP account and to check whether the PERMANENTFLAGS server response to the SELECT command contains \* (see RFC 3501).This page explains how to manually connect to an IMAP server.

Thunderbird 1.5.x uses Labels instead of tags but stores them in the same way.

For sharing tags with another PC (or Thunderbird using a different profile) you need to have defined the same tags to see them. Thunderbird appears to have hard coded support for five tags that mimic the old labels. If you use one of those tags on another PC and delete those five tags on your PC you can still see the tags in the remote folder though they will not be colored. It will display the tags in the folder listing but won't list them in the expanded header when you read the message. Use mailtweak to export and import your tag definitions to another profile.

Tags appear to be case insensitive. If you define a "Forum" tag on one PC and a "forum" tag on another PC they're treated as the same tag.

A few other email clients such as Mulberry can recognize Thunderbird tags.

There is a bug in how tags are stored when a message is moved from a remote folder to a local folder. The information is stored in the .msf file rather than using a X-Mozilla-Keys: header. This means you can't search or filter that tag, and if you delete the .msf file in an attempt to fix a mildly corrupted folder you lose the tag.

Alternatives/Enhancements

The Tag Toolbar extension adds a toolbar with buttons for your tags, plus the ability to filter the tags to be displayed by categorizing tags.

You could use saved searches to automatically sort each tagged message into a different folder. Or omit the tags and have it test the headers to sort messages into the appropriate virtual folder. This isn't restricted to your inbox, like automatically running message filters is.

If you don't like the way Thunderbird implements tags you might consider using either the MailClassifier extension or PopFile to automatically scan and classify your messages. The main downside is you need to train it, they use Bayesian filtering to figure out where to move the message.

Interoperability

The Tag the Bird extension provided a type of tagging for Thunderbird 1.5 before tagging was added to Thunderbird. The extension has been updated for 2.x but neither understands the others concept of tags. The extension stores the tag by adding a "X-Tags" header. To use it you need to expand the message header. That will show a "Tags:" header which you can edit by left clicking on it.

It supports both POP and IMAP accounts. With a Dovecot IMAP server it initially set the View: listbox to 0 for that account, hiding all of the message headers. If you change that to All it works. It works with the AIM IMAP server. With Fastmail's Cyrus IMAP server you get a "The current command did not succeed. The mail server responded: Message contains bare newlines." when you try to set a tag.

If you right click on a tag in a message you can select a search engine such as Google or Flickr and search using that tag.

Think twice before using the "Get Suggestions!" button or enabling "Auto Tagging". Both send a digest of your message to the tagthe.net web service in Austria using a secure connection. The web sites privacy policy states the information is not stored (just cached temporarily) and contains no personal information, and the developer claims nobody reads it. You might consider configuring your firewall to block the connection to the web service if you're worried about accidentally using those features.

MailTags is a tagging plug-in for Mail.App thats gotten a lot of press, and supports IMAP accounts. Neither Thunderbird or MailTags support each others concept of tags due to differences in how each stores tags. Thunderbird uses IMAP flags while MailTags replaces the message with one where it added the tag using a X-Mailtags header . If you set clear text headers in the MailTags preferences, a search in Thunderbird would find the tag headers but it wouldn't recognize them as tags (they'd just be headers) while MailTags won't find Thunderbirds tags .

External links

  • Bug report about tags not being applied automatically by filters if you enabled "allow antivirus clients to quarantine individual messages".
  • Bug report about tags for the same account in another profile not being visible until the tag is defined again.
  • Bug report about how tags are stored when moving messages from remote folders to local folders.
  • Bug report about how Rebuild Index can delete tags if the IMAP server doesn't support storing tags as message attributes.
  • Details of how the X-Mozilla-Status headers are used.