[imp] filter is not functioning in CVS :)

Andreas Dahlén andreas@dahlen.ws
Thu, 1 Aug 2002 19:59:24 +0200


This message is in MIME format.

---------------------- multipart/alternative attachment
Citerar Michael M Slusarz <slusarz@bigworm.colorado.edu>: 

> Quoting Michael Cochrane <mike@graftonhall.co.nz>: 
> 
> | This fixes everything for me: 
> | 
> | - $query = 'UNDELETED OR'; 
> | + $query = 'UNDELETED'; 
> | foreach ($fields as $field) { 
> | $query .= ' ' . strtoupper($field) . ' "' . 
> $text . '"'; 
> | } 
> 
> That is definitely _not_ the correct solution. This change results 
> in all 
> the fields being matched in an "AND" manner. RFC 2060: 
> 
> When multiple keys are specified, the result is the 
> intersection 
> (AND function) of all the messages that match those keys. 
> 
> However, the current IMP filters only support "OR" filters - I am 
> currently 
> hard at work implementing "AND" filters. 
> 
> If someone could give me an example of a filter that doesn't work, 
> that 
> would be great. My filters all look like this: 
> 
> Move messages to the Spam folder where the X-Spam-Flag: header 
> contains YES 
> 
> and they all work fine. 
> 

My filters all look like this;

Move messages to folder Lists/Openna where the To or Cc or From contains : header contains openna-users@smtp.openna.com

and thay doesn't work.

/Andreas
---------------------- multipart/alternative attachment
<html><head><title></title><meta content="MSHTML 6.00.2716.2200"
name="GENERATOR" /></head><body>Citerar Michael M Slusarz
&lt;slusarz@bigworm.colorado.edu&gt;: <br /><br />&gt; Quoting Michael Cochrane
&lt;mike@graftonhall.co.nz&gt;: <br />&gt; <br />&gt; | This fixes everything
for me: <br />&gt; | <br />&gt; | - $query = 'UNDELETED OR'; <br />&gt; | +
$query = 'UNDELETED'; <br />&gt; | foreach ($fields as $field) { <br />&gt; |
$query .= ' ' . strtoupper($field) . ' "' . <br />&gt; $text . '"'; <br />&gt;
| } <br />&gt; <br />&gt; That is definitely _not_ the correct solution. This
change results <br />&gt; in all <br />&gt; the fields being matched in an
"AND" manner. RFC 2060: <br />&gt; <br />&gt; When multiple keys are specified,
the result is the <br />&gt; intersection <br />&gt; (AND function) of all the
messages that match those keys. <br />&gt; <br />&gt; However, the current IMP
filters only support "OR" filters - I am <br />&gt; currently <br />&gt; hard
at work implementing "AND" filters. <br />&gt; <br />&gt; If someone could give
me an example of a filter that doesn't work, <br />&gt; that <br />&gt; would
be great. My filters all look like this: <br />&gt; <br />&gt; Move messages to
the Spam folder where the X-Spam-Flag: header <br />&gt; contains YES <br
/>&gt; <br />&gt; and they all work fine. <br />&gt; <br /><br />My filters all
look like this;<br /><br />Move messages to folder Lists/Openna where the To or
Cc or From contains : header contains <a
href="mailto:openna-users@smtp.openna.com">openna-users@smtp.openna.com</a><br
/><br />and thay doesn't work.<br /><br />/Andreas</body></html>
---------------------- multipart/alternative attachment--