[exim] Getting DN of user in LDAP authenticator

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jan-Piet Mens
Date:  
À: exim-users
Sujet: [exim] Getting DN of user in LDAP authenticator
In Exim 4.44 I'd like to set the authenticated sender_id to the
distinguished name (DN) of the authenticated user. My authenticator
is:

ldap_plain:
   driver = plaintext
   public_name = PLAIN
   server_prompts = "Username:: : Password::"
   server_condition = ${if ldapauth\
        { user="${lookup ldapdn {ldap:///BASEDN?dn?sub?(&(uid=${quote_ldap:$2})(service=ximap)(mail=
*)(!(expiredDate=*)))}{$value}fail}" \
               pass="$3" \
               ldap:///BASEDN/ \
         }{yes} {no} \
    }
   # value for $authenticated_id
   server_set_id = $2


The inner LDAP lookup is searching for uid=username in the directory
and retrieving the DN.

Is there any way of setting `server_set_id' to the DN of the bound
user?

Thanks,
    -JP