You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Scott Techlist <te...@s2ca.us> on 2026/03/13 16:07:27 UTC

Help with KAM rule set setup

Redhat/Centos 8 

Spamassassin 3.4.0 running on Perl version 5.16.3

Normally used via amavisd

 

Trying unsuccessfully to implement/install the KAM rule set.

 

 

Novice spamassassin user.    I have used it for years but haven't had to configure much except a few custom rule sets and scores.  I'm now trying to use the KAM rule set.

 

When I run the last step:

 

sa-update --gpgkey 24C063D8 --channel kam.sa-channels.mcgrail.com

 

That results in:

 

rules: failed to run SNB_HASHBL_FREEMAIL test, skipping:

        (Can't locate object method "check_hashbl_emails" via package "Mail::SpamAssassin::PerMsgStatus" at (eval 1571) line 45.

)

Possible unintended interpolation of @L in string at /tmp/.spamassassin1602K8J4hetmp/KAM.cf, rule __KAM_PHISH_INVOICE2_1, line 1.

rules: failed to compile Mail::SpamAssassin::Plugin::Check::_body_tests_0_8, skipping:

        (Global symbol "@L" requires explicit package name at /tmp/.spamassassin1602K8J4hetmp/KAM.cf, rule __KAM_PHISH_INVOICE2_1, line 1.)

channel: lint check of update failed, channel failed

 

I also added this .conf file:

 

cat /etc/mail/spamassassin/channel.d/KAM_channel.conf

 

CHANNELURL=kam.sa-channels.mcgrail.com

KEYID=24C063D8

# Ignore everything below.

return 0

 

<snipped KEY BLOCK>

 

 

Any easy fix to this?

 

Thanks, Scott

 

 

 

 

 

 


Re: Help with KAM rule set setup

Posted by Greg Troxel <gd...@lexort.com>.
"Scott Techlist" <te...@s2ca.us> writes:

> Redhat/Centos 8 
>
> Spamassassin 3.4.0 running on Perl version 5.16.3

3.4.0 was released in February, 2014.
4.0.0 was released on December 18, 2022.

Thus you are more than 3 years behind making the jump to 4, and using a
long-unmaintained version of 3.4.x, instead of 3.4.6 (from 2021 I
think).

FWIW, my system says:

  $ spamassassin --version
  SpamAssassin version 4.0.2
    running on Perl version 5.42.0

While I can't claim there are problems with your perl version, SA 3.4.0
is too old to be reasonable to use.  I would not expect SA's current
rules, or KAM rules, to necessarily work well with old SA.  Were I
maintaining a ruleset, I wouldn't be testing with obsolete SA.

My advice is figure out how to run current code instead.  This is
basically a redhat problem, caused by your choice (or someone else's in
your world) to run old software because "stable" is better than
up-to-date ("LTS") and how to get newer versions of things that need to
be newer should probably be addressed in redhat/centos channels.

Overall, your errors look like packaging problems.

RE: Help with KAM rule set setup

Posted by John Hardin <jh...@impsec.org>.
On Sat, 14 Mar 2026, John Hardin wrote:

> On Fri, 13 Mar 2026, Scott Techlist wrote:
>
>>>  __KAM_PHISH_INVOICE2_1 appears to be missing an escaped "@", P\@YP@L.  On
>>>  a version of KAM.cf that I am looking at - in or around line 10359.
>>
>>  Thanks for checking into that.  Maybe there's hope I can get it to work
>>  then, if Kevin et.al. can fix it.  Meanwhile, I don't know how to load it
>>  manually; it's setup as a channel now.  Know of any old guides on loading
>>  it manually (downloading the appropriate .cf files etc)?
>
> You presumably have a "local rules" .cf file that loads after all the 
> maintained-channel files (like SA base, and KAM).
>
> If you copy that entire rule into your local rules file

I just realized that may be taken two ways. Copy _just_ the _one_ broken 
rule into your local config to fix it, _not_ the entire KAM ruleset.


-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org                         pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   Socialism is like polio: it comes back when people forget about
   the horrible damage it did last time.             -- Garry Kasparov
-----------------------------------------------------------------------
  Today: Albert Einstein's 147th Birthday

RE: Help with KAM rule set setup

Posted by John Hardin <jh...@impsec.org>.
On Fri, 13 Mar 2026, Scott Techlist wrote:

