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/09/04 19:22:37 UTC

svn commit: r440126 - /spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm

Author: jm
Date: Mon Sep  4 10:22:36 2006
New Revision: 440126

URL: http://svn.apache.org/viewvc?view=rev&rev=440126
Log:
bug 5040: if in no-net scoreset, don't warn about net rules being zero-score dependencies of meta rules

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

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm?view=diff&rev=440126&r1=440125&r2=440126
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm Mon Sep  4 10:22:36 2006
@@ -2792,7 +2792,18 @@
           info("rules: meta test $rulename has undefined dependency '$token'");
         }
         elsif ($conf->{scores}->{$token} == 0) {
-          info("rules: meta test $rulename has dependency '$token' with a zero score");
+          my $dowarn = 1;
+
+          # there are some cases where this is expected; don't warn
+          # in those cases.
+          if ((($self->{conf}->get_score_set()) & 1) == 0 &&
+              $conf->{tflags}->{$token} && 
+              $conf->{tflags}->{$token} =~ /\bnet\b/)
+          {
+            $dowarn = 0;    # bug 5040: net rules in a non-net scoreset
+          }
+
+          $dowarn and info("rules: meta test $rulename has dependency '$token' with a zero score");
         }
 
         # If the token is another meta rule, add it as a dependency