>Что-то мне подсказывает, что лдап тут не работает. Мне что-то подсказывает, что
>userdb в данном случае работает при помощи имапа эксчейнджа.
>
>Для эктив дайректори нужно лдап на порт 3268 биндить.
>
>http://wiki.dovecot.org/AuthDatabase/LDAP/AuthBinds вот тут, кстати, чуть другой темплейт. ldapsearch уже заставили выбирать из
>активдайректори? Сорри, я пропустил главные строчки в dovecot-ldap.conf
hosts = 10.0.29.2:389 10.0.29.3:389
На самом деле лдап работает, потому как если закоментировать dovecot-imap.conf, то аутентификация SMTP проходит успешно.
Проблему вижу в следующем.
Вот здесь написано http://wiki.dovecot.org/PasswordDatabase/ExtraFields/Proxy
Password forwarding
Make sure that the authentication succeeds with any given password. You can do this by using empty passwords. v1.1+ requires also that you return nopassword field.
Ну я взял и прописал в файле dovecot-imap.conf следующее
%u:{PLAIN}:0:0::::proxy host=10.0.10.3 port=143
Ниже приведу лог, с включенный auth debug
Oct 2 09:20:11 relay dovecot: auth(default): new auth connection: pid=60178
Oct 2 09:20:44 relay dovecot: auth(default): new auth connection: pid=60182
Oct 2 09:20:45 relay dovecot: auth(default): client in: AUTH 1 PLAIN service=imap secured lip=external_ip rip=199.0.149.3 lport=993 rport=27958 resp=<hidden>
Oct 2 09:20:45 relay dovecot: auth(default): passwd-file /usr/local/etc/dovecot-imap.conf: Read 1 users
Oct 2 09:20:45 relay dovecot: auth(default): passwd-file(user1@example.com,199.0.149.3): lookup: user=user1@example.com file=/usr/local/etc/dovecot-imap.conf
Oct 2 09:20:45 relay dovecot: auth(default): passwd-file(user1@example.com,199.0.149.3): unknown user
Oct 2 09:20:45 relay dovecot: auth(default): ldap_bind
Oct 2 09:20:45 relay dovecot: auth(default): ldap_simple_bind
Oct 2 09:20:45 relay dovecot: auth(default): ldap_sasl_bind
Oct 2 09:20:45 relay dovecot: auth(default): ldap_send_initial_request
Oct 2 09:20:45 relay dovecot: auth(default): ldap_send_server_request
Oct 2 09:20:45 relay dovecot: auth(default): ldap_result ld 0x185290c0 msgid -1
Oct 2 09:20:45 relay dovecot: auth(default): ldap_chkResponseList ld 0x185290c0 msgid -1 all 1
Oct 2 09:20:45 relay dovecot: auth(default): ldap_chkResponseList returns ld 0x185290c0 NULL
Oct 2 09:20:45 relay dovecot: auth(default): wait4msg ld 0x185290c0 msgid -1 (timeout 0 usec)
Oct 2 09:20:45 relay dovecot: auth(default): wait4msg continue ld 0x185290c0 msgid -1 all 1
Oct 2 09:20:45 relay dovecot: auth(default): ** ld 0x185290c0 Connections:
Oct 2 09:20:45 relay dovecot: auth(default): * host: 10.0.29.2 port: 389 (default)
Oct 2 09:20:45 relay dovecot: auth(default): refcnt: 2 status: Connected
Oct 2 09:20:45 relay dovecot: auth(default): last used: Fri Oct 2 09:20:45 2009
Oct 2 09:20:45 relay dovecot: auth(default):
Oct 2 09:20:45 relay dovecot: auth(default): ** ld 0x185290c0 Outstanding Requests:
Oct 2 09:20:45 relay dovecot: auth(default): * msgid 2, origid 2, status InProgress
Oct 2 09:20:45 relay dovecot: auth(default): outstanding referrals 0, parent count 0
Oct 2 09:20:45 relay dovecot: auth(default): ** ld 0x185290c0 Response Queue:
Oct 2 09:20:45 relay dovecot: auth(default): Empty
Oct 2 09:20:45 relay dovecot: auth(default): ldap_chkResponseList ld 0x185290c0 msgid -1 all 1
Oct 2 09:20:45 relay dovecot: auth(default): ldap_chkResponseList returns ld 0x185290c0 NULL
Oct 2 09:20:45 relay dovecot: auth(default): ldap_int_select
Oct 2 09:20:45 relay dovecot: auth(default): read1msg: ld 0x185290c0 msgid -1 all 1
Oct 2 09:20:45 relay dovecot: auth(default): read1msg: ld 0x185290c0 msgid 2 message type bind
Oct 2 09:20:45 relay dovecot: auth(default): ldap_chase_referrals
Oct 2 09:20:45 relay dovecot: auth(default): read1msg: V2 referral chased, mark request completed, id = 2
Oct 2 09:20:45 relay dovecot: auth(default): new result: res_errno: 49, res_error: <80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 525, vece>, res_matched: <>
Oct 2 09:20:45 relay dovecot: auth(default): read1msg: ld 0x185290c0 0 new referrals
Oct 2 09:20:45 relay dovecot: auth(default): read1msg: mark request completed, ld 0x185290c0 msgid 2
Oct 2 09:20:45 relay dovecot: auth(default): request done: ld 0x185290c0 msgid 2
Oct 2 09:20:45 relay dovecot: auth(default): res_errno: 49, res_error: <80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 525, vece>, res_matched: <>
Oct 2 09:20:45 relay dovecot: auth(default): ldap_free_request (origid 2, msgid 2)
Oct 2 09:20:45 relay dovecot: auth(default): ldap_free_connection 0 1
Oct 2 09:20:45 relay dovecot: auth(default): ldap_free_connection: refcnt 1
Oct 2 09:20:45 relay dovecot: auth(default): ldap_parse_result
Oct 2 09:20:45 relay dovecot: auth(default): ldap_parse_result
Oct 2 09:20:45 relay dovecot: auth(default): ldap(user1@example.com,199.0.149.3): invalid credentials
Oct 2 09:20:45 relay dovecot: auth(default): ldap_msgfree
Oct 2 09:20:45 relay dovecot: auth(default): ldap_result ld 0x185290c0 msgid -1
Oct 2 09:20:45 relay dovecot: auth(default): ldap_chkResponseList ld 0x185290c0 msgid -1 all 1
Oct 2 09:20:45 relay dovecot: auth(default): ldap_chkResponseList returns ld 0x185290c0 NULL
Oct 2 09:20:45 relay dovecot: auth(default): wait4msg ld 0x185290c0 msgid -1 (timeout 0 usec)
Oct 2 09:20:45 relay dovecot: auth(default): wait4msg continue ld 0x185290c0 msgid -1 all 1
Oct 2 09:20:45 relay dovecot: auth(default): ** ld 0x185290c0 Connections:
Oct 2 09:20:45 relay dovecot: auth(default): * host: 10.0.29.2 port: 389 (default)
Oct 2 09:20:45 relay dovecot: auth(default): refcnt: 1 status: Connected
Oct 2 09:20:45 relay dovecot: auth(default): last used: Fri Oct 2 09:20:45 2009
Oct 2 09:20:45 relay dovecot: auth(default):
Oct 2 09:20:45 relay dovecot: auth(default): ** ld 0x185290c0 Outstanding Requests:
Oct 2 09:20:45 relay dovecot: auth(default): Empty
Oct 2 09:20:45 relay dovecot: auth(default): ** ld 0x185290c0 Response Queue:
Oct 2 09:20:45 relay dovecot: auth(default): Empty
Oct 2 09:20:45 relay dovecot: auth(default): ldap_chkResponseList ld 0x185290c0 msgid -1 all 1
Oct 2 09:20:45 relay dovecot: auth(default): ldap_chkResponseList returns ld 0x185290c0 NULL
Oct 2 09:20:45 relay dovecot: auth(default): ldap_int_select
Oct 2 09:20:47 relay dovecot: auth(default): client out: FAIL 1 user=user1@example.com
КАкие предложения?