aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-26 14:41:40 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-26 14:41:40 +0000
commit2708a3ba19620c3f8f180f26ca39a92969484804 (patch)
tree20509ceefeb2106193a1d7cfbfda8b63293f44ba
parent103a5177d6a98b2b2645c6fcf71cc44eba12be29 (diff)
downloadrspamd-2708a3ba19620c3f8f180f26ca39a92969484804.tar.gz
rspamd-2708a3ba19620c3f8f180f26ca39a92969484804.zip
[Config] Add groups for message id rules
-rw-r--r--rules/mid.lua12
-rw-r--r--rules/regexp/misc.lua7
2 files changed, 11 insertions, 8 deletions
diff --git a/rules/mid.lua b/rules/mid.lua
index 0b68fa612..92d0118b2 100644
--- a/rules/mid.lua
+++ b/rules/mid.lua
@@ -53,14 +53,14 @@ end
local check_mid_id = rspamd_config:register_callback_symbol('CHECK_MID', 1.0,
mid_check_func)
rspamd_config:register_virtual_symbol('MID_BARE_IP', 1.0, check_mid_id)
-rspamd_config:set_metric_symbol('MID_BARE_IP', 2.0, 'Message-ID RHS is a bare IP address')
+rspamd_config:set_metric_symbol('MID_BARE_IP', 2.0, 'Message-ID RHS is a bare IP address', 'Message ID')
rspamd_config:register_virtual_symbol('MID_RHS_NOT_FQDN', 1.0, check_mid_id)
-rspamd_config:set_metric_symbol('MID_RHS_NOT_FQDN', 0.5, 'Message-ID RHS is not a fully-qualified domain name')
+rspamd_config:set_metric_symbol('MID_RHS_NOT_FQDN', 0.5, 'Message-ID RHS is not a fully-qualified domain name', 'Message ID')
rspamd_config:register_virtual_symbol('MID_MISSING_BRACKETS', 1.0, check_mid_id)
-rspamd_config:set_metric_symbol('MID_MISSING_BRACKETS', 0.5, 'Message-ID is missing <>\'s')
+rspamd_config:set_metric_symbol('MID_MISSING_BRACKETS', 0.5, 'Message-ID is missing <>\'s', 'Message ID')
rspamd_config:register_virtual_symbol('MID_RHS_IP_LITERAL', 1.0, check_mid_id)
-rspamd_config:set_metric_symbol('MID_RHS_IP_LITERAL', 0.5, 'Message-ID RHS is an IP-literal')
+rspamd_config:set_metric_symbol('MID_RHS_IP_LITERAL', 0.5, 'Message-ID RHS is an IP-literal', 'Message ID')
rspamd_config:register_virtual_symbol('MID_CONTAINS_FROM', 1.0, check_mid_id)
-rspamd_config:set_metric_symbol('MID_CONTAINS_FROM', 1.0, 'Message-ID contains From address')
+rspamd_config:set_metric_symbol('MID_CONTAINS_FROM', 1.0, 'Message-ID contains From address', 'Message ID')
rspamd_config:register_virtual_symbol('MID_RHS_MATCH_FROM', 1.0, check_mid_id)
-rspamd_config:set_metric_symbol('MID_RHS_MATCH_FROM', 1.0, 'Message-ID RHS matches From domain') \ No newline at end of file
+rspamd_config:set_metric_symbol('MID_RHS_MATCH_FROM', 1.0, 'Message-ID RHS matches From domain', 'Message ID') \ No newline at end of file
diff --git a/rules/regexp/misc.lua b/rules/regexp/misc.lua
index a819ec729..2fc194965 100644
--- a/rules/regexp/misc.lua
+++ b/rules/regexp/misc.lua
@@ -21,19 +21,22 @@ reconf['HTML_META_REFRESH_URL'] = {
-- Requires options { check_attachements = true; }
re = '/<meta\\s+http-equiv="refresh"\\s+content="\\d+;url=/{sa_raw_body}i',
description = "Has HTML Meta refresh URL",
- score = 5.0
+ score = 5.0,
+ group = 'HTML'
}
reconf['HAS_DATA_URI'] = {
-- Requires options { check_attachements = true; }
re = '/data:[^\\/]+\\/[^; ]+;base64,/{sa_raw_body}i',
- description = "Has Data URI encoding"
+ description = "Has Data URI encoding",
+ group = 'HTML'
}
reconf['DATA_URI_OBFU'] = {
-- Requires options { check_attachements = true; }
re = '/data:text\\/(?:plain|html);base64,/{sa_raw_body}i',
description = "Uses Data URI encoding to obfuscate plain or HTML in base64",
+ group = 'HTML',
score = 2.0
}