Server-Side Message Labels

In addition to making it easy to share mailboxes, IMAP makes it easy to share message labels. Message labels are called flags in the IMAP specification and are divided into two types: system flags and user-defined flags. The current IMAP specification (RFC 3501) defines these six system flags:
  • \Seen
  • \Answered
  • \Flagged
  • \Deleted
  • \Draft
  • \Recent
To learn about the \Deleted flag, see my blog item titled The IMAP Way of Deleting a Message.

User-defined flags are also known as IMAP keywords and, as the name implies, are defined by IMAP users. There is a de facto standard that keywords that are in common use have names that begin with a dollar sign ($). Examples of common keywords are:
  • $Label1
  • $Label2
  • $Label3
  • $Label4
  • $Label5
More examples of common keywords are in the IETF Internet Draft Registration of common IMAP keywords, but note that most of the keywords in this draft are at the proposal stage and are not currently in common use. If you define your own personal keyword, its name should not begin with dollar sign ($) or backslash (\) because otherwise it might collide with a flag that is used by current -- or future -- IMAP clients and servers.

The Mozilla-based IMAP clients, SeaMonkey Suite and Thunderbird, have the above five $LabelN keywords hardwired in and do not currently [1] allow users to create custom personal keywords. Since my other desktop IMAP clients, Pine and Mulberry, let me specify custom personal keywords, I have set them up so they can use the above five $LabelN keywords. In Mozilla-based clients, the following are the default display names for these:
  1. Important
  2. Work
  3. Personal
  4. To Do
  5. Later
In Mozilla-based clients, it's easy for a user to change these display names and I'm currently using these display names:
  1. Useful


  2. To Do
  3. To Do Maybe
I chose these display names because they are similar to the defaults and, in general, I try to use defaults whenever possible. I'm still experimenting with $Label2 and $Label3, but I'm thinking that I will use them to help me manage my SMTP-level filters and my delivery-level filters [2] (including my server-side greenlist). If I do, I'll probably use display names like this:
  1. To Train As Spam
  2. To Train As Not Spam
Or this:
  1. To Block Filter
  2. To Accept Filter
Or this:
  1. To SMTP Filter
  2. To Sieve Filter
I'm also experimenting with colors and I'm thinking that I'll make "Useful" messages blue, "To Do" messages yellow, and "To Do Maybe" messages pale yellow. I'm still mulling over what colors to use for my you-need-to-update-your-filter keywords.

In any case, all five of these IMAP keywords, as well as the IMAP system flags, are available in all my desktop IMAP clients (Mulberry, Pine, and SeaMonkey Suite) and are helping me to organize and manage my messages and my filters. I am hopeful that they will someday (soon!) also be available in my web-based IMAP clients.

To learn more about IMAP keywords, see the keywords section of my IMAP Service Providers page.

Please post any thoughts you have about IMAP keywords. I'm especially interested in learning about IMAP clients (both desktop and web-based) that support IMAP keywords, and about the keywords and colors that you use to help you manage your messages.

[1] Thanks to sphery for adding a comment to this blog item and pointing out wiki.mozilla.org/Thunderbird2:Tags, which describes the future of labels (aka tags) in the Mozilla-based IMAP clients.

[2] Many IMAP systems use either Sieve or Procmail for delivery-level filtering and as the message delivery agent (MDA).

Hashtag: #server-side- [?]

Post & Read Comments (located elsewhere)

 

 

Post & Read Comments (located here)

