From: Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com> Date: Wed, 30 Jul 2025 13:18:01 +0000 (+0200) Subject: Disable invalid mime from and rcpt in case of 8bit and enable_mime_utf X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5553%2Fhead;p=thirdparty%2Frspamd.git Disable invalid mime from and rcpt in case of 8bit and enable_mime_utf --- diff --git a/rules/headers_checks.lua b/rules/headers_checks.lua index 905c8db628..168d76e3d6 100644 --- a/rules/headers_checks.lua +++ b/rules/headers_checks.lua @@ -1186,6 +1186,16 @@ rspamd_config.INVALID_RCPT_8BIT = { group = 'headers' } +if rspamd_config:is_mime_utf8() then + -- Disable some of the rules preserving the underlying logic + rspamd_config.INVALID_FROM_8BIT.condition = function() + return false + end + rspamd_config.INVALID_RCPT_8BIT.condition = function() + return false + end +end + rspamd_config.XM_CASE = { callback = function(task) return task:has_header('X-mailer', true)