Browse Source

[Fix] DKIM signing: allow for auth_only to be false

tags/1.7.0
Andrew Lewis 6 years ago
parent
commit
8f1967692c
1 changed files with 10 additions and 10 deletions
  1. 10
    10
      lualib/dkim_sign_tools.lua

+ 10
- 10
lualib/dkim_sign_tools.lua View File

@@ -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')

Loading…
Cancel
Save