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 2008/04/14 14:52:37 UTC

svn commit: r647774 - /spamassassin/trunk/lib/Mail/SpamAssassin/ArchiveIterator.pm

Author: jm
Date: Mon Apr 14 05:52:33 2008
New Revision: 647774

URL: http://svn.apache.org/viewvc?rev=647774&view=rev
Log:
mass-check should ignore lines that start with 'From ' in message bodies when looking for mbox separators.  be more resilient and require a properly-formatted From line, with an email address and a date stamp

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/ArchiveIterator.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/ArchiveIterator.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/ArchiveIterator.pm?rev=647774&r1=647773&r2=647774&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/ArchiveIterator.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/ArchiveIterator.pm Mon Apr 14 05:52:33 2008
@@ -363,7 +363,7 @@
   }
   seek(INPUT,$offset,0);
   while (<INPUT>) {
-    last if (substr($_,0,5) eq "From " && @msg);
+    last if (substr($_,0,5) eq "From " && @msg && /^From \S+  ?\S\S\S \S\S\S .\d .\d:\d\d:\d\d \d{4}/);
     push (@msg, $_);
 
     # skip too-big mails
@@ -800,7 +800,7 @@
 	      $header .= $_;
 	    }
 	  }
-	  if (substr($_,0,5) eq "From ") {
+	  if (substr($_,0,5) eq "From " && /^From \S+  ?\S\S\S \S\S\S .\d .\d:\d\d:\d\d \d{4}/) {
 	    $in_header = 1;
 	    $first = $_;
 	    $start = $where;