From 8dc74bb1e8074c8342c3ffe61b929deb042737b9 Mon Sep 17 00:00:00 2001 From: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> Date: Sun, 17 Aug 2025 12:28:33 +0200 Subject: [PATCH] remove: Diffie-Hellman parameters for Postfix & Dovecot This patch removes all custom DH parameters from DMS. The documentation update is NOT included in this patch yet. ref: #4538 Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> --- Dockerfile | 6 -- docs/content/config/security/ssl.md | 2 + target/dovecot/10-ssl.conf | 5 -- target/postfix/main.cf | 1 - target/scripts/helpers/ssl.sh | 17 ------ target/scripts/start-mailserver.sh | 1 - target/scripts/startup/setup.d/dovecot.sh | 4 -- target/scripts/startup/setup.d/postfix.sh | 3 - target/shared/ffdhe4096.pem | 13 ----- target/shared/ffdhe4096.pem.sha512sum | 1 - test/tests/parallel/set1/tls/dhparams.bats | 68 ---------------------- 11 files changed, 2 insertions(+), 119 deletions(-) delete mode 100644 target/shared/ffdhe4096.pem delete mode 100644 target/shared/ffdhe4096.pem.sha512sum delete mode 100644 test/tests/parallel/set1/tls/dhparams.bats diff --git a/Dockerfile b/Dockerfile index e2f7fc0d..d737de8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -191,12 +191,6 @@ COPY target/getmail/getmailrc_general /etc/getmailrc_general COPY target/getmail/getmail-service.sh /usr/local/bin/ COPY target/postfix/main.cf target/postfix/master.cf /etc/postfix/ -# DH parameters for DHE cipher suites, ffdhe4096 is the official standard 4096-bit DH params now part of TLS 1.3 -# This file is for TLS <1.3 handshakes that rely on DHE cipher suites -# Handled at build to avoid failures by doveadm validating ssl_dh filepath in 10-ssl.auth (eg generate-accounts) -COPY target/shared/ffdhe4096.pem /etc/postfix/dhparams.pem -COPY target/shared/ffdhe4096.pem /etc/dovecot/dh.pem - COPY \ target/postfix/header_checks.pcre \ target/postfix/sender_header_filter.pcre \ diff --git a/docs/content/config/security/ssl.md b/docs/content/config/security/ssl.md index 853ab446..46f12182 100644 --- a/docs/content/config/security/ssl.md +++ b/docs/content/config/security/ssl.md @@ -908,6 +908,8 @@ fi ## Custom DH Parameters +TODO + By default DMS uses [`ffdhe4096`][ffdhe4096-src] from [IETF RFC 7919][ietf::rfc::ffdhe]. These are standardized pre-defined DH groups and the only available DH groups for TLS 1.3. It is [discouraged to generate your own DH parameters][dh-avoid-selfgenerated] as it is often less secure. Despite this, if you must use non-standard DH parameters or you would like to swap `ffdhe4096` for a different group (eg `ffdhe2048`); Add your own PEM encoded DH params file via a volume to `/tmp/docker-mailserver/dhparams.pem`. This will replace DH params for both Dovecot and Postfix services during container startup. diff --git a/target/dovecot/10-ssl.conf b/target/dovecot/10-ssl.conf index c52d21f5..54640c04 100644 --- a/target/dovecot/10-ssl.conf +++ b/target/dovecot/10-ssl.conf @@ -45,11 +45,6 @@ ssl_key =