[Dovecot] LDAP Auth

Proskurin Kirill k.proskurin at fxclub.org
Wed Jul 2 18:54:42 EEST 2008


Hello all.

Im trying to configure Dovecot to auth at LDAP.
Main idea what login = email of user.

At dovecot-ldap:

hosts = 127.0.0.1
dn = cn=root,dc=ForexClub
dnpass = secret
tls = no
debug_level = 1
auth_bind = no
ldap_version = 3
base = dc=Virtual-Domains,dc=ForexClub
deref = never
scope = subtree
user_attrs =
user_filter = (&(objectClass=mailUser)(mail=%u))
pass_attrs = mail=user,userPassword=password
pass_filter = (&(objectClass=mailUser)(mail=%u))
default_pass_scheme = CRYPT

And... all works fine. Im can connect and auth.
But in logs with debug_level=1 im see this:

As im think it is *not* good. As im understand he not found anythink.
BUT it is auth and work... Whats wrong?


dovecot: Jul 02 19:47:11 Info: auth(default): client in: AUTH   1 
PLAIN   service=imap    secured lip=172.16.1.19 rip=172.16.1.80 
lport=143       rport=59553
dovecot: Jul 02 19:47:11 Info: auth(default): client out: CONT  1
dovecot: Jul 02 19:47:11 Info: auth(default): client in: CONT<hidden>
dovecot: Jul 02 19:47:11 Info: auth(default): 
ldap(admin at domain.off,172.16.1.80): pass search: 
base=dc=Virtual-Domains,dc=ForexClub scope=subtree 
filter=(&(objectClass=mailUser)(mail=admin at domain.off)) 
fields=mail,userPassword
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_search
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: 
"(&(objectClass=mailUser)(mail=admin at domain.off))"
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: AND
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter_list 
"(objectClass=mailUser)(mail=admin at domain.off)"
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: 
"(objectClass=mailUser)"
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: simple
dovecot: Jul 02 19:47:11 Error: auth(default): put_simple_filter: 
"objectClass=mailUser"
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: 
"(mail=admin at domain.off)"
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: simple
dovecot: Jul 02 19:47:11 Error: auth(default): put_simple_filter: 
"mail=admin at domain.off"
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_send_initial_request
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_send_server_request
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_result ld 0x18529160 
msgid -1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg ld 0x18529160 
msgid -1 (timeout 0 usec)
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg continue ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Connections:
dovecot: Jul 02 19:47:11 Error: auth(default): * host: 127.0.0.1  port: 
389  (default)
dovecot: Jul 02 19:47:11 Error: auth(default):   refcnt: 2  status: 
Connected
dovecot: Jul 02 19:47:11 Error: auth(default):   last used: Wed Jul  2 
19:47:11 2008
dovecot: Jul 02 19:47:11 Error: auth(default):
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 
Outstanding Requests:
dovecot: Jul 02 19:47:11 Error: auth(default):  * msgid 6,  origid 6, 
status InProgress
dovecot: Jul 02 19:47:11 Error: auth(default):    outstanding referrals 
0, parent count 0
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Response 
Queue:
dovecot: Jul 02 19:47:11 Error: auth(default):    Empty
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_int_select
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg: ld 0x18529160 
msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg: ld 0x18529160 
msgid 6 message type search-entry
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_result ld 0x18529160 
msgid -1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg ld 0x18529160 
msgid -1 (timeout 0 usec)
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg continue ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Connections:
dovecot: Jul 02 19:47:11 Error: auth(default): * host: 127.0.0.1  port: 
389  (default)
dovecot: Jul 02 19:47:11 Error: auth(default):   refcnt: 2  status: 
Connected
dovecot: Jul 02 19:47:11 Error: auth(default):   last used: Wed Jul  2 
19:47:11 2008
dovecot: Jul 02 19:47:11 Error: auth(default):
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 
Outstanding Requests:
dovecot: Jul 02 19:47:11 Error: auth(default):  * msgid 6,  origid 6, 
status InProgress
dovecot: Jul 02 19:47:11 Error: auth(default):    outstanding referrals 
0, parent count 0
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Response 
Queue:
dovecot: Jul 02 19:47:11 Error: auth(default):  * msgid 6,  type 100
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_int_select
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg: ld 0x18529160 
msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg: ld 0x18529160 
msgid 6 message type search-result
dovecot: Jul 02 19:47:11 Error: auth(default): new result:  res_errno: 
0, res_error: <>, res_matched: <>
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg: ld 0x18529160 0 
new referrals
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg:  mark request 
completed, ld 0x18529160 msgid 6
dovecot: Jul 02 19:47:11 Error: auth(default): request done: ld 
0x18529160 msgid 6
dovecot: Jul 02 19:47:11 Error: auth(default): res_errno: 0, res_error: 
<>, res_matched: <>
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_free_request (origid 
6, msgid 6)
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_free_connection 0 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_free_connection: 
refcnt 1
dovecot: Jul 02 19:47:11 Error: auth(default): adding response ld 
0x18529160 msgid 6 type 101:
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_parse_result
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_first_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_get_values
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_get_values
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Info: auth(default): 
ldap(admin at domain.off,172.16.1.80): result: mail(user)=admin at domain.off 
userPassword(password)=<hidden>
dovecot: Jul 02 19:47:11 Info: auth(default): client out: OK    1 
user=admin at domain.off
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_msgfree
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_result ld 0x18529160 
msgid -1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg ld 0x18529160 
msgid -1 (timeout 0 usec)
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg continue ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Connections:
dovecot: Jul 02 19:47:11 Error: auth(default): * host: 127.0.0.1  port: 
389  (default)
dovecot: Jul 02 19:47:11 Error: auth(default):   refcnt: 1  status: 
Connected
dovecot: Jul 02 19:47:11 Error: auth(default):   last used: Wed Jul  2 
19:47:11 2008
dovecot: Jul 02 19:47:11 Error: auth(default):
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 
Outstanding Requests:
dovecot: Jul 02 19:47:11 Error: auth(default):    Empty
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Response 
Queue:
dovecot: Jul 02 19:47:11 Error: auth(default):    Empty
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_int_select
dovecot: Jul 02 19:47:11 Info: auth(default): master in: REQUEST 
3       14642   1
dovecot: Jul 02 19:47:11 Info: auth(default): 
ldap(admin at domain.off,172.16.1.80): user search: 
base=dc=Virtual-Domains,dc=ForexClub scope=subtree 
filter=(&(objectClass=mailUser)(mail=admin at domain.off)) fields=(all)
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_search
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: 
"(&(objectClass=mailUser)(mail=admin at domain.off))"
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: AND
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter_list 
"(objectClass=mailUser)(mail=admin at domain.off)"
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: 
"(objectClass=mailUser)"
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: simple
dovecot: Jul 02 19:47:11 Error: auth(default): put_simple_filter: 
"objectClass=mailUser"
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: 
"(mail=admin at domain.off)"
dovecot: Jul 02 19:47:11 Error: auth(default): put_filter: simple
dovecot: Jul 02 19:47:11 Error: auth(default): put_simple_filter: 
"mail=admin at domain.off"
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_send_initial_request
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_send_server_request
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_result ld 0x18529160 
msgid -1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg ld 0x18529160 
msgid -1 (timeout 0 usec)
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg continue ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Connections:
dovecot: Jul 02 19:47:11 Error: auth(default): * host: 127.0.0.1  port: 
389  (default)
dovecot: Jul 02 19:47:11 Error: auth(default):   refcnt: 2  status: 
Connected
dovecot: Jul 02 19:47:11 Error: auth(default):   last used: Wed Jul  2 
19:47:11 2008
dovecot: Jul 02 19:47:11 Error: auth(default):
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 
Outstanding Requests:
dovecot: Jul 02 19:47:11 Error: auth(default):  * msgid 7,  origid 7, 
status InProgress
dovecot: Jul 02 19:47:11 Error: auth(default):    outstanding referrals 
0, parent count 0
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Response 
Queue:
dovecot: Jul 02 19:47:11 Error: auth(default):    Empty
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_int_select
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg: ld 0x18529160 
msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg: ld 0x18529160 
msgid 7 message type search-entry
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_result ld 0x18529160 
msgid -1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg ld 0x18529160 
msgid -1 (timeout 0 usec)
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg continue ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Connections:
dovecot: Jul 02 19:47:11 Error: auth(default): * host: 127.0.0.1  port: 
389  (default)
dovecot: Jul 02 19:47:11 Error: auth(default):   refcnt: 2  status: 
Connected
dovecot: Jul 02 19:47:11 Error: auth(default):   last used: Wed Jul  2 
19:47:11 2008
dovecot: Jul 02 19:47:11 Error: auth(default):
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 
Outstanding Requests:
dovecot: Jul 02 19:47:11 Error: auth(default):  * msgid 7,  origid 7, 
status InProgress
dovecot: Jul 02 19:47:11 Error: auth(default):    outstanding referrals 
0, parent count 0
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Response 
Queue:
dovecot: Jul 02 19:47:11 Error: auth(default):  * msgid 7,  type 100
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_int_select
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg: ld 0x18529160 
msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg: ld 0x18529160 
msgid 7 message type search-result
dovecot: Jul 02 19:47:11 Error: auth(default): new result:  res_errno: 
0, res_error: <>, res_matched: <>
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg: ld 0x18529160 0 
new referrals
dovecot: Jul 02 19:47:11 Error: auth(default): read1msg:  mark request 
completed, ld 0x18529160 msgid 7
dovecot: Jul 02 19:47:11 Error: auth(default): request done: ld 
0x18529160 msgid 7
dovecot: Jul 02 19:47:11 Error: auth(default): res_errno: 0, res_error: 
<>, res_matched: <>
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_free_request (origid 
7, msgid 7)
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_free_connection 0 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_free_connection: 
refcnt 1
dovecot: Jul 02 19:47:11 Error: auth(default): adding response ld 
0x18529160 msgid 7 type 101:
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_parse_result
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_first_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_next_attribute
dovecot: Jul 02 19:47:11 Info: auth(default): 
ldap(admin at domain.off,172.16.1.80): result: objectClass(?unknown?)= 
mail(?unknown?)= accountStatus(?unknown?)= clearPassword(?unknown?)= 
initials(?unknown?)= cn(?unknown?)= givenName(?unknown?)= l(?unknown?)= 
o(?unknown?)= telephoneNumber(?unknown?)= sn(?unknown?)= 
title(?unknown?)= userPassword(?unknown?)=
dovecot: Jul 02 19:47:11 Info: auth(default): master out: USER  3 
admin at domain.off
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_msgfree
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_result ld 0x18529160 
msgid -1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg ld 0x18529160 
msgid -1 (timeout 0 usec)
dovecot: Jul 02 19:47:11 Error: auth(default): wait4msg continue ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Connections:
dovecot: Jul 02 19:47:11 Error: auth(default): * host: 127.0.0.1  port: 
389  (default)
dovecot: Jul 02 19:47:11 Error: auth(default):   refcnt: 1  status: 
Connected
dovecot: Jul 02 19:47:11 Error: auth(default):   last used: Wed Jul  2 
19:47:11 2008
dovecot: Jul 02 19:47:11 Error: auth(default):
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 
Outstanding Requests:
dovecot: Jul 02 19:47:11 Error: auth(default):    Empty
dovecot: Jul 02 19:47:11 Error: auth(default): ** ld 0x18529160 Response 
Queue:
dovecot: Jul 02 19:47:11 Error: auth(default):    Empty
dovecot: Jul 02 19:47:11 Info: imap-login: Login: 
user=<admin at domain.off>, method=PLAIN, rip=172.16.1.80, lip=172.16.1.19, TLS
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList ld 
0x18529160 msgid -1 all 1
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_chkResponseList 
returns ld 0x18529160 NULL
dovecot: Jul 02 19:47:11 Error: auth(default): ldap_int_select
dovecot: Jul 02 19:47:11 Info: IMAP(admin at domain.off): Effective 
uid=1002, gid=1002, home=
dovecot: Jul 02 19:47:11 Info: IMAP(admin at domain.off): maildir: 
data=/var/spool/dovecot/domains/domain.off/admin/
dovecot: Jul 02 19:47:11 Info: IMAP(admin at domain.off): maildir++: 
root=/var/spool/dovecot/domains/domain.off/admin, index=, control=, 
inbox=/var/spool/dovecot/domains/domain.off/admin
dovecot: Jul 02 19:47:11 Info: auth(default): new auth connection: pid=14669



