You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2020/04/15 10:39:34 UTC

[Bug 7808] New: DNSEval: check_rbl_addresses ha unexpected behavior with multiple heders

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: dev@spamassassin.apache.org
          Reporter: rodolfo@saccani.net
  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: test@src.com
To: test@dest.com
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.

[Bug 7808] DNSEval: check_rbl_addresses ha unexpected behavior with multiple heders

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7808

Henrik Krohns <ap...@hege.li> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |apache@hege.li
         Resolution|---                         |FIXED

--- Comment #1 from Henrik Krohns <ap...@hege.li> ---
Thanks,

Sending        spamassassin-3.4/lib/Mail/SpamAssassin/Plugin/DNSEval.pm
Sending        trunk/lib/Mail/SpamAssassin/Plugin/DNSEval.pm
Transmitting file data ..done
Committing transaction...
Committed revision 1876556.

-- 
You are receiving this mail because:
You are the assignee for the bug.