diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-31 14:39:00 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-31 14:39:00 +0100 |
commit | 98ead161e60bbda2b389bc3e92048c7a5e524502 (patch) | |
tree | a36fc139a225f60ae1e23adf37178b7743e07f2c /src/plugins/lua/spamassassin.lua | |
parent | 6d27d22f08e2dcabe2b3a5122f3478d45fc3cf66 (diff) | |
download | rspamd-98ead161e60bbda2b389bc3e92048c7a5e524502.tar.gz rspamd-98ead161e60bbda2b389bc3e92048c7a5e524502.zip |
[Feature] Save trace for SA metas
Diffstat (limited to 'src/plugins/lua/spamassassin.lua')
-rw-r--r-- | src/plugins/lua/spamassassin.lua | 5 |
1 files 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 |