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 }}
|
2023-08-29 08:18:45 +02:00
|
|
|
{%- if SUBNET6 %}
|
2023-08-28 11:56:25 +02:00
|
|
|
listen = *,::
|
2023-08-29 08:18:45 +02:00
|
|
|
{% else %}
|
2023-08-28 11:56:25 +02:00
|
|
|
listen = *
|
2023-08-29 08:18:45 +02:00
|
|
|
{% endif %}
|
2016-02-17 23:56:40 +02:00
|
|
|
|
2022-11-27 11:59:18 +02:00
|
|
|
default_internal_user = dovecot
|
|
|
|
default_login_user = mail
|
|
|
|
default_internal_group = dovecot
|
|
|
|
|
2023-04-20 15:36:17 +02:00
|
|
|
login_trusted_networks = {{ SUBNET }} {{ SUBNET6 }}
|
2022-12-28 15:17:00 +02:00
|
|
|
|
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
|
2021-06-16 14:56:53 +02:00
|
|
|
mail_plugins = $mail_plugins quota quota_clone{{ ' ' }}
|
|
|
|
{%- if COMPRESSION -%}
|
|
|
|
zlib{{ ' ' }}
|
|
|
|
{%- endif %}
|
2020-06-14 19:06:17 +02:00
|
|
|
{%- if (FULL_TEXT_SEARCH or '').lower() not in ['off', 'false', '0'] -%}
|
2023-10-09 17:15:28 +02:00
|
|
|
fts fts_flatcurve
|
2020-06-14 19:06:17 +02:00
|
|
|
{%- endif %}
|
2020-01-04 19:04:25 +02:00
|
|
|
default_vsz_limit = 2GB
|
2016-02-17 23:56:40 +02:00
|
|
|
|
2016-02-21 16:07:12 +02:00
|
|
|
namespace inbox {
|
|
|
|
inbox = yes
|
2018-07-26 21:41:11 +02:00
|
|
|
{% for mailbox in ("Trash", "Drafts", "Sent", "Junk") %}
|
|
|
|
mailbox {{ mailbox }} {
|
2016-02-21 16:07:12 +02:00
|
|
|
auto = subscribe
|
2018-07-26 21:41:11 +02:00
|
|
|
special_use = \{{ mailbox }}
|
2016-02-21 16:07:12 +02:00
|
|
|
}
|
2018-07-26 21:41:11 +02:00
|
|
|
{% endfor %}
|
2016-02-21 16:07:12 +02:00
|
|
|
}
|
|
|
|
|
2018-04-21 17:19:44 +02:00
|
|
|
plugin {
|
|
|
|
quota = count:User quota
|
|
|
|
quota_vsizes = yes
|
2018-07-26 21:41:11 +02:00
|
|
|
quota_clone_dict = proxy:/tmp/podop.socket:quota
|
2018-08-05 19:48:24 +02:00
|
|
|
|
2020-06-14 19:06:17 +02:00
|
|
|
{% if (FULL_TEXT_SEARCH or '').lower() not in ['off', 'false', '0'] %}
|
2023-10-09 17:15:28 +02:00
|
|
|
fts = flatcurve
|
2023-10-09 17:38:15 +02:00
|
|
|
fts_languages = {% if FULL_TEXT_SEARCH %}{{ FULL_TEXT_SEARCH.split(",") | join(" ") }}{% else %}en{% endif %}
|
|
|
|
fts_tokenizers = generic email-address
|
2020-01-04 19:04:25 +02:00
|
|
|
fts_autoindex = yes
|
|
|
|
fts_enforced = yes
|
|
|
|
fts_autoindex_exclude = \Trash
|
2023-10-09 18:32:28 +02:00
|
|
|
fts_filters = normalizer-icu stopwords
|
|
|
|
fts_filters_en = lowercase english-possessive stopwords
|
2023-10-10 08:20:46 +02:00
|
|
|
fts_filters_fr = lowercase contractions stopwords
|
2023-10-10 08:40:33 +02:00
|
|
|
|
|
|
|
fts_decoder = decode2text
|
2020-06-14 19:06:17 +02:00
|
|
|
{% endif %}
|
2020-01-04 19:04:25 +02:00
|
|
|
|
2021-06-16 14:21:55 +02:00
|
|
|
{% if COMPRESSION in [ 'gz', 'bz2', 'lz4', 'zstd' ] %}
|
2018-08-05 19:48:24 +02:00
|
|
|
zlib_save = {{ COMPRESSION }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if COMPRESSION_LEVEL %}
|
|
|
|
zlib_save_level = {{ COMPRESSION_LEVEL }}
|
|
|
|
{% endif %}
|
2018-04-21 17:19:44 +02:00
|
|
|
}
|
|
|
|
|
2023-10-10 08:40:33 +02:00
|
|
|
{% if FULL_TEXT_SEARCH %}
|
|
|
|
service decode2text {
|
|
|
|
executable = script /usr/libexec/dovecot/decode2text.sh
|
|
|
|
user = nobody
|
|
|
|
unix_listener decode2text {
|
|
|
|
mode = 0666
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{% endif %}
|
|
|
|
|
2016-02-17 23:56:40 +02:00
|
|
|
###############
|
|
|
|
# Authentication
|
|
|
|
###############
|
2018-12-19 17:19:37 +02:00
|
|
|
auth_username_chars =
|
2016-02-24 08:44:49 +02:00
|
|
|
auth_mechanisms = plain login
|
2017-09-24 14:42:40 +02:00
|
|
|
disable_plaintext_auth = no
|
2016-02-17 23:56:40 +02:00
|
|
|
|
|
|
|
passdb {
|
2018-07-26 21:41:11 +02:00
|
|
|
driver = dict
|
|
|
|
args = /etc/dovecot/auth.conf
|
2016-02-17 23:56:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
userdb {
|
2018-07-26 21:41:11 +02:00
|
|
|
driver = dict
|
|
|
|
args = /etc/dovecot/auth.conf
|
2016-02-17 23:56:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
service auth {
|
|
|
|
unix_listener auth-userdb {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
service auth-worker {
|
|
|
|
unix_listener auth-worker {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
###############
|
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
|
2019-02-21 17:15:56 +02:00
|
|
|
mail_max_userip_connections = 20
|
2022-02-03 12:31:33 +02:00
|
|
|
imap_idle_notify_interval = 29mins
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-08 10:26:22 +02:00
|
|
|
service pop3-login {
|
|
|
|
inet_listener pop3 {
|
|
|
|
port = 110
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-02-17 23:56:40 +02:00
|
|
|
###############
|
|
|
|
# Delivery
|
|
|
|
###############
|
2022-11-27 11:49:31 +02:00
|
|
|
recipient_delimiter = {{ RECIPIENT_DELIMITER }}
|
2016-02-17 23:56:40 +02:00
|
|
|
protocol lmtp {
|
2016-02-21 16:07:12 +02:00
|
|
|
mail_plugins = $mail_plugins sieve
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-04 12:01:50 +02:00
|
|
|
protocol sieve {
|
|
|
|
ssl = no
|
|
|
|
}
|
|
|
|
|
2016-10-18 23:02:42 +02:00
|
|
|
service managesieve {
|
2023-01-04 12:01:50 +02:00
|
|
|
process_limit = 1024
|
2016-10-18 23:02:42 +02:00
|
|
|
}
|
|
|
|
|
2016-02-17 23:56:40 +02:00
|
|
|
plugin {
|
2018-10-17 17:41:21 +02:00
|
|
|
sieve = file:~/sieve;active=~/.dovecot.sieve
|
|
|
|
sieve_before = dict:proxy:/tmp/podop.socket:sieve
|
2018-07-26 21:41:11 +02:00
|
|
|
sieve_plugins = sieve_imapsieve sieve_extprograms
|
2018-09-27 14:10:53 +02:00
|
|
|
sieve_extensions = +spamtest +spamtestplus +editheader
|
|
|
|
sieve_global_extensions = +vnd.dovecot.execute
|
2016-11-24 13:39:58 +02:00
|
|
|
|
2016-12-11 20:15:09 +02:00
|
|
|
# Sieve execute
|
2018-09-27 16:13:02 +02:00
|
|
|
sieve_execute_bin_dir = /conf/bin
|
2016-12-11 20:15:09 +02:00
|
|
|
|
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
|
2022-10-19 19:36:13 +02:00
|
|
|
# It appears that our implementation of mail delivery meets criteria of section 4.5
|
2016-11-24 13:39:58 +02:00
|
|
|
# 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
|
|
|
|
2023-01-31 15:53:28 +02:00
|
|
|
# Use To: header from original message becaus envelope has a SRS address
|
|
|
|
sieve_vacation_to_header_ignore_envelope = yes
|
|
|
|
|
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
|
2023-08-15 10:14:27 +02:00
|
|
|
imapsieve_mailbox1_causes = COPY APPEND
|
2018-09-27 16:13:02 +02:00
|
|
|
imapsieve_mailbox1_before = file:/conf/report-spam.sieve
|
2016-12-11 20:15:09 +02:00
|
|
|
imapsieve_mailbox2_name = *
|
|
|
|
imapsieve_mailbox2_from = Junk
|
|
|
|
imapsieve_mailbox2_causes = COPY
|
2018-09-27 16:13:02 +02:00
|
|
|
imapsieve_mailbox2_before = file:/conf/report-ham.sieve
|
2016-09-29 15:34:43 +02:00
|
|
|
}
|
2016-10-18 23:02:42 +02:00
|
|
|
|
2023-06-05 08:47:22 +02:00
|
|
|
service anvil {
|
|
|
|
unix_listener anvil-auth-penalty {
|
|
|
|
mode = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|