I have a CentOS7 server running an yum-based install of Spamassassin (spamassassin-3.3.2-4.el6.rfx.x86_64). For some reason, I cannot change the required score setting to a custom value. When mail gets flagged as spam, I see this in the mail header:

X-Spam-Flag: YES
X-Spam-Score: 6.869
X-Spam-Level: ******
X-Spam-Status: Yes, score=6.869 tagged_above=-99 required=5
SPF_SOFTFAIL=0.972] autolearn=no

I tried editing /etc/mail/spamassassin/local.cf to this:

required_score 4.9

But it does not seem to take affect - I continue to see '5' being the required spam score. I have restarted both postfix and spamassassin to no avail. I also tried creating a symbolic link from /usr/share/spamassassin/local.cf to /etc/mail/spamassassin/local.cf as someone suggested, to no avail.

Email accounts on my server do not reflect actual Centos users, so user_prefs files do not exist that could override the local.cf far as I can tell.

I did run 'spamassassin -D --lint' and i did see my 4.9 when it ran generic tests, if that means anything.

Oct 16 09:15:53.384 [9363] dbg: rules: run_generic_tests - compiling eval code: meta, priority 500
Oct 16 09:15:53.384 [9363] dbg: rules: compiled meta tests
Oct 16 09:15:53.386 [9363] dbg: check: is spam? score=3.652 required=4.9

Is there any other file I should be editing to allow for custom required settings?


/usr/bin/spamassassin is a standalone program which utilizes Spamassassin engine and is used to check manually single emails and to verify configuration, rules, etc.

When you use Spamassassin engine in conjunction with postfix or other MTA, your MTA uses some filter program to process emails. This filter utilizes the same Spamassassin engine but can use different configuration file. It can be /usr/bin/spamc for example.

You can check postfix /etc/postfix/master.cf configuration to find what program is run as a Spamassassin content_filter (argv parameter). For /usr/bin/spamc you can add -F /etc/mail/spamassassin/local.cf to explicitly set spamc configuration.

| improve this answer | |
  • 1
    This pointed me in the right direction. When I looked at postfix's master.cf, I saw that there was no reference to spamassassin nor spamd. But I did find amavisd, which I found out controls spamassassin. The change I needed to make was against the '$sa_tag2_level_deflt' entry in the /etc/amavisd/amavisd.conf file. – cardinalPilot Oct 17 '18 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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