From: Vsevolod Stakhov Date: Wed, 17 Apr 2019 15:23:02 +0000 (+0100) Subject: [Minor] Emails: Lowercase all emails before check X-Git-Tag: 1.9.3~105 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=942de46ab870d84b23897f4e2ce854d27b79f60f;p=rspamd.git [Minor] Emails: Lowercase all emails before check Issue: #2857 Closes: #2857 --- 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