From: moisseev Date: Wed, 31 Jul 2024 15:17:56 +0000 (+0300) Subject: [Conf] Add SenderScore Reputationlist RBL X-Git-Tag: 3.10.0~65^2~3^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=52fd16769e8e1b3379f1e303c9d90eb71d8133b0;p=rspamd.git [Conf] Add SenderScore Reputationlist RBL --- diff --git a/conf/groups.conf b/conf/groups.conf index 2aeb4ed5d..4f40d865c 100644 --- a/conf/groups.conf +++ b/conf/groups.conf @@ -39,6 +39,13 @@ group "rbl" { .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/rbl_group.conf" } +# Limits the maximum score when both bl.score.senderscore.com and score.senderscore.com RBLs are enabled. +group "senderscore" { + max_score = 4.0; + .include(try=true; priority=1; duplicate=merge) "$LOCAL_CONFDIR/local.d/senderscore_group.conf" + .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/senderscore_group.conf" +} + group "statistics" { .include "$CONFDIR/scores.d/statistics_group.conf" .include(try=true; priority=1; duplicate=merge) "$LOCAL_CONFDIR/local.d/statistics_group.conf" diff --git a/conf/modules.d/rbl.conf b/conf/modules.d/rbl.conf index d8db05ecc..2a718e5a4 100644 --- a/conf/modules.d/rbl.conf +++ b/conf/modules.d/rbl.conf @@ -79,6 +79,11 @@ rbl { } senderscore { + # Disabled by default to prioritize the use of score.senderscore.com. + # Note: The free query limit applies to both bl.score.senderscore.com and score.senderscore.com RBLs + # (see https://knowledge.validity.com/hc/en-us/articles/20961730681243). + # Enabling this RBL is recommended for low-traffic systems or MyValidity account users who benefit from using both RBLs. + enabled = false; symbol = "RBL_SENDERSCORE_UNKNOWN"; checks = ['from']; rbl = "bl.score.senderscore.com"; @@ -104,6 +109,27 @@ rbl { } } + senderscore_reputation { + symbol = "RBL_SENDERSCORE_REPUT_UNKNOWN"; + checks = ['from']; + rbl = "score.senderscore.com"; + returncodes_matcher = "luapattern"; + + returncodes { + RBL_SENDERSCORE_REPUT_0 = "127%.0%.4%.%d"; + RBL_SENDERSCORE_REPUT_1 = "127%.0%.4%.1%d"; + RBL_SENDERSCORE_REPUT_2 = "127%.0%.4%.2%d"; + RBL_SENDERSCORE_REPUT_3 = "127%.0%.4%.3%d"; + RBL_SENDERSCORE_REPUT_4 = "127%.0%.4%.4%d"; + RBL_SENDERSCORE_REPUT_5 = "127%.0%.4%.5%d"; + RBL_SENDERSCORE_REPUT_6 = "127%.0%.4%.6%d"; + RBL_SENDERSCORE_REPUT_7 = "127%.0%.4%.7%d"; + RBL_SENDERSCORE_REPUT_8 = "127%.0%.4%.8%d"; # Neutral reputation (80-89). + RBL_SENDERSCORE_REPUT_9 = ["127%.0%.4%.9%d", "127%.0%.4%.100"]; # Good reputation (90-100). + RBL_SENDERSCORE_REPUT_BLOCKED = "127%.255%.255%.255"; + } + } + sem { symbol = "RBL_SEM"; rbl = "bl.spameatingmonkey.net"; diff --git a/conf/scores.d/rbl_group.conf b/conf/scores.d/rbl_group.conf index 741552a17..6a59b865f 100644 --- a/conf/scores.d/rbl_group.conf +++ b/conf/scores.d/rbl_group.conf @@ -257,6 +257,67 @@ symbols = { groups = ["senderscore", "blocked"]; } + "RBL_SENDERSCORE_REPUT_UNKNOWN" { + weight = 0.0; + description = "Unrecognized result from SenderScore Reputation list."; + groups = ["senderscore"]; + } + "RBL_SENDERSCORE_REPUT_0" { + weight = 4.0; + description = "SenderScore Reputation: Very Bad (0-9)."; + groups = ["senderscore"]; + } + "RBL_SENDERSCORE_REPUT_1" { + weight = 3.5; + description = "SenderScore Reputation: Bad (10-19)."; + groups = ["senderscore"]; + } + "RBL_SENDERSCORE_REPUT_2" { + weight = 3.0; + description = "SenderScore Reputation: Bad (20-29)."; + groups = ["senderscore"]; + } + "RBL_SENDERSCORE_REPUT_3" { + weight = 2.5; + description = "SenderScore Reputation: Bad (30-39)."; + groups = ["senderscore"]; + } + "RBL_SENDERSCORE_REPUT_4" { + weight = 2.0; + description = "SenderScore Reputation: Bad (40-49)."; + groups = ["senderscore"]; + } + "RBL_SENDERSCORE_REPUT_5" { + weight = 1.5; + description = "SenderScore Reputation: Bad (50-59)."; + groups = ["senderscore"]; + } + "RBL_SENDERSCORE_REPUT_6" { + weight = 1.0; + description = "SenderScore Reputation: Bad (60-69)."; + groups = ["senderscore"]; + } + "RBL_SENDERSCORE_REPUT_7" { + weight = 0.5; + description = "SenderScore Reputation: Bad (70-79)."; + groups = ["senderscore"]; + } + "RBL_SENDERSCORE_REPUT_8" { + weight = 0.0; + description = "SenderScore Reputation: Neutral (80-89)."; + groups = ["senderscore"]; + } + "RBL_SENDERSCORE_REPUT_9" { + weight = -1.0; + description = "SenderScore Reputation: Good (90-100)."; + groups = ["senderscore"]; + } + "RBL_SENDERSCORE_REPUT_BLOCKED" { + weight = 0.0; + description = "Excessive number of queries to SenderScore RPBL, more info: https://knowledge.validity.com/hc/en-us/articles/20961730681243"; + groups = ["senderscore", "blocked"]; + } + "MAILSPIKE" { weight = 0.0; description = "Unrecognised result from Mailspike";