commit e40213c: [Rules] Fix CTYPE_MIXED_BOGUS for text attachments

Vsevolod Stakhov vsevolod at highsecure.ru
Wed May 19 14:14:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-05-19 15:12:33 +0100
URL: https://github.com/rspamd/rspamd/commit/e40213cb545daa6e0a7093aba7b777a9eb38f213 (HEAD -> master)

[Rules] Fix CTYPE_MIXED_BOGUS for text attachments
Issue: #3748

---
 rules/headers_checks.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/headers_checks.lua b/rules/headers_checks.lua
index 4613a7dd7..9cdd9c57c 100644
--- a/rules/headers_checks.lua
+++ b/rules/headers_checks.lua
@@ -1001,7 +1001,7 @@ rspamd_config.CTYPE_MIXED_BOGUS = {
     for _,p in ipairs(parts) do
       local mtype,_ = p:get_type()
       if mtype then
-        if mtype == 'text' then
+        if mtype == 'text' and not p:is_attachment() then
           ntext_parts = ntext_parts + 1
           if ntext_parts > 2 then
             found = true


More information about the Commits mailing list