https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7808
Bug ID: 7808
Summary: DNSEval: check_rbl_addresses ha unexpected behavior
with multiple heders
Product: Spamassassin
Version: 3.4.4
Hardware: PC
OS: Linux
Status: NEW
Severity: major
Priority: P2
Component: Plugins
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: Undefined
Created attachment 5697
--> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5697&action=edit
Patch to DNSEval plugin
check_rbl_headers creates an rbl request from the content of specified headers.
If the specified header is present multiple times the expected behavior is to
have multiple rbl queries, one for each header content.
Example:
-------- email --------
X-Test-Hdr: 9999.test
X-Test-Hdr: 0000.test
From: [email protected]
To: [email protected]
Subject: test
ciao
----------------------
With such an email, the following test on X-Test-Hdr is expected to perform two
rbl queries:
header TEST_HEADERS eval:check_rbl_headers('testrbl', 'rbl.example.com.',
'127.0.0.5', 'X-Test-Hdr')
A query to 9999.test.rbl.example.com and a query to 0000.test.rbl.example.com
are expected.
Instead, what happens is a query to
9999.test.rbl.example.com\010000.test.rbl.example.com
The two headers are concatenated and separated by a newline. A single query for
this string (containing a newline) is performed.
The issue can be reproduced with:
spamassassin -tD --cf="header TEST_HEADERS eval:check_rbl_headers('testrbl',
'rbl.example.com.', '127.0.0.5', 'X-Test-Hdr')" --cf="tflags TEST_HEADERS
net" < test.eml
where test.eml is the sample email listed above.
The attached patch fixes the issue,
--
You are receiving this mail because:
You are the assignee for the bug.