On Thu, Apr 02, 2015 at 10:10:56AM +0200, Markus Baader wrote:
> I guess I could solve my problem by a small script that compares the 
> slave uuids from the state files with the uuids from the slave imap 
> server and delete all emails on the server that don't match an entry in 
> the correspondig state file. Would that be correct
>
sounds about right.

> and is there some way to do this without writing a script but with
> mbsync?
> 
there is no obvious built-in operation for that in mbsync.

you could hack it (basically, replace a propagation with a deletion)
with only few lines changed, but it's still tricky.

you could set some flag ("draft" is usally unused) on all mails on the
master server, sync it up, and then filter unmarked mails on the slave,
and the reset the flag again. i don't know how much traffic that would
cause and whether it would have some side effects (if draft means
something to the server).

you could open the mailboxes with mutt and delete duplicates by
message-id (D=~), but that is not guaranteed to be reliable (a user
could have distinct messages with the same id, f.ex. if they saved an
edited copy of a message, or if they have an fcc of a mail and a copy
received via a mailing list in the same folder).

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to