Gordon Messmer wrote:
> matt wrote:
>> I will try and explain what I want again as I dont think I have done 
>> that very well. And I can also prove via the docs that the filter you 
>> tried (the one I posted) does not work.
>>   
>
> You've tried to prove it logically, and failed because of logical 
> errors.  Don't try to prove this via the docs.  Demonstrate that it 
> doesn't work the way you expect with actual logs.
>
your right and I see that now.
>> - the mail filter is for user [EMAIL PROTECTED]
>> - when matt recieves any mail from [EMAIL PROTECTED], those mails 
>> should be checked for the phrase "very important message"
>> - if the phrase exists, then a copy of the message should be 
>> forwarded to [EMAIL PROTECTED]
>> - the message should also be delivered normally
>>
>> -if a message comes through with only one of the above criteria, the 
>> message should not be forwarded to [EMAIL PROTECTED]
>>   
>
> That's right, and that's what should happen with the example you 
> gave.  It's what *does* happen when I tested it.
>
>> As I am learning about this by reading the docs, using && does not 
>> work because if expression1 is false, expresssion2 is not checked...
>
> That's right.  If expression1 is false, then expression1 && 
> expression2 can not possibly be true.  Since the interpreter already 
> knows that the && will be false, it doesn't check the latter, because 
> that would be a waste of time (time == CPU resources).
>
that makes sense
>> ... and if expression 1 is true, expression2 is checked and 
>> expression1 is not considered.
>>   
>
> So?  If expression1 is true, then expression2 is evaluated.  If 
> expression2 is true, then the whole statement is true.  If it's not, 
> then the whole statement is not.  You're describing the way that && 
> works in pretty much every language (except VB.  I'm told VB evaluates 
> everything regardless.)
I never thought of it like that .... it makes sense
>
>>     /|expression1|/ && /|expression2|/
>>
>> If /|expression1|/ evaluates to a logical false, the result of the && 
>> is /|expression1|/, otherwise it's /|expression2|/, which is evaluated.
>>   
>
> Which isn't a problem.  You get a positive result when both tests are 
> positive, and a negative result if either test, or both, is negative.  
> This is what you expect.
>
>
>> so I need to understand how to make a filter that  checks for the 
>> phrase only after validating the email is from [EMAIL PROTECTED]
>>   
>
> You already do.  The sample that you posted works the way you expect 
> it to.
>
ok thanks Gordon, this is really helpful, it seems I might have some 
other influences working on the users mailbox such as local outlook 
filters etc.  I will add a log command to the filter and find out 
exactly what is happening as you suggested.
many thanks for your thorough explanations.

-Matt

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to