Davmail-mediated Exchange mailbox losing messages on local/near client when goimapnotify is used

I've run into an issue with using goimapnotify with an IMAP mailbox that is mediated by a Davmail Exchange gateway intermediary.

So, to all appearances, goimapnotify works as expected with this mailbox. Except that I realised that doing so ends up causing gradual loss of messages in certain subdirectories over time. And only on the local/near client - so it doesn't cause irrevocable data loss, fortunately: the messages still exist on the remote/far client. But it is still obviously undesirable behaviour, because I want to be able to access this mail on my local/near clients.

And normal use of mbsync/isync to sync local mail (even frequently) doesn't cause this issue, it only occurs when I use goimapnotify.

As far as I can tell, it may specifically affect subdirectories that contain large numbers of messages. So my "Archive" has ~2000 emails in it, but any local client where I "watch" this subdirectory with goimapnotify, my local messages in this directory slowly dwindle to 0 (mbsync's "near side" message count slowly decreases over a period of hours/days; with the "far side" message count remaining accurate). I don't quite understand the reason behind this, though I'm guessing because Davmail interfaces with Exchange via the Exchange Web Client "api", that api may, for directories containing larger numbers of emails, only present partial lists of email? I'm not sure why this wouldn't affect regular mbsync/isync interaction, but that's my best guess.

Do you have any insight on this? I'd like to be able to use goimapnotify to watch at least my Davmail-mediated-Exchange INBOX, but I'm worried about the possibility of local/near-side mail loss that I've experienced with the Archive mailbox.

Assignee Loading
Time tracking Loading