From 98ead161e60bbda2b389bc3e92048c7a5e524502 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 31 Mar 2016 14:39:00 +0100 Subject: [PATCH] [Feature] Save trace for SA metas --- src/plugins/lua/spamassassin.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/spamassassin.lua b/src/plugins/lua/spamassassin.lua index afd5bc926..69a3d1f78 100644 --- a/src/plugins/lua/spamassassin.lua +++ b/src/plugins/lua/spamassassin.lua @@ -1362,15 +1362,16 @@ local function post_process() -- Meta function callback local meta_cb = function(task) local res = 0 + local trace = {} -- XXX: need to memoize result for better performance local sym = task:has_symbol(k) if not sym then if expression then - res = expression:process(task) + res,trace = expression:process_traced(task) end if res > 0 then -- Symbol should be one shot to make it working properly - task:insert_result(k, res) + task:insert_result(k, res, trace) end else res = 1 -- 2.39.5