No SpamAssassin report with MailScanner?

Rose, Bobby brose at MED.WAYNE.EDU
Fri Mar 29 21:53:14 GMT 2002


I added some code to the sendmail.pl that will call SA to rewrite the
message with a report and dump that into a directory.  I haven't spent
any time to see about returning rewrite back since I think that may be
more difficult.  Here's the diffs.

289c289,290
<   $SAResult = SAForkAndTest($SAspamtest, $spammail);
---
> #Bobby added $mID
>   $SAResult = SAForkAndTest($SAspamtest, $spammail, $mID);
299c300,301
<   my($Test, $Mail) = @_;
---
> #Bobby added $mID
>   my($Test, $Mail, $mID) = @_;
312a315,327
> #Bobby's added code
>     my $SAScore  = $spamness->get_hits();
>     my $SAReqHits = $spamness->get_required_hits();
>     Log::InfoLog("SpamAssassin score $SAScore of $SAReqHits");
>     if ($SAScore >= $SAReqHits) {
>       #$spamness->report_as_spam ($Mail);
>       $spamness->rewrite_mail ();
>       my $SARewrite = $spamness->get_full_message_as_text();
>       local(*DOUT); 
>       open(DOUT, ">>/var/spam/queue/spr$mID") or Log::DieLog("Failed
to create copy of spam message spr$mID");
>       print DOUT $SARewrite;
>       close DOUT;
>    }



-----Original Message-----
From: Dan Kubilos [mailto:dan at OXNARDSD.ORG] 
Sent: Friday, March 29, 2002 4:40 PM
To: MAILSCANNER at JISCMAIL.AC.UK
Subject: Re: No SpamAssassin report with MailScanner?


Thanks Richard.  I was looking for this.

But . . .

why the -P option

>
> :0fw
>
> | spamassassin -P
>
> As I mentioned before if your setup is typical then if you don't want


-P

The -P parameter will cause it to pipe the output to STDOUT instead.

Why do you want it in standard out instead of the mail spool?

Thanks


--
Dan Kubilos     __\o_ ^
K-8 Tech Coord
http://www.oxnardsd.org



More information about the MailScanner mailing list