diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-22 17:18:45 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-22 17:18:45 +0100 |
commit | d2a91c67f95d1ded1ff655f0d5416ed9ffe88225 (patch) | |
tree | e0d9716fb852a2c25556bafeb0c5b8d2fb231556 /src | |
parent | 2de134c35d21fcf02ed17c0a5c58bc3393fce80b (diff) | |
download | rspamd-d2a91c67f95d1ded1ff655f0d5416ed9ffe88225.tar.gz rspamd-d2a91c67f95d1ded1ff655f0d5416ed9ffe88225.zip |
[Minor] Multimap: Add more debugging
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/multimap.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index f0f1ec719..da8ab01e3 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -624,11 +624,15 @@ local function multimap_callback(task, rule) end end - if r['filter'] or r['type'] == 'url' then - local fn = multimap_filters[r['type']] + if r.filter or r.type == 'url' then + local fn = multimap_filters[r.type] if fn then - value = fn(task, r['filter'], value, r) + + local filtered_value = fn(task, r.filter, value, r) + lua_util.debugm(N, task, 'apply filter %s for rule %s: %s -> %s', + r.filter, r.symbol, value, filtered_value) + value = filtered_value end end |