Spam Scanning Larger Messages

Mark Martinec Mark.Martinec+amavis at ijs.si
Wed Jun 15 20:01:47 CEST 2011


Clayton,

> I know in 2.6.3 the ability to pass partial messages to SpamAssassin was 
> put into place:
> 
> "- large messages beyond $sa_mail_body_size_limit are now partially 
> passed to SpamAssassin and other spam scanners for checking: a copy 
> passed to a spam scanner is truncated near or slightly past the 
> indicated limit. Large messages are no longer given an almost free 
> passage through spam checks"
> 
> Is it possible to revert back to the previous method of not scanning 
> these messages? Or is it considered better practice to go ahead and 
> provide some scanning giving the attachment and image type spams we see 
> periodically these days?

I don't see any good reason to do so, but it is possible if you insist:


amavisd.conf:

$policy_bank{'NOSPAMCHECK'} = {
  bypass_spam_checks_maps => [1],
  spam_lovers_maps => [1],
};

package Amavis::Custom;

sub new {
  my($class,$conn,$msginfo) = @_;
  my($self) = bless {}, $class;
  if ($msginfo->msg_size > 400*1024) {
    Amavis::load_policy_bank('NOSPAMCHECK',$msginfo);
  }
  $self;
}

1;



Mark


More information about the amavis-users mailing list