• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

spamassassin - and my own rules

SvenA

Basic Pleskian
I'm slowly despair, I have my own rules for spamassasssin created and some existing rules changed some values​​.
Well I have to say with scare that none of the rules works.

The rules are located in "/usr/share/spamassassin" and end with the file type ".cf".
After I had created the rules I have with this "./spamassassin --lint-D" and checked by "service spamassissin restart"
restarts the service - unfortunately, neither change my adjustments in existing rules have my own rules run.

What am I doing wrong?

Here once a simple .cf file:

filename: 10_unknown.cf
Code:
header UNKN_SENDER_2   Received =~ /ipconnect/i
describe UNKN_SENDER_2 unknown Sender
score UNKN_SENDER_2    3
 
Hello IgorG ,

this documentary is well known to me but unfortunately it is something not quite .

Server - wide SpamAssassin settings are stored in the Following Following files:

The /usr/share/spamassasin /*.cf files containment configuration details,
eg White list and Black list 50_scores.cf scores are assigned in the configuration file.

After I searched the entire server several times after cf files , I noticed that the Folder
/var/lib/spamassassin/3.003002 contains a file update_spamassassin_org.cf.

In these excerpts , I found the following entries:

Code:
include update_spamassassin_org/50_scores.cf

And only these rules are active, the Folder /usr/share/spamassasin/ will be ignored completely.

Now , I wonder where I can just change the directories, or at least integrate the default folder ?
I once looked at the file sa-update closer , here is also noted that the SA updates are stored in
/var/lib/spamassassin/3.003002. but why the folder /usr/share/spamassasin/ is completely ignored ?
 
Your .cf file needs to be in /etc/mail/spamassassin not /usr/share/spamassassin

You can alternatively edit the local.cf that you'll find in the /etc/mail/spamassassin and add them there.

Afterwards, do a lint and debug, checking carefully in the debug output to see your .cf or the local.cf file being parsed and your rules processed.

/etc/mail/spamassassin is the standard location for global rules files. Check out the spamassassin docs - there's lots of info (but too much really -- it can be confusing!!)
 
It would be nice if SpamAssassin could be configured from the Plesk control planel. Anything the involves root access to files is difficult.
 
Your .cf file needs to be in /etc/mail/spamassassin not /usr/share/spamassassin

FWIW: The Advanced Administration Guide, Parallels Plesk Panel 11.0 for Linux states:
Server-wide SpamAssassin settings are stored in the following files:

The /usr/share/spamassasin/*.cf files contain configuration details, e.g. White list and Black list scores are assigned in the 50_scores.cf configuration file.
The /etc/mail/spamassassin/local.cf stores server-wide filter settings.

User settings are stored in the following files:

/var/qmail/mailnames/<domain>/<mailname>/.spamassassin/user_prefs file defines SpamAssassin actions.
/var/qmail/mailnames/<domain>/<mailname>/.qmail defines how message flow reaches SpamAssassin daemons.
 
Back
Top