--No more checks for auth user or local network
local rip = task:get_from_ip()
- if ((not check_user and task:get_user()) or
+ if ((not check_authed and task:get_user()) or
(not check_local and rip and rip:is_local())) then
return false
end
-- Check's HELO
local weight_helo = 0
+ local helo
if config['helo_enabled'] then
- local helo = task:get_helo()
+ helo = task:get_helo()
if helo then
if helo ~= rspamc_local_helo then
helo = string.gsub(helo, '[%[%]]', '')
conn:add_cmd('setex', v)
end, fun.drop_n(1, values))
else
- rspamd_logger.infox(task, 'got error while connecting to redis: %1', addr)
+ rspamd_logger.infox(task, 'got error while connecting to redis: %1', upstream:get_addr())
upstream:fail()
end
end
local key_keywords = rspamd_str_split(params[1], '_')
for _, k in ipairs(key_keywords) do
- if (custom_keywords[v] and type(custom_keywords[v]['get_value']) == 'function') or
- (keywords[v] and type(keywords[v]['get_value']) == 'function') then
+ if (custom_keywords[k] and type(custom_keywords[k]['get_value']) == 'function') or
+ (keywords[k] and type(keywords[k]['get_value']) == 'function') then
set_limit(settings[params[1]], params[2], params[3])
else
rspamd_logger.errx(rspamd_config, 'invalid limit type: ' .. params[1])
priority = 10,
})
else
+ local symbol
if not ratelimit_symbol then
symbol = 'RATELIMIT_CHECK'
else
end
local function process_trie_file(symbol, cf)
- file = io.open(cf['file'])
+ local file = io.open(cf['file'])
if not file then
rspamd_logger.errx(rspamd_config, 'Cannot open trie file %1', cf['file'])