Hello Noah,

thank you for your support.

Am 26.02.22 um 18:25 schrieb Noah Meyerhans:
Control: tags -1 + moreinfo

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

I tried
spamassassin --lint -D &> spam.log
and get

Feb 27 12:31:05.285 [2778089] dbg: config: read file /etc/spamassassin/local.cf
Feb 27 12:31:05.285 [2778089] dbg: config: read file 
/etc/spamassassin/myrules.cf
Feb 27 12:31:05.283 [2778089] dbg: config: read file 
/etc/spamassassin/sa-compile.pre
Feb 27 12:31:05.305 [2778089] dbg: pyzor: local tests only, disabling Pyzor
Feb 27 12:31:05.305 [2778089] dbg: plugin: loading 
Mail::SpamAssassin::Plugin::Razor2 from @INC
Feb 27 12:31:05.308 [2778089] dbg: razor2: local tests only, skipping Razor
Feb 27 12:31:05.308 [2778089] dbg: plugin: loading 
Mail::SpamAssassin::Plugin::SpamCop from @INC
Feb 27 12:31:05.311 [2778089] dbg: reporter: local tests only, disabling SpamCop

Feb 27 12:31:05.404 [2778089] dbg: config: fixed relative path: /var/lib/spamassassin/3.004006/updates_spamassassin_org/10_default_prefs.cf Feb 27 12:31:05.404 [2778089] dbg: config: using "/var/lib/spamassassin/3.004006/updates_spamassassin_org/10_default_prefs.cf" for included file Feb 27 12:31:05.404 [2778089] dbg: config: read file /var/lib/spamassassin/3.004006/updates_spamassassin_org/10_default_prefs.cf Feb 27 12:31:05.420 [2778089] dbg: config: fixed relative path: /var/lib/spamassassin/3.004006/updates_spamassassin_org/10_hasbase.cf Feb 27 12:31:05.420 [2778089] dbg: config: using "/var/lib/spamassassin/3.004006/updates_spamassassin_org/10_hasbase.cf" for included file

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:

I send an email from an external account to my server and the rules are ignored 
as you can see:

Delivery-date: Sun, 27 Feb 2022 12:36:49 +0100
Received: from mout.kundenserver.de ([212.227.126.134])
          ...
To: deb...@decotrain.de
...
X-Spam-Threshold: 5
X-Spam-Score: 4.9
X-Spam-Score-Int: 49
X-Spam-Bar: ++++
X-Spam-Flag: NO
X-Delivered-To: deb...@decotrain.de
X-Message-Age: 2
Subject: My Madchen does have more sex and dating

Again there is only ficken, Finanz and Potenz.


So the question is what rules are used by the spamd process?

Other "regular spam" is detected correct like:

X-Spam-Threshold: 5
X-Spam-Score: 9.4
X-Spam-Score-Int: 94
X-Spam-Bar: +++++++++
X-Spam-Flag: YES
X-Message-Age: 3
Subject: ***SPAM (9.4)*** _=?UTF-8?B?V2lyIGdyYXR1bGllcmVuX0lobmVuIHJlY2h0IGhlcnpsaWNoLlNpZV9nZWhvcmVuIHp1IGRlbl9BdXNlcndhaGx0ZW4gZnVyX2RpZV9UZXNsYS1VbWZyYWdlLg==?=_

<html>
<p align="center"><a


I am displaying the Spam-Score by modifying the subject.

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

Every other test is successful too.

So the question is how i can implement my rules practical, because my rules are 
parsed in a test but are not active.
How i can check what is used within sa-compile?

Reply via email to