[exim] ldap "OR" filter woes

Etusivu
Poista viesti
Vastaa
Lähettäjä: Tom Kinghorn
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] ldap "OR" filter woes
Good afternoon list.

I am having trouble looking up a mailhost using an LDAP lookup.

Basically, what I am hoping to achieve is:

If a mail is destined to a local user and the address is either the
users email address or the users Alias, then lookup the
host it must be delivered to.

If I change the ldap lookup to use a single lookup (either the mail
address or the alias), it works.

I cannot however get it to work using the ldap "OR" filter.

If user@domain is in the mail_address OR in the alias_address.

Router below

ldap_mail_deliver:
         driver  = manualroute
         transport = remote_smtp
         route_data = ${lookup ldap \
                                  {user=LDAPU pass=LDAPP 
LDAPS/BASEDN?mailHost?sub?\


(|(mail=$local_part@$domain)(mailAlternateAddress=$local_part@$domain))}}

Any help would be appreciated.

Thanks
Tom