Tag timestamps and synchronization

Michal Sojka sojkam1 at fel.cvut.cz
Tue Jan 25 02:00:27 PST 2011


On Mon, 24 Jan 2011, dm-list-email-notmuch at scs.stanford.edu wrote:
> One of the features I would like to see from notmuch is an easier
> ability to synchronize tags across machines.  At the very least, I
> would need either incremental dump and restore, or some way to
> communicate arbitrary tags to a local imap server that shares
> notmuch's maildir (much as notmuch currently syncs the standard tags),
> so that I synchronize two maildirs with a tool like offlineimap.

[...]

> In the case of dovecot, the arbitrary tag format is very simple.  Each
> maildir has a file called dovecot-keywords mapping numbers 0, 1,
> ... to keywords.  Then mail file names contain lower-case letters for
> the flags they are marked with--0 => a, 1 => b, etc.--allowing up to
> 26 arbitrary tags for each maildir.  One could probably sync to
> dovecot's maildir format relatively easily in a script given
> incremental dump and restore of tags.  Or possibly notmuch could
> natively support dovecot as one of multiple back-end tag storage
> schemes.

Hi David,

here is my idea of solving the problem of synchronizing tags and all
message metadata. The problem, it seems, is that every program uses a
different format for message metadata. Maybe, it would be useful to
define a simple metadata format that could be used by multiple programs
(at least by notmuch, dovecot and maybe mutt) and base the
synchronization on this format. Currently, I'm thinking about a separate
file with the same base name as the message storing message metadata in
the same format as message headers so it could look like:

tag: inbox
tag: notmuch
timestamp: 2011-01-25 10:48:00 GMT
spam: no
...

Then, any program could do whatever it wants with the metadata, e.g.
index them in a database etc.

In the ideal it would work like this: Dovecot would store the metadata
in a file like described above. IMAP protocol would be extended to be
able to send such metadata corresponding to a particular UID.
offlineimap would be able to retrieve (and synchronize) the metadata
files with the IMAP server and notmuch would index the metadata
similarly as it index messages and would modify them when it change
tags.

What do you (and others) think? Is this too wild? Too longterm?

Cheers
Michal
 


More information about the notmuch mailing list