Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


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
# See for earlier versions
# Generated by (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

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:


GTUBE is the anti-spam equivalent of EICAR.

share|improve this answer
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


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.