Dovecot 2 LDAP "unknown user"

Peter Fraser petros.fraser at gmail.com
Tue Nov 1 20:25:57 UTC 2016


Hi All
I am using Dovecot dovecot2-2.2.25_6 on FreeBSD 11. I am trying to set up
LDAP authentication to Active Director as I had it in version 1 of Dovecot.
My settings are at bottom. When I run doveadm auth test username, I get
back
root at BSD-11:/usr/local/etc/dovecot # doveadm auth test username
Password:
passdb: user auth succeeded
extra fields:
  user=username
root at BSD-11:/usr/local/etc/dovecot #

But when I run telnet 127.0.0.1 110 and try to log in it says unknown user.
Error below in maillog.
BSD-11 dovecot: pop3: Error: Authenticated user not found from userdb, auth
lookup id=2262958081 (client-pid=2273 client-id=1)
Nov  1 15:15:41 BSD-11 dovecot: pop3-login: Internal login failure
(pid=2273 id=1) (internal failure, 1 successful auths): user=



root at BSD-11:/usr/local/etc/dovecot # doveconf -n
# 2.2.25 (7be1766): /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 11.0-RELEASE-p1 i386
auth_debug = yes
auth_verbose = yes
listen = *
login_greeting = Mail Server ready.
mail_location = maildir:~/Maildir
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
ssl_cert = </usr/local/etc/certs/certs/dovecot.pem
ssl_key = </usr/local/etc/certs/private/dovecot.pem
userdb {
  args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
protocol lda {
  mail_plugins =
}

#Contents of dovecot-ldap.conf.ext
hosts = 192.168.153.143
dn = user at domain.com
dnpass = password
auth_bind = yes
auth_bind_userdn = domain\%u
ldap_version = 3
base = dc=domain,dc=com
pass_filter = (&(objectclass=person)(uid=%u))
user_attrs = homeDirectory=/home/vmail/%u,uid=1002,gid=1002

Amy help would be appreciated.


More information about the dovecot mailing list