summaryrefslogtreecommitdiffstats
path: root/lualib/lua_stat.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-16 17:17:07 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-16 17:17:07 +0000
commit2a0763e955fcbfa2c61e28faaa71765a8fc685e6 (patch)
tree2452ca1bcb795060bf5f09147692a74943c14454 /lualib/lua_stat.lua
parent84b57c53f4f6e9b3915d57b4a5c83570fea50dc3 (diff)
downloadrspamd-2a0763e955fcbfa2c61e28faaa71765a8fc685e6.tar.gz
rspamd-2a0763e955fcbfa2c61e28faaa71765a8fc685e6.zip
[Minor] Remove meta for now as it won't work on learning
Diffstat (limited to 'lualib/lua_stat.lua')
-rw-r--r--lualib/lua_stat.lua41
1 files changed, 0 insertions, 41 deletions
diff --git a/lualib/lua_stat.lua b/lualib/lua_stat.lua
index cda80cf71..4d6fef7a8 100644
--- a/lualib/lua_stat.lua
+++ b/lualib/lua_stat.lua
@@ -706,43 +706,6 @@ local function get_headers_stat_tokens(task, cf, res, i)
return i
end
-local function get_meta_stat_tokens(task, res, i)
- local pool = task:get_mempool()
- local asn = pool:get_variable("asn")
- local country = pool:get_variable("country")
- local ipnet = pool:get_variable("ipnet")
-
- if asn and country and ipnet then
- rawset(res, i, string.format("#asn:%s", asn))
- lua_util.debugm("bayes", task, "added asn token: %s",
- res[i])
- i = i + 1
- rawset(res, i, string.format("#cnt:%s", country))
- lua_util.debugm("bayes", task, "added country token: %s",
- res[i])
- i = i + 1
- rawset(res, i, string.format("#ipn:%s", country))
- lua_util.debugm("bayes", task, "added ipnet token: %s",
- res[i])
- i = i + 1
- end
-
- local pol = {}
- if task:has_symbol('R_DKIM_ALLOW') then
- table.insert(pol, 'D')
- end
- if task:has_symbol('R_SPF_ALLOW') then
- table.insert(pol, 'S')
- end
-
- rawset(res, i, string.format("#pol:%s", table.concat(pol, '')))
- lua_util.debugm("bayes", task, "added policies token: %s",
- res[i])
- i = i + 1
-
- return i
-end
-
local function get_stat_tokens(task, cf)
local res = {}
local E = {}
@@ -794,10 +757,6 @@ local function get_stat_tokens(task, cf)
end
end
- if cf.classify_meta then
- i = get_meta_stat_tokens(task, res, i)
- end
-
return res
end