Re: Debugging white/black-listing

Bill Cole <[email protected]> Wed, 18 Feb 2026 13:41:34 -0500
Newsgroups gmane.mail.spam.spamassassin.general
Message-ID <[email protected]>
On 2026-02-18 at 12:59:42 UTC-0500 (Wed, 18 Feb 2026 10:59:42 -0700)
Philip Prindeville via users <[email protected]>
is rumored to have said:

> Hi.
>
> I have rules like:
>
> whitelist_from_rcvd [email protected] mirrors.kernel.org
> ...
>
> blacklist_from *@yandex.ru
>
> And only the last rule seems to be hit.

All rules are run UNLESS you use shortcircuit. Order in the file should 
not matter.

> How do I debug this?

spamassassin -t -D rules <testmessage will show you all the hits of a 
message.

> I'm trying to avoid spam from Yandex while getting mailing list mail 
> from legit contributors to Linux that use Yandex (god knows why).

I gather it's a Russian analog to Yahoo...

You can always supplement the generic wl/bl directives with a specific 
rule based on specific headers, e.g.:

describe W_LINUX_CONT  Welcome linux-contrib
header   W_LINUX_CONT  From =~ /[email protected]/
score    W_LINUX_CONT  -10

You can make that more complex if you like, or combine it in a metarule 
with a subrule that matches mirrors.kernel.org in the last Received 
header. RTFM for details.


-- 
  Bill Cole
  [email protected] or [email protected]
  (AKA @[email protected] and many *@billmail.scconsult.com 
addresses)
  Please keep discussion mailing list replies *on-list*
  Not Currently Available For Hire