Skip to content

Commit

Permalink
[Minor] Improve various rule descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
twesterhever committed May 26, 2023
1 parent 7a0fce6 commit 68d9f76
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 76 deletions.
2 changes: 1 addition & 1 deletion conf/scores.d/rbl_group.conf
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ symbols = {
}
"RECEIVED_SPAMHAUS_XBL" {
weight = 1.0;
description = "Received address is listed in ZEN XBL";
description = "Received address is listed in Spamhaus XBL";
groups = ["spamhaus"];
one_shot = true;
}
Expand Down
4 changes: 2 additions & 2 deletions rules/headers_checks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ rspamd_config.MISSING_FROM = {
end,
score = 2.0,
group = 'headers',
description = 'Missing From: header'
description = 'Missing From header'
}

rspamd_config.MULTIPLE_FROM = {
Expand All @@ -583,7 +583,7 @@ rspamd_config.MULTIPLE_FROM = {
end,
score = 8.0,
group = 'headers',
description = 'Multiple addresses in From'
description = 'Multiple addresses in From header'
}

rspamd_config.MV_CASE = {
Expand Down
12 changes: 6 additions & 6 deletions rules/html.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ local rspamd_regexp = require "rspamd_regexp"
reconf['MIME_HTML_ONLY'] = {
re = 'has_only_html_part()',
score = 0.2,
description = 'Messages that have only HTML part',
description = 'Messages has only an HTML part',
group = 'headers'
}

Expand Down Expand Up @@ -74,7 +74,7 @@ rspamd_config.HTML_SHORT_LINK_IMG_1 = {
end,
score = 2.0,
group = 'html',
description = 'Short html part (0..1K) with a link to an image'
description = 'Short HTML part (0..1K) with a link to an image'
}

rspamd_config.HTML_SHORT_LINK_IMG_2 = {
Expand All @@ -83,7 +83,7 @@ rspamd_config.HTML_SHORT_LINK_IMG_2 = {
end,
score = 1.0,
group = 'html',
description = 'Short html part (1K..1.5K) with a link to an image'
description = 'Short HTML part (1K..1.5K) with a link to an image'
}

rspamd_config.HTML_SHORT_LINK_IMG_3 = {
Expand All @@ -92,7 +92,7 @@ rspamd_config.HTML_SHORT_LINK_IMG_3 = {
end,
score = 0.5,
group = 'html',
description = 'Short html part (1.5K..2K) with a link to an image'
description = 'Short HTML part (1.5K..2K) with a link to an image'
}

rspamd_config.R_EMPTY_IMAGE = {
Expand Down Expand Up @@ -395,7 +395,7 @@ rspamd_config.HTTP_TO_HTTPS = {
end
return false
end,
description = 'Anchor text contains different scheme to target URL',
description = 'HTML anchor text contains different scheme to target URL',
score = 0.5,
group = 'html'
}
Expand Down Expand Up @@ -425,7 +425,7 @@ rspamd_config.HTTP_TO_IP = {
end
end
end,
description = 'Anchor points to an IP address',
description = 'HTML anchor points to an IP address',
score = 1.0,
group = 'html'
}
29 changes: 14 additions & 15 deletions rules/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ local date_id = rspamd_config:register_symbol({
rspamd_config:register_symbol({
name = 'MISSING_DATE',
score = 1.0,
description = 'Message date is missing',
description = 'Date header is missing',
group = 'headers',
type = 'virtual',
parent = date_id,
Expand All @@ -100,7 +100,7 @@ rspamd_config:register_symbol({
rspamd_config:register_symbol({
name = 'INVALID_DATE',
score = 1.5,
description = 'Malformed date header',
description = 'Malformed Date header',
group = 'headers',
type = 'virtual',
parent = date_id,
Expand All @@ -109,7 +109,7 @@ rspamd_config:register_symbol({
rspamd_config:register_symbol({
name = 'DATE_IN_FUTURE',
score = 4.0,
description = 'Message date is in future',
description = 'Message date is in the future',
group = 'headers',
type = 'virtual',
parent = date_id,
Expand All @@ -118,7 +118,7 @@ rspamd_config:register_symbol({
rspamd_config:register_symbol({
name = 'DATE_IN_PAST',
score = 1.0,
description = 'Message date is in past',
description = 'Message date is in the past',
group = 'headers',
type = 'virtual',
parent = date_id,
Expand Down Expand Up @@ -148,7 +148,7 @@ local obscured_id = rspamd_config:register_symbol{
name = 'R_SUSPICIOUS_URL',
score = 5.0,
one_shot = true,
description = 'Obfuscated or suspicious URL has been found in a message',
description = 'Has obfuscated or suspicious URL',
group = 'url'
}

Expand All @@ -157,7 +157,7 @@ rspamd_config:register_symbol{
name = 'ZERO_WIDTH_SPACE_URL',
score = 7.0,
one_shot = true,
description = 'Zero width space in url',
description = 'Zero width space in URL',
group = 'url',
parent = obscured_id,
}
Expand Down Expand Up @@ -382,7 +382,7 @@ end
rspamd_config:register_symbol({
name = 'FREEMAIL_REPLYTO_NEQ_FROM_DOM',
callback = freemail_reply_neq_from,
description = 'Freemail From and Reply-To, but to different Freemail services',
description = 'Freemail addresses in From and Reply-To headers, but to different freemail services',
score = 3.0,
group = 'headers',
})
Expand Down Expand Up @@ -440,7 +440,7 @@ rspamd_config.OMOGRAPH_URL = {
end,
score = 5.0,
group = 'url',
description = 'Url contains both latin and non-latin characters'
description = 'URL contains both latin and non-latin characters'
}

rspamd_config.URL_IN_SUBJECT = {
Expand Down Expand Up @@ -471,8 +471,7 @@ rspamd_config.URL_IN_SUBJECT = {
score = 4.0,
group = 'subject',
type = 'mime',
description = 'URL found in Subject'

description = 'Subject contains URL'
}

local aliases_id = rspamd_config:register_symbol{
Expand Down Expand Up @@ -697,7 +696,7 @@ rspamd_config.R_BAD_CTE_7BIT = {
return false
end,
score = 3.5,
description = 'Detects bad content-transfer-encoding for text parts',
description = 'Detects bad Content-Transfer-Encoding for text parts',
group = 'headers',
type = 'mime',
}
Expand Down Expand Up @@ -776,7 +775,7 @@ rspamd_config:register_symbol{
type = 'virtual',
parent = check_encrypted_name,
name = 'ENCRYPTED_PGP',
description = 'Message is encrypted with pgp',
description = 'Message is encrypted with PGP',
group = 'mime_types',
score = -0.5,
one_shot = true
Expand All @@ -786,7 +785,7 @@ rspamd_config:register_symbol{
type = 'virtual',
parent = check_encrypted_name,
name = 'ENCRYPTED_SMIME',
description = 'Message is encrypted with smime',
description = 'Message is encrypted with S/MIME',
group = 'mime_types',
score = -0.5,
one_shot = true
Expand All @@ -796,7 +795,7 @@ rspamd_config:register_symbol{
type = 'virtual',
parent = check_encrypted_name,
name = 'SIGNED_PGP',
description = 'Message is signed with pgp',
description = 'Message is signed with PGP',
group = 'mime_types',
score = -2.0,
one_shot = true
Expand All @@ -806,7 +805,7 @@ rspamd_config:register_symbol{
type = 'virtual',
parent = check_encrypted_name,
name = 'SIGNED_SMIME',
description = 'Message is signed with smime',
description = 'Message is signed with S/MIME',
group = 'mime_types',
score = -2.0,
one_shot = true
Expand Down

0 comments on commit 68d9f76

Please sign in to comment.