Just an update on Mozilla support for IMAP flags... Thunderbird 2 ( http://wiki.mozilla.org/Thunderbird2 ) lists one of it's "themes" for development as "Message Tagging." TB2 uses the term "Tag" to refer to tags that can be applied both locally (for POP users) or as IMAP flags. The plan for TB2 tags is described at http://wiki.mozilla.org/Thunderbird2:Tags , and current CVS (which is technically development toward TB3, but from which TB2 changes are backported) has preliminary support for tags (allows an unlimited number of user-defined tags and automatically "upgrades" TB1 labels to tags) and is primarily only lacking some of the UI changes for tag editing/handling.
 

 

Nancy, as I understand you, you say that, if I create a label in Mulberry called, say, "$Label5", and use Mulberry to apply that label to messages, Thunderbird should be able to see the messages with that label. Well, it doesn't seem to work with Thunderbird version 2 beta 1. Apparently, they've changed something. Any idea how to get around this?
 

 

Thunderbird 1.5 doesn't seem to allow label-based searching (these are just its five pre-defined labels) on IMAP folders. Given that it will search the bodies of messages on the server I don't know quite what its problem is.

It only seems to allow label-searches on local folders. I don't know how TB2 might change this.
 

 

Not only is this acknowledged as a TB bug, but there is also an easy work-around, described here.
 

 

Regarding webmail clients and IMAP keywords: In the FastMail-interface you can use Advanced search to look for IMAP keywords. For example, enter "KEYWORD $Label1" in the "Custom"-field to search for the first of Thunderbird's flags. You can save the search and apply it from the action-menu on the mailbox-screen.
 

 

Thanks for this article.. Do you know which servers / versions of server support or do not support IMAP flags?
 

 

So... does the IMAP standard allow using more than one user tag for a message? If so, why do most mail readers (TB 1.5, cone, Evolution) only allow one "label" at a time, but do not allow to assign multiple labels to a message? Is this a limitation of the IMAP protocol, or is it too difficult to implement, or too difficult to show in UI, or...?

I'm currently searching for a mail reader that supports tagging but haven't really found a lot (TB 2 seems to support it but is too new at the moment :) . Outlook 2003 has "Categories" but I have no clue where they are stored (guess if I switch away from Outlook later all tagged messages will be untagged again - too risky).
 

 

Thunderbird 2.0 has been released and it DOES support IMAP tags. I added a tag to a message in Thunderbird and was pleasantly surprised to see that a Courier IMAP tag of the SAME NAME was created on the server.

Thunderbird still has the same five default tags. I haven't checked to see what tags end up getting written to the server. Whenever you add a tag, the tag gets added to the tag list behind these five default tags.

A HIDDEN FEATURE (this may be documented)... After adding a tag, you can "edit" the tag in Thunderbird's preferences. This does *NOT* change the name of the server tag. It only changes the name of the local display. Therefore you can have a server tag like "dad" and have a local tag like "Messages from Dad" or something like that.
 

 

So now I've installed TB2 and ran some tests... Using my private mail server (Cyrus 2.2) I could indeed assign multiple tags to a mail :-D and the tags were still there after rebuilding the folder index (in folder properties dialog). Great stuff :-)

But when trying the same with my work mail account (which resides on an MS Exchange server), the tags were lost after rebuilding the folder index... My guess is that Exchange does not support storing IMAP keywords on the server - can anyone confirm that? It seems that TB2 stores the tags in its local mailbox index instead... The Outlook Categories again seem to be stored either by Outlook locally or via a special (MAPI) function on the Exchange server.

Strange thing is that http://www.ii.com/internet/messaging/imap/isps/#keywords lists MS Exchange as keyword-capable server. Anyone has more infos on that? Do our admins have to enable the IMAP keywords feature explicitly?
 

 

In addition to Jannick, Theo,...
I found this an interesting article (as far as I understand, about Thunderbird and IMAP tags):
http://www.mvpittman.com/thunderbird_tags/
 

 

Post a Comment


 

 

Links to this page

Create a Link

 

 

Each item © Nancy McGough
Each comment © the author of the comment
Deflexion.com web site hosted by DreamHost.com
deflexions powered by Delicious · reflexions powered by Blogger
More deflexions & reflexions, & feeds available via the sidebar top & bottom

[link] For bookmarks & links, please use this page's permalink [link]