aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--lualib/lua_mime.lua5
-rw-r--r--src/libmime/scan_result.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/README.md b/README.md
index 6bb2494b7..b4d234d50 100644
--- a/README.md
+++ b/README.md
@@ -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);