From: Vsevolod Stakhov Date: Tue, 23 Sep 2014 15:28:29 +0000 (+0100) Subject: Use `reject` action for ratelimit. X-Git-Tag: 0.7.1~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b3c00f448a26f21ecb7092eee5e261461126f0aa;p=rspamd.git Use `reject` action for ratelimit. --- 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,