Re: How do you synchronize your notmuch tags across multiple machines?

Subject: Re: How do you synchronize your notmuch tags across multiple machines?

Date: Sat, 05 Jan 2019 20:20:42 -0800

To: Dan Čermák,


From: David Mazieres

Dan Čermák <> writes:

> Could you maybe elaborate in more detail, as I don't know how it would
> help me exactly? Are you running a server for syncing your tags?
> My problem is the following: I have 3 machines E, B and C of which none
> is always up and running. I would like to be able to sync my email on
> any of the machines with offlineimap (but always only with one syncing)
> and to transfer what's missing to the others, once I switch the
> currently used machine.

The problem is that muchsync doesn't know about imap or offlineimap.
Muchsync will happily ensure that all of your notmuch maildirs and tags
are synchronized.  But if you run offlineimap on E and then sync E to B,
B will already have a copy of all new messages.  If you run offlineimap
on B then, it will download additional copies of the messages already
synchronized over muchsync.

One solution would be to archive all the messages downloaded with
offlineimap as you download them.  But then you have to remember to run
muchsync to upload them to other machines, or you risk losing track of
messages if you download them to a machine that you then immediately
turn off.

I'm open to other ideas if they require some kind of new feature from
muchsync, but I'm worried that this would require delving into the guts
of offlineimap (and then wouldn't work with other solutions like isync).

The ideal solution would be to implement an imap server on top of
libnotmuch.  If we had that, then you could just use offlineimap and
isync through the imap (as opposed to file system) interface, and
everything will just work.  That would also have the benefit of making
notmuch work really well with phones--you could use the gmail app on
your phone and the emacs/vim front-end on your desktop.  It's even
conceivable that such an imap server could use notmuch's indexing to
support the gmail imap extensions:

Unfortunately, implementing an imap server is a bit beyond the scope of
muchsync and not something I have time for right now.

notmuch mailing list