From: Andrew Lewis Date: Mon, 6 Mar 2017 16:00:20 +0000 (+0200) Subject: [Fix] Couple of fixes for DKIM signing module X-Git-Tag: 1.5.2~10^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=86b50712eff45e4a2a044fd1ec1878be84055221;p=rspamd.git [Fix] Couple of fixes for DKIM signing module --- 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