[PATCH] Syncing gmail labels for gmail accounts

Abdó Roig-Maranges abdo.roig at gmail.com
Wed Nov 28 14:14:45 GMT 2012

Hi again,

> But I would like to forward your email to the notmuch mailing list, as
> I would like to encourage them to index the gmail labels in the
> x-headers with their tags - would be lovely.


One comment though. I have the feeling that what you suggest for notmuch
would be less trivial than it seems. I was a notmuch user (my first
attempt at labels was with notmuch), and this is part of the reason I
moved away from notmuch and chose mu.

Notmuch already implements tags that live only on the notmuch
database. Notmuch could easily index the X-Keywords or X-Label headers
(as mu does). That would be rather straightforward. However, keeping it
in sync with notmuch tags could lead to some headaches. For instance,

  * What would happen if the tags on the database and the ones on the
    message change in different ways?

  * What about the special notmuch tags like unread, attachment, etc.

  * Keeping the tags into a header in the messages is quite inefficient
    if you want to change labels of lots of messages in one go. For
    notmuch, having to keep the embedded labels in sync with the tags
    would degrade the performance of tag modifications considerably.

I don't mean to be pessimistic, but I suspect you may find it difficult
to convince the notmuch people to sync their tags with the X-Keywords

All this issues would go away if you use a mail indexer that has no data
living exclusively on the database (like mu), and your only tags are the
embedded ones.

This way, you loose performance on large tag modifications (not done
very often), but things become simpler, plus you gain the ability to
sync your maildir between machines (between desktop and laptop, for
instance) with tools like rsync or unison, without having to worry about
the tags that only live in the database.


More information about the OfflineIMAP-project mailing list