diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2017-05-19 09:30:35 +0300 |
---|---|---|
committer | Alexander Moisseev <moiseev@mezonplus.ru> | 2017-05-19 09:30:35 +0300 |
commit | bf86836adacbbb919c146ec44150af2c6075c5c0 (patch) | |
tree | 3af6d5de279623678e248b725d5d7d602edb45e1 /rules/regexp | |
parent | 37a04a9e42001f376f69d2920315194f3098a0c4 (diff) | |
download | rspamd-bf86836adacbbb919c146ec44150af2c6075c5c0.tar.gz rspamd-bf86836adacbbb919c146ec44150af2c6075c5c0.zip |
[Minor] Fix R_MISSING_CHARSET rule
Do not trigger on messages with empty payload body as Content-Type header is not mandatory (RFC7231).
Diffstat (limited to 'rules/regexp')
-rw-r--r-- | rules/regexp/headers.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/regexp/headers.lua b/rules/regexp/headers.lua index 593052a38..a2e7f3829 100644 --- a/rules/regexp/headers.lua +++ b/rules/regexp/headers.lua @@ -93,7 +93,7 @@ reconf['R_RCVD_SPAMBOTS'] = { -- Charset is missing in message reconf['R_MISSING_CHARSET'] = { - re = string.format('content_type_is_type(text) & !content_type_has_param(charset) & !%s', + re = string.format('!is_empty_body() & content_type_is_type(text) & !content_type_has_param(charset) & !%s', 'compare_transfer_encoding(7bit)'), score = 2.5, description = 'Charset is missing in a message', |