~clint-fewbar/ubuntu/hardy/spamassassin/remove-open-whois

« back to all changes in this revision

Viewing changes to lib/Mail/SpamAssassin/Plugin/Rule2XSBody.pm

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2007-06-13 11:33:36 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070613113336-icdflw7kthep7ptm
Tags: 3.2.1-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - debian/control:
    + Replace libmail-spf-query-perl Recommends with Depends on
      libmail-spf-perl for spamassassin binary.
    + Bump required version for libnet-dns-perl to (>= 0.58) due
      to libmail-spf-perl requirements.
    + Change Maintainer/XSBC-Original-Maintainer field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
  $self->setup_test_set ($conf, $conf->{body_tests}, 'body');
71
71
}
72
72
 
 
73
sub compile_now_start {
 
74
  my ($self) = @_;
 
75
  # call info here (and no earlier) so that the message appears in the syslog
 
76
  # but not on stderr when we start spamd
 
77
  if (exists $self->{compiled_rules_log_msg_text}) {
 
78
    info("zoom: $self->{compiled_rules_log_msg_text}") unless (would_log('dbg', 'zoom'));
 
79
    delete $self->{compiled_rules_log_msg_text};
 
80
  }
 
81
}
 
82
 
73
83
sub setup_test_set {
74
84
  my ($self, $conf, $test_set, $ruletype) = @_;
75
85
  foreach my $pri (keys %{$test_set}) {
148
158
    my $pc_zoomed   = ($found / ($totalhasrules || .001)) * 100;
149
159
    $pc_zoomed   = int($pc_zoomed * 1000) / 1000;
150
160
 
151
 
    info("zoom: able to use $found/$totalhasrules '$ruletype' compiled ".
152
 
        "rules ($pc_zoomed\%)");
 
161
    $self->{compiled_rules_log_msg_text} = "able to use $found/".
 
162
        "$totalhasrules '$ruletype' compiled rules ($pc_zoomed\%)";
 
163
    dbg("zoom: $self->{compiled_rules_log_msg_text}");
153
164
 
154
165
    # TODO: issue a warning for low counts?
155
166
    # TODO: inhibit rule2xs scanning entirely for low counts?