commit a7ac20d: [Fix] ratelimit - symbol per bucket
Carsten Rosenberg
c.rosenberg at heinlein-support.de
Thu Nov 11 12:07:04 UTC 2021
Author: Carsten Rosenberg
Date: 2021-11-10 23:32:32 +0100
URL: https://github.com/rspamd/rspamd/commit/a7ac20d0b5600442d7351e87479b6c2b3c3c6135 (refs/pull/3974/head)
[Fix] ratelimit - symbol per bucket
---
src/plugins/lua/ratelimit.lua | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua
index e31026366..b265ea1ca 100644
--- a/src/plugins/lua/ratelimit.lua
+++ b/src/plugins/lua/ratelimit.lua
@@ -797,8 +797,8 @@ if opts then
end, fun.map(function(n,d)
return string.format('%s [%s]', n,
table.concat(fun.totable(fun.map(function(v)
- return string.format('%s msgs burst, %s msgs/sec rate',
- v.burst, v.rate)
+ return string.format('symbol: %s, %s msgs burst, %s msgs/sec rate',
+ v.symbol, v.burst, v.rate)
end, d.buckets)), '; ')
)
end, settings.limits))
@@ -877,9 +877,9 @@ if opts then
-- Register per bucket symbols
-- Display what's enabled
- fun.each(function(set)
- if set.buckets then
- for _,b in ipairs(set.buckets) do
+ fun.each(function(set, lim)
+ if type(lim.buckets) == 'table' then
+ for _,b in ipairs(lim.buckets) do
if b.symbol then
rspamd_config:register_symbol{
type = 'virtual',
More information about the Commits
mailing list