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 2007/08/03 01:55:10 UTC

[Bug 5583] New: Another unparsed Received line

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5583

           Summary: Another unparsed Received line
           Product: Spamassassin
           Version: 3.2.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Libraries
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: Mark.Martinec@ijs.si


IP address could not be extracted from the following Received header field,
which came in from the wild, but I have no idea from what system.
The syntax is close to standard (rfc2821), although missing TCP-info.

Received: from [86.122.158.69] by mta2.iomartmail.com;
  Thu, 2 Aug 2007 21:50:04 -0200

The attached patch fixes it. It also localizes $1..$6 which are
in use in sub parse_received_line, which can't hurt, but can
do good for a careless caller or to contain a Perl taint bug from
spreading. I think this should become a standard practice with
new code additions or when fixing existing code.

Btw, i think the sub parse_received_line needs a rewrite from scratch.
It should be able to parse rfc2821-compliant trace field without a
hitch (nested comments in CFWS, arbitrary order of option subfields,
IPv6, ...), then deal with whatever anomalies are known.
Something for the future...



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

[Bug 5583] [review] Another unparsed Received line

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


Mark.Martinec@ijs.si changed:

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




------- Additional Comments From Mark.Martinec@ijs.si  2007-10-18 01:18 -------
Thanks. Committed to 3.2:

$ svn -m 'Another unparsed Received line, Bug 5583, including a test case' ci
Sending        lib/Mail/SpamAssassin/Message/Metadata/Received.pm
Sending        t/rcvd_parser.t
Transmitting file data ..
Committed revision 585895.




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

[Bug 5583] [review] Another unparsed Received line

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





------- Additional Comments From sidney@sidney.com  2007-12-15 19:20 -------
$ svn ci -m "test case number was not incremented last time a test case was
added" t/rcvd_parser.t 
Sending        t/rcvd_parser.t
Transmitting file data .
Committed revision 604547.




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

[Bug 5583] Another unparsed Received line

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





------- Additional Comments From Mark.Martinec@ijs.si  2007-08-10 08:05 -------
(In reply to comment #2)
> > Created an attachment (id=4078)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4078&action=view) [edit] [edit] a simple fix
> $ svn ci -m 'fix Received parsing of "from [IP] by host" (bug 4078)'

Wrong bug number in message. Anyway.




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

[Bug 5583] [review] Another unparsed Received line

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


maddoc@maddoc.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 1 vote for 3.2        |can be commited




------- Additional Comments From maddoc@maddoc.net  2007-10-17 12:14 -------
+1 good work.



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

[Bug 5583] Another unparsed Received line

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





------- Additional Comments From Mark.Martinec@ijs.si  2007-08-02 16:57 -------
Created an attachment (id=4078)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4078&action=view)
a simple fix




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

[Bug 5583] [review] Another unparsed Received line

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


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 2 votes for 3.2       |needs 1 vote for 3.2




------- Additional Comments From jm@jmason.org  2007-10-17 11:47 -------
+1

btw, a good first step to being able to rewrite from scratch, is to ensure that
the test cases are up to date; it'd be useful if t/rcvd_parser.t had a case for
this line.



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

[Bug 5583] Another unparsed Received line

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





------- Additional Comments From Mark.Martinec@ijs.si  2007-08-10 08:02 -------
> Created an attachment (id=4078)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4078&action=view) [edit] a simple fix

Committed to trunk, primarily as an exercise:

$ svn ci -m 'fix Received parsing of "from [IP] by host" (bug 4078)'
Sending lib/Mail/SpamAssassin/Message/Metadata/Received.pm
Committed revision 564613.

Yea, my first commit!!!



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

[Bug 5583] [review] Another unparsed Received line

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


Mark.Martinec@ijs.si changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Another unparsed Received   |[review] Another unparsed
                   |line                        |Received line
  Status Whiteboard|                            |needs 2 votes for 3.2
   Target Milestone|Undefined                   |3.2.4




------- Additional Comments From Mark.Martinec@ijs.si  2007-10-17 10:27 -------
Can we get this into 3.2?  Vote please.



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