LinuxForum.Fans
Тема

Dovecot авторизация в AD

Автор: l_cho 10 сообщений 3399 просмотров
#276333

Добрый день, приручаю dovecot и AD , но не слишком хорошо все получается , так прошу совета.
Логи
Sep 24 16:44:40 auth(default): Info: new auth connection: pid=1625
Sep 24 16:44:40 auth(default): Info: new auth connection: pid=1626
Sep 24 16:44:40 auth(default): Info: new auth connection: pid=1627

text

dovecot.conf

protocols = imap imaps disable_plaintext_auth = no # info_log_path = /var/log/dovecot.log log_timestamp = "%b %d %H:%M:%S " login_log_format = %$: %s auth_verbose = yes auth_debug_passwords = yes # mail_location = maildir:/var/mail/%u mail_access_groups = mail protocol imap { } auth default { passdb ldap { args = /etc/dovecot/dovecot-ldap.conf } userdb ldap { args = /etc/dovecot/dovecot-ldap.conf } user = mail } mechanisms = plain login plugin { quota = maildir }

dovecot-ldap.conf

hosts = 192.168.2.99 dn = cn=user,DC=OR,DC=LOCAL dnpass = gs debug_level = 1 auth_bind = yes ldap_version = 3 base = dc=OR, dc=LOCAL deref = never scope = subtree user_filter = (&(objectClass=*)(userAccountControl=66048)) pass_filter = (&(objectClass=*)(userAccountControl=66048))

#276372

Увеличел ЛОГ:

text

Sep 25 08:23:32 postman dovecot: dovecot: Killed with signal 15 (by pid=2155 uid=0 code=kill)
Sep 25 08:23:32 postman dovecot: auth(default): ldap_bind
Sep 25 08:23:32 postman dovecot: auth(default): ldap_simple_bind
Sep 25 08:23:32 postman dovecot: auth(default): ldap_sasl_bind
Sep 25 08:23:32 postman dovecot: auth(default): ldap_send_initial_request
Sep 25 08:23:32 postman dovecot: auth(default): ldap_new_connection 1 1 0
Sep 25 08:23:32 postman dovecot: auth(default): ldap_int_open_connection
Sep 25 08:23:32 postman dovecot: auth(default): ldap_connect_to_host: TCP 192.168.2.99:389
Sep 25 08:23:32 postman dovecot: auth(default): ldap_new_socket: 10
Sep 25 08:23:32 postman dovecot: auth(default): ldap_prepare_socket: 10
Sep 25 08:23:32 postman dovecot: auth(default): ldap_connect_to_host: Trying 192.168.2.99:389
Sep 25 08:23:32 postman dovecot: auth(default): ldap_pvt_connect: fd: 10 tm: -1 async: 0
Sep 25 08:23:32 postman dovecot: auth(default): ldap_open_defconn: successful
Sep 25 08:23:32 postman dovecot: auth(default): ldap_send_server_request
Sep 25 08:23:32 postman dovecot: auth(default): ldap_result ld 0x8a4fc58 msgid -1
Sep 25 08:23:32 postman dovecot: auth(default): wait4msg ld 0x8a4fc58 msgid -1 (timeout 0 usec)
Sep 25 08:23:32 postman dovecot: auth(default): wait4msg continue ld 0x8a4fc58 msgid -1 all 1
Sep 25 08:23:32 postman dovecot: auth(default): ** ld 0x8a4fc58 Connections:
Sep 25 08:23:32 postman dovecot: auth(default): * host: 192.168.2.99  port: 389  (default)
Sep 25 08:23:32 postman dovecot: auth(default):   refcnt: 2  status: Connected
Sep 25 08:23:32 postman dovecot: auth(default):   last used: Tue Sep 25 08:23:32 2012
Sep 25 08:23:32 postman dovecot: auth(default):
Sep 25 08:23:32 postman dovecot: auth(default):
Sep 25 08:23:32 postman dovecot: auth(default): ** ld 0x8a4fc58 Outstanding Requests:
Sep 25 08:23:32 postman dovecot: auth(default):  * msgid 1,  origid 1, status InProgress
Sep 25 08:23:32 postman dovecot: auth(default):    outstanding referrals 0, parent count 0
Sep 25 08:23:32 postman dovecot: auth(default):   ld 0x8a4fc58 request count 1 (abandoned 0)
Sep 25 08:23:32 postman dovecot: auth(default): ** ld 0x8a4fc58 Response Queue:
Sep 25 08:23:32 postman dovecot: auth(default):    Empty
Sep 25 08:23:32 postman dovecot: auth(default):   ld 0x8a4fc58 response count 0
Sep 25 08:23:32 postman dovecot: auth(default): ldap_chkResponseList ld 0x8a4fc58 msgid -1 all 1
Sep 25 08:23:32 postman dovecot: auth(default): ldap_chkResponseList returns ld 0x8a4fc58 NULL
Sep 25 08:23:32 postman dovecot: auth(default): ldap_int_select
Sep 25 08:23:32 postman dovecot: auth(default): read1msg: ld 0x8a4fc58 msgid -1 all 1
Sep 25 08:23:32 postman dovecot: auth(default): read1msg: ld 0x8a4fc58 msgid 1 message type bind
Sep 25 08:23:32 postman dovecot: auth(default): read1msg: ld 0x8a4fc58 0 new referrals
Sep 25 08:23:32 postman dovecot: auth(default): read1msg:  mark request completed, ld 0x8a4fc58 msgid 1
Sep 25 08:23:32 postman dovecot: auth(default): request done: ld 0x8a4fc58 msgid 1
Sep 25 08:23:32 postman dovecot: auth(default): res_errno: 49, res_error: <80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 525, vece>, res_match$
Sep 25 08:23:32 postman dovecot: auth(default): ldap_free_request (origid 1, msgid 1)
Sep 25 08:23:32 postman dovecot: auth(default): ldap_parse_result
Sep 25 08:23:32 postman dovecot: auth(default): ldap_err2string
Sep 25 08:23:32 postman dovecot: auth(default): LDAP: binding failed (dn CN=mail,CN=User,DC=betta,DC=EOR,DC=LOCAL): Invalid credentials, 80090308: LdapErr: DSID-0C09033$
Sep 25 08:23:32 postman dovecot: auth(default): ldap_unbind
Sep 25 08:23:32 postman dovecot: auth(default): ldap_free_connection 1 1
Sep 25 08:23:32 postman dovecot: auth(default): ldap_send_unbind
Sep 25 08:23:32 postman dovecot: auth(default): ldap_free_connection: actually freed
Sep 25 08:23:32 postman dovecot: auth(default): ldap_msgfree

