MBOX-Line: From davidr at imap.cc  Thu Jan 29 11:46:13 2009
To: imap-protocol@u.washington.edu
From: David Rauschenbach <davidr@imap.cc>
Date: Fri Jun  8 12:34:42 2018
Subject: [Imap-protocol] SEARCH OR question
In-Reply-To: <4981FBC7.9040509@sun.com>
References: <4981FBC7.9040509@sun.com>
Message-ID: <FC0BD018-D393-4BAD-9D65-FF406D2EB791@imap.cc>

The Exchange 2003 IMAP connector's OR handling seems fine.

>  fetch 1:* rfc822.size
> * 1 FETCH (RFC822.SIZE 3940)
> * 2 FETCH (RFC822.SIZE 12133)
> * 3 FETCH (RFC822.SIZE 11243)
> * 4 FETCH (RFC822.SIZE 12210)
> * 5 FETCH (RFC822.SIZE 13601)
> * 6 FETCH (RFC822.SIZE 25480)
> * 7 FETCH (RFC822.SIZE 4631)
> * 8 FETCH (RFC822.SIZE 5712)
> * 9 FETCH (RFC822.SIZE 22364)
> * 10 FETCH (RFC822.SIZE 8505)
> * 11 FETCH (RFC822.SIZE 264403)
> * 12 FETCH (RFC822.SIZE 23832)
> * 13 FETCH (RFC822.SIZE 23422)
> * 14 FETCH (RFC822.SIZE 29670)
> * 15 FETCH (RFC822.SIZE 27351)
> c OK FETCH completed.
> d search smaller 4000
> * SEARCH 1
> d OK SEARCH completed.
> e search or smaller 4000 smaller 5000
> * SEARCH 1 7
> e OK SEARCH completed.
> f search or or smaller 4000 smaller 5000 smaller 9000
> * SEARCH 1 7 8 10
> f OK SEARCH completed.


Same test worked fine on Cyrus. I am typing in 3 OR terms according to  
the ABNF.

David
Synchronica Software



On Jan 29, 2009, at 10:56 AM, Bill Shannon wrote:

> What's the correct syntax to do a SEARCH for an OR of three terms?
> I've been using:
>
> SEARCH OR OR HEADER Message-ID id1 HEADER Message-ID id2 HEADER  
> Message-ID id3
>
> RFC 3501 says:
>
>      When multiple keys are specified, the result is the intersection
>      (AND function) of all the messages that match those keys.  For
>      example, the criteria DELETED FROM "SMITH" SINCE 1-Feb-1994  
> refers
>      to all deleted messages from Smith that were placed in the  
> mailbox
>      since February 1, 1994.  A search key can also be a parenthesized
>      list of one or more search keys (e.g., for use with the OR and  
> NOT
>      keys).
>
> How would this work with OR?
>
> SEARCH OR (HEADER Message-ID id1 HEADER Message-ID id2 HEADER  
> Message-ID id3)
>
> That doesn't match the BNF for OR.
>
> SEARCH OR HEADER Message-ID id1 (HEADER Message-ID id2 HEADER  
> Message-ID id3)
>
> Are the multiple terms inside the parens combined using OR because  
> they're
> part of an OR key?  Or are they combined with AND because they're  
> multiple
> keys (first rule above)?  I assume the latter because there's no AND  
> key
> and otherwise there would be no way to express that case.
>
>
> Assuming the first syntax at the top is correct, it appears that  
> Exchange
> 2003 fails with more than two terms in OR.  Anyone know if that's a  
> known
> bug?  I can't find anything in the Microsoft knowledge base.
>
> (A JavaMail customer reported this problem, I don't use Exchange  
> myself.)
>
>
> _______________________________________________
> Imap-protocol mailing list
> Imap-protocol@u.washington.edu
> http://mailman2.u.washington.edu/mailman/listinfo/imap-protocol

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