Skip to content

Fix QRESYNC VANISHED fetch for highest expunged UID#73

Open
HeyGuido wants to merge 1 commit into
Alinto:masterfrom
HeyGuido:fix-qresync-vanished-highest-uid
Open

Fix QRESYNC VANISHED fetch for highest expunged UID#73
HeyGuido wants to merge 1 commit into
Alinto:masterfrom
HeyGuido:fix-qresync-vanished-highest-uid

Conversation

@HeyGuido

Copy link
Copy Markdown

This fixes an ActiveSync/QRESYNC issue where externally expunged messages may not be detected when using Cyrus IMAP as backend.

SOGo/SOPE currently detects VANISHED messages using:

UID FETCH 1:* (UID) (CHANGEDSINCE VANISHED)

With Cyrus IMAP, * is resolved to the highest currently visible UID in the mailbox. If the expunged message previously had the highest UID, it is now above the resolved 1:* range and Cyrus returns no VANISHED response.

As a result, SOGo does not emit a delete command to the ActiveSync client, but the SyncKey is still advanced past the expunge modseq. The deletion is then permanently missed by the device until a full folder resync.

Using an explicit maximum UID range fixes this:

UID FETCH 1:4294967295 (UID) (CHANGEDSINCE VANISHED)

Tested with:

SOGo 5.x nightly
Cyrus IMAP 3.8.2
iOS/iPadOS Mail as ActiveSync client

This reliably fixes deletions and moves performed outside of ActiveSync, for example via IMAP or the SOGo web UI.

I have also opened a corresponding Cyrus IMAP issue for the backend-side behavior:

cyrusimap/cyrus-imapd#6071

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant