]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Lower-case DKIM domain sooner 1532/head
authorAndrew Lewis <nerf@judo.za.org>
Fri, 17 Mar 2017 11:23:49 +0000 (13:23 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Fri, 17 Mar 2017 11:23:49 +0000 (13:23 +0200)
src/plugins/lua/dkim_signing.lua

index e58f9cde53aaf375d0916dbffff0901e63cb2459..2efae06254d670dee92a65f2febce0dae2882ddf 100644 (file)
@@ -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