On 4/7/2014 5:08 AM, Nuno Fernandes wrote:
Nevertheless i think the following one liner would do the trick (have to
test it though):

--- Mail/SpamAssassin/Plugin/AWL.pm.orig        2014-03-24
11:31:18.000000000 +0000
+++ Mail/SpamAssassin/Plugin/AWL.pm     2014-03-24 11:31:20.000000000 +0000
@@ -437,6 +437,7 @@
        # or if the test is marked as "noautolearn"
        next if !$scores->{$test};
        next if exists $tflags->{$test} && $tflags->{$test} =~
/\bnoautolearn\b/; +      return 0 if $tflags->{$test} =~ /\bnoawl\b/;
        $points += $scores->{$test};
      }


The correct patch should be:

diff -Naur Mail-SpamAssassin-3.4.0.orig/lib/Mail/SpamAssassin/Plugin/AWL.pm
Mail-SpamAssassin-3.4.0/lib/Mail/SpamAssassin/Plugin/AWL.pm
--- Mail-SpamAssassin-3.4.0.orig/lib/Mail/SpamAssassin/Plugin/AWL.pm
2014-02-07 08:36:27.000000000 +0000
+++ Mail-SpamAssassin-3.4.0/lib/Mail/SpamAssassin/Plugin/AWL.pm 2014-03-25
10:25:27.000000000 +0000
@@ -437,6 +437,7 @@
        # or if the test is marked as "noautolearn"
        next if !$scores->{$test};
        next if exists $tflags->{$test} && $tflags->{$test} =~ 
/\bnoautolearn\b/;
+      return 0 if exists $tflags->{$test} && $tflags->{$test} =~ /\bnoawl\b/;
        $points += $scores->{$test};
      }

As sa-learn was giving errors like:

Use of uninitialized value in pattern match (m//) at
/usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/AWL.pm line 440.

Best regards,
Nuno Fernandes
Please move this patch to a bug for SA. Add more comments and some documentation for the feature and I don't see why we couldn't patch for you. However, also realize that I'm looking heavily at things like TxRep to replace AWL which is in trunk.

Reply via email to