On Tue, 14 Aug 2012, Daniel McDonald wrote:

Each night when I run masschecks, I get a lot of (couple of hundred) errors
that look like:
Use of uninitialized value in regexp compilation at
/home/dmcdonald/nightlymc/trunk/masses/../blib/lib/Mail/SpamAssassin/Archive
Iterator.pm line 437, <DEFANGED_INPUT> line 168.

Line 437 reads:
   last if (substr($_,0,5) eq "From " && @msg && /$self->{opt_from_regex}/o);

Any idea where I should start looking to fix my mass-checks?

As stated, it's a known bug.

As a workaround so that I can run local masschecks when I need to, I've made a local change in that line to use the full regex from the default-setting code that's currently apparently being skipped.

I have not and will not check this in, as the problem needs to be correctly fixed and this is only a Q'n'D hack.

I've attached a diff so you can patch your local copy and get masschecks running again until the correct fix is made.

--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 [email protected]    FALaholic #11174     pgpk -a [email protected]
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  Of the twenty-two civilizations that have appeared in history,
  nineteen of them collapsed when they reached the moral state the
  United States is in now.                          -- Arnold Toynbee
-----------------------------------------------------------------------
 Tomorrow: the 67th anniversary of the end of World War II
Index: lib/Mail/SpamAssassin/ArchiveIterator.pm
===================================================================
--- lib/Mail/SpamAssassin/ArchiveIterator.pm    (revision 1369873)
+++ lib/Mail/SpamAssassin/ArchiveIterator.pm    (working copy)
@@ -434,7 +434,7 @@
   my $size = 0;
   for ($!=0; <INPUT>; $!=0) {
     #Changed Regex to use option Per bug 6703
-    last if (substr($_,0,5) eq "From " && @msg && /$self->{opt_from_regex}/o);
+    last if (substr($_,0,5) eq "From " && @msg && /^From \S+  ?(\S\S\S \S\S\S 
.\d .\d:\d\d:\d\d \d{4}|.\d-\d\d-\d{4}_\d\d:\d\d:\d\d_)/o);
     $size += length($_);
     push (@msg, $_);


Reply via email to