type = 'normal',
name = m['symbol'],
callback = cb,
+ score = 0.0,
+ group = 'antivirus'
})
rspamd_config:register_symbol({
type = 'virtual',
name = m['symbol_fail'],
parent = id,
score = 0.0,
+ group = 'antivirus'
})
has_valid = true
if type(m['patterns']) == 'table' then
name = m['symbol'],
score = m['score'],
description = description,
- group = group
+ group = group or 'antivirus'
})
end
end
local id = rspamd_config:register_symbol({
name = 'ARC_CALLBACK',
type = 'callback',
+ group = 'policies',
+ groups = {'arc'},
callback = arc_callback
})
type = 'virtual',
score = -1.0,
group = 'policies',
+ groups = {'arc'},
})
rspamd_config:register_symbol({
name = arc_symbols['reject'],
type = 'virtual',
score = 2.0,
group = 'policies',
+ groups = {'arc'},
})
rspamd_config:register_symbol({
name = arc_symbols['invalid'],
type = 'virtual',
score = 1.0,
group = 'policies',
+ groups = {'arc'},
})
rspamd_config:register_symbol({
name = arc_symbols['dnsfail'],
type = 'virtual',
score = 0.0,
group = 'policies',
+ groups = {'arc'},
})
rspamd_config:register_symbol({
name = arc_symbols['na'],
type = 'virtual',
score = 0.0,
group = 'policies',
+ groups = {'arc'},
})
rspamd_config:register_dependency('ARC_CALLBACK', symbols['spf_allow_symbol'])
local id = rspamd_config:register_symbol({
name = 'DMARC_CALLBACK',
type = 'callback',
+ group = 'policies',
+ groups = {'dmarc'},
callback = dmarc_callback
})
rspamd_config:register_symbol({
name = dmarc_symbols['allow'],
flags = 'nice',
parent = id,
+ group = 'policies',
+ groups = {'dmarc'},
type = 'virtual'
})
rspamd_config:register_symbol({
name = dmarc_symbols['reject'],
parent = id,
+ group = 'policies',
+ groups = {'dmarc'},
type = 'virtual'
})
rspamd_config:register_symbol({
name = dmarc_symbols['quarantine'],
parent = id,
+ group = 'policies',
+ groups = {'dmarc'},
type = 'virtual'
})
rspamd_config:register_symbol({
name = dmarc_symbols['softfail'],
parent = id,
+ group = 'policies',
+ groups = {'dmarc'},
type = 'virtual'
})
rspamd_config:register_symbol({
name = dmarc_symbols['dnsfail'],
parent = id,
+ group = 'policies',
+ groups = {'dmarc'},
type = 'virtual'
})
rspamd_config:register_symbol({
name = dmarc_symbols['na'],
parent = id,
+ group = 'policies',
+ groups = {'dmarc'},
type = 'virtual'
})
name = 'FORGED_CALLBACK',
callback = check_forged_headers,
type = 'callback',
+ group = 'headers',
+ score = 0.0,
})
if opts['symbol_rcpt'] then
symbol_rcpt = opts['symbol_rcpt']
--dumper(symbols_enabled)
if #symbols_enabled > 0 then
rspamd_config:register_symbols(hfilter, 1.0, "HFILTER", symbols_enabled);
+ rspamd_config:set_metric_symbol({
+ name = 'HFILTER',
+ score = 0.0,
+ group = 'hfilter'
+ })
+
+ for _,s in ipairs(symbols_enabled) do
+ rspamd_config:set_metric_symbol({
+ name = s,
+ score = 0.0,
+ group = 'hfilter'
+ })
+ end
else
lua_util.disable_module(N, "config")
end
local id = rspamd_config:register_symbol({
name = 'KNOWN_MID_CALLBACK',
type = 'callback',
+ group = 'mid',
callback = known_mid_cb
})
rspamd_config:register_symbol({
name = settings['symbol_known_mid'],
parent = id,
+ group = 'mid',
type = 'virtual'
})
rspamd_config:register_symbol({
name = settings['symbol_known_no_mid'],
parent = id,
+ group = 'mid',
type = 'virtual'
})
rspamd_config:add_composite(settings['csymbol_invalid_msgid_allowed'],
local id = rspamd_config:register_symbol({
name = 'MIME_TYPES_CALLBACK',
callback = check_mime_type,
- type = 'callback,nostat'
+ type = 'callback,nostat',
+ group = 'mime_types',
})
rspamd_config:register_symbol({
type = 'virtual',
name = settings['symbol_unknown'],
- parent = id
+ parent = id,
+ group = 'mime_types',
})
rspamd_config:register_symbol({
type = 'virtual',
name = settings['symbol_bad'],
- parent = id
+ parent = id,
+ group = 'mime_types',
})
rspamd_config:register_symbol({
type = 'virtual',
name = settings['symbol_good'],
flags = 'nice',
- parent = id
+ parent = id,
+ group = 'mime_types',
})
rspamd_config:register_symbol({
type = 'virtual',
name = settings['symbol_attachment'],
- parent = id
+ parent = id,
+ group = 'mime_types',
})
rspamd_config:register_symbol({
type = 'virtual',
name = settings['symbol_encrypted_archive'],
- parent = id
+ parent = id,
+ group = 'mime_types',
})
rspamd_config:register_symbol({
type = 'virtual',
name = settings['symbol_archive_in_archive'],
- parent = id
+ parent = id,
+ group = 'mime_types',
})
rspamd_config:register_symbol({
type = 'virtual',
name = settings['symbol_double_extension'],
- parent = id
+ parent = id,
+ group = 'mime_types',
})
rspamd_config:register_symbol({
type = 'virtual',
name = settings['symbol_bad_extension'],
- parent = id
+ parent = id,
+ group = 'mime_types',
})
else
lua_util.disable_module(N, "config")