From 01036d24ca7794ac7ad7be407798806f4eac54ce Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 23 Oct 2018 16:08:24 +0100 Subject: [PATCH] [Feature] Fold b= value when doing arc sealing --- src/plugins/lua/arc.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/arc.lua b/src/plugins/lua/arc.lua index e066613e9..d5ee1b514 100644 --- a/src/plugins/lua/arc.lua +++ b/src/plugins/lua/arc.lua @@ -483,9 +483,15 @@ local function arc_sign_seal(task, params, header) sha_ctx:update(s) lua_util.debugm(N, task, 'initial update signature with header: %s', s) + local nl_type = 'crlf' + if task:has_flag("milter") then + nl_type = "lf" + else + nl_type = task:get_newlines_type() + end local sig = rspamd_rsa.sign_memory(privkey, sha_ctx:bin()) cur_arc_seal = string.format('%s%s', cur_arc_seal, - sig:base64()) + sig:base64(70, nl_type)) task:set_milter_reply({ add_headers = { -- 2.39.5