On Tue, Aug 14, 2012 at 12:07 AM, Jim Schueler <jschue...@eloquency.com>wrote:

> The attached contains two files:
>   spamtoday.msg came out of a filter in my mail stream
>   spamtoday.out is spamtoday.msg piped through 'spamassassin -t'
>
> This problem occurs very intermittently.  Out of 300 daily emails, only 4
> or 5 show up as false positives this way.  Normally, the blacklist tests
> are very effective.
>
> Any ideas?
>
> Here is my code:
>
> use Mail::SpamAssassin ;
>
> package TQIS::SpamAssassin ;
>
> sub new {
>         my $package = shift ;
>         return bless { @_ }, $package ;
>         }
>
> sub status {
>         my $self = shift ;
>
>         if ( @_ ) {
>                 my $buff = shift ;
>                 $self->{spamtest} ||= new Mail::SpamAssassin ;
>                 $self->{mail} = $self->{spamtest}->parse( $buff ) ;
>                 $self->{status} = $self->{spamtest}->check(
>                                         $self->{mail} ) ;
>                 }
>
>         return $self->{status} ;
>         }
>
> sub DESTROY {
>         my $self = shift ;
>         $self->{status}->finish() if ref $self->{status} ;
>         $self->{mail}->finish() if ref $self->{mail} ;
>         }
>
> our $sa = new Mail::SpamAssassin ;
> while ( 1 ) {
>         my $msg = getNextMessage() :        ## Blocking
>         my $spam = new TQIS::SpamAssassin spamtest => $sa ;
>         $spam->status( $mg ) ;
>         my $out = $spam->{status}->rewrite_mail() ;
>         forward( $out ) unless $spam->{status}->is_spam() ;
>         }
>
>
>


-- 
Thanks!

Sincerely,

Jim Schueler
E L O Q U E N C Y
Tell Your Story to the World

http://www.eloquency.com/
734 786-5278

Attachment: spamtoday.tar.gz
Description: GNU Zip compressed data

Reply via email to