Ok, tested a bit further and got interesting things.
It seems the dovecot server doesn't accept the last parenthesized list
if no known UIDs sequence is provided, so this won't work:
SELECT INBOX (QRESYNC (1412601342 12776
(1410,2115,2468,2644,2732,2776,2798,2809,2815,2818
4220,5092,5509,5709,5805,5864,5889,5900,5906,5910)))
But this will work:
SELECT INBOX (QRESYNC (1412601342 12776 1:5910
(1410,2115,2468,2644,2732,2776,2798,2809,2815,2818
4220,5092,5509,5709,5805,5864,5889,5900,5906,5910)))
Where 5910 = UIDNEXT - 1
Section 3.2.5.1 of the RFC 7162 states that:
"If the list of known UIDs was also provided, the server should only
report flag changes and expunges for the specified messages. If the
client did not provide the list of UIDs, the server acts as if the
client has specified "1:<maxuid>", where <maxuid> is the mailbox's
UIDNEXT value minus 1. If the mailbox is empty and never had any
messages in it, then lack of the list of UIDs is interpreted as an
empty set of UIDs."
It's not very clear what they refer by "the list of UIDs" but I assume
it's for the list of known UIDs, am I right?
Anyway, could this method be an acceptable patch?
Regards,
Matthieu Hazon