From: Alexander Moisseev Date: Fri, 19 May 2017 06:30:35 +0000 (+0300) Subject: [Minor] Fix R_MISSING_CHARSET rule X-Git-Tag: 1.6.0~171^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1645%2Fhead;p=thirdparty%2Frspamd.git [Minor] Fix R_MISSING_CHARSET rule Do not trigger on messages with empty payload body as Content-Type header is not mandatory (RFC7231). --- diff --git a/rules/regexp/headers.lua b/rules/regexp/headers.lua index 593052a383..a2e7f3829c 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',