>> __KAM_PHISH_INVOICE2_1 appears to be missing an escaped "@", P\@YP@L.  On a version of KAM.cf that I am looking at - in or around line 10359.
>
> Thanks for checking into that.  Maybe there's hope I can get it to work 
> then, if Kevin et.al. can fix it.  Meanwhile, I don't know how to load 
> it manually; it's setup as a channel now.  Know of any old guides on 
> loading it manually (downloading the appropriate .cf files etc)?

You presumably have a "local rules" .cf file that loads after all the 
maintained-channel files (like SA base, and KAM).

If you copy that entire rule into your local rules file and fix it 
_there_, it will override the downloaded version. DO NOT rename it!

Then you just need to check periodically if upstream (KAM) has fixed it 
(he's on this list, it may be fixed pretty quickly) and remove your 
override when it is.


-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org                         pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   The third basic rule of firearms safety:
   Keep your booger hook off the bang switch!
-----------------------------------------------------------------------
  Today: Albert Einstein's 147th Birthday

RE: Help with KAM rule set setup

Posted by Scott Techlist <te...@s2ca.us>.
> __KAM_PHISH_INVOICE2_1 appears to be missing an escaped "@", P\@YP@L.  On a version of KAM.cf that I am looking at - in or around line 10359.

Thanks for checking into that.  Maybe there's hope I can get it to work then, if Kevin et.al. can fix it.  Meanwhile, I don't know how to load it manually; it's setup as a channel now.  Know of any old guides on loading it manually (downloading the appropriate .cf files etc)?






Re: Help with KAM rule set setup

Posted by Jared Hall via users <us...@spamassassin.apache.org>.
__KAM_PHISH_INVOICE2_1 appears to be missing an escaped "@", P\@YP@L.  
On a version of KAM.cf that I am looking at - in or around line 10359.

-- Jared Hall
jared@jaredsec.com
Available for hire.


On 3/13/2026 12:07 PM, Scott Techlist wrote:
>
> Possible unintended interpolation of @L in string at 
> /tmp/.spamassassin1602K8J4hetmp/KAM.cf, rule __KAM_PHISH_INVOICE2_1, 
> line 1.
>
> rules: failed to compile 
> Mail::SpamAssassin::Plugin::Check::_body_tests_0_8, skipping:
>
>         (Global symbol "@L" requires explicit package name at 
> /tmp/.spamassassin1602K8J4hetmp/KAM.cf, rule __KAM_PHISH_INVOICE2_1, 
> line 1.)
>
> channel: lint check of update failed, channel failed
>
>

RE: Help with KAM rule set setup (RHEL10, SA 4.0)

Posted by Scott Techlist <te...@s2ca.us>.
>What is the *actual* *problem* that you are trying to resolve?

Thanks Bill.  I'm grateful for your input in particular.  It's one of those weary days and I'm fuzzy what detail originally took me down that path, something to do with HashBL triggered the rabbit hole somehow, as I recall.  But now that I've undone my changes related to OVAL, SA appears to be fine. No errors out of --lint.  Looks like I was chasing a self-induced error. 

So, never mind and apologies to the list for the static.   Scott




Re: Help with KAM rule set setup (RHEL10, SA 4.0)

Posted by Bill Cole <sa...@billmail.scconsult.com>.
On 2026-04-14 at 13:57:16 UTC-0400 (Tue, 14 Apr 2026 12:57:16 -0500)
Scott Techlist <us...@spamassassin.apache.org>
is rumored to have said:

> Restarting a (new) thread from a few weeks back where I was trying to 
> get KAM working on an older box.  I couldn't get that to work and that 
> was the impetus to upgrade.

I don't understand how that could have broken, unless the problem was 
antique OpenSSH on that old box not supporting secure transfers from the 
very modern mcgrail.com servers.

> I started a fresh server build to get KAM implemented.
> -AlmaLinux release 10.1 (Heliotrope Lion)
> -amavis-2.13.1 (20240304)
> -SpamAssassin version 4.0.1
> -  running on Perl version 5.40.2
>
> This was not without some pain. I had to cpanm and build from source 
> some missing perl modules that are not included in any AL10 dnf 
> packages to get the base installs missing modules cleared.  After 
> that, I setup the KAM channel and ran into a problem:
>
> On AlmaLinux 10 (and presumably RHEL 10, Rocky 10, etc) the OVAL 
> plugin is no longer included in the SpamAssassin 4.0.x packages. I 
> presume due to Red Hat's deprecation of OVAL in favor of CSAF/VEX. 
> (https://access.redhat.com/security/oval-v2-deprecation-announcement)

OVAL.pm has *never* been part of the official SpamAssassin distribution 
and in fact this is the first time I've ever heard of it. I guess it 
never caught on...

NOTHING in SpamAssassin as distributed has any dependencies on or 
awareness of OVAL or RH's replacements for OVAL.

I have been using the KAM ruleset for many years, blissfully unaware of 
OVAL. That may be because the KAM rules channel also does not reference 
OVAL in any way that I can find. It also requires no special setup 
beyond the documented process of running "sa-update --channel 
kam.sa-channels.mcgrail.com --gpgkey 24C063D8" as root (or another user 
that can write to your config...) daily.

> AS a workaround to the KAM installation:
>
> 1. I had added to /etc/mail/spamassassin/v400.pre:
>
> loadplugin Mail::SpamAssassin::Plugin::OVAL 
> /etc/mail/spamassassin/OVAL.pm

How was that in any way related to the KAM ruleset?

Just remove it if you don't have the plugin.

> 2. In order to clear the error I made a stub ruleset OVAL.pm (thanks 
> to AI, hopefully it's OK):

Since you didn't put in the effort to write it, I'm not about to waste 
any effort on it either. I guarantee that it's useless, because NO ONE 
understands it.

[slop elided...]

> Is there anything better I can do to resolve?  Will what I did break 
> something or cause the KAM scores to be bad for the OVAL dependent 
> rules?

What is the *actual* *problem* that you are trying to resolve?

Note that neither the KAM rules channel nor any proprietary plugin from 
a distro vendor is an ASF-supported part of SpamAssassin. However, we do 
support 3rd-party plugins and rules channels, so if you're having a 
*clearly* *defined* *problem* with integrating either, we'd eagerly 
help.

-- 
Bill Cole
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo@toad.social and many *@billmail.scconsult.com 
addresses)
Please keep discussion mailing list replies *on-list*
Not Currently Available For Hire

Help with KAM rule set setup (RHEL10, SA 4.0)

Posted by Scott Techlist <te...@s2ca.us>.
Restarting a (new) thread from a few weeks back where I was trying to get KAM working on an older box.  I couldn't get that to work and that was the impetus to upgrade.

I started a fresh server build to get KAM implemented.
-AlmaLinux release 10.1 (Heliotrope Lion)
-amavis-2.13.1 (20240304)
-SpamAssassin version 4.0.1
-  running on Perl version 5.40.2

This was not without some pain. I had to cpanm and build from source some missing perl modules that are not included in any AL10 dnf packages to get the base installs missing modules cleared.  After that, I setup the KAM channel and ran into a problem:

On AlmaLinux 10 (and presumably RHEL 10, Rocky 10, etc) the OVAL plugin is no longer included in the SpamAssassin 4.0.x packages. I presume due to Red Hat's deprecation of OVAL in favor of CSAF/VEX. (https://access.redhat.com/security/oval-v2-deprecation-announcement)

AS a workaround to the KAM installation:

1. I had added to /etc/mail/spamassassin/v400.pre:

loadplugin Mail::SpamAssassin::Plugin::OVAL /etc/mail/spamassassin/OVAL.pm

2. In order to clear the error I made a stub ruleset OVAL.pm (thanks to AI, hopefully it's OK):

cat << 'EOF' > /etc/mail/spamassassin/OVAL.pm
package Mail::SpamAssassin::Plugin::OVAL;
use Mail::SpamAssassin::Plugin;
our @ISA = qw(Mail::SpamAssassin::Plugin);
sub new {
  my ($class, $mailsa) = @_;
  $class = ref($class) || $class;
  my $self = $class->SUPER::new($mailsa);
  bless ($self, $class);
  return $self;
}
1;
EOF

Is there anything better I can do to resolve?  Will what I did break something or cause the KAM scores to be bad for the OVAL dependent rules?

Thanks,
Scott





Re: Help with KAM rule set setup

Posted by gi...@paclan.it.
On 3/13/26 5:54 PM, Jared Hall via users wrote:
> A blast from the past.  AFAIK, HashBL came out with 3.4.2.
> 
> Think you're going to have to contact KAM directly for resolution.
> 
`P@yp@l` escape issue is now fixed in latest KAM.cf version.
HashBL came out with 3.4.2, those rules have `ifplugin` guards and won't load if HashBL is not loaded.
SpamAssassin 3.4.0 also has security issues, it would be better to update to a supported version.
  Cheers
   Giovanni

> 
> TTFN,
> 
> -- Jared Hall
> jared@jaredsec.com
> Available for hire.
> 
> 
> On 3/13/2026 12:07 PM, Scott Techlist wrote:
>>
>> Redhat/Centos 8
>>
>> Spamassassin 3.4.0 running on Perl version 5.16.3
>>
>> Normally used via amavisd
>>
>> Trying unsuccessfully to implement/install the KAM rule set.
>>
>> Novice spamassassin user.    I have used it for years but haven’t had to configure much except a few custom rule sets and scores.  I’m now trying to use the KAM rule set.
>>
>> When I run the last step:
>>
>> sa-update --gpgkey 24C063D8 --channel kam.sa-channels.mcgrail.com
>>
>> That results in:
>>
>> rules: failed to run SNB_HASHBL_FREEMAIL test, skipping:
>>
>>         (Can't locate object method "check_hashbl_emails" via package "Mail::SpamAssassin::PerMsgStatus" at (eval 1571) line 45.
>>
>> )
>>
>> Possible unintended interpolation of @L in string at /tmp/.spamassassin1602K8J4hetmp/KAM.cf, rule __KAM_PHISH_INVOICE2_1, line 1.
>>
>> rules: failed to compile Mail::SpamAssassin::Plugin::Check::_body_tests_0_8, skipping:
>>
>>         (Global symbol "@L" requires explicit package name at /tmp/.spamassassin1602K8J4hetmp/KAM.cf, rule __KAM_PHISH_INVOICE2_1, line 1.)
>>
>> channel: lint check of update failed, channel failed
>>
>> I also added this .conf file:
>>
>> cat /etc/mail/spamassassin/channel.d/KAM_channel.conf
>>
>> CHANNELURL=kam.sa-channels.mcgrail.com
>>
>> KEYID=24C063D8
>>
>> # Ignore everything below.
>>
>> return 0
>>
>> <snipped KEY BLOCK>
>>
>> Any easy fix to this?
>>
>> Thanks, Scott
>>
> 


Re: Help with KAM rule set setup

Posted by Jared Hall via users <us...@spamassassin.apache.org>.
A blast from the past.  AFAIK, HashBL came out with 3.4.2.

Think you're going to have to contact KAM directly for resolution.


TTFN,

-- Jared Hall
jared@jaredsec.com
Available for hire.


On 3/13/2026 12:07 PM, Scott Techlist wrote:
>
> Redhat/Centos 8
>
> Spamassassin 3.4.0 running on Perl version 5.16.3
>
> Normally used via amavisd
>
> Trying unsuccessfully to implement/install the KAM rule set.
>
> Novice spamassassin user.    I have used it for years but haven’t had 
> to configure much except a few custom rule sets and scores.  I’m now 
> trying to use the KAM rule set.
>
> When I run the last step:
>
> sa-update --gpgkey 24C063D8 --channel kam.sa-channels.mcgrail.com
>
> That results in:
>
> rules: failed to run SNB_HASHBL_FREEMAIL test, skipping:
>
>         (Can't locate object method "check_hashbl_emails" via package 
> "Mail::SpamAssassin::PerMsgStatus" at (eval 1571) line 45.
>
> )
>
> Possible unintended interpolation of @L in string at 
> /tmp/.spamassassin1602K8J4hetmp/KAM.cf, rule __KAM_PHISH_INVOICE2_1, 
> line 1.
>
> rules: failed to compile 
> Mail::SpamAssassin::Plugin::Check::_body_tests_0_8, skipping:
>
>         (Global symbol "@L" requires explicit package name at 
> /tmp/.spamassassin1602K8J4hetmp/KAM.cf, rule __KAM_PHISH_INVOICE2_1, 
> line 1.)
>
> channel: lint check of update failed, channel failed
>
> I also added this .conf file:
>
> cat /etc/mail/spamassassin/channel.d/KAM_channel.conf
>
> CHANNELURL=kam.sa-channels.mcgrail.com
>
> KEYID=24C063D8
>
> # Ignore everything below.
>
> return 0
>
> <snipped KEY BLOCK>
>
> Any easy fix to this?
>
> Thanks, Scott
>