From: Vsevolod Stakhov Date: Thu, 31 Mar 2016 13:39:00 +0000 (+0100) Subject: [Feature] Save trace for SA metas X-Git-Tag: 1.2.2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=98ead161e60bbda2b389bc3e92048c7a5e524502;p=rspamd.git [Feature] Save trace for SA metas --- 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