Topic: dovecot-ldap + ADS
==== Provide basic information to help troubleshoot ====
- iRedMail version: 0.7.3
- Linux/BSD distribution name and version: CentOS 6.0 2.6.32-71.29.1.el6.x86_64
- Any related log? Log is helpful for troubleshooting.
====
Hello.
I cannot login to dovecot in telnet with next message:
* OK Waiting for authentication process to respond..
* BYE Disconnected for inactivity.
I have next configuration:
1. Windows domain: win-domain.tld
2. Postfix virtual domain: domain2.tld ( this domain name use in mail address in AD)
3. Configs:
- main.cf:
smtpd_sasl_local_domain = domain2.tld
virtual_mailbox_domains = domain2.tld
transport_maps = hash:/etc/postfix/transport
# AD query
smtpd_sender_login_maps = proxy:ldap:/etc/postfix/ad_sender_login_maps.cf
virtual_mailbox_maps = proxy:ldap:/etc/postfix/ad_virtual_mailbox_maps.cf
virtual_alias_maps = proxy:ldap:/etc/postfix/ad_virtual_group_maps.cf
- ad_sender_login_maps.cf:
server_host = dc.win-domain.tld
server_port = 389
version = 3
bind = yes
start_tls = no
bind_dn = vmail
bind_pw = vmail_passw
search_base = dc=win-domain,dc=tld
scope = sub
query_filter = (&(userPrincipalName=%s)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
result_attribute= userPrincipalName
#result_attribute= mail
debuglevel = 0
- ad_virtual_mailbox_maps.cf:
server_host = dc.win-domain.tld
server_port = 389
version = 3
bind = yes
start_tls = no
bind_dn = vmail
bind_pw = vmail_passw
search_base = dc=win-domain,dc=tld
scope = sub
query_filter = (&(objectclass=person)(userPrincipalName=%s))
result_attribute= userPrincipalName
result_format = %d/%u/Maildir/
debuglevel = 0
- ad_virtual_group_maps.cf:
server_host = dc.win-domain.tld
server_port = 389
version = 3
bind = yes
start_tls = no
bind_dn = vmail
bind_pw = vmail_passw
search_base = dc=win-domain,dc=tld
scope = sub
query_filter = (&(objectClass=group)(mail=%s))
special_result_attribute = member
leaf_result_attribute = mail
result_attribute= userPrincipalName
debuglevel = 0
- dovecot-ldap.conf
hosts = dc.win-domain.tld:389
ldap_version = 3
auth_bind = yes
dn = vmail
dnpass = vmail_passw
base = dc=windomain,dc=tld
scope = subtree
deref = never
user_filter = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
user_attrs = homeDirectory=home,mailMessageStore=mail=maildir:/var/vmail/%$/Maildir/,mailQuota=quota_rule=*:bytes=%$
pass_filter = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
pass_attrs = userPassword=password
default_pass_scheme = CRYPT
user_attrs = =home=/var/vmail/vmail1/%Ld/%Ln/Maildir/,=mail=maildir:/var/vmail/vmail1/%Ld/%Ln/Maildir/
4. telnet localhost 143
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
. login user@domain2.tld user_passw
* OK Waiting for authentication process to respond..
* BYE Disconnected for inactivity.
Connection closed by foreign host.
in /var/log/dovecot.log:
Oct 14 13:48:30 auth: Debug: client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=143 rport=57939 resp=AGdyb3NoZXZpQHRkNy5ydQBFRVI1MDc=
Oct 14 13:48:30 auth: Debug: ldap(user@domain2.tld,127.0.0.1): bind search: base=dc=win-domain,dc=tld filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=imapsecured)(|(mail=user@domain2.tld)(&(enabledService=shadowaddress)(shadowAddress=user@domain2.tld))))
Oct 14 13:50:14 imap-login: Info: Disconnected: Inactivity (disconnected while authenticating): method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Oct 14 13:50:14 auth: Debug: client in: CANCEL 1
Thank you.==== Provide basic information to help troubleshoot ====
- iRedMail version:
- Linux/BSD distribution name and version:
- Any related log? Log is helpful for troubleshooting.
====
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.