[exim] 'boolean' LDAP query...

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Marco Gaiarin
Datum:  
To: exim-users
Betreff: [exim] 'boolean' LDAP query...

I've setup an LDAP query like that:

    unseen = ${if eq{${lookup ldapm {user=LOCAL_AD_BIND_DN pass=LOCAL_AD_PASS ldap:///LOCAL_AD_ALIASES_DN?rfc822MailMember?sub?(&(objectClass=nisMailAlias)(cn=${quote_ldap:${local_part}}@${quote_ldap:${domain}}))}}}{}{no}{yes}}


query work (tested by hand; and if i set manually 'unseen = yes', it is
used by the subsequent router) but 'unseen' is every time 'no'.


Probably is because checking for empty result in an ldap query have soem
trouble.

How can i setup a query/condition that simply set 'yes' if the ldap query
return some output?


Thanks.

-- 
  Please note that free software should be interpreted as free speach
  while most seem to interprete it as free lunch.
                        (Hugo van der Kooij)