Hi,

Well, my question is probably answered somewhere but I am not able to
find a satisfactory solution.

My workflow is typical: I fetch emails from various IMAP servers and I
have 2 clients (laptop and desktop).  I cannot let all the emails on
these servers because the space is very limited.  Therefore, I archive
(move them from inbox to other folders).

I use notmuch for sorting my emails.  And muchsync to synchronize
between desktop and laptop.  So far, so good.

All works very well if my desktop is always up.  Only my desktop is
talking with the the servers and my laptop always fetches the emails
from the desktop.

The issue is that sometimes, my desktop is off (or unreachable from my
laptop).  In this case, my laptop has to talk with the servers.  And
the issue is well-known [1]: muchsync is not aware about the mbsync
internal states.

1: <https://notmuchmail.org/pipermail/notmuch/2019/027304.html>

Other said, when my desktop is off, new emails are fetched by mbsync
on my laptop.  Then once the desktop is on again, I synchronize with
muchsync the laptop and desktop.  Therefore, the new emails (on
laptop) are transferred by muchsync from laptop to desktop.  However,
the mbsync state is not updated, thus when desktop talks again with
the servers, it duplicates the new emails.

It is not a big deal if you read only using one notmuch front-end,
since notmuch works with Message-ID and so no apparent duplication.
:-)

However, a web front-end is confused... Messages are duplicated, date
are wrong, etc.

Well, some convoluted hacks seem possible.  For instance, when desktop
is off, laptop only pulls (and never pushes) and marks these new
fetched emails as 'fake'.  When desktop is on again, before the sync
between laptop and desktop, remove these marked 'fake' messages; using
the correct order for updating the notmuch index.  Another instance,
remove the duplicates on desktop before synch with the servers.  All
are convoluted and suboptimal. :-)

It could nice to be able to update the mbsync states between machines.
Somehow, the format of .mbsyncstate is a mapping such as remote (col1)
and local (col2).  Using this map from laptop, it seems possible to
update the state on desktop.  And vice versa.

Any blocking points?  Maybe I miss a fundamental concept and it is
just not possible.
Maybe another tool perfectly fits the bill.

Before giving a try, I would like to be sure I am not missing the obvious. :-)


WDYT?

Cheers,
simon


_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to