~ubuntu-branches/ubuntu/utopic/spamassassin/utopic-updates

« back to all changes in this revision

Viewing changes to build/mkrules

  • Committer: Package Import Robot
  • Author(s): Noah Meyerhans
  • Date: 2014-02-14 22:45:15 UTC
  • mfrom: (0.8.1) (0.6.2) (5.1.22 sid)
  • Revision ID: package-import@ubuntu.com-20140214224515-z1es2twos8xh7n2y
Tags: 3.4.0-1
* New upstream version! (Closes: 738963, 738872, 738867)
* Scrub the environment when switching to the debian-spamd user in
  postinst and cron.daily. (Closes: 738951)
* Enhancements to postinst to better manage ownership of
  /var/lib/spamassassin, via Iain Lane <iain.lane@canonical.com>
  (Closes: 738974)

Show diffs side-by-side

added added

removed removed

Lines of Context:
229
229
sub lint_rule_text {
230
230
  my ($text) = @_;
231
231
 
232
 
  # ensure we turn off slow/optional stuff for linting!
 
232
  # ensure we turn off slow/optional stuff for linting, but keep the essentials
233
233
  my $pretext = q{
234
234
    loadplugin Mail::SpamAssassin::Plugin::Check
 
235
    loadplugin Mail::SpamAssassin::Plugin::URIDNSBL
235
236
    use_bayes 0
236
237
  };
237
238
 
936
937
    my $text    = $rules->{$rule}->{output_text};
937
938
    next unless defined ($text);
938
939
 
 
940
# DOS - bug 6297 - HACK HACK HACK HACK
 
941
# this will probably screw up meta rules that do something like '&& !$rule'
 
942
 
 
943
    # avoid publishing 'tflags nopublish' rules
 
944
    if (pubfile_is_activeout($pubfile) && exists $rules->{$rule}->{tflags} &&
 
945
        $rules->{$rule}->{tflags} =~ /\bnopublish\b/)
 
946
    {
 
947
      print "omitting rule $rule due to tflags nopublish (tflags $rules->{$rule}->{tflags})\n";
 
948
      next;
 
949
    }
 
950
 
 
951
# DOS - END HACK
 
952
 
939
953
    $output_file_text->{$pubfile} .= "##{ $rule\n".
940
954
                            $text.
941
955
                            "##} ".$rule."\n\n";
947
961
    my $pubfile = $rules->{$rule}->{output_file};
948
962
    my $text    = $rules->{$rule}->{output_text};
949
963
    next unless defined ($text);
 
964
 
 
965
# DOS - bug 6297 - HACK HACK HACK HACK
 
966
# this will probably screw up meta rules that do something like '&& !$rule'
 
967
 
 
968
    # avoid publishing 'tflags nopublish' rules
 
969
    if (pubfile_is_activeout($pubfile) && exists $rules->{$rule}->{tflags} &&
 
970
        $rules->{$rule}->{tflags} =~ /\bnopublish\b/)
 
971
    {
 
972
      print "omitting rule $rule due to tflags nopublish (tflags $rules->{$rule}->{tflags})\n";
 
973
      next;
 
974
    }
 
975
 
 
976
# DOS - END HACK
 
977
 
950
978
    $output_file_text->{$pubfile} .= $text;
951
979
  }
952
980