From: Vsevolod Stakhov Date: Tue, 11 Jul 2017 07:25:11 +0000 (+0100) Subject: [Feature] Allow to attach stat signature to messages X-Git-Tag: 1.7.0~864 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1285858a9ed4ec712d95210524cceaa12fae9fd5;p=thirdparty%2Frspamd.git [Feature] Allow to attach stat signature to messages --- diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua index 52cd874a67..009af075ab 100644 --- a/src/plugins/lua/milter_headers.lua +++ b/src/plugins/lua/milter_headers.lua @@ -112,6 +112,10 @@ local settings = { quarantine = 'DMARC_POLICY_QUARANTINE', }, }, + ['stat-signature'] = { + header = 'X-Stat-Signature', + remove = 1, + }, }, } @@ -356,6 +360,18 @@ local function milter_headers(task) end end + routines['stat-signature'] = function() + if skip_wanted('stat-signature') then return end + if settings.routines['stat-signature'].remove then + remove[settings.routines['stat-signature'].header] = + settings.routines['stat-signature'].remove + end + local res = task:get_mempool():get_variable("stat_signature") + if res then + add[settings.routines['stat-signature'].header] = res + end + end + for _, n in ipairs(active_routines) do local ok, err if custom_routines[n] then