Hi,

Depending on how you deliver mail after SA has added headers, you might be able to use postfix header checks to log your header,using action INFO or WARN.

Something along the likes of:

main.cf:
header_checks = pcre:/etc/postfix/header_checks

header_checks:
/^X-Spam-ASN:/ WARN

See https://www.postfix.org/header_checks.5.html for details

Kind regards,
Tom


On 02-04-2025 18:20, Georg Faerber wrote:
Hi all,

I'm using SpamAssassin 4.0.1 and the ASN plugin, which works as
expected: relying on

   add_header all ASN _ASN_

adds a header like

   X-Spam-ASN: AS200069 Mailjet SAS

Besides, I would like to log such results, ideally via the default
syslog lines, i.e. no additional "asn" debug channel, to make parsing as
easy as possible, to provide ham/spam stats, per ASN.

Is there any possibility to do so, except doing this via "tests hit",
which would require, if my understanding is correct, a specific test,
per ASN?

Thanks a lot in advance,
cheers,
Georg

Reply via email to