summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorJulien Schmidt <git@julienschmidt.com>2017-05-30 06:21:33 +0800
committerJulien Schmidt <git@julienschmidt.com>2017-05-30 06:24:56 +0800
commitdf802d3790df50bed38a5477f8c8c11f84c0cea0 (patch)
treea35474716709365c501b266ca632242cf4ea652a /rules
parent7c3e81ab7a91f184fd1a221d315206686c8b33d7 (diff)
downloadrspamd-df802d3790df50bed38a5477f8c8c11f84c0cea0.tar.gz
rspamd-df802d3790df50bed38a5477f8c8c11f84c0cea0.zip
[Minor] Do not punish OpenPGP/MIME attachments
Fixes #1655
Diffstat (limited to 'rules')
-rw-r--r--rules/headers_checks.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/rules/headers_checks.lua b/rules/headers_checks.lua
index 585c97b0b..8ee28e40b 100644
--- a/rules/headers_checks.lua
+++ b/rules/headers_checks.lua
@@ -897,7 +897,10 @@ rspamd_config.CTYPE_MISSING_DISPOSITION = {
local cd = p:get_header('Content-Disposition')
if (not cd) or (cd and cd:lower():find('^attachment') == nil) then
local ci = p:get_header('Content-ID')
- if ci then return false end
+ if ci or (#parts > 1 and (cd and cd:find('filename=.+%.asc') ~= nil))
+ then
+ return false
+ end
return true
end
end