Trying to configure SpamAssassin 4.0.0 with Postfix 3.7.10 on Debian 12. I'm using spamass-milter 0.4.0. My /etc/spamassasin/local.cf
has the following entries:
required_score 5.1
clear_headers
add_header all Flag th: _YESNOCAPS_
add_header all Score th: _SCORE_/_REQD_
add_header all Score-Debug th: _TESTSSCORES(,)_
add_header all Status th3: _YESNO_, score=_SCORE_/_REQD_ tests=_TESTSSCORES(,)_ autolearn=_AUTOLEARN_ version=_VERSION_
add_header all Level th: _STARS(*)_
add_header all Checker-Version th: SpamAssassin _VERSION_ (_SUBVERSION_) on _HOSTNAME_
This is what is inserted into incoming mail:
X-Spam-Flag: th: NO
X-Spam-Status: th3: No, score=-4.0/5.1 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,
DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DKIM_VALID_EF=-0.1,
DMARC_PASS=-0.001,RCVD_IN_VALIDITY_CERTIFIED=-3,
RCVD_IN_VALIDITY_RPBL=1.284,RCVD_IN_VALIDITY_SAFE=-2,
SPF_HELO_PASS=-0.001,SPF_PASS=-0.001,URIBL_BLOCKED=0.001,
URIBL_DBL_BLOCKED_OPENDNS=0.001 autolearn=ham autolearn_force=no
version=4.0.0
X-Spam-Level: th:
X-Spam-Checker-Version: th: SpamAssassin 4.0.0 (2022-12-13) on megaton
I have this entry in the /etc/postfix/main.cf
:
smtpd_milters = <irrelevant milters here>, local:spamass/spamass.sock
Here's content of /etc/default/spamd
:
OPTIONS="--create-prefs --max-children 5 --helper-home-dir --configpath=/usr/share/spamassassin --siteconfigpath=/etc/spamassassin"
spamd and spamass-milter log some activity, so they seem to be triggered properly.
spamassassin --lint
doesn't show anything and returns 0.
This question suggests amavisd might remove headers, but I don't use amavisd and spamass-milter is the last one in the list of milters (the other two I use are OpenDKIM, and OpenDMARC, both called before spamass-milter).
I've tried to enable debugging (-d option) for spamd, but there doesn't seem anything useful being logged.
The documentation for spamass-milter is limited to man page. It's OK in explaining the knobs, but doesn't give the big picture.
My questions are:
Why only SOME headers are inserted, but not others? Is there a list of allowed header names? I thought you could put arbitrary text.
I have not altered spamassassin scores for rules. Why is the default set to such small weights as 0.001? I read somewhere this was used for testing.
Is there a way to ask spamassassin what kind of rules were loaded and what their weights are? Something like "dump all your loaded rules" would be best. Asking, because I've added couple custom rules, but the log always says
spamd[2420376]: zoom: able to use 388/388 'body_0' compiled rules (100%)
even when I added more rules. I'm not sure if my custom rules were even loaded or not.
I'm really interested in figuring this out. Will gladly post extra info, if needed. Thanks in advance for any tips and pointers.