From 561dcaece01f78ed1d0de249701bc1698aa2cbb8 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Mon, 15 Jan 2018 17:33:48 +0200 Subject: [PATCH] [Fix] DKIM signing: allow for auth_only to be false --- lualib/dkim_sign_tools.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lualib/dkim_sign_tools.lua b/lualib/dkim_sign_tools.lua index 4b615eae0..afe34ff57 100644 --- a/lualib/dkim_sign_tools.lua +++ b/lualib/dkim_sign_tools.lua @@ -30,16 +30,16 @@ local function prepare_dkim_signing(N, task, settings) is_local = true end - if settings.auth_only and not auser then - if (settings.sign_networks and settings.sign_networks:get_key(ip)) then - is_sign_networks = true - rspamd_logger.debugm(N, task, 'mail is from address in sign_networks') - elseif settings.sign_local and is_local then - rspamd_logger.debugm(N, task, 'mail is from local address') - else - rspamd_logger.debugm(N, task, 'ignoring unauthenticated mail') - return false,{} - end + if settings.auth_only and auser then + rspamd_logger.debugm(N, task, 'user is authenticated') + elseif (settings.sign_networks and settings.sign_networks:get_key(ip)) then + is_sign_networks = true + rspamd_logger.debugm(N, task, 'mail is from address in sign_networks') + elseif settings.sign_local and is_local then + rspamd_logger.debugm(N, task, 'mail is from local address') + else + rspamd_logger.debugm(N, task, 'ignoring unauthenticated mail') + return false,{} end local efrom = task:get_from('smtp') -- 2.39.5