diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lua/lua_task.c | 5 | ||||
-rw-r--r-- | src/plugins/lua/multimap.lua | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 3968c01eb..b368ad4e6 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -192,6 +192,11 @@ LUA_FUNCTION_DEF(task, remove_result); * - `rewrite subject`: rewrite subject to spam subject * - `greylist`: greylist message * - `accept` or `no action`: whitelist message + * - `quarantine`: quarantine the message; depending on the MTA, it can be done via HOLD. + * Note: the message parameter must be `nil` for proper operation. + * - `discard`: drop the message from the queue without returning an error to the sender. + * + * Actions should be defined in the `actions.conf` configuration file. * * This function also accepts a table from Rspamd 2.6 with the following keys: * - action: string required 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, }) |