[PATCH/RFC 0/3] Maildir custom flags and notmuch tags
Jan Pobrislo
ccx at webprojekty.cz
Tue Feb 2 08:52:20 PST 2016
Hello. I've been thinking about this feature for quite some while.
Having tags stored and synchronized together with mail would certainly
make life easier for a lot of notmuch user. And the upside is that you
can already do that with Dovecot's dsync tool.
But from what I've seen in the patches (as far as I understood them) it
doesn't really work anything like keyword storage in Dovecot - aside
from using maildir flags a-z.
I've been missing comprehensive source of information on various things
maildir-related, so I've written this: https://notmuchmail.org/software/
It includes links to specifications of the two keyword storage formats
for maildir: Dovecot's and Courier's. There's a lot more that can be
added on that page, all the MUAs for starters.
I think that using fixed mapping for flag meaning is a good POC step,
but that won't work without explicit support from the synchronizer to
map specific keywords to always same tags. I don't really know what
offlineimap does to synchronize keywords, if anything. Dsync already
does what it does - which is obviously to use the full dovecot format.
Having the mapping in the maildir rather than database can work well
because you have one unambiguous format that both synchronizer and
notmuch can use without much hassle. And it will scale up to 26
different tags per maildir, after that it will unfortunately stop
working without resorting to dovecot-specific formats, but I think it
still covers 98% of use-cases or so.
On the other hand, you can hack up a script that renames mail
post-dsync to conform to expected static mapping. The change detection
with just one auxiliary file is simple too, as opposed to the
subdirectory format Courier uses.
More information about the notmuch
mailing list