# apt-get install dovecot
/etc/dovecot/dovecot-ldap.conf.ext
:
hosts = test.alt:3268 ldap_version = 3 auth_bind = yes dn = cn=vmail,cn=Users,dc=test,dc=alt dnpass = Pa$$word base = cn=Users,dc=test,dc=alt scope = subtree deref = never user_filter = (&(objectClass=user)(|(mail=%Lu)(sAMAccountName=%Lu))) user_attrs = =uid=8,gid=12,mail=user pass_filter = (&(objectClass=user)(|(mail=%Lu)(sAMAccountName=%Lu))) pass_attrs = mail=user
/etc/dovecot/conf.d/10-auth.conf
к виду:
auth_mechanisms = plain !include auth-ldap.conf.ext
/etc/dovecot/conf.d/10-mail.conf
:
mail_location = maildir:/var/mail/%d/%n:UTF-8:INBOX=/var/mail/%d/%n/Inbox mail_uid = mail mail_gid = mail first_valid_uid = 5 first_valid_gid = 5
/etc/dovecot/conf.d/10-master.conf
:
service imap-login { inet_listener imap { port = 0 } inet_listener imaps { } } service pop3-login { inet_listener pop3 { port = 0 } inet_listener pop3s { port = 0 } } service lmtp { unix_listener lmtp { } } service imap { } service pop3 { } service auth { unix_listener auth-userdb { } unix_listener /var/spool/postfix/private/auth { mode = 0600 user = postfix group = postfix } } service auth-worker { } service dict { unix_listener dict { } }
/etc/dovecot/conf.d/15-lda.conf
:
protocol lda { hostname = test.alt postmaster_address = administrator@test.alt }
/etc/dovecot/conf.d/15-mailboxes.conf
:
namespace inbox { inbox = yes mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Trash { auto = subscribe special_use = \Trash } mailbox Sent { auto = subscribe special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } }
/etc/dovecot/conf.d/10-stats.conf
:
service stats { unix_listener stats-reader { user = mail group = mail mode = 0660 } unix_listener stats-writer { user = mail group = mail mode = 0660 } }
# systemctl restart dovecot
# doveconf >/dev/null