From ff6329d01b24d257da75807f41cc58efb00d6397 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com> Date: Tue, 6 Oct 2026 09:41:34 +0200 Subject: [PATCH 1/2] [Rspamd] Fix CTE and boundary prefix in domain wide footer --- data/conf/rspamd/lua/rspamd.local.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/data/conf/rspamd/lua/rspamd.local.lua b/data/conf/rspamd/lua/rspamd.local.lua index 313ba7e90..5d7bcaaf3 100644 --- a/data/conf/rspamd/lua/rspamd.local.lua +++ b/data/conf/rspamd/lua/rspamd.local.lua @@ -856,6 +856,8 @@ rspamd_config:register_symbol({ local seen_cte local newline_s = newline(task) + -- use the CTE add_text_footer actually applied + local new_cte = rewrite.new_cte or 'quoted-printable' local function rewrite_ct_cb(name, hdr) if rewrite.need_rewrite_ct then @@ -877,13 +879,13 @@ rspamd_config:register_symbol({ return elseif name:lower() == 'content-transfer-encoding' then out[#out + 1] = string.format('%s: %s', - 'Content-Transfer-Encoding', 'quoted-printable') + 'Content-Transfer-Encoding', new_cte) -- update Content-Transfer-Encoding header task:set_milter_reply({ remove_headers = {['Content-Transfer-Encoding'] = 0}, }) task:set_milter_reply({ - add_headers = {['Content-Transfer-Encoding'] = 'quoted-printable'} + add_headers = {['Content-Transfer-Encoding'] = new_cte} }) seen_cte = true return @@ -895,7 +897,7 @@ rspamd_config:register_symbol({ task:headers_foreach(rewrite_ct_cb, {full = true}) if not seen_cte and rewrite.need_rewrite_ct then - out[#out + 1] = string.format('%s: %s', 'Content-Transfer-Encoding', 'quoted-printable') + out[#out + 1] = string.format('%s: %s', 'Content-Transfer-Encoding', new_cte) end -- End of headers @@ -914,7 +916,7 @@ rspamd_config:register_symbol({ out_parts[#out_parts + 1] = o out_parts[#out_parts + 1] = newline_s else - local removePrefix = "--\x0D\x0AContent-Type" + local removePrefix = "--\x0D\x0AContent-" if string.lower(string.sub(tostring(o[1]), 1, string.len(removePrefix))) == string.lower(removePrefix) then o[1] = string.sub(tostring(o[1]), string.len("--\x0D\x0A") + 1) end From 74facc4b5b96d7503ce521e0105be5229ef1424c Mon Sep 17 00:00:00 2001 From: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com> Date: Tue, 6 Oct 2026 09:41:51 +0200 Subject: [PATCH 2/2] [Rspamd] update to 4.2.1 --- data/Dockerfiles/rspamd/Dockerfile | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/Dockerfiles/rspamd/Dockerfile b/data/Dockerfiles/rspamd/Dockerfile index 13e56357b..534ed943e 100644 --- a/data/Dockerfiles/rspamd/Dockerfile +++ b/data/Dockerfiles/rspamd/Dockerfile @@ -2,7 +2,7 @@ FROM debian:trixie-slim LABEL maintainer="The Infrastructure Company GmbH " ARG DEBIAN_FRONTEND=noninteractive -ARG RSPAMD_VER=rspamd_4.1.4-1~beb659b +ARG RSPAMD_VER=rspamd_4.2.1-1~b7a16ae ARG CODENAME=trixie ENV LC_ALL=C diff --git a/docker-compose.yml b/docker-compose.yml index a22d9e8ca..e9c256570 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -84,7 +84,7 @@ services: - clamd rspamd-mailcow: - image: ghcr.io/mailcow/rspamd:4.1.4-1 + image: ghcr.io/mailcow/rspamd:4.2.1-1 stop_grace_period: 30s depends_on: - dovecot-mailcow