I am using spamasassin along with perl. My perl script calculates the score of emails based on its
body content, subject and from address. Mail content type is HTML. I just pass the html along with
subject and from address to perl, but for any kind of text in mail body, I get same score even if I
pass it illegle content.
Important the content I pass to spamassassin don't include email headers.
It looks to me that spamassassin rules are not invoked, I even tried installing many open source
rules as well, but nothing hapens and even default spamassassin rules look not working.
I am using perl and spam assassing on windows xp with IIS 6 on development machine where as Apache, perl and spamassassin on deployment machine but same results on both ends.
Some snapshot of my perl code is as follows:
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
use Mail::SpamAssassin;
&get_form_data();
$message = 'Subject:' . $FORM{'txtsubject'} .
'From:' . $FORM{'txtfrom'} .
'
' . $FORM{'txtbody'};
my $spamtest = Mail::SpamAssassin->new();
my $mail = $spamtest->parse($message)
;
my $status = $spamtest->check($mail);
if ($status->is_spam()) {
$message = $status->rewrite_mail();
$report = $status->get_report ();
}
print $report;
$status->finish();
$mail->finish();
Please let me know what can I do for Spamassassin to process all the rules? How can I update the spam assassin rules?
Start Free Trial