dovecot authentication issue
Hi,
I have been trying to get the Dovecot authentication via LDAP to work on my Ubuntu Server 10.04 but with no luck. I have postfix, dovecot, squirrelmail and openLDAP running at the moment on the same server.
My goal is rather than creating new accounts on the server for each of the users (time consuming), I decided to allow a list of users from LDAP to be able to login to the mail server.
The problem I have been having is when a user login to squirrelmail, there are error messages in the mail.log file as follows
Aug 30 17:39:37 server1 dovecot: auth(default): passwd(mike_lee,127.0.0.1): unknown user
Aug 30 17:39:37 server1 dovecot: auth(default): ldap(mike_lee,127.0.0.1): invalid credentials
Aug 30 17:39:44 server1 dovecot: imap-login: Aborted login (auth failed, 1 attempts): user=<mike_lee>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
I do not know why it says unknown user and invalid credentials there. I wonder if anyone might be able to point out where it went wrong.
Here is the details of dovecot-ldap.conf
hosts = localhost
dn = cn=admin,dc=widgetexample,dc=com,dc=au
dnpass = secrets
auth_bind = yes
auth_bind_userdn = cn=%u,ou=accounts,dc=widgetexample,dc=com,dc=au
ldap_version = 3
base = ou=accounts,dc=widgetexample,dc=com,dc=au
deref = never
scope = subtree
user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid
user_filter = (&(objectClass=posixAccount)(uid=%u))
pass_attrs = uid=user,userPassword=password
homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid
pass_filter = (&(objectClass=posixAccount)(uid=%u))
default_pass_scheme = CRYPT
=========================================================
Here is the details of dovecot.conf
base_dir = /var/run/dovecot
protocols = imap
protocol imap {
listen = *:143
}
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl = no
login_dir = /var/run/dovecot/login
login_chroot = yes
login_user = dovecot
mail_location = maildir:/home/%u/Maildir
#mail_uid =
#mail_gid =
mail_privileged_group = mail
verbose_proctitle = yes
#first_valid_uid = 500
#last_valid_uid = 0
#first_valid_gid = 1
#last_valid_gid = 0
mail_save_crlf = no
maildir_copy_with_hardlinks = yes
protocol imap {
imap_client_workarounds = outlook-idle delay-newmail netscape-eoh tb-extra-mailbox-sep
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
protocol managesieve {
}
auth_verbose = yes
auth default {
mechanisms = plain
passdb pam {
}
passdb passwd {
}
passdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}
userdb passwd {
}
userdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}
user = root
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
!include_try /etc/dovecot/auth.d/*.auth
}
dict {
}
plugin {
}
!include_try /etc/dovecot/conf.d/*.conf
=============================================================
Here is the details of main.cf
biff = no
append_dot_mydomain = no
readme_directory = no
myhostname = server1
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server1, server1.widgetexample.com.au, localhost.localdomain, localhost, widgetexample.com.au
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
home_mailbox = Maildir/
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
broken_sasl_auth_clients = yes
I hope the information above would help you to help me out.
Any help is much appreciated.
Thank you
|