No SpamAssassin report with MailScanner?

Kelly Hamlin fizz at BOMB.NET
Sat Mar 30 00:58:58 GMT 2002

Would this make it so it includes the spamassassin report in the header when
using mailscanner on a email gateway useing sendmail?
----- Original Message -----
From: "Rose, Bobby" <brose at MED.WAYNE.EDU>
Sent: Friday, March 29, 2002 4:53 PM
Subject: Re: No SpamAssassin report with MailScanner?

I added some code to the 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.

<   $SAResult = SAForkAndTest($SAspamtest, $spammail);
> #Bobby added $mID
>   $SAResult = SAForkAndTest($SAspamtest, $spammail, $mID);
<   my($Test, $Mail) = @_;
> #Bobby added $mID
>   my($Test, $Mail, $mID) = @_;
> #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
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


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?


Dan Kubilos     __\o_ ^
K-8 Tech Coord

More information about the MailScanner mailing list