]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Rules] Fix CTYPE_MIXED_BOGUS for text attachments
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 19 May 2021 14:12:33 +0000 (15:12 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 19 May 2021 14:12:33 +0000 (15:12 +0100)
Issue: #3748

rules/headers_checks.lua

index 4613a7dd72a7383a7d7f7bda27b6adb268ca4a11..9cdd9c57c08fdbd937c415dc38a025239b4f1014 100644 (file)
@@ -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