Search for:

Available article translations:

I installed Spamassassin but it doesn’t work correctly. What should I do to make it work properly?


This problem usually occurs because your procmail is either configured incorrectly or not configured at all.

You should do the following to make Spamassassin work properly:

  1. The “spamd” should start with “-d -x -q -L” options. You can specify these options in the /etc/sysconfig/spamd or /etc/default/spamassassin files depending on your OS.


# vi /etc/sysconfig/spamd

SPAMD_ARGS = "-d -x -q -L"


Here is the explanation of these flags: 

 -d -- Run daemonized

 -L -- Use local tests only (no DNS)

 -x -- Do not use user preferences files (typical mail users in Confixx do not have home directories, so they can not have preferences files).

 -q -- Use sql database to keep user preferences.


  1. Create or change /etc/procmailrc. The /etc/procmailrc should look as follows:





:0 fw

* < 256000

| /usr/bin/spamc -f


# Mails with a score of 15 or higher are almost certainly spam (with 0.05%

# false positives according to rules/STATISTICS.txt). Let's put them in a

# different mbox. (This one is optional.)


#* ^X-Spam-Level: ***************



# All mail tagged as spam (eg. with a score higher than the set threshold)

# is moved to "probably-spam".


#* ^X-Spam-Status: Yes



# Work around procmail bug: any output on stderr will cause the "F" in "From"

# to be dropped. This will re-add it.

:0 H

* ! ^From[ ]

* ^rom[ ]


 LOG="*** Dropped F off From_ header! Fixing up. "


 :0 fhw

 | sed -e 's/^rom /From /'



  1. # chmod 666 /var/log/procmail
  2. Your Mail Transfer Agent should be configured with procmail.


If you have postfix, then the has to have the entry:


mailbox_command = /usr/bin/procmail -a "$EXTENSION"

If you have sendmail, then the has to have the entry:


 FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')


Was this article helpful?
Tell us how we may improve it.
Yes No