From b3c00f448a26f21ecb7092eee5e261461126f0aa Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 23 Sep 2014 16:28:29 +0100 Subject: [PATCH] Use `reject` action for ratelimit. --- src/plugins/lua/ratelimit.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index 2c327a7c5..e202be587 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -70,8 +70,7 @@ local function check_specific_limit (task, limit, key) rspamd_redis.make_request(task, upstream:get_ip_string(), upstream:get_port(), rate_set_key_cb, 'SET %b %b', key, lstr) if bucket > limit[1] then - rspamd_logger.info(string.format('[%s]:soft reject - Ratelimit exceeded', key)) - task:set_pre_result(rspamd_actions['soft reject'], 'Ratelimit exceeded') + task:set_pre_result(rspamd_actions['reject'], 'Ratelimit exceeded: ' .. key) end else rspamd_redis.make_request(task, upstream:get_ip_string(), upstream:get_port(), rate_set_key_cb, -- 2.39.5