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:
- 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.
- Create or change /etc/procmailrc. The /etc/procmailrc should look as follows:
* < 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.
* ! ^From[ ]
* ^rom[ ]
LOG="*** Dropped F off From_ header! Fixing up. "
| sed -e 's/^rom /From /'
# chmod 666 /var/log/procmail
- Your Mail Transfer Agent should be configured with procmail.
If you have postfix, then the main.cf has to have the entry:
mailbox_command = /usr/bin/procmail -a "$EXTENSION"
If you have sendmail, then the sendmail.mc has to have the entry:
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')