Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

on my centos 5 I've installed spamassassin and I want to execute it from php using the command line client.

The problem is that each time I run it, I get as result:

0/0

here is how I run it

echo "VIAGRA" | /usr/bin/spamc -c -F spamassasin.conf

this is my config file

# SpamAssassin config file for version 3.x
# NOTE: NOT COMPATIBLE WITH VERSIONS 2.5 or 2.6
# See http://www.yrex.com/spam/spamconfig25.php for earlier versions
# Generated by http://www.yrex.com/spam/spamconfig.php (version 1.50)

# How many hits before a message is considered spam.
required_score           7.5

# Encapsulate spam in an attachment (0=no, 1=yes, 2=safe)
report_safe             1

# Enable the Bayes system
use_bayes               1

# Enable Bayes auto-learning
bayes_auto_learn              1

# Enable or disable network checks
skip_rbl_checks         0
use_razor2              1
use_dcc                 1
use_pyzor               1

# Mail using languages used in these country codes will not be marked
# as being possibly spam in a foreign language.
# - english 
ok_languages            en 

# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_locales              en

any idea?

As always, thank you

share|improve this question

3 Answers 3

That's not an RFC822 e-mail, spamassassin may simply be giving up.

You might have some test mails in /usr/share/doc/spamassassin/examples/ that are a better test.

share|improve this answer
    
I know what you say. but that was a quick test before start building the application. Thank you –  Gabriel Sosa Jun 11 '09 at 15:43

the answer what pretty easy..... the spamassassin was down during testings :P

share|improve this answer

Rather than testing using the string 'VIAGRA', use sample spam (sample-spam.txt) or the GTUBE string:

XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

GTUBE is the anti-spam equivalent of EICAR.

share|improve this answer
1  
Yes, I'm aware he already figured it out, I just thought this bit would be helpful :p –  MikeyB Jun 11 '09 at 16:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.