MailTags -- How I did it
Scott Morrison
smorr at indev.ca
Thu Aug 23 17:05:26 CEST 2007
Hello all -- and thanks for inviting me.
I have glanced at the archives and thought it best to start with some
of the decisions I made.
There has been some debate about using IMAP flags.
I don't really use IMAP flags. Here are a few of my reasons
1) Not all servers support them or the support is limited. And
trying to explain to end users that their server is limited in its
capabilities is not something I want to do.
2) They can be volatile -- I have seen servers whack all the IMAP
flags when moving messages to different IMAP folders.
3) They don't persist if you decide to archive the email offline
4) They are limited in the form of data -- single word, cannot deal
with notes, times, can't differentiate between keywords and
categories, and priorities etc.
5) Can not share tags (ie send them) to others.
My method of tagging is to save the data in a X-Mailtags header. The
data dictionary is encoded as JSON structure which is a very
lightweight alternative to xml . I also give the option of storing
keywords and projects as X-keywords and X-project headers.
The advantage of this is that
All servers should be able to handle it.
When you archive messages offline - the tags are there
Procmail can add tags if it needs to -- I have a couple of users
that do exactly this -- using proc mail to provide pretty powerful
tagging before the mail even gets to the client.
Tags can be almost anything, and they can be sent to others for
sharing a workflow.
What I do is create a new message with the Tag data embedded, write
it to the server with an APPEND command, and then upon success,
delete and expunge the old message. The downside is that it can
be bandwidth heavy -- especially for large (attachments included)
messages. However, my analysis show that this is pretty much how
drafts are handled with IMAP server and Mail.app at least. and most
people have good bandwidth these days -- especially if they are using
IMAP.
I do use IMAP flags (when available) as a token system to keep track
of which clients have seen the tags. Basically this works by adding
a token to a message when it is tagged or viewed. The client can
then find any freshly tagged messages with a Search where Headers
include X-MailTags and keyword (IMAP flags) != token.
My biggest issues have not been dealing with the IMAP server but UI
issues on the client --- dealing with things like replacing the old
(untagged) message with the new tagged message in the local cache,
changes to tags on a message before the update is complete.
But then again, the list is not about working with the UI problems.
but devising a standard that can be used.
I would actually welcome work on a thunderbird tagging (not tag the
bird!) extension or one for outlook that made use of MailTags
formated headers.
Scott
________________________________
Scott Morrison <smorr at indev.ca>
Creator of Mail Act-On and Mail Tags plug-ins for OS X Mail.app.
<http://www.indev.ca/>
More information about the mailtags
mailing list