From 6a32c3ad6043c433e5c3ca458c4c3a47bcc67641 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 14 Dec 2021 16:41:01 +0000 Subject: [PATCH] [Minor] Bimi: Fold huge bimi header --- src/plugins/lua/bimi.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/bimi.lua b/src/plugins/lua/bimi.lua index bc3d90be7..a2768ea26 100644 --- a/src/plugins/lua/bimi.lua +++ b/src/plugins/lua/bimi.lua @@ -110,12 +110,16 @@ end local function insert_bimi_headers(task, domain, bimi_content) local hdr_name = 'BIMI-Indicator' + -- Re-encode base64... + local content = rspamd_util.encode_base64(rspamd_util.decode_base64(bimi_content), + 73, task:get_newlines_type()) lua_mime.modify_headers(task, { remove = {[hdr_name] = 0}, add = { [hdr_name] = { order = 0, - value = rspamd_util.fold_header(hdr_name, bimi_content) + value = rspamd_util.fold_header(hdr_name, content, + task:get_newlines_type()) } } }) -- 2.39.5