commit adefe59: [Minor] Lua_magic: Make an exclusion for message parts

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Apr 22 13:14:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-04-22 14:08:47 +0100
URL: https://github.com/rspamd/rspamd/commit/adefe59d6f1273d4b9613bf29f19bca954d6ad45

[Minor] Lua_magic: Make an exclusion for message parts

---
 lualib/lua_magic/heuristics.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua
index 042bfde3f..5863897bc 100644
--- a/lualib/lua_magic/heuristics.lua
+++ b/lualib/lua_magic/heuristics.lua
@@ -427,7 +427,7 @@ exports.text_part_heuristic = function(part, log_obj, _)
 
         local ext, weight = process_top_detected(res)
 
-        if weight and weight >= 40 then
+        if weight and weight >= 40 and mtype ~= 'message' then
           return ext, weight
         end
       end


More information about the Commits mailing list