https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6224

           Summary: header rules concatenate matching headers into one
                    block
           Product: Spamassassin
           Version: 3.2.5
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Libraries
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=4554)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4554)
Very simple fake email that hits both examples of this bug.

Header rules concatenate all headers into one block.
I have two examples that hit it since I couldn't fully replicate the real-world
example in a simpler test example.

Example bug.cf
########
# example (couldn't figure out how to skip the /s)
header   BUG_IN_HEADER    Received =~ /(by.*by)/s
describe BUG_IN_HEADER    Should almost never fire but almost always does
score    BUG_IN_HEADER    0.001

# real-world example, from my khop-general channel
header   KHOP_2IPS_RCVD Received =~
/[\[\(\s]((?:[12]?\d\d?\.){3}[12]?\d\d?)[\[\(\s][^\[]*\[(?!\1)\d/
describe KHOP_2IPS_RCVD Received: Relay identifies itself as wrong IP
score    KHOP_2IPS_RCVD 1.25 # 20050729
########


Example bug.eml:
########
Received: by 10.2.3.4 with SMTP id i16mr42710000;
    Sun, 21 Oct 2009 12:34:14 -0400 (EDT)
Received: from a.local (a.example.com [10.2.3.5])
    by b.example.net with SMTP id c28sm40000;
    Sun, 21 Oct 2009 12:34:13 -0400 (EDT)
Subject: Fake email to parse
From: Test From <[email protected]>
To: Test To <[email protected]>
Date: Wed, 21 Oct 2009 12:34:12 -0400
Message-ID: <[email protected]>

This shows a bug regarding the SA header rule.
########


Output of   spamassassin -L -D < bug.eml 2>&1 |egrep -A1 "BUG_IN|2IPS"   is:
########
[25654] dbg: rules: ran header rule KHOP_2IPS_RCVD ======> got hit: " 10.2.3.4
with SMTP id i16mr42710000; Sun, 21 Oct 2009 12:34:14 -0400 (EDT)
[25654] dbg: rules: from a.local (a.example.com [1"
[25654] dbg: rules: ran header rule BUG_IN_HEADER ======> got hit: "by 10.2.3.4
with SMTP id i16mr42710000; Sun, 21 Oct 2009 12:34:14 -0400 (EDT)
[25654] dbg: rules: from a.local (a.example.com [10.2.3.5]) by"
--
[25654] dbg: check:
tests=BAYES_99,BUG_IN_HEADER,KHOP_2IPS_RCVD,KHOP_HELO_FCRDNS,KHOP_NEW_TO_ME
<snip>
--
X-Spam-Status: No, score=4.8 required=5.0 tests=BAYES_99,BUG_IN_HEADER,
        KHOP_2IPS_RCVD,KHOP_HELO_FCRDNS,KHOP_NEW_TO_ME shortcircuit=no
autolearn=no
        version=3.2.5

########

(Never mind those custom rules, they're irrelevant)

I've attached bug.cf and bug.eml too.

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to