From: Vsevolod Stakhov Date: Tue, 14 Dec 2021 16:41:01 +0000 (+0000) Subject: [Minor] Bimi: Fold huge bimi header X-Git-Tag: 3.2~160 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6a32c3ad6043c433e5c3ca458c4c3a47bcc67641;p=rspamd.git [Minor] Bimi: Fold huge bimi header --- 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()) } } })