]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Lua_magic: Make an exclusion for message parts
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Apr 2021 13:08:47 +0000 (14:08 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Apr 2021 13:08:47 +0000 (14:08 +0100)
lualib/lua_magic/heuristics.lua

index 042bfde3f8835bce3e3a99357f23e7b42b78223a..5863897bc474ab7eb6d6c66e7aee00ac3899ff4b 100644 (file)
@@ -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