From c2c48b2b83d6c39bb67cb1ecf866041f5249dc1b Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Wed, 26 Mar 2025 00:24:20 +0100 Subject: [PATCH 1/4] fix: ensure message content is not modified by header filter (#4429) --- CHANGELOG.md | 5 +++++ target/postfix/sender_header_filter.pcre | 3 ++- .../parallel/set3/container_configuration/hostname.bats | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28ae00d9..4995b748 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ All notable changes to this project will be documented in this file. The format > **Note**: Changes and additions listed here are contained in the `:edge` image tag. These changes may not be as stable as released changes. +### Fixes + +- **Postfix** + - Avoid modifying the message body when filtering sender headers. This regression was introduced from [#4120](https://github.com/docker-mailserver/docker-mailserver/pull/4120) as part of DMS v15.0.0 ([#4429](https://github.com/docker-mailserver/docker-mailserver/pull/4429)) + ## [v15.0.1](https://github.com/docker-mailserver/docker-mailserver/releases/tag/v15.0.1) ### Added diff --git a/target/postfix/sender_header_filter.pcre b/target/postfix/sender_header_filter.pcre index fe4ff045..773ec24f 100644 --- a/target/postfix/sender_header_filter.pcre +++ b/target/postfix/sender_header_filter.pcre @@ -8,4 +8,5 @@ /^\s*X-Mailer/ IGNORE /^\s*X-Originating-IP/ IGNORE /^\s*Received: from.*127.0.0.1/ IGNORE -/^Content-Type:/i PREPEND X-MS-Reactions: disallow +/^\s*X-MS-Reactions:/ IGNORE +/^\s*Message-Id:/i PREPEND X-MS-Reactions: disallow diff --git a/test/tests/parallel/set3/container_configuration/hostname.bats b/test/tests/parallel/set3/container_configuration/hostname.bats index a525ecb2..65d7ce13 100644 --- a/test/tests/parallel/set3/container_configuration/hostname.bats +++ b/test/tests/parallel/set3/container_configuration/hostname.bats @@ -234,8 +234,9 @@ function _should_have_correct_mail_headers() { # but Amavis is changing that. It also changes protocol from SMTP to ESMTP. assert_line --index 7 --partial 'Received: from localhost (localhost [127.0.0.1])' assert_line --index 8 --partial "by ${EXPECTED_FQDN} (Postfix) with ESMTP id" - assert_line --index 14 --partial 'Message-Id:' - assert_line --index 14 --partial "@${EXPECTED_FQDN}>" + assert_line --index 14 'X-MS-Reactions: disallow' + assert_line --index 15 --partial 'Message-Id:' + assert_line --index 15 --partial "@${EXPECTED_FQDN}>" # Mail contents example: # From 5027f4f5b6fed075a2892825ab350bb8154959bd Mon Sep 17 00:00:00 2001 From: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> Date: Thu, 27 Mar 2025 00:09:31 +0100 Subject: [PATCH 2/4] release: v15.0.2 (#4432) * chore: prepare for release of v15.0.2 Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> * Update CHANGELOG.md --------- Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com> --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4995b748..38b5cea3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/docker-mailserver/docker-mailserver/compare/v15.0.1...HEAD) +## [Unreleased](https://github.com/docker-mailserver/docker-mailserver/compare/v15.0.2...HEAD) > **Note**: Changes and additions listed here are contained in the `:edge` image tag. These changes may not be as stable as released changes. +## [v15.0.2](https://github.com/docker-mailserver/docker-mailserver/releases/tag/v15.0.2) + ### Fixes - **Postfix** @@ -20,8 +22,6 @@ All notable changes to this project will be documented in this file. The format ### Fixes -- **Docs** - - Gender-neutral language - **Postfix:** - `setup email restrict` generated configs now only prepend to `dms_smtpd_sender_restrictions` ([#4379](https://github.com/docker-mailserver/docker-mailserver/pull/4379)) - **Rspamd:** From df7a98ec502de8237d5f4b855110eb67ab2b686f Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sat, 29 Mar 2025 12:11:29 +0100 Subject: [PATCH 3/4] chore: Fix broken README link for SRS (#4434) --- mailserver.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailserver.env b/mailserver.env index 338bf680..5ae0027b 100644 --- a/mailserver.env +++ b/mailserver.env @@ -92,7 +92,7 @@ TLS_LEVEL= # 1 => Mail spoofing denied. Each user may only send with their own or their alias addresses. Addresses with extension delimiters(http://www.postfix.org/postconf.5.html#recipient_delimiter) are not able to send messages. SPOOF_PROTECTION= -# Enables the Sender Rewriting Scheme. SRS is needed if your mail server acts as forwarder. See [postsrsd](https://github.com/roehling/postsrsd/blob/master/README.md#sender-rewriting-scheme-crash-course) for further explanation. +# Enables the Sender Rewriting Scheme. SRS is needed if your mail server acts as forwarder. See [postsrsd](https://github.com/roehling/postsrsd/blob/main/README.rst) for further explanation. # - **0** => Disabled # - 1 => Enabled ENABLE_SRS=0 From 229ebba1b870cbd849727fb2165a4e409e103894 Mon Sep 17 00:00:00 2001 From: beertje44 <101147154+beertje44@users.noreply.github.com> Date: Mon, 31 Mar 2025 00:00:57 +0200 Subject: [PATCH 4/4] docs: Dovecot Solr - Add compatibility note (#4433) Co-authored-by: Casper Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com> --- .../examples/tutorials/dovecot-solr.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/content/examples/tutorials/dovecot-solr.md b/docs/content/examples/tutorials/dovecot-solr.md index 13a9f0e7..844198bf 100644 --- a/docs/content/examples/tutorials/dovecot-solr.md +++ b/docs/content/examples/tutorials/dovecot-solr.md @@ -146,6 +146,25 @@ docker compose exec mailserver doveadm fts rescan -A Usually within 15 minutes or so, you should be able to search your mail using the Dovecot FTS feature! :tada: +### Compatibility + +Since Solr 9.8.0 was released (Jan 2025), a breaking change [deprecates support for `` directives][solr::9.8::lib-directive] which is presently used by the Dovecot supplied Solr config (`solr-config-9.xml`) to automatically load additional jars required. + +To enable support for `` directives, add the following ENV to your `solr` container: + +```yaml +services: + solr: + environment: + SOLR_CONFIG_LIB_ENABLED: true +``` + +!!! warning "Solr 10" + + From the Solr 10 release onwards, this opt-in ENV will no longer be available. + + If Dovecot has not updated their example Solr config ([upstream PR][dovecot::pr::solr-config-lib]), you will need to manually modify the Solr XML config to remove the `` directives and replace the suggested ENV `SOLR_CONFIG_LIB_ENABLED=true` with `SOLR_MODULES=analysis-extras`. + [docs::user-patches]: ../../config/advanced/override-defaults/user-patches.md [docs::dovecot::full-text-search]: ../../config/advanced/full-text-search.md [gh-dms::feature-request::dovecot-solr-package]: https://github.com/docker-mailserver/docker-mailserver/issues/4052 @@ -154,3 +173,6 @@ docker compose exec mailserver doveadm fts rescan -A [dockerfile-solr-uidgid]: https://github.com/apache/solr-docker/blob/9cd850b72309de05169544395c83a85b329d6b86/9.6/Dockerfile#L89-L92 [github-solr]: https://github.com/apache/solr [github-dovecot::core-docs]: https://github.com/dovecot/core/tree/main/doc + +[solr::9.8::lib-directive]: https://issues.apache.org/jira/browse/SOLR-16781 +[dovecot::pr::solr-config-lib]: https://github.com/dovecot/core/pull/238