[imp] IMP and filters

Michael M Slusarz slusarz at bigworm.colorado.edu
Mon Jul 14 13:08:04 PDT 2003


Quoting Peter Solodov <peter at alcor.concordia.ca>:

| On Mon, 14 Jul 2003, Michael M. Slusarz wrote:
| >| Hi,
| >|
| >| I don't understand the reason behind default filter's behavior.
| >| Currently (IMP 3.2.1) if I select multiple headers for a filter,
| >| then message which matches any of selected filters will be
| >| filtered.  That seems clearly incorrect to me.  Only messages where
| >| all selected headers have specified text should match that filter.
| >|
| >| Is there any reason behind that behavior?
| >
| > Yes.  Only 'OR' searches are supported via the PHP imap_search()
| > function.
|
| That's weird.  From RFC 2060:
|
|       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).

Whoops. My bad. I meant to say that 'OR' searches are not handled by
imap_search().

BTW, you are looking at the wrong RFC - imap_search() only supports IMAP2
search criteria which can be found instead in RFC 1176.

So (pardon my confusion on this - I haven't used IMP 3.x in ages) the result
should be that ALL fields entered MUST be matched. So if you are getting an
'OR' type result, something is screwy on your side - I just did a test
search using IMP RELENG_3 and ALL fields needed to match.

In conclusion, I should have said that IMP 3.x doesn't support OR searches
instead. Sorry for any confusion I caused.

michael


______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder


More information about the imp mailing list