mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-02-03 21:55:57 +00:00
docker: Update Dovecot config to 2.4
Debian 13, the new stable version, updated Dovecot from 2.3 to 2.4. Unfortunately, the new Dovecot version introduced several changes to the configuration file that are not backwards-compatible. https://doc.dovecot.org/2.4.2/installation/upgrade/2.3-to-2.4.html This patch updates our docker's Dovecot config to the new version. Thanks to Ernesto Alfonso (erjoalgo@github) for reporting this problem in https://github.com/albertito/chasquid/issues/80.
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
dovecot_config_version = 2.4.0
|
||||||
|
dovecot_storage_version = 2.4.0
|
||||||
|
|
||||||
#
|
#
|
||||||
# Logging
|
# Logging
|
||||||
#
|
#
|
||||||
@@ -10,10 +13,11 @@ log_path = /data/dovecot/dovecot.log
|
|||||||
|
|
||||||
# Store emails in /data/mail/home/domain/user, which will be inside the
|
# Store emails in /data/mail/home/domain/user, which will be inside the
|
||||||
# container's volume.
|
# container's volume.
|
||||||
mail_home = /data/mail/home/%d/%n
|
mail_home = /data/mail/home/%{user|domain}/%{user|username}
|
||||||
|
|
||||||
# Use Dovecot's native format.
|
# Use Dovecot's native format.
|
||||||
mail_location = mdbox:~/mdbox
|
mail_driver = mdbox
|
||||||
|
mail_path = ~/mdbox
|
||||||
|
|
||||||
# User and group used to store and access mailboxes.
|
# User and group used to store and access mailboxes.
|
||||||
mail_uid = dovecot
|
mail_uid = dovecot
|
||||||
@@ -31,13 +35,13 @@ first_valid_gid = 100
|
|||||||
|
|
||||||
# Static file, in /data/dovecot/users.
|
# Static file, in /data/dovecot/users.
|
||||||
auth_mechanisms = plain
|
auth_mechanisms = plain
|
||||||
passdb {
|
passdb passwd-file {
|
||||||
driver = passwd-file
|
passwd_file_path = /data/dovecot/users
|
||||||
args = scheme=CRYPT username_format=%u /data/dovecot/users
|
auth_username_format = %{user}
|
||||||
}
|
}
|
||||||
userdb {
|
userdb passwd-file {
|
||||||
driver = passwd-file
|
passwd_file_path = /data/dovecot/users
|
||||||
args = /data/dovecot/users
|
auth_username_format = %{user}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -102,8 +106,10 @@ service managesieve {
|
|||||||
}
|
}
|
||||||
protocol sieve {
|
protocol sieve {
|
||||||
}
|
}
|
||||||
plugin {
|
sieve_script personal {
|
||||||
sieve = file:~/sieve;active=~/.dovecot.sieve
|
driver = file
|
||||||
|
path = ~/sieve
|
||||||
|
active_path = ~/.dovecot.sieve
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -125,8 +131,6 @@ service auth {
|
|||||||
}
|
}
|
||||||
service auth-worker {
|
service auth-worker {
|
||||||
}
|
}
|
||||||
dict {
|
|
||||||
}
|
|
||||||
service lmtp {
|
service lmtp {
|
||||||
# This is used by mda-lmtp.
|
# This is used by mda-lmtp.
|
||||||
unix_listener lmtp {
|
unix_listener lmtp {
|
||||||
|
|||||||
@@ -85,13 +85,13 @@ chown dovecot:dovecot /data/mail/
|
|||||||
# The default goes first because dovecot complains otherwise.
|
# The default goes first because dovecot complains otherwise.
|
||||||
echo "# Autogenerated by entrypoint.sh" > /etc/dovecot/auto-ssl.conf
|
echo "# Autogenerated by entrypoint.sh" > /etc/dovecot/auto-ssl.conf
|
||||||
cat >> /etc/dovecot/auto-ssl.conf <<EOF
|
cat >> /etc/dovecot/auto-ssl.conf <<EOF
|
||||||
ssl_cert = </etc/letsencrypt/live/$ONE_DOMAIN/fullchain.pem
|
ssl_server_cert_file = /etc/letsencrypt/live/$ONE_DOMAIN/fullchain.pem
|
||||||
ssl_key = </etc/letsencrypt/live/$ONE_DOMAIN/privkey.pem
|
ssl_server_key_file = /etc/letsencrypt/live/$ONE_DOMAIN/privkey.pem
|
||||||
EOF
|
EOF
|
||||||
for DOMAIN in $CERT_DOMAINS; do
|
for DOMAIN in $CERT_DOMAINS; do
|
||||||
echo "local_name $DOMAIN {"
|
echo "local_name $DOMAIN {"
|
||||||
echo " ssl_cert = </etc/letsencrypt/live/$DOMAIN/fullchain.pem"
|
echo " ssl_server_cert_file = /etc/letsencrypt/live/$DOMAIN/fullchain.pem"
|
||||||
echo " ssl_key = </etc/letsencrypt/live/$DOMAIN/privkey.pem"
|
echo " ssl_server_key_file = /etc/letsencrypt/live/$DOMAIN/privkey.pem"
|
||||||
echo "}"
|
echo "}"
|
||||||
done >> /etc/dovecot/auto-ssl.conf
|
done >> /etc/dovecot/auto-ssl.conf
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user