1 PEOPLE_OUTGOING = ${strlen:people-outgoing:} 2 3 LDAP_PERSON_OUTGOING_RECIPIENT_QUERY = (&(|(mail=${quote_ldap:${substr{PEOPLE_OUTGOING}{${local_part}}}@${domain})(alias=${quote_ldap:${substr{PEOPLE_OUTGOING}{${local_part}}}@${domain}))(objectclass=inetorgperson)) 4 5 ldap_person_outgoing_recipient: 6 debug_print = "R: ldap_person_outgoing_recipient for $local_part@$domain" 7 driver = accept 8 unseen 9 no_expn 10 no_verify 11 condition = ${if and { \ 12 {eq {people-outgoing:}{${substr{0}{PEOPLE_OUTGOING}{${local_part}}}}} \ 13 {!eq {}{${lookup ldap{ \ 14 user="LDAP_SERVICE_BIND_DN" \ 15 pass=LDAP_SERVICE_PASSWORD \ 16 ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?mail?sub?LDAP_PERSON_OUTGOING_RECIPIENT_QUERY} \ 17 }}} \ 18 }} 19 transport = people_outgoing_transport