From 86b50712eff45e4a2a044fd1ec1878be84055221 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Mon, 6 Mar 2017 18:00:20 +0200 Subject: [PATCH] [Fix] Couple of fixes for DKIM signing module --- src/plugins/lua/dkim_signing.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/lua/dkim_signing.lua b/src/plugins/lua/dkim_signing.lua index 7f3d1ffcc..d439c5e58 100644 --- a/src/plugins/lua/dkim_signing.lua +++ b/src/plugins/lua/dkim_signing.lua @@ -78,13 +78,13 @@ local function dkim_signing_cb(task) end if settings.use_esld then dkim_domain = rspamd_util.get_tld(dkim_domain) - if settings.use_domain == 'envelope' then + if settings.use_domain == 'envelope' and hdom then hdom = rspamd_util.get_tld(hdom) - elseif settings.use_domain == 'header' then + elseif settings.use_domain == 'header' and edom then edom = rspamd_util.get_tld(edom) end end - if not settings.allow_hdrfrom_mismatch and hdom ~= edom then + if edom and hdom and not settings.allow_hdrfrom_mismatch and hdom ~= edom then rspamd_logger.debugm(N, task, 'domain mismatch not allowed: %1 != %2', hdom, edom) return false end -- 2.39.5