[Dovecot] Using tags instead of folders?

Timo Sirainen tss at iki.fi
Wed Jul 2 11:23:24 EEST 2008


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.

> 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.

> 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.

> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080702/a234b271/attachment.bin 


More information about the dovecot mailing list