You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2004/03/18 05:50:43 UTC

svn commit: rev 9581 - in incubator/spamassassin/trunk: lib/Mail/SpamAssassin t

Author: jm
Date: Wed Mar 17 20:50:42 2004
New Revision: 9581

Modified:
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Received.pm
   incubator/spamassassin/trunk/t/rcvd_parser.t
Log:
bug 3183: Received line with extra space misparsed

Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Received.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Received.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Received.pm	Wed Mar 17 20:50:42 2004
@@ -953,7 +953,7 @@
   if (/^from (\S+)[^-A-Za-z0-9\.]/) { $helo = $1; }
   if (/^helo=(\S+)[^-A-Za-z0-9\.]/) { $helo = $1; }
   if (/\[(${IP_ADDRESS})\]/) { $ip = $1; }
-  if (/ by (\S+)[^-A-Za-z0-9\.]/) { $by = $1; }
+  if (/ by (\S+)[^-A-Za-z0-9\;\.]/) { $by = $1; }
   if ($ip && $by) { goto enough; }
 
   # ------------------------------------------------------------------------
@@ -998,6 +998,7 @@
   }
 
   $envfrom =~ s/^\s*<*//gs; $envfrom =~ s/>*\s*$//gs;
+  $by =~ s/\;$//;
 
   # ensure invalid chars are stripped.  Replace with '!' to flag their
   # presence, though.  NOTE: this means "[1.2.3.4]" IP addr HELO

Modified: incubator/spamassassin/trunk/t/rcvd_parser.t
==============================================================================
--- incubator/spamassassin/trunk/t/rcvd_parser.t	(original)
+++ incubator/spamassassin/trunk/t/rcvd_parser.t	Wed Mar 17 20:50:42 2004
@@ -46,6 +46,19 @@
 },
 q{
 
+Received: from hotmail.com (bay1-f95.bay1.hotmail.com [65.54.245.95]) by Daffy.timing.com; 
+Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
+        Tue, 16 Mar 2004 18:12:31 -0800
+Received: from 24.8.231.233 by by1fd.bay1.hotmail.msn.com with HTTP;
+        Wed, 17 Mar 2004 02:12:31 GMT
+
+} => q{
+
+  [ ip=65.54.245.95 rdns=bay1-f95.bay1.hotmail.com helo=hotmail.com by=Daffy.timing.com ident= envfrom= ] [ ip=24.8.231.233 rdns= helo= by=by1fd.bay1.hotmail.msn.com ident= envfrom= ]
+
+},
+q{
+
 Received: from postfix3-2.free.fr (foobar@213.228.0.139) 
   by totor.example.net with SMTP; 14 Nov 2003 08:05:50 -0000 
 Received: from asterix.laurier.org (lns-p19-8-82-65-66-244.adsl.proxad.net [82.65.66.244])