[Dovecot] Using tags instead of folders?

Patrick Nagel patrick.nagel at star-group.net
Wed Jul 2 11:38:53 EEST 2008


Hi,

On Wednesday 02 July 2008, Timo Sirainen wrote:
> On Wed, 2008-07-02 at 15:56 +0800, Patrick Nagel wrote:
> > Then I looked at how Thunderbird implements those tags when using IMAP.
> > It stores them as IMAP keywords. Dovecot stores the first 26 flags in the
> > filename, because it will only use one letter. Mapping between client's
> > tag name and the letter is being done in dovecot-keywords files (one for
> > each mailbox). If there are more IMAP keywords than 26, they will be
> > stored in the dovecot.index file.
> > (http://wiki.dovecot.org/MailboxFormat/Maildir)
> >
> > Now imagine we want to have 1000s (maybe 10000s) of different tags (=IMAP
> > keywords) - instead of folders. Can this be recommended?
>
> Dovecot is currently optimized to handle a rather small number of
> keywords. They're stored as a bitmask, so using 1000 different keywords
> would use 125 bytes per each mail. If the keyword usage gets this high
> it would be a good idea to change the implementation to store them
> differently.
>
> You're also concentrating on only maildir format. Yes, there the limit
> is 26 keywords and I don't have plans to improve it. But for example
> with dbox format there is no such limit.

I see. I kind of like maildir (and thought it was "recommended").

> > What happens if the
> > index file gets corrupted for some reason? (I had to delete dovecot.index
> > files before...).
>
> v1.1 tries very hard to fix corrupted dovecot.index files and it also
> ignores errors in dovecot.index.log file. Also there have been rarely
> problems with those files. dovecot.index.cache file has been nearly
> always the problem and it can always be safely deleted.

Ok. I don't remember the details - maybe deleting dovecot.index.cache would 
have been enough.

> > What happens if the Thunderbird profile breaks? What
> > happens if we want to move on to another client?
>
> AFAIK Thunderbird currently supports only 5 keywords and it names them
> $Lablel1 .. $Label5. Not very portable.
>

No, those $label1...5 are the default five tags. You can add more (although I 
didn't check if there is actually a (low) limit. May well be. One of our 
users already has something like 20 IMAP keywords in various 
folders/mailboxes, and she uses Thunderbird and its tags. Tags that are 
created by the user get a name that somehow resembles the tag's name in 
Thunderbird. Example: a tag named "Content Check" in Thunderbird will end up 
as "content_check" in dovecot-keywords.

> > Are there other ways to implement 'tagging' instead of a hierarchy?
>
> With v1.2 it'll be possible to create virtual mailboxes. Each keyword
> could have its corresponding virtual mailbox. Pretty much like in gmail.

Yeah, this is the second time those virtual mailboxes would come in handy for 
me ;) Do you have a roadmap for 1.2? :D

Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.            http://www.star-group.net/
Phone:    +86 (21) 3462 7688 x 826             Fax:   +86 (21) 3462 7779

PGP key:         https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:           E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://dovecot.org/pipermail/dovecot/attachments/20080702/127981a4/attachment-0001.bin 


More information about the dovecot mailing list