]> source.dussan.org Git - rspamd.git/commitdiff
Use `reject` action for ratelimit.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Sep 2014 15:28:29 +0000 (16:28 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Sep 2014 15:28:29 +0000 (16:28 +0100)
src/plugins/lua/ratelimit.lua

index 2c327a7c5e29f6359d299cbfdc4d74072b2943ae..e202be587e80a55b9331a7ba8bb895f3722886b7 100644 (file)
@@ -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,