diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-25 11:24:28 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-25 11:24:28 +0100 |
commit | 7603ac88ab8c9ccc44223c3580d857033457d5d8 (patch) | |
tree | bada6451b3fcfd01a0784c80a85c33de64b58485 /rules/regexp/headers.lua | |
parent | 95a24ff47020b0b7f08ec2872057408db7a0b691 (diff) | |
download | rspamd-7603ac88ab8c9ccc44223c3580d857033457d5d8.tar.gz rspamd-7603ac88ab8c9ccc44223c3580d857033457d5d8.zip |
[Minor] Cleanup crap
Diffstat (limited to 'rules/regexp/headers.lua')
-rw-r--r-- | rules/regexp/headers.lua | 17 |
1 files changed, 0 insertions, 17 deletions
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), |