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 2006/10/13 20:20:42 UTC

svn commit: r463766 - /spamassassin/trunk/build/mkrules

Author: jm
Date: Fri Oct 13 11:20:41 2006
New Revision: 463766

URL: http://svn.apache.org/viewvc?view=rev&rev=463766
Log:
previous change to mkrules was causing good rules to be sent to the sandbox file, since they shared the same section key as 'test' lines.  fix this by making 'test' lines individually-keyed, totally separate from rules

Modified:
    spamassassin/trunk/build/mkrules

Modified: spamassassin/trunk/build/mkrules
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/mkrules?view=diff&rev=463766&r1=463765&r2=463766
==============================================================================
--- spamassassin/trunk/build/mkrules (original)
+++ spamassassin/trunk/build/mkrules Fri Oct 13 11:20:41 2006
@@ -515,11 +515,13 @@
       $name =~ s/\s+/ /gs;
 
       my $forceactive = 1;
-
-      # always send 'test' lines to the sandbox
+      
+      # always send 'test' lines to the sandbox or inactive files
       if (/^test\s*/) {
-        $issandbox = 1;
         $forceactive = 0;
+
+        $name = $_;   # ensure we don't drag rules with us though!
+        $name =~ s/\s+/ /gs;
       }
 
       my $cond;
@@ -538,6 +540,7 @@
       $rules->{$name}->{cond} ||= $cond;
       $rules->{$name}->{issandbox} = $issandbox;
       $rules->{$name}->{forceactive} = $forceactive;
+      # $rules->{$name}->{forceactive} = 1;
       $rules->{$name}->{iscommand} = 1;
 
       # warn "unknown line in rules file '$f', saving to default: $orig";