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

« back to all changes in this revision

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

  • 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:
45
45
  $self->register_eval_rule("check_blank_line_ratio");
46
46
  $self->register_eval_rule("tvd_vertical_words");
47
47
  $self->register_eval_rule("check_stock_info");
 
48
  $self->register_eval_rule("check_body_length");
48
49
 
49
50
  return $self;
50
51
}
282
283
  return;
283
284
}
284
285
 
 
286
sub check_body_length {
 
287
  my ($self, $pms, undef, $min) = @_;
 
288
 
 
289
  my $body_length = $pms->{msg}->{pristine_body_length};
 
290
  dbg("eval: body_length - %s - check for min of %s", $body_length, $min);
 
291
 
 
292
  return (defined $body_length && $body_length <= $min) ? 1 : 0;
 
293
}
 
294
 
 
295
# ---------------------------------------------------------------------------
 
296
 
 
297
# capability checks for "if can()":
 
298
#
 
299
sub has_check_body_length { 1 }
285
300
 
286
301
1;