No SpamAssassin report with MailScanner?

Rose, Bobby brose at MED.WAYNE.EDU
Mon Apr 1 01:27:23 IST 2002


Nope as stated it just saves the message with an SA rewrite in a dir.  I
think it will take more work to get the current Mailscanner to return
the rewritten body and replace the original message body.  Right now all
the main routine does it send the contents to sendmail.pl, run SA
against it, and return an additional header tag which is appended to the
header before mailscanner reassembles the message for delviery. 

-----Original Message-----
From: Kelly Hamlin [mailto:fizz at BOMB.NET] 
Sent: Friday, March 29, 2002 7:59 PM
To: MAILSCANNER at JISCMAIL.AC.UK
Subject: Re: No SpamAssassin report with MailScanner?


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>
To: <MAILSCANNER at JISCMAIL.AC.UK>
Sent: Friday, March 29, 2002 4:53 PM
Subject: Re: No SpamAssassin report with MailScanner?


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