group = 'policies',
})
-rspamd_config:register_dependency(id, symbols['spf_allow_symbol'])
-rspamd_config:register_dependency(id, symbols['dkim_allow_symbol'])
+rspamd_config:register_dependency('ARC_CALLBACK', symbols['spf_allow_symbol'])
+rspamd_config:register_dependency('ARC_CALLBACK', symbols['dkim_allow_symbol'])
local function arc_sign_seal(task, params, header)
local fold_type = "crlf"
})
-- Do not sign unless valid
-rspamd_config:register_dependency(id, 'ARC_CALLBACK')
+rspamd_config:register_dependency(settings['sign_symbol'], 'ARC_CALLBACK')
type = 'virtual'
})
-rspamd_config:register_dependency(id, symbols['spf_allow_symbol'])
-rspamd_config:register_dependency(id, symbols['dkim_allow_symbol'])
+rspamd_config:register_dependency('DMARC_CALLBACK', symbols['spf_allow_symbol'])
+rspamd_config:register_dependency('DMARC_CALLBACK', symbols['dkim_allow_symbol'])
flags = 'empty',
})
for _, a in ipairs(atoms) do
- rspamd_config:register_dependency(id, a)
+ rspamd_config:register_dependency(name, a)
end
rspamd_logger.infox(rspamd_config, 'Registered symbol %1 <%2> with dependencies [%3]', name, expr, table.concat(atoms, ','))
end
local id = rspamd_config:register_symbol(t)
if t.type == 'normal' then
for _, a in ipairs(atoms) do
- rspamd_config:register_dependency(id, a)
+ rspamd_config:register_dependency(t.name, a)
end
rspamd_logger.infox(rspamd_config, 'Registered symbol %1 <%2> with dependencies [%3]', name, expr, table.concat(atoms, ','))
else
rspamd_config:add_composite(settings['csymbol_missing_mid_allowed'],
settings['symbol_known_no_mid'] .. ' & ' .. settings['symbol_missing_mid'])
- rspamd_config:register_dependency(id, settings['symbol_dkim_allow'])
+ rspamd_config:register_dependency('KNOWN_MID_CALLBACK', settings['symbol_dkim_allow'])
else
rspamd_logger.infox(rspamd_config, 'source is not specified, disabling module')
lua_util.disable_module(N, "config")
end
local id = rspamd_config:register_symbol(s)
if use_ip_score then
- rspamd_config:register_dependency(id, 'IP_SCORE')
+ rspamd_config:register_dependency(s.name, 'IP_SCORE')
end
for _, v in pairs(custom_keywords) do
if type(v) == 'table' and type(v['init']) == 'function' then
local id = rspamd_config:register_symbol({
type = 'callback',
callback = rbl_cb,
+ name = 'RBL_CALLBACK',
flags = 'empty,nice'
})
end
end
if need_dkim then
- rspamd_config:register_dependency(id, symbols['dkim_allow_symbol'])
+ rspamd_config:register_dependency('RBL_CALLBACK', symbols['dkim_allow_symbol'])
end
if rule.selector.dependencies then
fun.each(function(d)
- rspamd_config:register_dependency(id, d)
+ rspamd_config:register_dependency(symbol, d)
end, rule.selector.dependencies)
end
local spf_dep = false
local dkim_dep = false
if rule['valid_spf'] then
- rspamd_config:register_dependency(id, options['spf_allow_symbol'])
+ rspamd_config:register_dependency(symbol, options['spf_allow_symbol'])
spf_dep = true
end
if rule['valid_dkim'] then
- rspamd_config:register_dependency(id, options['dkim_allow_symbol'])
+ rspamd_config:register_dependency(symbol, options['dkim_allow_symbol'])
dkim_dep = true
end
if rule['valid_dmarc'] then
if not spf_dep then
- rspamd_config:register_dependency(id, options['spf_allow_symbol'])
+ rspamd_config:register_dependency(symbol, options['spf_allow_symbol'])
end
if not dkim_dep then
- rspamd_config:register_dependency(id, options['dkim_allow_symbol'])
+ rspamd_config:register_dependency(symbol, options['dkim_allow_symbol'])
end
- rspamd_config:register_dependency(id, 'DMARC_CALLBACK')
+ rspamd_config:register_dependency(symbol, 'DMARC_CALLBACK')
end
if rule['score'] then