#944958 interimap: please optionally sync flags with local notmuch database

#944958#5
Date:
2019-11-17 20:19:21 UTC
From:
To:
I love interimap helping me distribute emails to multiple workstations.

One thing is missing, though: flags a.k.a. tags.

None of the lightweight MUAs that I use support imap flags, but I have
found a few that support notmuch.  Unfortunately notmuch is local-only.

Ideally I could translate notmuch tags to imag flags.

This approach seems sensible to me:
https://deferred.io/2016/01/18/notmuch-tags-gmail-labels-bidirectional-sync.html#how-does-it-work

...but I am not offering to implement it myself.

Could you perhaps be intrigued to implement it?

The link to code in above blog post is a broken link, but looking around
a bit seems to indicate that the blog author now uses this:
https://github.com/gauteh/lieer

That's written in Python, tightly integrated with yet another sync tools
which is geared towards GMail.

I would love something geared towards standards-compliant IMAP,
enabled by adding one interimap config line pointing to my notmuch
database.

 - Jonas
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEn+Ppw2aRpp/1PMaELHwxRsGgASEFAl3Rq0YACgkQLHwxRsGg
ASFNQhAAhBfz//5UzT7x8a7lGdlbvP7iYVSD5jClK39eml5GH/6Xw59bf6pHSeIY
Dp8Bhr0zXloxjp0ecPxqED0M5PEYwyyDUXJ1yp8YHIXtSTv8mpQmd8G+8ANDOjRT
uHgw2jwJ2qq/u8yfVsHapmsTBf2mrVWW4Mu7F7EJYrhRnAeoHwQDvtM2y2KjJ0ma
90IRcO4A8JVR5vAwJYz9gPWuUek+CvQmyImaeTgXPG8+tMdooIR73FjXDdovBvd1
G037OWH1tdboPQx2yOegNTfvv4g1dSc2zZ0jMfHLGVoV/IhGUdhypGCKBXQTGW0f
Zfsa1TLnR3LLuyFEHTIPjo90kiXwWq7Q0tVBBFT0v9ZN+/xrNR1upJgqEj+jS1px
vLzHHepGad8m3OFX7nstKazqVRvV8MlYK9KFFlf3f+JGoC9UKWfkduV2hQi7MHzb
bUEFiHAbtdU3dfWOZu2OVrjJHoupIpOB53KlOrVUtrCINJgvoSEYSJRfAg8Qr4x8
3gZWcMPd5EXq8REF+SzFBpE/O0/kirrs+q4sC3RSa0767/bhFoGXN2CAQJaSO/iu
Gk7CXKyWCg+KfDLBNTXbaf6psw815cwuLJ96U2Ez05R58ooiIio2WbL93tAQvNSJ
nBaiEauWcG0ENbJSycvc4ifzhNB5jzliza61lMGVEPlpqyqqpL4=
=zisj
-----END PGP SIGNATURE-----

#944958#10
Date:
2019-11-17 22:13:28 UTC
From:
To:
Hi Jonas,

Such a MUA-specific feature is most likely a won't fix I'm afraid,
because interimap is intentionally MUA-agnostic and I'm very, very keen
to keep it that way…

Not tagging the bug as ‘wontfix’ as hooks *might* be added at some point
in the distant future (or by someone else).  But I'm not convinced it'd
work, because AFAIK notmuch works with filenames in the Maildir, while
interimap has only access to the message UID and sequence number.  (One
could FETCH X-GUIDs but that becomes Dovecot-specific.)  It works with
OfflineIMAP because it speak Maildir natively.  Furthermore, while a
hook system could in principle replicate remote flag updates to a custom
format locally, for the other way around we'd need active polling which
sound rather clunky, especially with NOTIFY.

Sorry to give up on that one, but I'm also very keen on preserving
layering :-P  IMHO the better fix would be to add an IMAP backend to
notmuch.  Unfortunately, that's also the most difficult :-(  (And not
something I plan to work on.)  Perhaps a stand-alone tool to sync a
notmuch tag database against an IMAP server would be easier?  Or even —
further breaking layering — directly in the Maildir.  Both options would
be IMAPd-specific though.