For a full picture here is a my LDAP structure for this lookup:

dn: dc=ForexClub
dc: ForexClub
objectClass: top
objectClass: domain

dn: dc=Virtual-Domains,dc=ForexClub
dc: Virtual-Domains
objectClass: top
objectClass: domain
description: Virtual Email Domains

dn: dc=domain.off,dc=Virtual-Domains,dc=ForexClub
dc: domain.off
objectClass: top
objectClass: domain
description: domain.off

dn: mail=admin at domain.off,dc=domain.off,dc=Virtual-Domains,dc=ForexClub
accountStatus: active
clearPassword: 123
mail: admin at domain.off
objectClass: mailUser
objectClass: organizationalPerson
objectClass: top
initials:: 0JLQuNC60YLQvtGA0L7QstC40Yc=
cn:: 0J/RgNC+0YHQutGD0YDQuNC9INCa0LjRgNC40LvQuyDQktC40LrRgtC+0YDQvtCy0LjRhw=
  =
givenName:: 0JrQuNGA0LjQu9C7
l:: 0JzQvtGB0LrQstCw
o: Forex Club
telephoneNumber: 1070
sn:: 0J/RgNC+0YHQutGD0YDQuNC9
title:: 0KHQuNGB0YLQtdC80L3Ri9C5INCQ0LTQvNC40L3QuNGB0YLRgNCw0YLQvtGA
userPassword: {CRYPT}$1$IsGbTFH9$87Jx5.HE3RJe11ZwYstTd.  <--- 123 here

-- 
Best Regards
Proskurin Kirill


More information about the dovecot mailing list