From: Vsevolod Stakhov Date: Thu, 29 Jun 2017 18:13:36 +0000 (+0100) Subject: [Minor] Lowercase email addresses X-Git-Tag: 1.6.2~51 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3019adc5713d89bc4f953cd9af0afc48a484f322;p=rspamd.git [Minor] Lowercase email addresses --- diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua index 41b65f2ff..ba390383c 100644 --- a/src/plugins/lua/emails.lua +++ b/src/plugins/lua/emails.lua @@ -116,9 +116,9 @@ local function gen_check_emails(rule) for _,addr in ipairs(emails) do local to_check = string.format('%s@%s', addr:get_user(), addr:get_host()) local naddr = { - user = addr:get_user(), - domain = addr:get_host(), - addr = to_check + user = (addr:get_user() or ''):lower(), + domain = (addr:get_host() or ''):lower(), + addr = to_check:lower() } rspamd_lua_utils.remove_email_aliases(naddr)