Never mind.  I just realized that this module does the full SA
execution.  

 

Mail::SpamAssassin:Client seems to work but is alpha.  Any ideas on the
status of this?

 

Gary Wayne Smith

 

________________________________

From: Gary W. Smith [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 20, 2007 1:56 AM
To: users@spamassassin.apache.org
Subject: SA/Perl Question

 

Hello, 

I'm working on a perl script that will check some emails.  I had a
question though (based on an earlier question).  If SA is on a different
box how do I tell the perl code to use a different host and port?

Given something like the code below how do I specific a non-default
backend?

#!/usr/bin/perl 

use Mail::SpamAssassin;

my $spamtest = Mail::SpamAssassin->new( { username => 'filter'} );

my $mail = $spamtest->parse(<STDIN>);

my $status = $spamtest->check($mail);

if ($status->is_spam()) {

    print $status->rewrite_mail();

}

$status->finish();

$mail->finish();

exit 0;

Reply via email to