Author: gbechis
Date: Mon Jan 12 10:40:25 2026
New Revision: 1931252
Log:
check more email addresses in check_rbl_headers
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DNSEval.pm
spamassassin/trunk/t/data/spam/dnsbl.eml
spamassassin/trunk/t/dnsbl.t
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DNSEval.pm
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DNSEval.pm Mon Jan 12 10:30:55 2026 (r1931251)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DNSEval.pm Mon Jan 12 10:40:25 2026 (r1931252)
@@ -471,11 +471,14 @@ sub check_rbl_headers {
my $queries;
foreach my $rbl_headers (@env_hdr) {
- my $addr = $pms->get($rbl_headers.':addr', undef);
- if ( defined $addr && $addr =~ /\@([^\@\s]+)/ ) {
- my $ret = $self->_check_rbl_addresses($pms, $rule, $set, $rbl_server,
- $subtest, $addr);
- $queries++ if defined $ret;
+ # some headers might contain more email addresses
+ my @addr = $pms->get($rbl_headers.':addr', undef);
+ if ( defined $addr[0] && $addr[0] =~ /\@([^\@\s]+)/ ) {
+ foreach my $emailaddr ( @addr ) {
+ my $ret = $self->_check_rbl_addresses($pms, $rule, $set, $rbl_server,
+ $subtest, $emailaddr);
+ $queries++ if defined $ret;
+ }
} else {
my $unsplitted_host = $pms->get($rbl_headers);
chomp($unsplitted_host);
Modified: spamassassin/trunk/t/data/spam/dnsbl.eml
==============================================================================
--- spamassassin/trunk/t/data/spam/dnsbl.eml Mon Jan 12 10:30:55 2026 (r1931251)
+++ spamassassin/trunk/t/data/spam/dnsbl.eml Mon Jan 12 10:40:25 2026 (r1931252)
@@ -15,6 +15,7 @@ Received: from evil.example.net [144.137
for [email protected]; Fri, 07 Dec 2001 11:07:15 +1100 (EST)
From: "DNSBL Testing" <[email protected]>
To: [email protected]
+Reply-To: "Example1" <[email protected]>, "Example" <[email protected]>
Subject: no subject needed
Date: Fri, 7 Dec 2001 07:01:03
Message-Id: <[email protected]>
Modified: spamassassin/trunk/t/dnsbl.t
==============================================================================
--- spamassassin/trunk/t/dnsbl.t Mon Jan 12 10:30:55 2026 (r1931251)
+++ spamassassin/trunk/t/dnsbl.t Mon Jan 12 10:40:25 2026 (r1931252)
@@ -9,7 +9,7 @@ plan skip_all => "Can't use Net::DNS Saf
# run many times to catch some random natured failures
my $iterations = 5;
-plan tests => 21 * $iterations;
+plan tests => 22 * $iterations;
# ---------------------------------------------------------------------------
# bind configuration currently used to support this test
@@ -64,6 +64,7 @@ EOF
' 1.0 DNSBL_TXT_TOP ' => '',
' 1.0 DNSBL_TXT_RE ' => '',
' 1.0 DNSBL_RHS ' => '',
+ ' 1.0 DNSBL_HEADERS ' => '',
' 1.0 META_DNSBL_A ' => '',
' 1.0 META_DNSBL_B ' => '',
' 1.0 META_DNSBL_C ' => '',
@@ -139,6 +140,10 @@ header DNSBL_RHS eval:check_rbl_from_hos
describe DNSBL_RHS DNSBL RHS match
tflags DNSBL_RHS net
+header DNSBL_HEADERS eval:check_rbl_headers('r', 'dnsbltest.spamassassin.org.')
+describe DNSBL_HEADERS DNSBL HEADERS match
+tflags DNSBL_HEADERS net
+
# Allow DNSBL_RHS to hit
clear_uridnsbl_skip_domain example.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.