lua_util.debugm(N, task, 'dkim unconfigured and fallback disabled')
return false,{}
end
+
+ lua_util.debugm(N, task, 'override selector and key to %s:%s', p.key, p.selector)
end
if not p.selector and settings.selector_map then
local data = settings.selector_map:get_key(dkim_domain)
if data then
p.selector = data
+ lua_util.debugm(N, task, 'override selector to "%s" using selector_map', p.selector)
elseif not settings.try_fallback then
lua_util.debugm(N, task, 'no selector for %s', dkim_domain)
return false,{}
local data = settings.path_map:get_key(dkim_domain)
if data then
p.key = data
+ lua_util.debugm(N, task, 'override key to "%s" using path_map', p.key)
elseif not settings.try_fallback then
lua_util.debugm(N, task, 'no key for %s', dkim_domain)
return false,{}
if not p.key then
if not settings.use_redis then
p.key = settings.path
+ lua_util.debugm(N, task, 'use default key "%s" from path', p.key)
end
end
if not p.selector then
p.selector = settings.selector
+ lua_util.debugm(N, task, 'use default selector "%s"', p.selector)
end
+
p.domain = dkim_domain
return true,p
lua_util.debugm(N, task, "missing DKIM key for %s", rk)
else
p.rawkey = data
+ lua_util.debugm(N, task, 'found and parsed key for %s:%s in Redis',
+ p.domain, p.selector)
do_sign()
end
end
end
end
if settings.selector_prefix then
- rspamd_logger.infox(task, "Using selector prefix %s for domain %s", settings.selector_prefix, p.domain);
+ rspamd_logger.infox(task, "Using selector prefix '%s' for domain '%s'",
+ settings.selector_prefix, p.domain);
local function redis_selector_cb(err, data)
if err or type(data) ~= 'string' then
rspamd_logger.infox(task, "cannot make request to load DKIM selector for domain %s: %s", p.domain, err)
{settings.selector_prefix, p.domain} -- arguments
)
if not rret then
- rspamd_logger.infox(task, "cannot make request to load DKIM selector for %s", p.domain)
+ rspamd_logger.infox(task, "cannot make request to load DKIM selector for '%s'", p.domain)
end
else
if not p.selector then
local exists,err = rspamd_util.file_exists(p.key)
if not exists then
if err and err == 'No such file or directory' then
- lua_util.debugm(N, task, 'cannot read key from %s: %s', p.key, err)
+ lua_util.debugm(N, task, 'cannot read key from "%s": %s', p.key, err)
else
- rspamd_logger.warnx(N, task, 'cannot read key from %s: %s', p.key, err)
+ rspamd_logger.warnx(N, task, 'cannot read key from "%s": %s', p.key, err)
end
return false
end
+ lua_util.debugm(N, task, 'key found at "%s", use selector "%s" for domain "%s"',
+ p.key, p.selector, p.domain)
+
do_sign()
else
rspamd_logger.infox(task, 'key path or dkim selector unconfigured; no signing')