From fb8c6ae700b80d0664174a331b255668ce449519 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 8 Sep 2016 11:54:03 +0100 Subject: [PATCH] [Minor] Improve logging for ratelimit --- src/plugins/lua/ratelimit.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index 8acc3edcfb..a4a870b096 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -183,7 +183,11 @@ local function check_limits(task, args) end else if bucket > threshold then - task:set_pre_result('soft reject', 'Ratelimit exceeded') + rspamd_logger.infox(task, + 'ratelimit "%s" exceeded: %s elements with %s limit', + rtype, bucket, threshold) + task:set_pre_result('soft reject', + string.format('Ratelimit "%s" exceeded', rtype)) end end end -- 2.47.3