commit 942de46: [Minor] Emails: Lowercase all emails before check
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Apr 17 15:28:03 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-04-17 16:23:02 +0100
URL: https://github.com/rspamd/rspamd/commit/942de46ab870d84b23897f4e2ce854d27b79f60f (HEAD -> master)
[Minor] Emails: Lowercase all emails before check
Issue: #2857
Closes: #2857
---
src/plugins/lua/emails.lua | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua
index 1727e49e1..778654a3b 100644
--- a/src/plugins/lua/emails.lua
+++ b/src/plugins/lua/emails.lua
@@ -49,6 +49,8 @@ local function check_email_rule(task, rule, addr)
email = string.format('%s%s%s', addr.user, rule.delimiter, addr.domain)
end
+ email = email:lower()
+
local function emails_dns_cb(_, _, results, err)
if err and (err ~= 'requested record is not found'
and err ~= 'no records with this name') then
@@ -190,6 +192,7 @@ local function gen_check_emails(rule)
if rt and rt[1] then
rspamd_lua_utils.remove_email_aliases(rt[1])
+ rt[1].addr = rt[1].addr:lower()
if not checked[rt[1].addr] then
check_email_rule(task, rule, rt[1])
checked[rt[1].addr] = true
More information about the Commits
mailing list