Reference: http://wiki2.dovecot.org/AuthDatabase/LDAP
aptitude install dovecot-imapd dovecot-pop3d dovecot-ldap
/etc/dovecot/conf.d/10-auth.conf:
... !include auth-ldap.conf.ext ..
/etc/dovecot/conf.d/10-mail.conf:
... mail_uid = 200 mail_gid = 200 ... first_valid_uid = 200 ...
/etc/dovecot/dovecot-ldap.conf.ext:
hosts = localhost auth_bind = yes base = ou=qmail, o=mrzesty user_attrs = =home=/var/qmail/maildirs/%{ldap:mailMessageStore} user_filter = (&(objectClass=qmailUser)(uid=%u)) pass_attrs = =home=/var/qmail/maildirs/%{ldap:mailMessageStore} pass_filter = (&(objectClass=qmailUser)(uid=%u))
Activate fail2ban to block brute force attacks.
<link idref=“44”></link>