[imapfilter-devel]Filter generation
Mario Strasser
mario.strasser at zhwin.ch
Thu Oct 31 09:33:05 EET 2002
Hi
On Wednesday 30 October 2002 18:38, you wrote:
>
> What does the server reply to the SEARCH requests? BAD? OK?
>
It simply doesn't find them:
* SEARCH
OK SEARCH completed
>
> A mail server with Microsoft Exchange 2000 at my university works
> fine:
> [...]
> debug: sending command: F00006 SEARCH ALL SEEN OR (TO "foo") OR
> (SUBJECT "123456") (SINCE 22-Jul-2002) OR (SMALLER 100000) OR (FROM
> "corge") (CC "thud")
> [...]
To be more precisely, the error only occurs if more than three rules
for the same type are used, for example:
filter A or
header x "aaa"
header y "bbb"
header z "ccc"
action ...
results in:
SEARCH OR (HEADER "x" "aaa") OR (HEADER "y" "bbb")
(HEADER "z" "ccc")
* SEARCH
F0000C OK SEARCH completed.
Can you verify this?
> > In RFC 2060 section 6.4.4 the OR command is defined as
> > OR <search-key1> <search-key2>
> > thus I had to modify the generate_filter_or() function in such a
> > way that it adds extra brackets and brings the filter to the
> > needed form: SEARCH (OR X (OR Y Z)).
>
> Note that, this is not the same with (OR X Y Æ) that you mentioned
> before:
>
> (OR X Y Æ) --> (X or Y) and Z
> (OR X (OR Y Z)) --> X or Y or Z
>
You' re right, sorry! What I meant was
(OR X OR Y Z) and (OR X (OR Y Z))
> I don't think that RFC2060 states that parentheses are needed in
> forms like the aforementioned. This means that "SEARCH OR X OR Y
> Z", "SEARCH (OR X (OR Y Z))", "SEARCH (OR X OR Y Z)", "SEARCH OR
> (X) OR (Y) (Z)", "SEARCH OR (X) (OR (Y) (Z))", etc. are correct and
> must return the same result.
I agree, however, deciding is what the developers from Microsoft
though.
Regards,
Mario
Content Security by MailMarshal
More information about the Imapfilter-devel
mailing list