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...@bugzilla.spamassassin.org on 2008/05/20 00:14:27 UTC

[Bug 5912] New: whitelist_bounce_relays misses multi-line Received headers

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

           Summary: whitelist_bounce_relays misses multi-line Received
                    headers
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Plugins
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: jm@jmason.org


with whitelist_bounce_relays mailgw02.wolfnettech.com, this is missed:



Received: from 10.100.0.101 (intmx02.mlsfinder.com 
   [192.168.0.71]) by mailgw02.wolfnettech.com 
   (Postfix) with SMTP id 3E2479E5965 for <wl...@pacbell.net>; 
   Fri, 16 May 2008 12:48:50 -0500 (CDT)


but this single-line version is not:

Received: from 10.100.0.101 (intmx02.mlsfinder.com [192.168.0.71]) by
mailgw02.wolfnettech.com (Postfix) with SMTP id 3E2479E5965 for
<wl...@pacbell.net>; Fri, 16 May 2008 12:48:50 -0500 (CDT)

the whitelist_bounce_relays code doesn't handle multi-line headers!


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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912

Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
                 CC|                            |jm@jmason.org

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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912


Karsten Bräckelmann <gu...@rudersport.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #4321|application/octet-stream    |text/plain
          mime type|                            |




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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912


Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hege@hege.li




--- Comment #5 from Justin Mason <jm...@jmason.org>  2008-08-13 09:42:19 PST ---
*** Bug 5900 has been marked as a duplicate of this bug. ***


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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912





--- Comment #4 from Karsten Bräckelmann <gu...@rudersport.de>  2008-08-13 07:46:26 PST ---
Scratch that, I realize this needs more work after discussion.

Also, I've been told about CTR mode for trunk again. So I'll first break trunk
and get some discussion later. ;)


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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912

Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #9 from Justin Mason <jm...@jmason.org> 2009-09-20 19:49:07 PDT ---
oops. bad test; this is actually still an issue.

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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912





--- Comment #3 from Karsten Bräckelmann <gu...@rudersport.de>  2008-08-12 16:24:50 PST ---
Created an attachment (id=4355)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4355)
proposed fix

Yes, the order as is *is* important. ;)

This patch correctly treats multi-line Received: headers. However, please note
that I tested the patch *briefly* only. In particular, I did not test the
plain-text part of the patch.

Multi-line Received: headers now are concatenated into a single line with a
single space, no embedded multiple spaces or tabs due to the wrapping. This is
important to retain the checking loop as is.

Using an empty string rather than a nicer looking undef, so the checking while
loop does not need to be guarded further.

Unlike the original, I anchored the Received: header match at the beginning of
the line. Or is there any reason not to?

Also, please note that this looping will fail, if the exonerating Received:
header is the *very* last line, without a single following line or even an
empty line. In that case, the foreach loop ends without checking the (possibly
multi-line) Received: header. Checking is delayed until the next line.

Other than that -- code duplication... *sigh*


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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912





--- Comment #6 from Justin Mason <jm...@jmason.org>  2009-06-29 04:48:39 PST ---
this should be fixed for 3.3.0, no?  maybe up the priority?

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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912


Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal




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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912

Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #10 from Justin Mason <jm...@jmason.org> 2009-09-20 20:30:46 PDT ---
really fixed this time.

: 194...; svn commit -m "bug 5912: fix parsing of multi-line Received: headers
for BOUNCE_MESSAGE/VBOUNCE_MESSAGE et al"
Sending        lib/Mail/SpamAssassin/Plugin/VBounce.pm
Sending        t.rules/BOUNCE_MESSAGE/fp_bug5912_att4322
Transmitting file data ..
Committed revision 817140.

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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912

Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Justin Mason <jm...@jmason.org> 2009-09-20 12:45:24 PDT ---
appears to be already fixed... hmm.

: 119...; svn commit -m "bug 5912: add tests for BOUNCE_MESSAGE header parsing
bug" t.rules 
Adding         t.rules/BOUNCE_MESSAGE/fp_bug5912_att4321
Adding         t.rules/BOUNCE_MESSAGE/fp_bug5912_att4321.cf
Adding         t.rules/BOUNCE_MESSAGE/fp_bug5912_att4322
Adding         t.rules/BOUNCE_MESSAGE/fp_bug5912_att4322.cf
Sending        t.rules/run
Transmitting file data .....
Committed revision 817087.

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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912


Karsten Bräckelmann <gu...@rudersport.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P5                          |P3




--- Comment #7 from Karsten Bräckelmann <gu...@rudersport.de>  2009-06-29 05:33:37 PST ---
ACK, would be nice to fix

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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912





--- Comment #1 from Justin Mason <jm...@jmason.org>  2008-05-19 15:15:37 PST ---
Created an attachment (id=4321)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4321)
message that can be whitelisted

with this config, this mail can be whitelisted successfully:


whitelist_bounce_relays mail.homes-magazine.com
whitelist_bounce_relays mailgw02.wolfnettech.com
whitelist_bounce_relays levit.reacheach1.com
whitelist_bounce_relays smtp*.blackberry.com
whitelist_bounce_relays *.tcsn.net

trusted_networks        66.224.197.128/27
internal_networks       66.224.197.156
internal_networks       66.224.197.130


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

[Bug 5912] whitelist_bounce_relays misses multi-line Received headers

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5912





--- Comment #2 from Justin Mason <jm...@jmason.org>  2008-05-19 15:16:18 PST ---
Created an attachment (id=4322)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4322)
message that cannot be whitelisted

and this one cannot.


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