How do you synchronize your notmuch tags across multiple machines?
dan.cermak at posteo.net
Sat Mar 9 01:21:30 PST 2019
David Mazieres <dm-list-email-notmuch at scs.stanford.edu> writes:
> Dan Čermák <dan.cermak at posteo.net> 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).
I have thought of an alternative: couldn't muchsync be taught to not
synchronize the mail from certain directories but only the tags?
I think this would help some of the users of notmuch: they could
synchronize their mailboxes via offlineimap/isync/$other_tool and the
tags (and non IMAP based messages) via muchsync. If this is possible and
viable, I'd definitely help out in implementing this.
> 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.
I have experimented with something like this a little bit, but instead
of using an imap server on top of libnotmuch, I simply used a local
dovecot and deliver all my mail via offlineimap to subfolders of the
local IMAP server.
The issue is: it does not work with muchsync + offlineimap. The problem
is exactly the same as when synchronizing via the file system: muchsync
will create new messages in dovecot's maildir, but offlineimap does not
know about these. Consequently it will start duplicating messages,
because they have different IMAP IDs.
This could be maybe made to work when both endpoints were libnotmuch
based IMAP servers, but I don't have and probably will never have that.
I really need to synchronize email from arbitrary IMAP servers, as I
can't put my work email on a private email server.
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 832 bytes
Desc: not available
More information about the notmuch