DOVECOT & LDAP

5 May

Dengan memantau server menggunakan tail -f /var/log/messages, ternyata ada error sebagai berikut :

Apr 28 14:41:44 linux dovecot(pam_unix)[13395]: authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=SEAG
Apr 28 15:46:52 linux dovecot(pam_unix)[14785]: authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=iker
Apr 29 11:08:27 linux dovecot(pam_unix)[26859]: authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=INRA

hal ini terjadi karena user – user itu memang tidak didaftarkan pada authentification pam_unix, saya menggunakan SSO [single sign on] dengan LDAP
cara mengatasi error juga sangat simple [kalau sudah tahu], caranya sebagai berikut :

1. edit /etc/dovecot.conf
# mv /etc/dovecot.conf /etc/dovecot.conf.asli
# vi /etc/dovecot.conf
protocol managesieve {
sieve=~/.dovecot.sieve
sieve_storage=~/sieve
}

protocol lda {
postmaster_address = root@ubslinux.com
}

auth default {
mechanisms = plain
passdb ldap {
args = /etc/dovecot-ldap.conf
}

userdb ldap {
args = /etc/dovecot-ldap.conf
}
user = root
}
protocols = pop3 pop3s imap imaps
mail_location = maildir:~/Maildir
valid_chroot_dirs = /home

2. buat file /etc/dovecot-ldap.conf
vi /etc/dovecot-ldap.conf
hosts = localhost
dn = cn=Manager,dc=ubslinux,dc=com
dnpass = password
tls = no
ldap_version = 2
base = uid=%u,ou=people,dc=ubslinux,dc=com
scope = subtree
pass_attrs = uid=user,userPassword=password
default_pass_scheme = CRYPT

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: