2017-07-10 09:19:12 +02:00
|
|
|
# --------------------------------------------------------------------------
|
|
|
|
# Please create a file "extra.conf" for persistent overrides to dovecot.conf
|
|
|
|
# --------------------------------------------------------------------------
|
2018-11-26 09:06:34 +01:00
|
|
|
# LDAP example:
|
|
|
|
#passdb {
|
2019-07-28 21:36:09 +02:00
|
|
|
# args = /etc/dovecot/ldap/passdb.conf
|
2018-11-26 09:06:34 +01:00
|
|
|
# driver = ldap
|
|
|
|
#}
|
|
|
|
|
2017-03-02 11:23:23 +01:00
|
|
|
auth_mechanisms = plain login
|
|
|
|
#mail_debug = yes
|
2018-02-27 20:54:46 +01:00
|
|
|
#auth_debug = yes
|
2017-05-06 23:42:07 +02:00
|
|
|
log_path = syslog
|
2017-03-02 11:23:23 +01:00
|
|
|
disable_plaintext_auth = yes
|
|
|
|
# Uncomment on NFS share
|
|
|
|
#mmap_disable = yes
|
|
|
|
#mail_fsync = always
|
|
|
|
#mail_nfs_index = yes
|
|
|
|
#mail_nfs_storage = yes
|
|
|
|
login_log_format_elements = "user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k"
|
2018-11-12 09:52:12 +01:00
|
|
|
mail_home = /var/vmail/%d/%n
|
2018-11-12 21:00:39 +01:00
|
|
|
mail_location = maildir:~/
|
2019-07-28 21:36:09 +02:00
|
|
|
mail_plugins = </etc/dovecot/mail_plugins
|
2018-11-12 09:52:12 +01:00
|
|
|
mail_attachment_fs = crypt:set_prefix=mail_crypt_global:posix:
|
|
|
|
mail_attachment_dir = /var/attachments
|
|
|
|
mail_attachment_min_size = 128k
|
2021-03-13 19:46:32 +01:00
|
|
|
# Significantly speeds up very large mailboxes, but is only safe to enable if
|
2021-05-03 01:39:26 +02:00
|
|
|
# you do not manually modify the files in the `cur` directories in
|
|
|
|
# mailcowdockerized_vmail-vol-1.
|
2023-05-10 20:32:38 +02:00
|
|
|
# https://docs.mailcow.email/manual-guides/Dovecot/u_e-dovecot-performance/
|
2021-08-29 05:02:39 +02:00
|
|
|
maildir_very_dirty_syncs = yes
|
2018-01-14 10:44:06 +01:00
|
|
|
|
2018-01-09 11:28:12 +01:00
|
|
|
# Dovecot 2.2
|
2018-04-26 12:36:13 +02:00
|
|
|
#ssl_protocols = !SSLv3
|
2018-01-09 11:28:12 +01:00
|
|
|
# Dovecot 2.3
|
2020-02-12 09:12:24 +01:00
|
|
|
ssl_min_protocol = TLSv1.2
|
2018-01-14 10:44:06 +01:00
|
|
|
|
2017-03-02 11:23:23 +01:00
|
|
|
ssl_prefer_server_ciphers = yes
|
2018-06-26 07:50:17 +02:00
|
|
|
ssl_cipher_list = ALL:!ADH:!LOW:!SSLv2:!SSLv3:!EXP:!aNULL:!eNULL:!3DES:!MD5:!PSK:!DSS:!RC4:!SEED:!IDEA:+HIGH:+MEDIUM
|
2018-01-14 10:44:06 +01:00
|
|
|
|
2018-01-09 11:28:12 +01:00
|
|
|
# Default in Dovecot 2.3
|
2019-09-06 12:39:33 +02:00
|
|
|
ssl_options = no_compression no_ticket
|
2018-01-14 10:44:06 +01:00
|
|
|
|
2018-01-09 11:28:12 +01:00
|
|
|
# New in Dovecot 2.3
|
2020-04-30 18:22:21 +02:00
|
|
|
ssl_dh = </etc/ssl/mail/dhparams.pem
|
2018-01-14 10:44:06 +01:00
|
|
|
# Dovecot 2.2
|
2018-04-26 12:36:13 +02:00
|
|
|
#ssl_dh_parameters_length = 2048
|
2017-03-02 11:23:23 +01:00
|
|
|
log_timestamp = "%Y-%m-%d %H:%M:%S "
|
|
|
|
recipient_delimiter = +
|
|
|
|
auth_master_user_separator = *
|
2017-09-14 13:32:11 +02:00
|
|
|
mail_shared_explicit_inbox = yes
|
2017-03-02 11:23:23 +01:00
|
|
|
mail_prefetch_count = 30
|
2019-12-02 11:02:19 +01:00
|
|
|
passdb {
|
2019-12-03 18:50:45 +01:00
|
|
|
driver = lua
|
2021-06-04 14:27:33 +02:00
|
|
|
args = file=/etc/dovecot/lua/passwd-verify.lua blocking=yes
|
2018-11-26 09:06:34 +01:00
|
|
|
result_success = return-ok
|
|
|
|
result_failure = continue
|
|
|
|
result_internalfail = continue
|
2017-03-02 11:23:23 +01:00
|
|
|
}
|
2021-06-04 14:27:33 +02:00
|
|
|
# try a master passwd
|
2018-12-10 23:25:37 +01:00
|
|
|
passdb {
|
|
|
|
driver = passwd-file
|
2019-07-28 21:36:09 +02:00
|
|
|
args = /etc/dovecot/dovecot-master.passwd
|
2021-06-04 14:27:33 +02:00
|
|
|
master = yes
|
2018-12-10 23:25:37 +01:00
|
|
|
skip = authenticated
|
|
|
|
}
|
2021-06-04 14:27:33 +02:00
|
|
|
# check for regular password - if empty (e.g. force-passwd-reset), previous pass=yes passdbs also fail
|
|
|
|
# a return of the following passdb is mandatory
|
|
|
|
passdb {
|
|
|
|
driver = lua
|
|
|
|
args = file=/etc/dovecot/lua/passwd-verify.lua blocking=yes
|
|
|
|
}
|
2017-07-10 21:30:45 +02:00
|
|
|
# Set doveadm_password=your-secret-password in data/conf/dovecot/extra.conf (create if missing)
|
|
|
|
service doveadm {
|
|
|
|
inet_listener {
|
|
|
|
port = 12345
|
|
|
|
}
|
2020-02-05 11:01:50 +01:00
|
|
|
vsz_limit=2048 MB
|
2017-07-10 21:30:45 +02:00
|
|
|
}
|
2021-06-08 13:14:47 +02:00
|
|
|
!include /etc/dovecot/dovecot.folders.conf
|
2017-03-02 11:23:23 +01:00
|
|
|
protocols = imap sieve lmtp pop3
|
|
|
|
service dict {
|
|
|
|
unix_listener dict {
|
|
|
|
mode = 0660
|
|
|
|
user = vmail
|
|
|
|
group = vmail
|
|
|
|
}
|
|
|
|
}
|
2017-11-05 12:18:52 +01:00
|
|
|
service log {
|
|
|
|
user = dovenull
|
|
|
|
}
|
2018-11-12 09:52:12 +01:00
|
|
|
service config {
|
|
|
|
unix_listener config {
|
|
|
|
user = root
|
|
|
|
group = vmail
|
|
|
|
mode = 0660
|
|
|
|
}
|
|
|
|
}
|
2017-03-02 11:23:23 +01:00
|
|
|
service auth {
|
|
|
|
inet_listener auth-inet {
|
|
|
|
port = 10001
|
|
|
|
}
|
|
|
|
unix_listener auth-master {
|
|
|
|
mode = 0600
|
|
|
|
user = vmail
|
|
|
|
}
|
|
|
|
unix_listener auth-userdb {
|
|
|
|
mode = 0600
|
|
|
|
user = vmail
|
|
|
|
}
|
2021-02-11 09:31:53 +01:00
|
|
|
vsz_limit = 2G
|
2017-03-02 11:23:23 +01:00
|
|
|
}
|
|
|
|
service managesieve-login {
|
|
|
|
inet_listener sieve {
|
|
|
|
port = 4190
|
|
|
|
}
|
2020-11-19 16:02:05 +01:00
|
|
|
inet_listener sieve_haproxy {
|
|
|
|
port = 14190
|
|
|
|
haproxy = yes
|
|
|
|
}
|
2017-03-02 11:23:23 +01:00
|
|
|
service_count = 1
|
|
|
|
process_min_avail = 2
|
2018-11-12 21:00:39 +01:00
|
|
|
vsz_limit = 1G
|
2017-11-05 12:18:52 +01:00
|
|
|
}
|
|
|
|
service imap-login {
|
|
|
|
service_count = 1
|
2018-12-06 16:47:41 +01:00
|
|
|
process_limit = 10000
|
2018-11-12 21:00:39 +01:00
|
|
|
vsz_limit = 1G
|
2017-11-05 12:18:52 +01:00
|
|
|
user = dovenull
|
2020-07-04 19:30:40 +02:00
|
|
|
inet_listener imap_haproxy {
|
|
|
|
port = 10143
|
|
|
|
haproxy = yes
|
|
|
|
}
|
|
|
|
inet_listener imaps_haproxy {
|
|
|
|
port = 10993
|
|
|
|
ssl = yes
|
|
|
|
haproxy = yes
|
|
|
|
}
|
2017-11-05 12:18:52 +01:00
|
|
|
}
|
|
|
|
service pop3-login {
|
|
|
|
service_count = 1
|
2018-11-12 21:00:39 +01:00
|
|
|
vsz_limit = 1G
|
2020-07-04 19:30:40 +02:00
|
|
|
inet_listener pop3_haproxy {
|
|
|
|
port = 10110
|
|
|
|
haproxy = yes
|
|
|
|
}
|
|
|
|
inet_listener pop3s_haproxy {
|
|
|
|
port = 10995
|
|
|
|
ssl = yes
|
|
|
|
haproxy = yes
|
|
|
|
}
|
2017-03-02 11:23:23 +01:00
|
|
|
}
|
|
|
|
service imap {
|
2021-06-08 13:14:47 +02:00
|
|
|
executable = imap
|
[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)
[Docker API] Create pipe to pass Rspamd UI worker password
[Dovecot] Pull Spamassassin ruleset to be read by Rspamd (MANY THANKS to Peer Heinlein!)
[Dovecot] Garbage collector for deleted maildirs (set keep time via MAILDIR_GC_TIME which defaults to 1440 minutes)
[Web] Flush memcached after mailbox item changes, fixes #1808
[Web] Fix duplicate IDs, fixes #1792
[Compose] Use SQL sockets
[PHP-FPM] Update APCu and Redis libs
[Dovecot] Encrypt maildir with global key pair in crypt-vol-1 (BACKUP!), also fixes #1791
[Web] Fix deletion of spam aliases
[Helper] Add "crypt" to backup script
[Helper] Override file for external SQL socket (not supported!)
[Compose] New images for Rspamd, PHP-FPM, SOGo, Dovecot, Docker API, Watchdog, ACME, Postfix
2018-09-29 22:01:23 +02:00
|
|
|
user = vmail
|
2018-11-12 21:00:39 +01:00
|
|
|
vsz_limit = 1G
|
2017-03-02 11:23:23 +01:00
|
|
|
}
|
|
|
|
service managesieve {
|
|
|
|
process_limit = 256
|
|
|
|
}
|
|
|
|
service lmtp {
|
|
|
|
inet_listener lmtp-inet {
|
|
|
|
port = 24
|
|
|
|
}
|
|
|
|
user = vmail
|
|
|
|
}
|
|
|
|
listen = *,[::]
|
|
|
|
ssl_cert = </etc/ssl/mail/cert.pem
|
|
|
|
ssl_key = </etc/ssl/mail/key.pem
|
2018-12-10 23:25:37 +01:00
|
|
|
userdb {
|
|
|
|
driver = passwd-file
|
2019-07-28 21:36:09 +02:00
|
|
|
args = /etc/dovecot/dovecot-master.userdb
|
2018-12-10 23:25:37 +01:00
|
|
|
}
|
2017-03-02 11:23:23 +01:00
|
|
|
userdb {
|
2019-07-28 21:36:09 +02:00
|
|
|
args = /etc/dovecot/sql/dovecot-dict-sql-userdb.conf
|
2017-03-02 11:23:23 +01:00
|
|
|
driver = sql
|
2018-12-10 23:25:37 +01:00
|
|
|
skip = found
|
2017-03-02 11:23:23 +01:00
|
|
|
}
|
|
|
|
protocol imap {
|
2019-07-28 21:36:09 +02:00
|
|
|
mail_plugins = </etc/dovecot/mail_plugins_imap
|
2018-02-05 21:42:23 +01:00
|
|
|
imap_metadata = yes
|
2017-03-02 11:23:23 +01:00
|
|
|
}
|
2018-02-05 21:42:23 +01:00
|
|
|
mail_attribute_dict = file:%h/dovecot-attributes
|
2017-03-02 11:23:23 +01:00
|
|
|
protocol lmtp {
|
2019-07-28 21:36:09 +02:00
|
|
|
mail_plugins = </etc/dovecot/mail_plugins_lmtp
|
|
|
|
auth_socket_path = /var/run/dovecot/auth-master
|
2017-03-02 11:23:23 +01:00
|
|
|
}
|
|
|
|
protocol sieve {
|
|
|
|
managesieve_logout_format = bytes=%i/%o
|
|
|
|
}
|
|
|
|
plugin {
|
2018-08-17 21:44:17 +02:00
|
|
|
# Allow "any" or "authenticated" to be used in ACLs
|
2019-07-28 21:36:09 +02:00
|
|
|
acl_anyone = </etc/dovecot/acl_anyone
|
2017-03-02 11:23:23 +01:00
|
|
|
acl_shared_dict = file:/var/vmail/shared-mailboxes.db
|
|
|
|
acl = vfile
|
2021-06-08 13:14:47 +02:00
|
|
|
acl_user = %u
|
2019-01-16 10:50:34 +01:00
|
|
|
fts = solr
|
|
|
|
fts_autoindex = yes
|
2019-03-10 09:40:31 +01:00
|
|
|
fts_solr = url=http://solr:8983/solr/dovecot-fts/
|
2017-03-02 11:23:23 +01:00
|
|
|
quota = dict:Userquota::proxy::sqlquota
|
|
|
|
quota_rule2 = Trash:storage=+100%%
|
2022-09-02 10:24:49 +02:00
|
|
|
sieve = /var/vmail/sieve/%u.sieve
|
2017-04-05 22:22:23 +02:00
|
|
|
sieve_plugins = sieve_imapsieve sieve_extprograms
|
2018-08-13 08:31:09 +02:00
|
|
|
sieve_vacation_send_from_recipient = yes
|
2019-05-18 09:18:00 +02:00
|
|
|
sieve_redirect_envelope_from = recipient
|
2017-04-05 22:22:23 +02:00
|
|
|
# From elsewhere to Spam folder
|
|
|
|
imapsieve_mailbox1_name = Junk
|
|
|
|
imapsieve_mailbox1_causes = COPY
|
2019-07-28 21:36:09 +02:00
|
|
|
imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve
|
2017-04-05 22:22:23 +02:00
|
|
|
# END
|
|
|
|
# From Spam folder to elsewhere
|
|
|
|
imapsieve_mailbox2_name = *
|
|
|
|
imapsieve_mailbox2_from = Junk
|
|
|
|
imapsieve_mailbox2_causes = COPY
|
2019-07-28 21:36:09 +02:00
|
|
|
imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve
|
2017-04-05 22:22:23 +02:00
|
|
|
# END
|
2021-06-08 13:14:47 +02:00
|
|
|
master_user = %u
|
2019-02-04 23:59:31 +01:00
|
|
|
quota_warning = storage=95%% quota-warning 95 %u
|
|
|
|
quota_warning2 = storage=80%% quota-warning 80 %u
|
2019-07-28 21:36:09 +02:00
|
|
|
sieve_pipe_bin_dir = /usr/lib/dovecot/sieve
|
2019-02-25 10:22:00 +01:00
|
|
|
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute
|
2019-12-31 14:24:33 +01:00
|
|
|
sieve_extensions = +notify +imapflags +vacation-seconds +editheader
|
2017-03-02 11:23:23 +01:00
|
|
|
sieve_max_script_size = 1M
|
2020-07-15 15:28:14 +02:00
|
|
|
sieve_max_redirects = 100
|
|
|
|
sieve_max_actions = 101
|
2017-03-02 11:23:23 +01:00
|
|
|
sieve_quota_max_scripts = 0
|
|
|
|
sieve_quota_max_storage = 0
|
2021-06-23 14:17:39 +02:00
|
|
|
listescape_char = "\\"
|
2018-07-23 19:59:23 +02:00
|
|
|
sieve_vacation_min_period = 5s
|
|
|
|
sieve_vacation_max_period = 0
|
|
|
|
sieve_vacation_default_period = 60s
|
2019-06-01 13:53:24 +02:00
|
|
|
sieve_before = /var/vmail/sieve/global_sieve_before.sieve
|
|
|
|
sieve_before2 = dict:proxy::sieve_before;name=active;bindir=/var/vmail/sieve_before_bindir
|
2017-11-05 12:18:52 +01:00
|
|
|
sieve_after = dict:proxy::sieve_after;name=active;bindir=/var/vmail/sieve_after_bindir
|
2019-06-01 13:53:24 +02:00
|
|
|
sieve_after2 = /var/vmail/sieve/global_sieve_after.sieve
|
2020-11-06 12:25:09 +01:00
|
|
|
sieve_duplicate_default_period = 1m
|
2020-10-11 10:35:29 +02:00
|
|
|
sieve_duplicate_max_period = 7d
|
[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)
[Docker API] Create pipe to pass Rspamd UI worker password
[Dovecot] Pull Spamassassin ruleset to be read by Rspamd (MANY THANKS to Peer Heinlein!)
[Dovecot] Garbage collector for deleted maildirs (set keep time via MAILDIR_GC_TIME which defaults to 1440 minutes)
[Web] Flush memcached after mailbox item changes, fixes #1808
[Web] Fix duplicate IDs, fixes #1792
[Compose] Use SQL sockets
[PHP-FPM] Update APCu and Redis libs
[Dovecot] Encrypt maildir with global key pair in crypt-vol-1 (BACKUP!), also fixes #1791
[Web] Fix deletion of spam aliases
[Helper] Add "crypt" to backup script
[Helper] Override file for external SQL socket (not supported!)
[Compose] New images for Rspamd, PHP-FPM, SOGo, Dovecot, Docker API, Watchdog, ACME, Postfix
2018-09-29 22:01:23 +02:00
|
|
|
|
|
|
|
# -- Global keys
|
|
|
|
mail_crypt_global_private_key = </mail_crypt/ecprivkey.pem
|
|
|
|
mail_crypt_global_public_key = </mail_crypt/ecpubkey.pem
|
|
|
|
mail_crypt_save_version = 2
|
|
|
|
|
2018-06-08 09:09:31 +02:00
|
|
|
# Enable compression while saving, lz4 Dovecot v2.2.11+
|
|
|
|
zlib_save = lz4
|
2018-11-12 21:00:39 +01:00
|
|
|
|
|
|
|
mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
|
|
|
|
mail_log_fields = uid box msgid size
|
|
|
|
mail_log_cached_only = yes
|
2024-01-30 10:15:33 +01:00
|
|
|
|
|
|
|
# Try set mail_replica
|
|
|
|
!include_try /etc/dovecot/mail_replica.conf
|
2017-03-02 11:23:23 +01:00
|
|
|
}
|
2019-02-04 23:59:31 +01:00
|
|
|
service quota-warning {
|
|
|
|
executable = script /usr/local/bin/quota_notify.py
|
|
|
|
# use some unprivileged user for executing the quota warnings
|
|
|
|
user = vmail
|
|
|
|
unix_listener quota-warning {
|
|
|
|
user = vmail
|
|
|
|
}
|
|
|
|
}
|
2017-03-02 11:23:23 +01:00
|
|
|
dict {
|
2019-07-28 21:36:09 +02:00
|
|
|
sqlquota = mysql:/etc/dovecot/sql/dovecot-dict-sql-quota.conf
|
|
|
|
sieve_after = mysql:/etc/dovecot/sql/dovecot-dict-sql-sieve_after.conf
|
|
|
|
sieve_before = mysql:/etc/dovecot/sql/dovecot-dict-sql-sieve_before.conf
|
2017-03-02 11:23:23 +01:00
|
|
|
}
|
|
|
|
remote 127.0.0.1 {
|
|
|
|
disable_plaintext_auth = no
|
|
|
|
}
|
|
|
|
submission_host = postfix:588
|
|
|
|
mail_max_userip_connections = 500
|
2018-06-20 07:25:10 +02:00
|
|
|
service stats {
|
|
|
|
unix_listener stats-writer {
|
|
|
|
mode = 0660
|
|
|
|
user = vmail
|
|
|
|
}
|
|
|
|
}
|
2018-10-12 10:56:40 +02:00
|
|
|
imap_max_line_length = 2 M
|
2019-03-18 14:15:02 +01:00
|
|
|
#auth_cache_verify_password_with_worker = yes
|
|
|
|
#auth_cache_negative_ttl = 0
|
|
|
|
#auth_cache_ttl = 30 s
|
|
|
|
#auth_cache_size = 2 M
|
2020-02-05 11:01:50 +01:00
|
|
|
service replicator {
|
|
|
|
process_min_avail = 1
|
|
|
|
}
|
|
|
|
service aggregator {
|
|
|
|
fifo_listener replication-notify-fifo {
|
|
|
|
user = vmail
|
|
|
|
}
|
|
|
|
unix_listener replication-notify {
|
|
|
|
user = vmail
|
|
|
|
}
|
|
|
|
}
|
|
|
|
service replicator {
|
|
|
|
unix_listener replicator-doveadm {
|
|
|
|
mode = 0666
|
|
|
|
}
|
|
|
|
}
|
|
|
|
replication_max_conns = 10
|
|
|
|
doveadm_port = 12345
|
|
|
|
replication_dsync_parameters = -d -l 30 -U -n INBOX
|
2021-06-21 22:03:11 +02:00
|
|
|
# <Includes>
|
|
|
|
!include_try /etc/dovecot/sni.conf
|
|
|
|
!include_try /etc/dovecot/sogo_trusted_ip.conf
|
2019-07-28 21:36:09 +02:00
|
|
|
!include_try /etc/dovecot/extra.conf
|
|
|
|
!include_try /etc/dovecot/sogo-sso.conf
|
|
|
|
!include_try /etc/dovecot/shared_namespace.conf
|
2021-06-21 22:03:11 +02:00
|
|
|
# </Includes>
|
2018-12-10 23:25:37 +01:00
|
|
|
default_client_limit = 10400
|
2019-04-24 14:46:45 +02:00
|
|
|
default_vsz_limit = 1024 M
|