paul@145 | 1 | LDAP_RESOURCE_QUERY = (&(|(mail=${quote_ldap:${local_part}}@${domain})(alias=${quote_ldap:${local_part}}@${domain}))(&(!(objectclass=inetOrgPerson))(objectclass=mailRecipient))) |
paul@90 | 2 | |
paul@90 | 3 | ldap_resource: |
paul@95 | 4 | debug_print = "R: ldap_resource for $local_part@$domain" |
paul@90 | 5 | driver = accept |
paul@90 | 6 | condition = ${if eq {}{${lookup ldap{ \ |
paul@90 | 7 | user="$ldap_service_bind_dn" \ |
paul@90 | 8 | pass=$ldap_service_password \ |
paul@145 | 9 | ldap://$ldap_host:$ldap_port/$ldap_base_dn?mail?sub?LDAP_RESOURCE_QUERY} \ |
paul@90 | 10 | }}{no}{yes}} |
paul@90 | 11 | transport = resources_transport |
paul@90 | 12 | cannot_route_message = Unknown user |