I'm implementing tags!

Joe Auricchio jauricchio.lists at gmail.com
Thu Aug 10 01:00:40 CEST 2006

On Aug 9, 2006, at 1:07 PM, Chuck, Charlie and Charles wrote:

> Implementing them as IMAP flags certainly sounds interesting.  I think
> you'll probably still need a database component though.  IMAP is  
> good at
> returning the flags associated with a single message, but I don't know
> that it has a method retrieving all flags attached to all the messages
> in a folder, for instance.  I would recommend storing the tags in a
> table, and using that to populate your various lists of tags, and also
> use it as the base for applying tags to messages.

Actually, there's a PERMANENTFLAGS response sent with every SELECT  
that lists the flags known to that mailbox. When I discovered that I  
was amazed more clients *don't* support tags -- the IMAP server does  
all the hard work!!

You're right, though, that there will need to be a global tag cache,  
since tags are available only per-box. There seems to be no easy way  
to retrieve all flags attached to all the messages in *all* folders,  
which is what we really need.

The tags applied to messages should also be cached, but it will be  
only a cache, and not authoritative.

I don't know anything about roundcube's caching, so I'll need some  
serious help with this when it comes time. I may just write things  
the naive way and let someone else handle the caching =]

> The javascript Iwrote should still be pretty good, if you'd like to  
> use that as a
> jumping off point I can post it here or something.
> Basically I got as far as tagging messages and seeing those tags in  
> the
> subject (like gmail) but didn't even get started on "virtual folders"
> and the like, which of course would be the ultimate goal of such a  
> project.

I'm not sure I want to implement full virtual folders, backed by  
arbitrary search. I would like to do a list of all messages that  
share a tag, in the way Gmail does. When it comes time to do UI, your  
code would certainly be helpful!

> Would you like to IRC or IM about it sometime?  I'm not free any
> evenings this week and I'm out of town this weekend, but I can usually
> carve out some of my companies time during the day (8AM-5PM CDT)

I'm in #roundcube on freenode, as either utf8 or jauricchio  
(depending on which machine I'm on).


More information about the Dev mailing list