From: Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com> Date: Thu, 6 Nov 2025 10:31:49 +0000 (+0100) Subject: Refactor checks array syntax in rbl.conf X-Git-Tag: 3.14.0~2^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3648d791a4b395f2183c5caf649bdd7f9cdcf64a;p=thirdparty%2Frspamd.git Refactor checks array syntax in rbl.conf --- diff --git a/conf/modules.d/rbl.conf b/conf/modules.d/rbl.conf index ec577a7d78..776b78ab03 100644 --- a/conf/modules.d/rbl.conf +++ b/conf/modules.d/rbl.conf @@ -37,7 +37,7 @@ rbl { spamhaus { symbol = "SPAMHAUS"; rbl = "zen.spamhaus.org"; - checks = ['received', 'from']; + checks = ["from", "received"]; symbols_prefixes = { received = "RECEIVED", from = "RBL", @@ -57,14 +57,16 @@ rbl { symbol = "MAILSPIKE"; rbl = "rep.mailspike.net"; is_whitelist = true; - checks = ['from']; - whitelist_exception = "MAILSPIKE"; - whitelist_exception = "RWL_MAILSPIKE_GOOD"; - whitelist_exception = "RWL_MAILSPIKE_NEUTRAL"; - whitelist_exception = "RWL_MAILSPIKE_POSSIBLE"; - whitelist_exception = "RBL_MAILSPIKE_WORST"; - whitelist_exception = "RBL_MAILSPIKE_VERYBAD"; - whitelist_exception = "RBL_MAILSPIKE_BAD"; + checks = ["from"]; + whitelist_exception = [ + "MAILSPIKE", + "RWL_MAILSPIKE_GOOD", + "RWL_MAILSPIKE_NEUTRAL", + "RWL_MAILSPIKE_POSSIBLE", + "RBL_MAILSPIKE_WORST", + "RBL_MAILSPIKE_VERYBAD", + "RBL_MAILSPIKE_BAD" + ]; returncodes { RBL_MAILSPIKE_WORST = "127.0.0.10"; RBL_MAILSPIKE_VERYBAD = "127.0.0.11"; @@ -84,7 +86,7 @@ rbl { # 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']; + checks = ["from"]; rbl = "bl.score.senderscore.com"; returncodes { RBL_SENDERSCORE_BOT = "127.0.0.1"; @@ -110,7 +112,7 @@ rbl { senderscore_reputation { symbol = "RBL_SENDERSCORE_REPUT_UNKNOWN"; - checks = ['from']; + checks = ["from"]; rbl = "score.senderscore.com"; returncodes_matcher = "luapattern"; returncodes { @@ -131,14 +133,14 @@ rbl { sem { symbol = "RBL_SEM"; rbl = "bl.spameatingmonkey.net"; - checks = ['from']; + checks = ["from"]; ipv6 = false; } semIPv6 { symbol = "RBL_SEM_IPV6"; rbl = "bl.ipv6.spameatingmonkey.net"; - checks = ['from']; + checks = ["from"]; ipv4 = false; ipv6 = true; } @@ -146,7 +148,7 @@ rbl { dnswl { symbol = "RCVD_IN_DNSWL"; rbl = "list.dnswl.org"; - checks = ['from', 'received']; + checks = ["from", "received"]; ipv6 = true; is_whitelist = true; returncodes_matcher = "luapattern"; @@ -167,7 +169,7 @@ rbl { virusfree { symbol = "RBL_VIRUSFREE_UNKNOWN"; rbl = "bip.virusfree.cz"; - checks = ['from']; + checks = ["from"]; ipv6 = true; returncodes { RBL_VIRUSFREE_BOTNET = "127.0.0.2"; @@ -177,7 +179,7 @@ rbl { blocklistde { symbol = "BLOCKLISTDE"; rbl = "bl.blocklist.de"; - checks = ['from', 'received']; + checks = ["from", "received"]; symbols_prefixes = { received = "RECEIVED", from = "RBL", @@ -188,7 +190,7 @@ rbl { dnswl_dwl { symbol = "DWL_DNSWL"; rbl = "dwl.dnswl.org"; - checks = ['dkim']; + checks = ["dkim"]; ignore_whitelist = true; unknown = false; returncodes_matcher = "luapattern"; @@ -203,7 +205,7 @@ rbl { RSPAMD_EMAILBL { rbl = "email.rspamd.com"; - checks = ['emails', 'replyto']; + checks = ["emails", "replyto"]; hash = "blake2"; hash_len = 32; hash_format = "base32"; @@ -224,7 +226,7 @@ rbl { MSBL_EBL { rbl = "ebl.msbl.org"; - checks = ['emails', 'replyto']; + checks = ["emails", "replyto"]; hash = "sha1"; ignore_whitelist = true; ignore_url_whitelist = true; @@ -249,7 +251,7 @@ rbl { SURBL_MULTI { rbl = "multi.surbl.org"; - checks = ['emails', 'dkim', 'helo', 'rdns', 'replyto', 'urls']; + checks = ["emails", "dkim", "helo", "rdns", "replyto", "urls"]; ignore_defaults = true; exclude_users = false; url_full_hostname = true; # According to SURBL rules @@ -273,7 +275,7 @@ rbl { SURBL_HASHBL { rbl = "hashbl.surbl.org"; # TODO: make limit more configurable maybe? - selector = "specific_urls_filter_map('surbl_hashbl_map', {limit = 10}).apply_methods('get_host', 'get_path').join_tables('/')", + selector = "specific_urls_filter_map('surbl_hashbl_map', {limit = 10}).apply_methods('get_host', 'get_path').join_tables('/')"; hash = "md5"; hash_len = 32; random_monitored = true; @@ -290,7 +292,7 @@ rbl { URIBL_MULTI { rbl = "multi.uribl.com"; - checks = ['emails', 'dkim', 'helo', 'rdns', 'replyto', 'urls']; + checks = ["emails", "dkim", "helo", "rdns", "replyto", "urls"]; ignore_defaults = true; exclude_users = false; emails_domainonly = true; @@ -309,7 +311,7 @@ rbl { RSPAMD_URIBL { rbl = "uribl.rspamd.com"; - checks = ['emails', 'dkim', 'urls']; + checks = ["emails", "dkim", "urls"]; hash = "blake2"; hash_len = 32; hash_format = "base32"; @@ -330,7 +332,7 @@ rbl { DBL { rbl = "dbl.spamhaus.org"; - checks = ['emails', 'dkim', 'helo', 'rdns', 'replyto', 'urls']; + checks = ["emails", "dkim", "helo", "rdns", "replyto", "urls"]; no_ip = true; ignore_defaults = true; exclude_users = false; @@ -371,7 +373,7 @@ rbl { SPAMHAUS_ZEN_URIBL { enabled = false; rbl = "zen.spamhaus.org"; - checks = ['emails']; + checks = ["emails"]; resolve_ip = true; returncodes = { URIBL_SBL = "127.0.0.2"; @@ -384,7 +386,7 @@ rbl { SEM_URIBL_UNKNOWN { rbl = "uribl.spameatingmonkey.net"; - checks = ['emails', 'dkim', 'urls']; + checks = ["emails", "dkim", "urls"]; no_ip = true; ignore_defaults = true; emails_domainonly = true; @@ -400,7 +402,7 @@ rbl { SEM_URIBL_FRESH15_UNKNOWN { rbl = "fresh15.spameatingmonkey.net"; - checks = ['emails', 'dkim', 'urls']; + checks = ["emails", "dkim", "urls"]; no_ip = true; ignore_defaults = true; emails_domainonly = true;