2016-02-17 23:56:40 +02:00
|
|
|
###############
|
|
|
|
# General
|
|
|
|
###############
|
2016-02-24 08:44:49 +02:00
|
|
|
log_path = /dev/stderr
|
2016-11-12 17:18:14 +02:00
|
|
|
protocols = imap pop3 lmtp sieve
|
2016-05-29 15:56:18 +02:00
|
|
|
postmaster_address = {{ POSTMASTER }}@{{ DOMAIN }}
|
2017-09-24 17:49:39 +02:00
|
|
|
hostname = {{ HOSTNAMES.split(",")[0] }}
|
2018-03-28 23:03:41 +02:00
|
|
|
submission_host = {{ FRONT_ADDRESS }}
|
2016-02-17 23:56:40 +02:00
|
|
|
|
2016-02-21 16:09:25 +02:00
|
|
|
service dict {
|
|
|
|
unix_listener dict {
|
|
|
|
group = mail
|
|
|
|
mode = 0660
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-20 21:20:02 +02:00
|
|
|
dict {
|
|
|
|
sieve = sqlite:/etc/dovecot/pigeonhole-sieve.dict
|
|
|
|
}
|
|
|
|
|
2016-02-17 23:56:40 +02:00
|
|
|
###############
|
|
|
|
# Mailboxes
|
|
|
|
###############
|
|
|
|
first_valid_gid = 8
|
|
|
|
first_valid_uid = 8
|
2016-02-24 08:44:49 +02:00
|
|
|
mail_location = maildir:/mail/%u
|
|
|
|
mail_home = /mail/%u
|
2016-02-17 23:56:40 +02:00
|
|
|
mail_uid = mail
|
|
|
|
mail_gid = mail
|
|
|
|
mail_privileged_group = mail
|
|
|
|
mail_access_groups = mail
|
2017-01-23 21:54:10 +02:00
|
|
|
maildir_stat_dirs = yes
|
2018-04-21 17:19:44 +02:00
|
|
|
mailbox_list_index = yes
|
|
|
|
mail_vsize_bg_after_count = 100
|
|
|
|
mail_plugins = $mail_plugins quota quota_clone
|
2016-02-17 23:56:40 +02:00
|
|
|
|
2016-02-21 16:07:12 +02:00
|
|
|
namespace inbox {
|
|
|
|
inbox = yes
|
|
|
|
mailbox Trash {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
|
|
|
mailbox Drafts {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Drafts
|
|
|
|
}
|
|
|
|
mailbox Sent {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
mailbox Junk {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Junk
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-21 17:19:44 +02:00
|
|
|
plugin {
|
|
|
|
quota = count:User quota
|
|
|
|
quota_vsizes = yes
|
|
|
|
quota_clone_dict = redis:host={{ REDIS_ADDRESS }}:port=6379:db=1
|
|
|
|
}
|
|
|
|
|
2016-02-17 23:56:40 +02:00
|
|
|
###############
|
|
|
|
# Authentication
|
|
|
|
###############
|
2016-02-24 08:44:49 +02:00
|
|
|
auth_mechanisms = plain login
|
2017-09-24 14:42:40 +02:00
|
|
|
disable_plaintext_auth = no
|
2018-03-19 10:36:03 +02:00
|
|
|
ssl_protocols = !SSLv3
|
2016-02-17 23:56:40 +02:00
|
|
|
|
|
|
|
passdb {
|
|
|
|
driver = sql
|
|
|
|
args = /etc/dovecot/dovecot-sql.conf.ext
|
|
|
|
}
|
|
|
|
|
|
|
|
userdb {
|
|
|
|
driver = sql
|
|
|
|
args = /etc/dovecot/dovecot-sql.conf.ext
|
|
|
|
}
|
|
|
|
|
|
|
|
service auth {
|
|
|
|
user = dovecot
|
|
|
|
unix_listener auth-userdb {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
service auth-worker {
|
|
|
|
unix_listener auth-worker {
|
2016-06-19 21:57:02 +02:00
|
|
|
user = dovecot
|
2016-05-06 19:26:11 +02:00
|
|
|
group = mail
|
2016-02-17 23:56:40 +02:00
|
|
|
mode = 0660
|
|
|
|
}
|
|
|
|
user = mail
|
|
|
|
}
|
|
|
|
|
|
|
|
###############
|
2016-11-12 17:18:14 +02:00
|
|
|
# IMAP & POP
|
2016-02-17 23:56:40 +02:00
|
|
|
###############
|
|
|
|
|
|
|
|
protocol imap {
|
2016-12-11 20:15:09 +02:00
|
|
|
mail_plugins = $mail_plugins imap_quota imap_sieve
|
2016-02-17 23:56:40 +02:00
|
|
|
}
|
|
|
|
|
2016-11-12 17:18:14 +02:00
|
|
|
protocol pop3 {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-02-17 23:56:40 +02:00
|
|
|
service imap-login {
|
|
|
|
inet_listener imap {
|
|
|
|
port = 143
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
###############
|
|
|
|
# Delivery
|
|
|
|
###############
|
|
|
|
|
|
|
|
protocol lmtp {
|
2016-02-21 16:07:12 +02:00
|
|
|
mail_plugins = $mail_plugins sieve
|
2017-09-10 14:09:16 +02:00
|
|
|
recipient_delimiter = {{ RECIPIENT_DELIMITER }}
|
2016-02-17 23:56:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
service lmtp {
|
2016-02-24 08:44:49 +02:00
|
|
|
inet_listener lmtp {
|
|
|
|
port = 2525
|
2016-02-17 23:56:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
###############
|
|
|
|
# Filtering
|
|
|
|
###############
|
|
|
|
|
|
|
|
service managesieve-login {
|
2017-09-24 14:42:40 +02:00
|
|
|
inet_listener sieve {
|
2016-02-17 23:56:40 +02:00
|
|
|
port = 4190
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-18 23:02:42 +02:00
|
|
|
service managesieve {
|
|
|
|
}
|
|
|
|
|
2016-02-17 23:56:40 +02:00
|
|
|
plugin {
|
2017-09-24 14:42:40 +02:00
|
|
|
sieve = file:~/sieve;active=~/.dovecot.sieve
|
2016-12-11 20:15:09 +02:00
|
|
|
sieve_plugins = sieve_extdata sieve_imapsieve sieve_extprograms
|
2018-04-03 22:12:08 +02:00
|
|
|
sieve_global_extensions = +vnd.dovecot.extdata +spamtest +spamtestplus +vnd.dovecot.execute +editheader
|
2017-09-24 14:42:40 +02:00
|
|
|
sieve_before = /var/lib/dovecot/before.sieve
|
|
|
|
sieve_default = /var/lib/dovecot/default.sieve
|
|
|
|
sieve_after = /var/lib/dovecot/after.sieve
|
2016-04-20 21:20:02 +02:00
|
|
|
sieve_extdata_dict_uri = proxy::sieve
|
2016-11-24 13:39:58 +02:00
|
|
|
|
2016-12-11 20:15:09 +02:00
|
|
|
# Sieve execute
|
|
|
|
sieve_execute_bin_dir = /var/lib/dovecot/bin
|
|
|
|
|
2016-11-24 13:39:58 +02:00
|
|
|
# Send vacation replies even for aliases
|
|
|
|
# See the Pigeonhole documentation about warnings: http://wiki2.dovecot.org/Pigeonhole/Sieve/Extensions/Vacation
|
|
|
|
# It appears that our implemntation of mail delivery meets criteria of section 4.5
|
|
|
|
# from RFC 5230 and that disabling the recipient checks is not an issue here.
|
|
|
|
sieve_vacation_dont_check_recipient = yes
|
|
|
|
|
|
|
|
# Include the recipient in vacation replies so that DKIM applies
|
2016-11-23 21:23:39 +02:00
|
|
|
sieve_vacation_send_from_recipient = yes
|
2016-06-19 21:57:02 +02:00
|
|
|
|
2017-11-05 17:54:23 +02:00
|
|
|
# extract spam score from headers
|
|
|
|
sieve_spamtest_status_type = strlen
|
|
|
|
sieve_spamtest_status_header = X-Spam-Level
|
|
|
|
sieve_spamtest_max_value = 15
|
2016-12-11 20:15:09 +02:00
|
|
|
|
|
|
|
# Learn from spam
|
|
|
|
imapsieve_mailbox1_name = Junk
|
|
|
|
imapsieve_mailbox1_causes = COPY
|
|
|
|
imapsieve_mailbox1_before = file:/var/lib/dovecot/report-spam.sieve
|
|
|
|
imapsieve_mailbox2_name = *
|
|
|
|
imapsieve_mailbox2_from = Junk
|
|
|
|
imapsieve_mailbox2_causes = COPY
|
|
|
|
imapsieve_mailbox2_before = file:/var/lib/dovecot/report-ham.sieve
|
2016-09-29 15:34:43 +02:00
|
|
|
}
|
2016-10-18 23:02:42 +02:00
|
|
|
|
2016-08-18 15:58:26 +02:00
|
|
|
###############
|
2016-10-18 23:02:42 +02:00
|
|
|
# Extensions
|
2016-08-18 15:58:26 +02:00
|
|
|
###############
|
|
|
|
|
|
|
|
!include_try /overrides/dovecot.conf
|