]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Disable invalid mime from and rcpt in case of 8bit and enable_mime_utf 5553/head
authorDmitriy Alekseev <1865999+dragoangel@users.noreply.github.com>
Wed, 30 Jul 2025 13:18:01 +0000 (15:18 +0200)
committerGitHub <noreply@github.com>
Wed, 30 Jul 2025 13:18:01 +0000 (15:18 +0200)
rules/headers_checks.lua

index 905c8db62811c67e535120959e36ea7989ef7526..168d76e3d60ec35ed5a618fc9c1ed7df9db7b251 100644 (file)
@@ -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)