aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-12-14 16:41:01 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-12-14 16:41:01 +0000
commit6a32c3ad6043c433e5c3ca458c4c3a47bcc67641 (patch)
tree05edd6d29d60ac50fc287e0c43d998b3bef1e75a /src/plugins
parentc1f6f952f4932089c45d36b71919330e5ee8dfe1 (diff)
downloadrspamd-6a32c3ad6043c433e5c3ca458c4c3a47bcc67641.tar.gz
rspamd-6a32c3ad6043c433e5c3ca458c4c3a47bcc67641.zip
[Minor] Bimi: Fold huge bimi header
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/bimi.lua6
1 files changed, 5 insertions, 1 deletions
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())
}
}
})