From 2a0763e955fcbfa2c61e28faaa71765a8fc685e6 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 16 Nov 2018 17:17:07 +0000 Subject: [PATCH] [Minor] Remove meta for now as it won't work on learning --- lualib/lua_stat.lua | 41 ----------------------------------------- 1 file changed, 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 -- 2.39.5