commit 7603ac8: [Minor] Cleanup crap

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Oct 25 10:28:06 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-10-25 11:24:28 +0100
URL: https://github.com/rspamd/rspamd/commit/7603ac88ab8c9ccc44223c3580d857033457d5d8 (HEAD -> master)

[Minor] Cleanup crap

---
 .luacheckrc              |  1 -
 rules/regexp/headers.lua | 17 -----------------
 2 files changed, 18 deletions(-)

diff --git a/.luacheckrc b/.luacheckrc
index 871aa4811..1af61bfda 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -15,7 +15,6 @@ globals = {
   'classifiers',
   'config',
   'confighelp',
-  'kmail_msgid',
   'rspamd_classifiers',
   'rspamd_config',
   'rspamd_count_metatokens',
diff --git a/rules/regexp/headers.lua b/rules/regexp/headers.lua
index dfd18f7df..1b76b6f36 100644
--- a/rules/regexp/headers.lua
+++ b/rules/regexp/headers.lua
@@ -415,23 +415,6 @@ reconf['FORGED_MUA_THEBAT_MSGID_UNKNOWN'] = {
 local kmail_mua = 'User-Agent=/^\\s*KMail\\/1\\.\\d+\\.\\d+/H'
 -- KMail common Message-ID template
 local kmail_msgid_common = 'Message-Id=/^<?\\s*\\d+\\.\\d+\\.\\S+\\@\\S+>?$/mH'
-function kmail_msgid (task)
-	local regexp_text = '<(\\S+)>\\|(19[789]\\d|20\\d\\d)(0\\d|1[012])([012]\\d|3[01])([0-5]\\d)([0-5]\\d)\\.\\d+\\.\\1$'
-	local re = rspamd_regexp.create_cached(regexp_text)
-	local header_msgid = task:get_header('Message-Id')
-	if header_msgid then
-		local header_from = task:get_header('From')
-		if header_from and re:match(header_from.."|"..header_msgid) then return true end
-	end
-	return false
-end
--- Summary rule for forged KMail Message-ID header
-reconf['FORGED_MUA_KMAIL_MSGID'] = {
-  re = string.format('(%s) & (%s) & !(%s) & !(%s)', kmail_mua, kmail_msgid_common, 'kmail_msgid', unusable_msgid),
-  score = 3.0,
-  description = 'Message pretends to be send from KMail but has forged Message-ID',
-  group = 'mua'
-}
 -- Summary rule for forged KMail Message-ID header with unknown template
 reconf['FORGED_MUA_KMAIL_MSGID_UNKNOWN'] = {
   re = string.format('(%s) & !(%s) & !(%s)', kmail_mua, kmail_msgid_common, unusable_msgid),


More information about the Commits mailing list