From: Vsevolod Stakhov Date: Wed, 28 Aug 2019 07:59:20 +0000 (+0100) Subject: [Minor] Remove surbl notice X-Git-Tag: 2.0~323 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=201a49582d05bac785750b46adbf1e2309e87b78;p=rspamd.git [Minor] Remove surbl notice --- diff --git a/conf/options.inc b/conf/options.inc index 51fd7b2dc..4489ed29f 100644 --- a/conf/options.inc +++ b/conf/options.inc @@ -1,6 +1,6 @@ # Included from top-level .conf file -filters = "chartable,dkim,spf,surbl,regexp,fuzzy_check"; +filters = "chartable,dkim,spf,regexp,fuzzy_check"; raw_mode = false; one_shot = false; cache_file = "$DBDIR/symbols.cache"; diff --git a/lualib/lua_maps.lua b/lualib/lua_maps.lua index c2f0e406c..f49d77f4e 100644 --- a/lualib/lua_maps.lua +++ b/lualib/lua_maps.lua @@ -116,12 +116,12 @@ local function rspamd_map_add_from_ucl(opt, mtype, description) if type(opt) == 'string' then opt,mtype = maybe_adjust_type(opt, mtype) - local k = map_hash_key(opt, mtype) - if maps_cache[k] then + local cache_key = map_hash_key(opt, mtype) + if maps_cache[cache_key] then rspamd_logger.infox(rspamd_config, 'reuse url for %s(%s)', opt, mtype) - return maps_cache[k] + return maps_cache[cache_key] end -- We have a single string, so we treat it as a map local map = rspamd_config:add_map{ @@ -132,18 +132,18 @@ local function rspamd_map_add_from_ucl(opt, mtype, description) if map then ret.__data = map - ret.hash = k + ret.hash = cache_key setmetatable(ret, ret_mt) - maps_cache[k] = ret + maps_cache[cache_key] = ret return ret end elseif type(opt) == 'table' then - local k = lua_util.table_digest(opt) - if maps_cache[k] then + local cache_key = lua_util.table_digest(opt) + if maps_cache[cache_key] then rspamd_logger.infox(rspamd_config, 'reuse url for complex map definition %s: %s', - k:sub(1,8), description) + cache_key:sub(1,8), description) - return maps_cache[k] + return maps_cache[cache_key] end if opt[1] then @@ -155,7 +155,7 @@ local function rspamd_map_add_from_ucl(opt, mtype, description) if map then ret.__data = map setmetatable(ret, ret_mt) - maps_cache[k] = ret + maps_cache[cache_key] = ret return ret end else @@ -168,7 +168,7 @@ local function rspamd_map_add_from_ucl(opt, mtype, description) if map then ret.__data = map setmetatable(ret, ret_mt) - maps_cache[k] = ret + maps_cache[cache_key] = ret return ret end end @@ -183,7 +183,7 @@ local function rspamd_map_add_from_ucl(opt, mtype, description) if map then ret.__data = map setmetatable(ret, ret_mt) - maps_cache[k] = ret + maps_cache[cache_key] = ret return ret end else @@ -198,7 +198,7 @@ local function rspamd_map_add_from_ucl(opt, mtype, description) if map then ret.__data = map setmetatable(ret, ret_mt) - maps_cache[k] = ret + maps_cache[cache_key] = ret return ret end end @@ -213,7 +213,7 @@ local function rspamd_map_add_from_ucl(opt, mtype, description) if map then ret.__data = map setmetatable(ret, ret_mt) - maps_cache[k] = ret + maps_cache[cache_key] = ret return ret end else @@ -225,7 +225,6 @@ local function rspamd_map_add_from_ucl(opt, mtype, description) -- Numeric table if mtype == 'hash' then -- Treat as KV pair - local lua_util = require "lua_util" local pieces = lua_util.str_split(elt, ' ') if #pieces > 1 then local key = table.remove(pieces, 1) @@ -252,7 +251,7 @@ local function rspamd_map_add_from_ucl(opt, mtype, description) return nil end - maps_cache[k] = ret + maps_cache[cache_key] = ret return ret else -- Empty map, huh? @@ -271,7 +270,7 @@ local function rspamd_map_add_from_ucl(opt, mtype, description) if map then ret.__data = map setmetatable(ret, ret_mt) - maps_cache[k] = ret + maps_cache[cache_key] = ret return ret end end -- opt[1]