Syncing IMAP keywords using xattrs: Modify what where in the codebase?

Florian Friesdorf flo at chaoflow.net
Mon Jan 7 16:23:06 GMT 2013


Hi Erik, Dan,

@Erik: I'm glad you are following up on this :)

Dan Christensen <jdc at uwo.ca> writes:
> Erik Quaeghebeur <offlineimap at equaeghe.nospammail.net> writes:
>> I'd like to use notmuch without losing the advantages of IMAP and I
> (..)
> Even better, run dovecot locally and let it handle the details of
> keyword storage.  Then offlineimap just needs to be modified so that
> when doing IMAP<-->IMAP synchronization, keywords are passed along.

notmuch needs a maildir structure to index, dovecot's maildir++ should
work. However, notmuch would need to be taught about dovecot's keyword
storage:

"Dovecot stores keywords in the maildir filename's flags field using
letters a..z. This means that only 26 keywords are possible to store in
the maildir. If more are used, they're still stored in Dovecot's index
files. The mapping from single letters to keyword names is stored in
dovecot-keywords file."[1]

That means we'd need two mechanisms in notmuch for keywords.

With xattr the keywords would be stored on the file holding the mail,
but needs to be fetched for each mail individually. dovecot's solution
knows them already by having the filename for the first 26 and stores
the rest in one place.

I would expect poorer performance for xattr vs dovecot.

Notmuch has an open feature request to map folders to tags[2]. Folders
with a special prefix "keywords." could be used and emails hardlinked
into them.

list of keywords: stat dir, filter for and remove prefix
all mails for specific keyword: stat keyword dir
keywords for one mail: not directly possible, needs to be done via above methods

@Erik: my next step would be consulting with the notmuch developers, but
I lack the time to do that / to follow up on it. In case you do, would
be great if you could Cc me on that.

regards
florian

[1] http://wiki.dovecot.org/MailboxFormat/Maildir
[2] http://notmuchmail.org/feature-requests/
-- 
Florian Friesdorf <flo at chaoflow.net>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo at chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20130107/37d28bae/attachment-0001.sig>


More information about the OfflineIMAP-project mailing list