Some .cf files not being used by SpamAssassin under MailScanner?

Matt Kettler mkettler at EVI-INC.COM
Thu Sep 15 23:20:43 IST 2005

    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Summary: Very strange problem where SA command line correctly uses all my rules,
but SA under MailScanner only reads SOME of the .cf files from the site rules
directory. reloading MailScanner does not fix the problem, and spamassassin
--lint is happy.

MailScanner 4.42.9
Perl 5.8.0
SpamAssassin 2.64
Redhat 9 based Linux box with custom kernel.


I make use of extensive custom rules including, as well as several
private rulesets. There are 35 .cf files in /etc/mail/spamassassin.

SpamAssassin --lint runs clean.

When I do testing on the command line, with spamassassin -t <testmessage.txt
everything works fine and all my rules work as they should.

However it looks like some of my custom rules are not being used by MailScanner,
but others are. Even after issuing service MailScanner reload.

In particular, I can see lots of hits of DRUGS_* rules, but no hits of my LOTTO

# grep DRUGS /var/log/maillog |wc -l
# grep LOTTO /var/log/maillog |wc -l
# grep LOTTO /etc/mail/spamassassin/*.cf |wc -l

I took a particular message which should have hit many of the LOTTO_* rules, and
I ran it through spamassassin -t and verified it hit.

Next I reloaded MailScanner, just to make sure, and emailed myself some of the
body text again from an outside system. MailScanner gave it:

X-EVI-MailScanner-SpamCheck: not spam, SpamAssassin (score=0.16, required 5,
	NO_REAL_NAME 0.16, UPPERCASE_50_75 0.00)

I then took the remailed message, and ran it through spamassassin -t on my
mailserver: SpamAssassin gave it:

X-Spam-Status: No, hits=2.7 required=5.0 tests=BAYES_50,
        UPPERCASE_50_75 autolearn=no version=2.64

Notice that L_AWARD_NOTICE and L_LUCKYDAY hit in SA, but not MailScanner. (These
rules are in /etc/mail/spamassassin/

Why would MailScanner's instance of SA fail to parse some of my rule files, but
successfully parse others (/etc/mail/spamassassin/

The mind boggles..

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki ( and
the archives (

Support MailScanner development - buy the book off the website!

More information about the MailScanner mailing list