]> source.dussan.org Git - rspamd.git/commitdiff
Restore soft reject for rate limit.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Sep 2014 15:42:26 +0000 (16:42 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Sep 2014 15:42:26 +0000 (16:42 +0100)
src/plugins/lua/ratelimit.lua

index e202be587e80a55b9331a7ba8bb895f3722886b7..1d9f15a6d2e0ee94264a4db1bf82055380a40efd 100644 (file)
@@ -70,7 +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
-                                       task:set_pre_result(rspamd_actions['reject'], 'Ratelimit exceeded: ' .. key)
+                                       task:set_pre_result('soft reject', 'Ratelimit exceeded: ' .. key)
                                end
                        else
                                rspamd_redis.make_request(task, upstream:get_ip_string(), upstream:get_port(), rate_set_key_cb,