summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2025-12-13 21:09:57 +0000
committerDmitry Ilvokhin <d@ilvokhin.com>2025-12-13 21:09:57 +0000
commita46db6bd0ddcc80420b912c2192518a6c34fdc30 (patch)
tree0f5337d474f0cbe871c18d7919c6aefe54c8732c /roles
parent06516d26b5c9c442a98228eceaaefda50ce7d622 (diff)
downloadinfra-a46db6bd0ddcc80420b912c2192518a6c34fdc30.tar.gz
infra-a46db6bd0ddcc80420b912c2192518a6c34fdc30.tar.bz2
infra-a46db6bd0ddcc80420b912c2192518a6c34fdc30.zip
Migrate dovecot from 2.3 to 2.4HEADmaster
See [1] for the anouncement. Basically, all config options were renamed or altered in some way. Brilliant. Used [2] as a reference as official documentation lack side by side migration examples. [1]: https://archlinux.org/news/dovecot-24-requires-manual-intervention/ [2]: https://zunzuncito.oriole.systems/28/
Diffstat (limited to 'roles')
-rw-r--r--roles/dovecot/files/dovecot.conf36
1 files changed, 24 insertions, 12 deletions
diff --git a/roles/dovecot/files/dovecot.conf b/roles/dovecot/files/dovecot.conf
index 3271cbd..4c59141 100644
--- a/roles/dovecot/files/dovecot.conf
+++ b/roles/dovecot/files/dovecot.conf
@@ -1,15 +1,23 @@
+# Freeze configuration syntax.
+dovecot_config_version = 2.4.0
+
+# Freeze storage file format version.
+dovecot_storage_version = 2.4.0
+
# Protocols we want to be serving.
protocols = imap pop3 lmtp
# Path to the mail directory.
-mail_location = maildir:/var/mail/%d/%n/Maildir
+mail_home = /var/mail/%{user | domain}/%{user | username}
+mail_path = ~/Maildir
+mail_driver = maildir
# Path to SSL certificate files.
-ssl_cert = </etc/letsencrypt/live/mail.ilvokhin.com/fullchain.pem
-ssl_key = </etc/letsencrypt/live/mail.ilvokhin.com/privkey.pem
+ssl_server_cert_file = /etc/letsencrypt/live/mail.ilvokhin.com/fullchain.pem
+ssl_server_key_file = /etc/letsencrypt/live/mail.ilvokhin.com/privkey.pem
# Disable plaintext authentication, only SSL is allowed.
-disable_plaintext_auth = yes
+auth_allow_cleartext = no
service auth {
# Postfix smtp-auth.
@@ -42,7 +50,7 @@ service pop3-login {
}
}
-namespace {
+namespace inbox {
inbox = yes
separator = /
@@ -69,14 +77,18 @@ namespace {
}
# Use separate passwd file for storing passwords.
-passdb {
- driver = passwd-file
- args = scheme=SHA512-CRYPT username_format=%u /etc/dovecot/passwd
+passdb passwd-file {
+ default_password_scheme = SHA512-CRYPT
+ auth_username_format = %{user}
+ passwd_file_path = /etc/dovecot/passwd
}
# Use the same separate passwd file for user lookup.
-userdb {
- driver = passwd-file
- args = username_format=%u /etc/dovecot/passwd
- override_fields = uid=vmail gid=vmail
+userdb static {
+ auth_username_format = %{user}
+ passwd_file_path = /etc/dovecot/passwd
+ fields {
+ uid = vmail
+ gid = vmail
+ }
}