From 8fca8a24cefe0d0743f64c0af178eb445d7d8fc0 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Fri, 17 Mar 2017 13:23:49 +0200 Subject: [PATCH] [Minor] Lower-case DKIM domain sooner --- src/plugins/lua/dkim_signing.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/dkim_signing.lua b/src/plugins/lua/dkim_signing.lua index e58f9cde5..2efae0625 100644 --- a/src/plugins/lua/dkim_signing.lua +++ b/src/plugins/lua/dkim_signing.lua @@ -87,6 +87,8 @@ 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) @@ -115,7 +117,6 @@ local function dkim_signing_cb(task) end end local p = {} - dkim_domain = dkim_domain:lower() if settings.domain[dkim_domain] then p.selector = settings.domain[dkim_domain].selector p.key = settings.domain[dkim_domain].path -- 2.39.5