diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | lualib/lua_mime.lua | 5 | ||||
-rw-r--r-- | src/libmime/scan_result.c | 2 |
3 files changed, 6 insertions, 3 deletions
@@ -28,7 +28,7 @@ We advice to use packages provided by Rspamd project if available for your OS in Rspamd is shipped with various spam filtering modules and features enabled just out of the box. The full list of built-in modules could be found in the [Rspamd documentation](https://rspamd.com/doc/modules/). -If that is not enough, Rspamd provides an extensive [Lua API](https://rspamd.com/doc/lua/) to write your own rules and plugins: <https://rspamd.com/doc/tutorials/writing_rules.html> +If that is not enough, Rspamd provides an extensive [Lua API](https://rspamd.com/doc/lua/) to write your own rules and plugins: <https://rspamd.com/doc/developers/writing_rules.html> ## License diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua index 0f5aa75c0..ea6bf5125 100644 --- a/lualib/lua_mime.lua +++ b/lualib/lua_mime.lua @@ -582,8 +582,11 @@ exports.modify_headers = function(task, hdr_alterations, mode) hdr_flattened[hname].remove = {} end local remove_tbl = hdr_flattened[hname].remove - if type(hdr) == 'number' then + local t_hdr = type(hdr) + if t_hdr == 'number' then table.insert(remove_tbl, hdr) + elseif t_hdr == 'userdata' then + hdr_alterations.remove[hname] = nil else for _, num in ipairs(hdr) do table.insert(remove_tbl, num) diff --git a/src/libmime/scan_result.c b/src/libmime/scan_result.c index ad3b5ef24..f15290b95 100644 --- a/src/libmime/scan_result.c +++ b/src/libmime/scan_result.c @@ -407,7 +407,7 @@ insert_metric_result(struct rspamd_task *task, } if (!isnan(diff)) { - + metric_res->score += diff; if (single) { msg_debug_metric("final score for single symbol %s = %.2f; %.2f diff", symbol, final_score, diff); |