On 2024-04-10 at 13:48:47 UTC-0400 (Wed, 10 Apr 2024 12:48:47 -0500)
Darrell Budic <bu...@onholyground.com>
is rumored to have said:

> Just checking in here that I’m not doing something wrong with the ASN plugin 
> before I file a bug on this. SpamAssassin 4.0.1 installed from cpan on Alma 9.
>
> I’ve got it configured to use the local maxmind db files, and those show up 
> in logs. Testing in spamassassin itself show that it finds the ASN and 
> includes it in the headers as expected. But when I let spamc/spamd process 
> emails, the X-Spam-ASN headers do not appear. Enabling debug logging on spamd 
> shows it does find the ASN properly, but doesn’t include the header. All my 
> other add_header entries show up as expected.

This smells like a case of not using the config that you think you are.

> Relevant config:

Says you... :)

When you run the spamassassin script from the command line, it loads your user 
prefs from ~/.spamassassin/user_prefs and uses them. When you use spamc to talk 
to spamd, which prefs are loaded depends on your configuration of spamd, 
perhaps using only the global config, possibly using the config of the user 
running spamd, and possibly (with configuration of spamd that allows it to use 
per-user configs properly) that of arbitrary users per message.

Differences in how spamc/spamd and spamassassin on the command line behave are 
almost always due to this.
> report_safe 0
> ifplugin Mail::SpamAssassin::Plugin::ASN
>  asn_prefix ''
>  asn_lookup asn.routeviews.org _ASN_ _ASNCIDR_
>  add_header all ASN _ASN_ _ASNCIDR_
>
>  # IPv6 support (Bug 7211)
>  asn_lookup_ipv6 origin6.asn.cymru.com _ASN_ _ASNCIDR_
> endif   # Mail::SpamAssassin::Plugin::ASN
>
> From the spamd debug log:
>
> Wed Apr 10 17:06:50 2024 [2246409] dbg: geodb: GeoIP2: search found asn 
> /usr/share/GeoIP/GeoLite2-ASN.mmdb
> Wed Apr 10 17:06:50 2024 [2246409] dbg: geodb: GeoIP2: loaded asn from 
> /usr/share/GeoIP/GeoLite2-ASN.mmdb
> Wed Apr 10 17:07:09 2024 [2246418] dbg: asn: using GeoDB ASN for lookups
> Wed Apr 10 17:07:09 2024 [2246418] dbg: asn: using first external relay IP 
> for lookups: 149.72.37.58
> Wed Apr 10 17:07:09 2024 [2246418] dbg: asn: GeoDB found ASN 11377
>
> There are no dgb: markup: entries for the ASN header.
>
> Anything I’m missing?

Look at the debug channel for config and etermine which config files are 
actually being used by spamd and by spamassassin. (spamc knows nothing of SA 
configs...)


-- 
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire

Reply via email to