title: OpenLDAP bind DN as email
body: <p>I'm trying to build and openLDAP container for my nodejs app. This is the code i'm using.</p>
  <pre><code>try {
          client = ldap.createClient({
              url: 'ldap://openldap:389'
          })
      } catch (err) {
          return errorHandler(req, res, err)
      }
      try {
          client.bind(email, password, async (err, result) =&gt; {
  (...)
  }
  </code></pre>
  <p>When I'm doing a request using company LDAP I use email in my request and I got a response from my request.</p>
  <p>But when I'm creating a container LDAP I only get a response from my request if I use DN instead of e-mail.
  This is the service LDAP that i'm creating for development</p>
  <pre><code>services:
    openldap:
      image: osixia/openldap:latest
      container_name: openldap
      hostname: openldap
      restart: always
      ports:
        - '389:389'
        - '636:636'
      environment:
        - LDAP_ORGANISATION=company
        - LDAP_DOMAIN=example.org
        - &quot;LDAP_BASE_DN=dc=example,dc=org&quot;
        - LDAP_ADMIN_PASSWORD=test123
      volumes:
        - ./test.ldif:/test.ldif
  
      networks:
        - infra-net
  </code></pre>
  <p>And my file test.ldif that I'm using is :</p>
  <pre><code>dn: uid=test,dc=example,dc=org
  uid: test
  cn: test
  sn: 3
  objectClass: top
  objectClass: posixAccount
  objectClass: inetOrgPerson
  loginShell: /bin/bash
  homeDirectory: /home/test
  uidNumber: 14583102
  gidNumber: 14564100
  userPassword: test
  mail: test@example.org
  gecos: test User
  </code></pre>
  <p>I know I can do it with client.search but I would love to get response using client.bind like we get in production.</p>