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