Re: [EXIM] Filter problem

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Pollywog
CC: Christian Dysthe, Exim-users
Sujet: Re: [EXIM] Filter problem
On Mon, 17 May 1999, Pollywog wrote:

> >>>
> >>> if
> >>>    $header_To: does not contain "ohboy@???" or
> >>>    $header_To: does not contain "labour@???" or
> >>>    $header_Cc: does not contain "ohboy@???" or
> >>>    $header_Cc: does not contain "labour@???" or

>
> try it with the "or" at the beginning of the line, not at the end


That will make no difference at all. Newlines are treated as any other
white space in filters.

I'm not sure what you are wanting to do here. Boolean combinations
involving negations are notoriously tricky to get one's head round.
I suspect you need some combination of "and", "or" and parentheses.

Maybe you can more easily write it the other way round, for messages you
do *not* want to save. Would this be something like

 if
    $header_To: contains "ohboy@???" or
    $header_To: contains "labour@???" or
    $header_Cc: contains "ohboy@???" or
    $header_Cc: contains "labour@???" or
 then
    finish      (i.e. don't save)
 endif        


? The negation of that condition is

 if not (
    $header_To: contains "ohboy@???" or
    $header_To: contains "labour@???" or
    $header_Cc: contains "ohboy@???" or
    $header_Cc: contains "labour@???" or
    )
 then


which is easier to read. However, by the normal rules of Boolean
expressions, that is exactly equivalent to

 if
    $header_To: does not contain "ohboy@???" and
    $header_To: does not contain "labour@???" and
    $header_Cc: does not contain "ohboy@???" and
    $header_Cc: does not contain "labour@???" and


which is what you said you didn't want ....     


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***