2021-01-13 16:36:50 +00:00
|
|
|
# Custom Dovecot configuration.
|
|
|
|
|
|
|
|
# ----------------------
|
|
|
|
# Generic configuration.
|
|
|
|
# ----------------------
|
|
|
|
|
|
|
|
# Logging & debugging.
|
|
|
|
log_path = /dev/stderr
|
|
|
|
auth_verbose = yes
|
|
|
|
|
2021-11-13 13:12:24 +00:00
|
|
|
plugin {
|
|
|
|
mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
|
|
|
|
mail_log_fields = uid box msgid size
|
|
|
|
}
|
|
|
|
|
2021-01-13 16:36:50 +00:00
|
|
|
# Mail directory.
|
|
|
|
mail_location = maildir:/var/mail/virtual/%u
|
|
|
|
mail_privileged_group = virtual
|
|
|
|
mail_uid = 5000
|
|
|
|
mail_gid = 5000
|
2022-12-03 14:11:03 +00:00
|
|
|
maildir_stat_dirs = yes
|
2021-01-13 16:36:50 +00:00
|
|
|
|
|
|
|
# Simplify log messages.
|
|
|
|
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c
|
|
|
|
mail_log_prefix = "%s(%u)<%{pid}>: "
|
|
|
|
|
|
|
|
# ----------------------
|
|
|
|
# Mailbox configuration.
|
|
|
|
# ----------------------
|
|
|
|
|
|
|
|
namespace inbox {
|
|
|
|
separator = .
|
|
|
|
prefix = INBOX.
|
|
|
|
inbox = yes
|
|
|
|
|
|
|
|
mailbox Drafts {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Drafts
|
|
|
|
}
|
|
|
|
|
|
|
|
mailbox Junk {
|
|
|
|
auto = create
|
|
|
|
special_use = \Junk
|
|
|
|
}
|
|
|
|
|
|
|
|
mailbox Sent {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
|
|
|
|
mailbox "Sent Messages" {
|
|
|
|
auto = no
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
|
2023-08-20 10:16:35 +00:00
|
|
|
mailbox Archive {
|
|
|
|
auto = create
|
|
|
|
special_use = \Archive
|
|
|
|
}
|
|
|
|
|
|
|
|
mailbox Archives {
|
|
|
|
auto = no
|
|
|
|
special_use = \Archive
|
|
|
|
}
|
|
|
|
|
2021-01-13 16:36:50 +00:00
|
|
|
mailbox Trash {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# ----------------------
|
|
|
|
# Protocol configuration.
|
|
|
|
# ----------------------
|
|
|
|
|
|
|
|
# Enabled protocols.
|
2021-11-13 13:12:24 +00:00
|
|
|
protocols = imap
|
2021-01-13 16:36:50 +00:00
|
|
|
|
|
|
|
# Enable SSL and STARTTLS.
|
|
|
|
ssl = yes
|
2021-11-13 13:12:24 +00:00
|
|
|
ssl_min_protocol = TLSv1.2
|
|
|
|
ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
|
|
|
|
ssl_prefer_server_ciphers = no
|
|
|
|
|
2021-06-27 11:52:47 +00:00
|
|
|
ssl_cert = </etc/ssl/private/certificates/${DOVECOT_HOST}.crt
|
|
|
|
ssl_key = </etc/ssl/private/certificates/${DOVECOT_HOST}.key
|
2021-01-13 16:36:50 +00:00
|
|
|
|
|
|
|
protocol imap {
|
|
|
|
mail_max_userip_connections = 25
|
|
|
|
}
|
|
|
|
|
|
|
|
service imap-login {
|
|
|
|
inet_listener imap {
|
|
|
|
port = 143
|
|
|
|
}
|
|
|
|
|
|
|
|
inet_listener imaps {
|
|
|
|
port = 993
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Disable POP3.
|
|
|
|
service pop3-login {
|
|
|
|
inet_listener pop3 {
|
|
|
|
port = 0
|
|
|
|
}
|
|
|
|
|
|
|
|
inet_listener pop3s {
|
|
|
|
port = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# ----------------------
|
|
|
|
# Auth configuration.
|
|
|
|
# ----------------------
|
|
|
|
|
|
|
|
auth_mechanisms = plain login
|
|
|
|
disable_plaintext_auth = yes
|
|
|
|
|
|
|
|
# Enable SASL authentication on specific TCP port.
|
|
|
|
service auth {
|
|
|
|
inet_listener {
|
|
|
|
port = 3659
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Enable SQL authentication.
|
|
|
|
userdb {
|
|
|
|
driver = sql
|
|
|
|
args = /etc/dovecot/dovecot-sql.conf.local
|
|
|
|
}
|
|
|
|
|
|
|
|
passdb {
|
|
|
|
driver = sql
|
|
|
|
args = /etc/dovecot/dovecot-sql.conf.local
|
|
|
|
}
|
|
|
|
|
|
|
|
# -------------------------
|
|
|
|
# Additional configuration.
|
|
|
|
# -------------------------
|
|
|
|
|
|
|
|
!include conf.d/*.conf
|