aboutsummaryrefslogtreecommitdiffstats
path: root/rules/headers_checks.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-09 18:29:40 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-09 18:29:40 +0000
commitda7b65e4b52f1abe485bfcf1abe7f36c836c4186 (patch)
treeb784c41a2fb7a83b5e48d4b8fb3d41388affc9eb /rules/headers_checks.lua
parent3e9c05bcc9dd370a9c65ecdecee6c236e245f917 (diff)
downloadrspamd-da7b65e4b52f1abe485bfcf1abe7f36c836c4186.tar.gz
rspamd-da7b65e4b52f1abe485bfcf1abe7f36c836c4186.zip
[Minor] Relax CTYPE_MISSING_DISPOSITION rule for pgp encryption
Issue: #2706 Closes: #2706
Diffstat (limited to 'rules/headers_checks.lua')
-rw-r--r--rules/headers_checks.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/rules/headers_checks.lua b/rules/headers_checks.lua
index 353690b56..359975dc1 100644
--- a/rules/headers_checks.lua
+++ b/rules/headers_checks.lua
@@ -958,6 +958,7 @@ rspamd_config:register_symbol{
description = 'Some of the recipients match the envelope',
}
+-- TODO: rewrite this rule, it should not touch headers directly
rspamd_config.CTYPE_MISSING_DISPOSITION = {
callback = function(task)
local parts = task:get_parts()
@@ -972,6 +973,18 @@ rspamd_config.CTYPE_MISSING_DISPOSITION = {
then
return false
end
+
+ local parent = p:get_parent()
+
+ if parent then
+ local t,st = parent:get_type()
+
+ if t == 'multipart' and st == 'encrypted' then
+ -- Special case
+ return false
+ end
+ end
+
return true
end
end