|
|
@@ -156,21 +156,12 @@ local function prepare_dkim_signing(N, task, settings) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
if not p.key then |
|
|
|
if not settings.use_redis then |
|
|
|
p.key = settings.path |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
if not p.selector then |
|
|
|
p.selector = settings.selector |
|
|
|
end |
|
|
|
p.domain = dkim_domain |
|
|
|
|
|
|
|
if not p.selector and settings.selector_map then |
|
|
|
local data = settings.selector_map:get_key(dkim_domain) |
|
|
|
if data then |
|
|
|
p.selector = data |
|
|
|
elseif not settings.try_fallback then |
|
|
|
return false,{} |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
@@ -178,11 +169,22 @@ local function prepare_dkim_signing(N, task, settings) |
|
|
|
local data = settings.path_map:get_key(dkim_domain) |
|
|
|
if data then |
|
|
|
p.key = data |
|
|
|
else |
|
|
|
elseif not settings.try_fallback then |
|
|
|
return false,{} |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
if not p.key then |
|
|
|
if not settings.use_redis then |
|
|
|
p.key = settings.path |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
if not p.selector then |
|
|
|
p.selector = settings.selector |
|
|
|
end |
|
|
|
p.domain = dkim_domain |
|
|
|
|
|
|
|
return true,p |
|
|
|
end |
|
|
|
|