Re: [Exim] ldap condition

Etusivu
Poista viesti
Vastaa
Lähettäjä: Peter A. Savitch
Päiväys:  
Vastaanottaja: Zachary Schneider
Aihe: Re: [Exim] ldap condition
Hello Zachary,

Wednesday, August 20, 2003, 1:19:50 AM, you wrote:

ZS> What I would like to do is:
ZS> if spam_score_int > 60
ZS> and
ZS> ldap query for $sender_address_domain fails
ZS> send to transport


ZS> I can get both conditions to work alone however when I try to combine
ZS> them in an and statement bad things happen.
ZS> Thank You


ZS> Zach




ZS> block_spam:
ZS>    driver = accept
ZS>    domains = +spam_block_domains
ZS>    no_verify
ZS>    transport = send_block_spam_msg
ZS>    condition =  ${if and {\
ZS>                  ${lookup ldapm {LDAP_READ_CRED \
ZS> ldap:///
ZS> mailSetting=white_list,dc=$domain,ou=domains,ou=mail,ou=services,dc=iron
ZS> keep,dc=net?mailSettingValue?sub?(mailSettingValue=$sender_address_domai
ZS> n)}{no}{yes}}\
ZS>                  {>{$spam_score_int}{60}} \
ZS>                  }{1}{0}}


What is $spam_score_int?

Syntax problems ( and{${lookup ...}} )?

WRONG SYNTAX: and{cond1}{cond2}
RIGHT SYNTAX: and{{cond1}{cond2}}

Mixing "yes"/"no" with exim `conditions'?

WRONG: and{{yes}{>{$spam_score_int}{60}}}
RIGHT: and{{eq{yes}{yes}}{>{$spam_score_int}{60}}}

You know, these curly brackets are tricky.
Watch the panic log. Use exim -bt options.
I use vim (VI iMproved) that shows opening/closing curly's.

--
Best regards,
 Peter                            mailto:spam4octan@highway.ru