Re: [Exim] help with complicated condition (exim 3.22)

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Chad Leigh -- Shire.Net LLC
Date:  
À: exim-users
Sujet: Re: [Exim] help with complicated condition (exim 3.22)
On Thursday, March 28, 2002, at 12:07 , Philip Hazel wrote:

> On Thu, 28 Mar 2002, Chad Leigh -- Shire.Net LLC wrote:
>
>> ${if and
>> {
>> {eq
>>     {${lookup ldap {user="cn=Manager,dc=blah,dc=tld" pass=somepassword
>>     ldap://ldap.blah.tld:389/accountname=${local_part},domain=${domain},dc=
>> blah,
>> dc=tld?vacation?base?}{$value}fail}}
>>     {Y}
>>     }
>> { ! eq {$message_precedence} {bulk}
>>     }
>> }
>> {yes}{no}
>> }

>>
>>
>> From reading Philips great book, it appears that my "and" condition
>> should work.
>
> It looks reasonable to me. Have you tried using "exim -be" to test the
> expansion "offline"? Of course, you won't have anything set in
> $message_precedence in that case. You'll have to put in a literal.


I'll give this a try to see what is happening. My "debugging" skills
are not so great. I did run it with -d to see what is happening but
will have to do the logging below to see what is happening

>
>> What actually happens is that if the LDAP lookup succeeds
>> with vacation field that exists and is Y, this condition is true,
>> regardless if the "Precedence:" header is "bulk" or not.
>
> I suggest you add to your director this:
>
> debug_print = ****Precedence: >$h_precedence:< >$message_precedence<
>
> and run a failing delivery with -d to get debugging output. Check that
> what appears between >< really is "bulk" (in both cases).
>
> In any event, I would recommend using $h_precedence: instead of
> $message_precedence. The latter is very old, and pre-dates the access to
> all headers. Because it is redundant, I removed it for Exim 4.
>


Ok, I was using the book and so thought it was something special or
something.

Thanks
Chad