What I did to make it work:
First fill in the email-field  into the users domain (ADUC)  properties. So omly users who have a email-adress set  can authenticate. ex:t...@tplk.loc
 
dovecot-ldap.conf:
 
hosts = my.samba.adc:389
dn = cn=mypassword,cn=users,dc=my,dc=domain
dnpass = password
auth_bind = yes
ldap_version = 3
base = cn=Users,dc=tplk,dc=loc
scope = subtree
user_filter = (mail=%u)     ###<--- just look for the user in this field
pass_filter = (mail=%u)
pass_attrs = mail=%u,= userPassword=password
 
Good Luck
Daniel
 
Gesendet: Donnerstag, 02. April 2015 um 09:32 Uhr
Von: "Dániel L." <linux.rendszerg...@gmail.com>
An: users@sogo.nu
Betreff: Re: [SOGo] Dovecot can't authenticate against Samba
Hi Gerald,
 
What do you see in the logs, when trying to login?
 
Open another terminal and check this:
tail -f /var/log/mail.log | grep dovecot
 
rgrds,
Daniel
 
2015-04-02 5:09 GMT+02:00 Gerald Brandt <g...@majentis.com>:
Hi,

I've been following the Openchange 'cookbook' on getting Sogo/Openchange installed, using the inverse PPA.

I've just completed the Dovecot section, and I can't get Dovecot to authenticate at all.

# nc localhost 143
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN] Dovecot (Ubuntu) ready.
1 LOGIN JohnDoe openchange123
1 NO [UNAVAILABLE] Temporary authentication failure. [ubuntu:2015-04-02 03:00:36]


This is my /etc/dovecot/dovecot.conf file:

# cat /etc/dovecot/dovecot.conf
disable_plaintext_auth = no
log_path = /var/log/dovecot.message
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/var/mail/%u
mail_privileged_group = mail
passdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
passdb {
  driver = pam
}
protocols = imap
service auth {
  unix_listener auth-master {
    group = vmail
    mode = 0600
    user = vmail
  }
  unix_listener auth-userdb {
    user = vmail
  }
  user = root
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
userdb {
  driver = passwd
}
protocol lda {
  hostname = oc.local
  log_path = /var/log/dovecot.message
  postmaster_address = postmaster@oc.local
}

protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}


and this is my /etc/dovecot/dovecot-ldap.conf file:

# cat /etc/dovecot/dovecot-ldap.conf
uris = ldap://localhost
dn = cn=administrator,dc=erlphase,dc=com
dnpass = openchange1!
tls = no
ldap_version = 3
base = dc=oc,dc=local
scope = subtree
user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid
user_filter = (uid=%u)
pass_attrs = uid=user,userPassword=password
pass_filter = (uid=%u)


Any helpful hints or directions I could look would be appreciated.

Gerald
--
users@sogo.nu
https://inverse.ca/sogo/lists

Reply via email to