diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-10-22 13:12:33 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-10-22 13:12:33 +0100 |
commit | 0cc9932cfed4c2854d329b42d688674ba3a0bd51 (patch) | |
tree | a50e2bfbd1c630bf9f2c088875c72d8bc07a7c79 /src | |
parent | 8b18d032b394d1873eb16e28e7caae9f6d8fe9c1 (diff) | |
download | rspamd-0cc9932cfed4c2854d329b42d688674ba3a0bd51.tar.gz rspamd-0cc9932cfed4c2854d329b42d688674ba3a0bd51.zip |
[Fix] Multimap: Fix flags usage
Issue: #3526
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/multimap.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index c253c660e..109f974cd 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -1276,11 +1276,21 @@ if opts and type(opts) == 'table' then rule.description = rule.description or 'multimap symbol' rule.group = rule.group or N + local tmp_flags + tmp_flags = rule.flags + + if rule.type == 'received' and rule.flags then + -- XXX: hack to allow received flags/nflags + -- See issue #3526 on GH + rule.flags = nil + end + -- XXX: for combined maps we use trace, so flags must include one_shot to avoid scores multiplication if rule.combined and not rule.flags then rule.flags = 'one_shot' end rspamd_config:set_metric_symbol(rule) + rule.flags = tmp_flags end end, fun.filter(function(r) return not r['prefilter'] end, rules)) |