]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Remove meta for now as it won't work on learning
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Nov 2018 17:17:07 +0000 (17:17 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Nov 2018 17:17:07 +0000 (17:17 +0000)
lualib/lua_stat.lua

index cda80cf71e0ffe3f3b3db508f4d8ff7e11e9fa37..4d6fef7a87f2bc42af9f91e8a0b104e24d51cae4 100644 (file)
@@ -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