spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject svn commit: rev 6167 - in incubator/spamassassin/trunk: lib/Mail/SpamAssassin t
Date Wed, 14 Jan 2004 07:41:57 GMT
Author: jm
Date: Tue Jan 13 23:41:56 2004
New Revision: 6167

Modified:
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Received.pm
   incubator/spamassassin/trunk/t/db_awl_path.t
Log:
bug 2787: Received header misunderstood; bug 2896: debug code to report unparseable received
header incorrect

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	Tue Jan 13 23:41:56 2004
@@ -896,7 +896,7 @@
     # SMTP Relay (MMS v5.0)); Mon, 24 Mar 2003 19:49:48 -0500
     if (/^from (${IP_ADDRESS}) by (\S+) with /) {
       $ip = $1; $by = $2;
-	goto enough;
+      goto enough;
     }
 
     # Received: from pobox.com (h005018086b3b.ne.client2.attbi.com[66.31.45.164])
@@ -1034,18 +1034,16 @@
   if (/^helo=(\S+)[^-A-Za-z0-9\.]/) { $helo = $1; }
   if (/\[(${IP_ADDRESS})\]/) { $ip = $1; }
   if (/ by (\S+)[^-A-Za-z0-9\.]/) { $by = $1; }
-  if (defined $ip && defined $by) { goto enough; }
+  if ($ip && $by) { goto enough; }
 
   # ------------------------------------------------------------------------
   # OK, if we still haven't figured out at least the basics (IP and by), or
   # returned due to it being a known-crap format, let's warn so the user can
   # file a bug report or something.
 
-  if (!defined $ip || !defined $by) {
-    dbg ("received-header: unknown format: $_");
-    # and skip the line entirely!  We can't parse it...
-    return;
-  }
+  dbg ("received-header: unknown format: $_");
+  # and skip the line entirely!  We can't parse it...
+  return;
 
   # ------------------------------------------------------------------------
   # OK, line parsed (at least partially); now deal with the contents

Modified: incubator/spamassassin/trunk/t/db_awl_path.t
==============================================================================
--- incubator/spamassassin/trunk/t/db_awl_path.t	(original)
+++ incubator/spamassassin/trunk/t/db_awl_path.t	Tue Jan 13 23:41:56 2004
@@ -38,8 +38,7 @@
 };
 
 print "# $error\n";
-ok($error, qr/cannot create tmp lockfile/, "Check we get the right error back");
-
+ok($error, qr/(cannot create tmp lockfile)|(unlink of lock file.*failed)/, "Check we get
the right error back");
 
 # and this mail should *not* be whitelisted as a result.
 %patterns = %is_spam_patterns;

Mime
View raw message