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.
> 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.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.