При включённом дебаге в dovecot-ldap в логах при лукапе пользователя я вижу много ERROR. Но всё работает и с виду даже как надо.
Мне искренне кажется что там что-то не так, хотя я не спец по LDAP. Но при этом пользователь находится и письма доставляются.
Лог довкота и конфиг dovecot-ldap:
Код: Выделить всё
dovecot-ldap.conf:
hosts = 127.0.0.1
dn = cn=root,dc=DOMAIN
dnpass = secret
tls = no
debug_level = 1
auth_bind = no
ldap_version = 3
base = dc=Virtual-Domains,dc=DOMAIN
deref = never
scope = subtree
user_attrs =
user_filter = (&(objectClass=mailUser)(mail=%u))
pass_attrs = mail=user,clearPassword=password
pass_filter = (&(objectClass=mailUser)(mail=%u))
default_pass_scheme = PLAIN
Лог LDAP запроса во время лукапа:
Код: Выделить всё
dovecot: Jul 09 11:07:26 Info: auth(default): new auth connection: pid=19445
dovecot: Jul 09 11:07:26 Info: auth(default): new auth connection: pid=19446
dovecot: Jul 09 11:07:33 Info: auth(default): new auth connection: pid=19453
dovecot: Jul 09 11:07:33 Info: auth(default): client in: AUTH 11 CRAM-MD5 service=smtp secured rip=172.16.1.19 lip=172.16.1.19 resp=<hidden>
dovecot: Jul 09 11:07:33 Info: auth(default): client out: CONT 11 PDgxOTE2ODE0MzM3NTk3ODYuMTIxNTYwMTY1M0BteC5kb21haW4ub2ZmPg==
dovecot: Jul 09 11:07:33 Info: auth(default): client in: CONT<hidden>
dovecot: Jul 09 11:07:33 Info: auth(default): ldap(admin@domain.off,172.16.1.19): pass search: base=dc=Virtual-Domains,dc=ForexClub scope=subtree filter=(&(objectClass=mailUser)(mail=admin@domain.off)) fields=mail,clearPassword
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_search
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: "(&(objectClass=mailUser)(mail=admin@domain.off))"
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: AND
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter_list "(objectClass=mailUser)(mail=admin@domain.off)"
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: "(objectClass=mailUser)"
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: simple
dovecot: Jul 09 11:07:33 Error: auth(default): put_simple_filter: "objectClass=mailUser"
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: "(mail=admin@domain.off)"
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: simple
dovecot: Jul 09 11:07:33 Error: auth(default): put_simple_filter: "mail=admin@domain.off"
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_send_initial_request
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_send_server_request
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_result ld 0x18529160 msgid -1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList returns ld 0x18529160 NULL
dovecot: Jul 09 11:07:33 Error: auth(default): wait4msg ld 0x18529160 msgid -1 (timeout 0 usec)
dovecot: Jul 09 11:07:33 Error: auth(default): wait4msg continue ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Connections:
dovecot: Jul 09 11:07:33 Error: auth(default): * host: 127.0.0.1 port: 389 (default)
dovecot: Jul 09 11:07:33 Error: auth(default): refcnt: 2 status: Connected
dovecot: Jul 09 11:07:33 Error: auth(default): last used: Wed Jul 9 11:07:33 2008
dovecot: Jul 09 11:07:33 Error: auth(default):
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Outstanding Requests:
dovecot: Jul 09 11:07:33 Error: auth(default): * msgid 2, origid 2, status InProgress
dovecot: Jul 09 11:07:33 Error: auth(default): outstanding referrals 0, parent count 0
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Response Queue:
dovecot: Jul 09 11:07:33 Error: auth(default): Empty
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList returns ld 0x18529160 NULL
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_int_select
dovecot: Jul 09 11:07:33 Error: auth(default): read1msg: ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): read1msg: ld 0x18529160 msgid 2 message type search-entry
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_result ld 0x18529160 msgid -1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList returns ld 0x18529160 NULL
dovecot: Jul 09 11:07:33 Error: auth(default): wait4msg ld 0x18529160 msgid -1 (timeout 0 usec)
dovecot: Jul 09 11:07:33 Error: auth(default): wait4msg continue ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:26 Info: auth(default): new auth connection: pid=19445
dovecot: Jul 09 11:07:26 Info: auth(default): new auth connection: pid=19446
dovecot: Jul 09 11:07:33 Info: auth(default): new auth connection: pid=19453
dovecot: Jul 09 11:07:33 Info: auth(default): client in: AUTH 11 CRAM-MD5 service=smtp secured rip=172.16.1.19 lip=172.16.1.19 resp=<hidden>
dovecot: Jul 09 11:07:33 Info: auth(default): client out: CONT 11 PDgxOTE2ODE0MzM3NTk3ODYuMTIxNTYwMTY1M0BteC5kb21haW4ub2ZmPg==
dovecot: Jul 09 11:07:33 Info: auth(default): client in: CONT<hidden>
dovecot: Jul 09 11:07:33 Info: auth(default): ldap(admin@domain.off,172.16.1.19): pass search: base=dc=Virtual-Domains,dc=ForexClub scope=subtree filter=(&(objectClass=mailUser)(mail=admin@domain.off))
fields=mail,clearPassword
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_search
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: "(&(objectClass=mailUser)(mail=admin@domain.off))"
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: AND
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter_list "(objectClass=mailUser)(mail=admin@domain.off)"
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: "(objectClass=mailUser)"
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: simple
dovecot: Jul 09 11:07:33 Error: auth(default): put_simple_filter: "objectClass=mailUser"
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: "(mail=admin@domain.off)"
dovecot: Jul 09 11:07:33 Error: auth(default): put_filter: simple
dovecot: Jul 09 11:07:33 Error: auth(default): put_simple_filter: "mail=admin@domain.off"
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_send_initial_request
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_send_server_request
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_result ld 0x18529160 msgid -1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList returns ld 0x18529160 NULL
dovecot: Jul 09 11:07:33 Error: auth(default): wait4msg ld 0x18529160 msgid -1 (timeout 0 usec)
dovecot: Jul 09 11:07:33 Error: auth(default): wait4msg continue ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Connections:
dovecot: Jul 09 11:07:33 Error: auth(default): * host: 127.0.0.1 port: 389 (default)
dovecot: Jul 09 11:07:33 Error: auth(default): refcnt: 2 status: Connected
dovecot: Jul 09 11:07:33 Error: auth(default): last used: Wed Jul 9 11:07:33 2008
dovecot: Jul 09 11:07:33 Error: auth(default):
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Outstanding Requests:
dovecot: Jul 09 11:07:33 Error: auth(default): * msgid 2, origid 2, status InProgress
dovecot: Jul 09 11:07:33 Error: auth(default): outstanding referrals 0, parent count 0
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Response Queue:
dovecot: Jul 09 11:07:33 Error: auth(default): Empty
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList returns ld 0x18529160 NULL
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_int_select
dovecot: Jul 09 11:07:33 Error: auth(default): read1msg: ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): read1msg: ld 0x18529160 msgid 2 message type search-entry
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_result ld 0x18529160 msgid -1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList returns ld 0x18529160 NULL
dovecot: Jul 09 11:07:33 Error: auth(default): wait4msg ld 0x18529160 msgid -1 (timeout 0 usec)
dovecot: Jul 09 11:07:33 Error: auth(default): wait4msg continue ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): wait4msg continue ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Connections:
dovecot: Jul 09 11:07:33 Error: auth(default): * host: 127.0.0.1 port: 389 (default)
dovecot: Jul 09 11:07:33 Error: auth(default): refcnt: 2 status: Connected
dovecot: Jul 09 11:07:33 Error: auth(default): last used: Wed Jul 9 11:07:33 2008
dovecot: Jul 09 11:07:33 Error: auth(default):
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Outstanding Requests:
dovecot: Jul 09 11:07:33 Error: auth(default): * msgid 2, origid 2, status InProgress
dovecot: Jul 09 11:07:33 Error: auth(default): outstanding referrals 0, parent count 0
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Response Queue:
dovecot: Jul 09 11:07:33 Error: auth(default): * msgid 2, type 100
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList returns ld 0x18529160 NULL
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_int_select
dovecot: Jul 09 11:07:33 Error: auth(default): read1msg: ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): read1msg: ld 0x18529160 msgid 2 message type search-result
dovecot: Jul 09 11:07:33 Error: auth(default): new result: res_errno: 0, res_error: <>, res_matched: <>
dovecot: Jul 09 11:07:33 Error: auth(default): read1msg: ld 0x18529160 0 new referrals
dovecot: Jul 09 11:07:33 Error: auth(default): read1msg: mark request completed, ld 0x18529160 msgid 2
dovecot: Jul 09 11:07:33 Error: auth(default): request done: ld 0x18529160 msgid 2
dovecot: Jul 09 11:07:33 Error: auth(default): res_errno: 0, res_error: <>, res_matched: <>
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_free_request (origid 2, msgid 2)
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_free_connection 0 1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_free_connection: refcnt 1
dovecot: Jul 09 11:07:33 Error: auth(default): adding response ld 0x18529160 msgid 2 type 101:
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_parse_result
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_first_attribute
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_get_values
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_next_attribute
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_get_values
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_next_attribute
dovecot: Jul 09 11:07:33 Info: auth(default): ldap(admin@domain.off,172.16.1.19): result: clearPassword(password)=<hidden> mail(user)=admin@domain.off
dovecot: Jul 09 11:07:33 Info: auth(default): client out: OK 11 user=admin@domain.off
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_msgfree
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_result ld 0x18529160 msgid -1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList returns ld 0x18529160 NULL
dovecot: Jul 09 11:07:33 Error: auth(default): wait4msg ld 0x18529160 msgid -1 (timeout 0 usec)
dovecot: Jul 09 11:07:33 Error: auth(default): wait4msg continue ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Connections:
dovecot: Jul 09 11:07:33 Error: auth(default): * host: 127.0.0.1 port: 389 (default)
dovecot: Jul 09 11:07:33 Error: auth(default): refcnt: 1 status: Connected
dovecot: Jul 09 11:07:33 Error: auth(default): last used: Wed Jul 9 11:07:33 2008
dovecot: Jul 09 11:07:33 Error: auth(default):
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Outstanding Requests:
dovecot: Jul 09 11:07:33 Error: auth(default): Empty
dovecot: Jul 09 11:07:33 Error: auth(default): ** ld 0x18529160 Response Queue:
dovecot: Jul 09 11:07:33 Error: auth(default): Empty
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList ld 0x18529160 msgid -1 all 1
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_chkResponseList returns ld 0x18529160 NULL
dovecot: Jul 09 11:07:33 Error: auth(default): ldap_int_select
И для полноты картины структура LDAP в которой идёт поиск:
Код: Выделить всё
dn: dc=DOMAIN
dc: DOMAIN
objectClass: top
objectClass: domain
dn: dc=Virtual-Domains,dc=DOMAIN
dc: Virtual-Domains
objectClass: top
objectClass: domain
description: Virtual Email Domains
dn: dc=domain.off,dc=Virtual-Domains,dc=DOMAIN
dc: domain.off
objectClass: top
objectClass: domain
description: domain.off
dn: mail=admin@domain.off,dc=domain.off,dc=Virtual-Domains,dc=DOMAIN
accountStatus: active
clearPassword: 123
mail: admin@domain.off
objectClass: mailUser
objectClass: organizationalPerson
objectClass: top
initials:: 0JLQuNC60YLQvtGA0L7QstC40Yc=
cn:: 0J/RgNC+0YHQutGD0YDQuNC9INCa0LjRgNC40LvQuyDQktC40LrRgtC+0YDQvtCy0LjRhw=
=
givenName:: 0JrQuNGA0LjQu9C7
l:: 0JzQvtGB0LrQstCw
o: ORG
telephoneNumber: 1070
sn:: 0J/RgNC+0YHQutGD0YDQuNC9
title:: 0KHQuNGB0YLQtdC80L3Ri9C5INCQ0LTQvNC40L3QuNGB0YLRgNCw0YLQvtGA