On Tue, Nov 30, 2021 at 4:42 AM Oswald Buddenhagen <
oswald.buddenha...@gmx.de> wrote:

> On Mon, Nov 29, 2021 at 12:52:24PM -0500, Peng Bai via isync-devel wrote:
> >Is there a way to sync messages that are flagged "\Deleted" but not
> >expunged?
>
> >It looks like messages with this flag will not be synced to the
> >Near side (please see my settings below).
> >
> that is correct; you have "expunge near", so pulling deleted messages
> would be pointless, as they'd be instantly expunged.
>
> >Even if later these flags were
> >removed, the messages will not be synced.
> >
> yes, for efficiency, mbsync skips messages it has already seen. you can
> hack the .mbsyncstate, resetting MaxPulledUid back to zero (you wouldn't
> want to do that if you used MaxMessages, but you don't).
>

Thanks for this suggestion. It looks like if a message started with
`\Deleted` and therefore was never synced, this trick will sync them after
removing the `\Deleted` flag. However, if a message was previously synced
and then marked `\Deleted` and expunged, this trick will not re-sync it but
instead gives a warning:
~~~
pair (4749,2358)
Notice: conflicting changes in (4749,2358)
  not pushing delete
~~~

I wonder if it's possible to avoid propagating the `\Deleted` flags using
some sort of a filter syntax like `SkipFlags Deleted` and only mark
messages `\Deleted` on the near side if the corresponding messages no
longer exist on the far side. My use case is that I want to review messages
on the far side that are marked `\Deleted` (by some automatic process) and
may un-`\Deleted` some of them, but I do want to delete and expunge
messages on the near side for those that are completely deleted on the far
side. I'm having some difficulty in devising a scheme to make this work.


> it might make sense to include undeleted messages into the scope of the
> renew sync operation; will have to think it over.
>

This would be great for my use case! I guess it also can take care of the
type of warning messages above.


>
> >Separately, is there a writeup somewhere that describes how mbsync
> >processes each message, especially in terms of how flags and settings
> >interact? It looks like certain flags (e.g., "\Starred", "\Deleted") will
> >override settings (e.g., MaxSize, PullFlags).
> >
> let's say that these behaviors follow logically from what the manual
> documents. one could be more explicit about the implications, though.
>
>
> _______________________________________________
> isync-devel mailing list
> isync-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/isync-devel
>
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to