MBOX-Line: From iana at apple.com  Thu Mar 20 11:32:30 2014
To: imap-protocol@u.washington.edu
From: Ian Anderson <iana@apple.com>
Date: Fri Jun  8 12:34:52 2018
Subject: [Imap-protocol] Detecting HIGHESTMODSEQ changes/polling for flag
	changes
Message-ID: <4E9EBB0E-ADFB-4F79-A27B-51ADC8395D71@apple.com>

I?m finding it dismayingly common that servers don?t give flag changes (i.e. an untagged FETCH response with FLAGS) on a NOOP.  Some of them don?t support IDLE, or don?t give flag changes on IDLE either.  At least some of the servers do support CONDSTORE though.

So I was hoping to mitigate the whole mess by polling for HIGHESTMODSEQ changes on CONDSTORE servers and then doing a FETCH CHANGEDSINCE for mailboxes with new highest modification sequences.  For mailboxes that I?m not SELECTed on, it?s an easy STATUS HIGHESTMODSEQ command.  I can also do it on SELECTed mailboxes too, though RFC 3501 says I "SHOULD NOT? do that and RFC 4551 doesn?t update that recommendation.

What?s the conventional wisdom on solving this problem from the client side in a generic fashion?  My inclination is to just replace my NOOP polling with STATUS on servers that support CONDSTORE.

Ian
