aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2017-08-28 13:00:19 +0200
committerAndrew Lewis <nerf@judo.za.org>2017-08-28 13:13:33 +0200
commitffdcbd493733f04a488838ad33e85d83184df296 (patch)
tree19c622fa7fda0a43d329fc6212e43d2f5eb92d3a /src
parentfa724a46030d58d6faf2215c5f544aaefc52ff4e (diff)
downloadrspamd-ffdcbd493733f04a488838ad33e85d83184df296.tar.gz
rspamd-ffdcbd493733f04a488838ad33e85d83184df296.zip
[Fix] Ratelimit: lowercase email addresses
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/ratelimit.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua
index 3036657f0..2516d1844 100644
--- a/src/plugins/lua/ratelimit.lua
+++ b/src/plugins/lua/ratelimit.lua
@@ -287,7 +287,7 @@ local keywords = {
['get_value'] = function(task)
local from = task:get_from(0)
if ((from or E)[1] or E).addr then
- return from[1]['addr']
+ return string.lower(from[1]['addr'])
end
return nil
end,
@@ -366,7 +366,7 @@ local function dynamic_rate_key(task, rtype)
local total_rcpt = 0
for _, r in ipairs(rcpts) do
if r['addr'] and total_rcpt < max_rcpt then
- local key_f = string.format(key_s, r['addr'])
+ local key_f = string.format(key_s, string.lower(r['addr']))
table.insert(rate_keys, key_f)
total_rcpt = total_rcpt + 1
end