diff options
Diffstat (limited to 'src/plugins/lua/multimap.lua')
-rw-r--r-- | src/plugins/lua/multimap.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index c67b3ddbe..e852ce15e 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -1118,6 +1118,7 @@ local function multimap_on_load_gen(rule) lua_util.debugm(N, rspamd_config, "loaded map object for rule %s", rule['symbol']) local known_symbols = {} rule.map_obj:foreach(function(key, value) + local mult = rule.score or 1.0 local r, symbol, score, _ = parse_multimap_value(rule, value) if r and symbol and not known_symbols[symbol] then @@ -1127,11 +1128,11 @@ local function multimap_on_load_gen(rule) name = symbol, parent = rule.callback_id, type = 'virtual', - score = score, + score = score * mult, } rspamd_config:set_metric_symbol({ group = N, - score = 1.0, -- In future, we will parse score from `get_value` and use it as multiplier + score = mult, -- In future, we will parse score from `get_value` and use it as multiplier description = 'Automatic symbol generated by rule: ' .. rule.symbol, name = symbol, }) |