diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-09-23 16:28:29 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-09-23 16:28:29 +0100 |
commit | b3c00f448a26f21ecb7092eee5e261461126f0aa (patch) | |
tree | 2e61943c1de8f73cd7fcbe8fdad3dbec2f43b0b6 /src/plugins/lua/ratelimit.lua | |
parent | 038044d082724af9d7df63c19645d302ea13aa77 (diff) | |
download | rspamd-b3c00f448a26f21ecb7092eee5e261461126f0aa.tar.gz rspamd-b3c00f448a26f21ecb7092eee5e261461126f0aa.zip |
Use `reject` action for ratelimit.
Diffstat (limited to 'src/plugins/lua/ratelimit.lua')
-rw-r--r-- | src/plugins/lua/ratelimit.lua | 3 |
1 files changed, 1 insertions, 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, |