MBOX-Line: From lasse at lasselog.com  Wed Aug 21 03:26:50 2013
To: imap-protocol@u.washington.edu
From: Lasse Jansen <lasse@lasselog.com>
Date: Fri Jun  8 12:34:51 2018
Subject: [Imap-protocol] Multiple non-waiting UID SEARCH commands
Message-ID: <520A622E-1A91-4B04-AD6F-361896D439F5@lasselog.com>

Hi,


I'm trying to find out if it's possible to issue multiple non-waiting UID SEARCH commands like this:


1 UID SEARCH UNSEEN
2 UID SEARCH FLAGGED
3 UID SEARCH DELETED



RFC 3501 says this:


UID SEARCH + UID SEARCH may be valid or invalid as a non-waiting
      command sequence, depending upon whether or not the second UID
      SEARCH contains message sequence numbers.


As none of the commands contain message sequence numbers, I would say this should be allowed.


With Gmail and Courier-IMAP everything seems to work fine, but with Dovecot, although both the tagged and untagged responses have the correct order within their category in my testing, sometimes an untagged response is sent before the tagged response of the preceding command:


1 UID SEARCH UNSEEN
2 UID SEARCH FLAGGED
3 UID SEARCH DELETED
* SEARCH 33085
1 OK Search completed (0.000 secs).
* SEARCH
* SEARCH
2 OK Search completed (0.000 secs).
3 OK Search completed (0.000 secs).


But this should be fine as long as I can rely on the order of the untagged responses. So my questions are:


1. Is my interpretation correct that the above commands are valid according to the RFC?
2. Do you know of any servers that don't respond in the order of the commands?


Thanks!
Lasse


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20130821/97f9b285/attachment.html>
