178 lines
3.8 KiB
Plaintext
178 lines
3.8 KiB
Plaintext
|
# Dovecot main configuration
|
||
|
# {{ ansible_managed }}
|
||
|
|
||
|
listen = *, [::]
|
||
|
mail_plugins = quota
|
||
|
protocols = pop3 imap sieve lmtp
|
||
|
mail_uid = 2000
|
||
|
mail_gid = 2000
|
||
|
first_valid_uid = 2000
|
||
|
last_valid_uid = 2000
|
||
|
log_path = /var/log/dovecot.log
|
||
|
mail_debug = no
|
||
|
auth_verbose = no
|
||
|
auth_debug = no
|
||
|
auth_debug_passwords = no
|
||
|
auth_verbose_passwords = no
|
||
|
ssl = no
|
||
|
mailbox_list_index = yes
|
||
|
disable_plaintext_auth = no
|
||
|
mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/:VOLATILEDIR=/tmp/dovecot-volatile/%d/%u
|
||
|
auth_default_realm = {{ domain }}
|
||
|
auth_mechanisms = PLAIN LOGIN
|
||
|
haproxy_trusted_networks = {{ trusted_networks }}
|
||
|
haproxy_timeout = 5s
|
||
|
service auth {
|
||
|
unix_listener /var/spool/postfix/private/dovecot-auth {
|
||
|
user = postfix
|
||
|
group = postfix
|
||
|
mode = 0666
|
||
|
}
|
||
|
unix_listener auth-master {
|
||
|
user = vmail
|
||
|
group = vmail
|
||
|
mode = 0666
|
||
|
}
|
||
|
unix_listener auth-userdb {
|
||
|
user = vmail
|
||
|
group = vmail
|
||
|
mode = 0660
|
||
|
}
|
||
|
}
|
||
|
service lmtp {
|
||
|
user = vmail
|
||
|
process_min_avail = 5
|
||
|
executable = lmtp -L
|
||
|
unix_listener /var/spool/postfix/private/dovecot-lmtp {
|
||
|
user = postfix
|
||
|
group = postfix
|
||
|
mode = 0600
|
||
|
}
|
||
|
inet_listener lmtp {
|
||
|
port = 24
|
||
|
}
|
||
|
}
|
||
|
service stats {
|
||
|
unix_listener stats-reader {
|
||
|
user = dovecot
|
||
|
group = postfix
|
||
|
mode = 0660
|
||
|
}
|
||
|
unix_listener stats-writer {
|
||
|
user = dovecot
|
||
|
group = postfix
|
||
|
mode = 0660
|
||
|
}
|
||
|
}
|
||
|
userdb {
|
||
|
args = /etc/dovecot/dovecot-ldap.conf
|
||
|
driver = ldap
|
||
|
}
|
||
|
passdb {
|
||
|
args = /etc/dovecot/dovecot-ldap.conf
|
||
|
driver = ldap
|
||
|
}
|
||
|
plugin {
|
||
|
auth_socket_path = /var/run/dovecot/auth-master
|
||
|
acl = vfile
|
||
|
acl_shared_dict = proxy::acl
|
||
|
sieve_dir = /%Lh/sieve
|
||
|
sieve = /%Lh/sieve/dovecot.sieve
|
||
|
sieve_global_dir = /srv/vmail/sieve
|
||
|
sieve_default = /srv/vmail/sieve/dovecot.sieve
|
||
|
}
|
||
|
service dict {
|
||
|
unix_listener dict {
|
||
|
mode = 0660
|
||
|
user = vmail
|
||
|
group = vmail
|
||
|
}
|
||
|
}
|
||
|
protocol lda {
|
||
|
mail_plugins = $mail_plugins sieve
|
||
|
auth_socket_path = /run/dovecot/auth-master
|
||
|
log_path = /var/log/dovecot.log
|
||
|
lda_mailbox_autocreate = yes
|
||
|
postmaster_address = {{ postmaster }}
|
||
|
}
|
||
|
protocol lmtp {
|
||
|
info_log_path = /var/log/dovecot-lmtp.log
|
||
|
mail_plugins = quota sieve
|
||
|
postmaster_address = {{ postmaster }}
|
||
|
lmtp_save_to_detail_mailbox = yes
|
||
|
recipient_delimiter = +
|
||
|
}
|
||
|
protocol imap {
|
||
|
mail_plugins = $mail_plugins imap_quota
|
||
|
imap_client_workarounds = tb-extra-mailbox-sep
|
||
|
}
|
||
|
protocol pop3 {
|
||
|
mail_plugins = $mail_plugins
|
||
|
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
|
||
|
pop3_uidl_format = %08Xu%08Xv
|
||
|
}
|
||
|
service imap-login {
|
||
|
service_count = 1
|
||
|
process_limit = 500
|
||
|
inet_listener imap {
|
||
|
port = 143
|
||
|
}
|
||
|
{% if haproxy %}
|
||
|
inet_listener imap-haproxy {
|
||
|
port = 10143
|
||
|
haproxy = yes
|
||
|
}
|
||
|
{% endif %}
|
||
|
}
|
||
|
service pop3-login {
|
||
|
service_count = 1
|
||
|
process_limit = 500
|
||
|
inet_listener pop3 {
|
||
|
port = 110
|
||
|
}
|
||
|
{% if haproxy %}
|
||
|
inet_listener pop3-haproxy {
|
||
|
port = 10110
|
||
|
haproxy = yes
|
||
|
}
|
||
|
{% endif %}
|
||
|
}
|
||
|
namespace {
|
||
|
type = private
|
||
|
separator = /
|
||
|
prefix =
|
||
|
inbox = yes
|
||
|
mailbox Sent {
|
||
|
auto = subscribe
|
||
|
special_use = \Sent
|
||
|
}
|
||
|
mailbox "Sent Messages" {
|
||
|
auto = no
|
||
|
special_use = \Sent
|
||
|
}
|
||
|
mailbox Drafts {
|
||
|
auto = subscribe
|
||
|
special_use = \Drafts
|
||
|
}
|
||
|
mailbox Trash {
|
||
|
auto = subscribe
|
||
|
special_use = \Trash
|
||
|
}
|
||
|
mailbox Junk {
|
||
|
auto = subscribe
|
||
|
special_use = \Junk
|
||
|
}
|
||
|
mailbox Spam {
|
||
|
auto = no
|
||
|
special_use = \Junk
|
||
|
}
|
||
|
}
|
||
|
namespace {
|
||
|
type = shared
|
||
|
separator = /
|
||
|
prefix = Shared/%%u/
|
||
|
location = maildir:/%%Lh/Maildir/:INDEX=/%%Lh/Maildir/Shared/%%u:VOLATILEDIR=/tmp/dovecot-volatile/Shared/%%u
|
||
|
subscriptions = yes
|
||
|
list = children
|
||
|
}
|