I noticed the MISSING_SUBJECT rule matched for every mail recently even though the mails contained a subject header. Finally I found this in the spamd.log:
warn: Possible unintended interpolation of @yahoo in string at /etc/spamassassin/local.cf, rule MY_SPAMMY_YAHOO, line 1. warn: rules: failed to compile Mail::SpamAssassin::Plugin::Check::_head_tests_0_4, skipping: warn: (Global symbol "@yahoo" requires explicit package name at /etc/spamassassin/local.cf, rule MY_SPAMMY_YAHOO, line 1.)
The reason was a rule like this:
header MY_SPAMMY_YAHOO To =~ /myspammyaddress@yahoo.de/ score MY_SPAMMY_YAHOO 3 describe MY_SPAMMY_YAHOO Mail to myspammyaddress@yahoo.de is mostly spam
Escaping the @ in the rule fixed the Problem:
header MY_SPAMMY_YAHOO To =~ /myspammyaddress\@yahoo.de/
Hope this helps someone to spot the error faster.
The problem is that spamassasin does not autolearn ham if the ham messages match the MISSING_SUBJECT rule. So an error like this basically not only breaks lots of tests but also autolearning of ham. So lesson learned: better always look at the spamd.log after creating a new rule, even if you think you know what you are doing 😉
Thank you so much!
Comment by Francisco — 25. July 2019 @ 15:54