Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Spamassassin false negative for message from text

by Anonymous Monk
on Jun 28, 2013 at 15:37 UTC ( #1041275=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:


I'm downloading my twitter feed and saving them into text files and I want to check the likely hood of spam using a perl script with Mail::SpamAssassin. So I followed this post about loading messages from text. All my messages keep getting marked as 'not spam' even when I inject 419 scams.


What am I doing wrong?
Do I have to configure some Spamasssasin files?
Do My messages need to be in a cetain format?
Is there a better alternative for my project?


use Mail::SpamAssassin; use Mail::Audit; open FILE, "<", ~/Messages/twitter_tweet.ema' or die; my @lines = <FILE>; my $spamtest = Mail::SpamAssassin->new(); my $mail = $spamtest->parse(\@lines); my $status = $spamtest->check($mail); print $status->get_report(); if ($status->is_spam()) { print "Totally Spam\n"; } else { print "not spam\n"; } $status->finish(); $mail->finish(); $spamtest->finish();
also $status->get_report() prints (no report template found)
I didn't configure spamAssasin I simply started using the perl module
There is a file called ~.spamassassin/user_prefs in my home directory but i didn't touch it

Comment on Spamassassin false negative for message from text
Download Code
Replies are listed 'Best First'.
Re: Spamassassin false negative for message from text
by runrig (Abbot) on Jun 28, 2013 at 15:55 UTC
    Cross-posted to StackOverflow. Please mention it when you cross-post.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1041275]
Approved by marto
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2015-11-30 04:23 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (757 votes), past polls