#276404

обратите внимание.

"l_cho" написал:
res_errno: 49, res_error: <80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 525, vece>, res_match$
"l_cho" написал:
LDAP: binding failed (dn CN=mail,CN=User,DC=betta,DC=EOR,DC=LOCAL): Invalid credentials, 80090308: LdapErr: DSID-0C09033$

из всего этого думаю больший интерес представляет строка

"l_cho" написал:
LDAP: binding failed (dn CN=mail,CN=User,DC=betta,DC=EOR,DC=LOCAL): Invalid credentials, 80090308: LdapErr: DSID-0C09033$

Есть мнение что это ответ вашего DC вашему dovecot. Проверьте путь к обьекту в AD, логин/пароль администратора (DOMAIN/user домен заглавными обязательно, остальное надо эксперементировать)

#276509

Спасибо osorkon, Dovecot приручил , но вот теперь Postfix не хочет пересылать сообщения.
Логи

text

Sep 26 10:23:43 postman postfix/smtpd[3054]: connect from unknown[192.168.2.1]
Sep 26 10:23:43 postman postfix/smtpd[3054]: NOQUEUE: reject: RCPT from unknown[192.168.2.1]: 554 5.7.1 <lfs@mail.ru>: Relay access denied$

main.cf

text

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

# Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. mydomain = SAM.RU #myorigin = /etc/mailname

smtpd_banner = $myhostname biff = no

# appending .domain is the MUA's job. append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h

readme_directory = no

# TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client.

myhostname = sam.ru alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = SAM.RU, postman.sam.ru,localhost.eor.local, localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 #mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all

mail_spool_directory = /var/mail/

#276513
"l_cho" написал:
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
"l_cho" написал:
RCPT from unknown[192.168.2.1]

продолжать? :)

#276516

Ну да от куда Локалхосту знать где 192.168.2.1
Уже туплю вторую неделю связку налаживаю )

#276528

Связочка работает , МАН выложить тотальный?

#276529

howto? давайте, пригодится

#276531

Howto выдам
Osorkon Вам как всегда огромное человеческое спасибо )

#276532

пожалуйста :) обращайтесь

Войдите или зарегистрируйтесь, чтобы ответить.