commit 608a080: [Minor] Add rule for messages missing both X-Mailer and User-Agent header
twesterhever
40121680+twesterhever at users.noreply.github.com
Fri Nov 3 14:42:03 UTC 2023
Author: twesterhever
Date: 2023-11-03 14:01:07 +0000
URL: https://github.com/rspamd/rspamd/commit/608a080d1142fd51c43fda158f8b62092d9cf837 (refs/pull/4682/head)
[Minor] Add rule for messages missing both X-Mailer and User-Agent header
---
rules/regexp/headers.lua | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/rules/regexp/headers.lua b/rules/regexp/headers.lua
index c4411e53a..0624997aa 100644
--- a/rules/regexp/headers.lua
+++ b/rules/regexp/headers.lua
@@ -949,6 +949,16 @@ reconf['XM_UA_NO_VERSION'] = {
group = 'experimental'
}
+-- Detects messages missing both X-Mailer and User-Agent header
+local has_ua = 'header_exists(User-Agent)'
+local has_xmailer = 'header_exists(X-Mailer)'
+reconf['MISSING_XM_UA'] = {
+ re = string.format('!%s && !%s', has_xmailer, has_ua),
+ score = 0.0,
+ description = 'Message has neither X-Mailer nor User-Agent header',
+ group = 'headers',
+}
+
-- X-Mailer for old MUA versions which are forged by spammers
local old_x_mailers = {
-- Outlook Express 6.0 was last included in Windows XP (EOL 2014). Windows
More information about the Commits
mailing list