[imp] IMP and filters
Peter Solodov
peter at alcor.concordia.ca
Mon Jul 14 12:51:36 PDT 2003
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).
And I've just tested a simple fix for the search and indeed AND worked
properly...
> You must use the HEAD version of IMP to obtain the ability to do
> 'AND' searches, searching via other headers, NOT searching, etc.
> (Although HEAD still uses the imap_search() function, we use PHP
> code there to manipulate the results to be able to provide these
> features).
Good to know that. But I'll wait till release to put it into
production :)
- Peter
--
Peter Solodov | Concordia University
http://alcor.concordia.ca/~peter | Montreal, QC, Canada
More information about the imp
mailing list