Control: tags -1 + moreinfo Hello Karsten,
On Fri, Feb 25, 2022 at 01:57:08PM +0100, karsten wrote: > i think this is not a bug and spamassassin is simply not using the rules. > First i have added my own rules to /etc/spamassassin/local.cf without success. > Because this has no effect i put the files in an extra file > /etc/spamassassin/myrules.cf > This is ignored too. How are you testing your rule? Does spamassassin --lint report anything notable? Also consider adding the '-D' flag to generate copious additional debug output. I have done the following to test it, and things seem to work as expected: 1. Install the rules: root@a103ba41188a:/# cat > /etc/spamassassin/test.cf header CONTAINS_SUB Subject =~ /(Sex|Potenz|Dating|Finanz|FFP-2|M[aä]dchen|Bett|ficken)/i score CONTAINS_SUB 5 describe CONTAINS_SUB Betreff enthält Spam-Wörter 2. Construct a message to trigger the rule: root@a103ba41188a:/# sed 's,Subject:.*,Subject: Potenz,; s,GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL,,' /usr/share/doc/spamassassin/examples/sample-spam.txt > /tmp/test.txt 3. Process the message with spamassassin. Note the report results at the bottom: Date: Wed, 23 Jul 2003 23:30:00 +0200 From: Sender <sen...@example.net> To: Recipient <recipi...@example.net> Precedence: junk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit This is the GTUBE, the Generic Test for Unsolicited Bulk Email If your spam filter supports it, the GTUBE provides a test by which you can verify that the filter is installed correctly and is detecting incoming spam. You can send yourself a test mail containing the following string of characters (in upper case and with no white spaces and line breaks): XJS*C4JDBQADN1.NSBN3*2IDNEN**C.34X You should send this test mail from an account outside of your network. Spam detection software, running on the system "a103ba41188a", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: This is the GTUBE, the Generic Test for Unsolicited Bulk Email If your spam filter supports it, the GTUBE provides a test by which you can verify that the filter is installed correctly and is detecting incoming spam. You can send yourself a test mail containing t [...] Content analysis details: (4.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 5.0 CONTAINS_SUB Betreff enthält Spam-Wörter -0.0 NO_RELAYS Informational: message was not relayed via SMTP -0.0 NO_RECEIVED Informational: message has no Received headers