rule.type = opts.type
- if not opts.symbol_fail then
- opts.symbol_fail = opts.symbol .. '_FAIL'
- end
- if not opts.symbol_encrypted then
- opts.symbol_encrypted = opts.symbol .. '_ENCRYPTED'
- end
- if not opts.symbol_macro then
- opts.symbol_macro = opts.symbol .. '_MACRO'
+ if not rule.symbol_fail then
+ rule.symbol_fail = rule.symbol .. '_FAIL'
end
rule.redis_params = redis_params
local id = rspamd_config:register_symbol(t)
- rspamd_config:register_symbol({
- type = 'virtual',
- name = m['symbol_fail'],
- parent = id,
- score = 0.0,
- group = N
- })
+ if m.symbol_fail then
+ rspamd_config:register_symbol({
+ type = 'virtual',
+ name = m['symbol_fail'],
+ parent = id,
+ score = 0.0,
+ group = N
+ })
+ end
if m.symbol_encrypted then
rspamd_config:register_symbol({