Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to get dovecot 2.0.19 authenticate users via LDAP (OpenLDAP 2.4.28) and using Wireshark to debug the process. It looks like the basic configuration of dovecot is fine, but it doesn't pull it off to send the right request to the LDAP server. First of all, this is how my LDAP-entries look:

# ht
dn: dc=ht
objectClass: top
objectClass: dcObject
objectClass: organization
o: ip
dc: ht

# admin, ht
dn: cn=admin,dc=ht
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword:: e1NTSEF9cFY1b0ZZVUhack1aRTVvaUg1T3c2cytVWHV4aUNvaHI=

# people, ht
dn: ou=people,dc=ht
objectClass: organizationalUnit
objectClass: top
ou: people

# groups, ht
dn: ou=groups,dc=ht
objectClass: organizationalUnit
objectClass: top
ou: groups

# ipusers, groups, ht
dn: cn=ipusers,ou=groups,dc=ht
gidNumber: 500
cn: ipusers
objectClass: posixGroup
objectClass: top

# Max Mustermann, people, ht
dn: cn=Max Mustermann,ou=people,dc=ht
cn: Max Mustermann
givenName: Max
gidNumber: 500
homeDirectory: /home/users/mmustormann
sn: Mustermann
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
uidNumber: 1000
uid: mmustermann
userPassword:: e01ENX1ETUYxdWNEeHRxZ3h3NW5pYVhjbVlRPT0=
loginShell: /bin/bash

Now, I use the following configuration for dovecot:

hosts =
dn = cn=admin,dc=ht
dnpass = a
auth_bind = yes
auth_bind_userdn = uid=%u,ou=people,dc=ht
ldap_version = 3
scope = subtree
base = ou=people,dc=ht
user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid      
user_filter = (&(objectClass=posixAccount)(uid=%u))
pass_attrs = uid=user,userPassword=password
pass_filter = (&(objectClass=posixAccount)(uid=%u))

Now what I see in Wireshark:

Dovecot cannot authenticate itself for some reason...

If i change the configuration as follows:

auth_bind = no 
#auth_bind_userdn = uid=%u,ou=people,dc=ht

Then I get following picture:

It doesn't pick up the setting base = ou=people,dc=ht. But what is more crucial is that even looking at the whole tree "<ROOT>" wholeSubTree it can't find the required entry.

I am really desperate and don't know how to make it work. I really just need to make it somehow work.

share|improve this question
Here's a detailed view of the request: – Danny Lo May 18 '14 at 0:31

Funny solution... but very annoying on the other hand. The mistake was to take example configuration file dovecot-ldap.conf.ext where everything was commented out. I ASSUMED it was commented out. The only single uncommented line was base =. I found it out after two days of torture...

This is the reason why dovecot sent search request with base=<ROOT>. And this is why it doesn't return any results. And the solution was to comment this line out.

Actual config:

hosts =
dn = cn=admin,dc=ht
dnpass = a
base = ou=people,dc=ht
ldap_version = 3
scope = onelevel
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.