From: Andrew Lewis Date: Fri, 17 Mar 2017 11:44:29 +0000 (+0200) Subject: [Minor] DKIM signing: lower-case both of envelope/header domains X-Git-Tag: 1.5.3~2^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e58455ae6ba37ef7723bf1189771f5bc1b1ac6fa;p=rspamd.git [Minor] DKIM signing: lower-case both of envelope/header domains --- diff --git a/src/plugins/lua/dkim_signing.lua b/src/plugins/lua/dkim_signing.lua index 2efae0625..8777afe93 100644 --- a/src/plugins/lua/dkim_signing.lua +++ b/src/plugins/lua/dkim_signing.lua @@ -79,6 +79,12 @@ local function dkim_signing_cb(task) local dkim_domain local hdom = ((hfrom or E)[1] or E).domain local edom = ((efrom or E)[1] or E).domain + if hdom then + hdom = hdom:lower() + end + if edom then + edom = edom:lower() + end if settings.use_domain == 'header' then dkim_domain = hdom else @@ -87,8 +93,6 @@ local function dkim_signing_cb(task) if not dkim_domain then rspamd_logger.debugm(N, task, 'could not extract dkim domain') return false - else - dkim_domain = dkim_domain:lower() end if settings.use_esld then dkim_domain = rspamd_util.get_tld(dkim_domain)