Use X-Amavis-Alert header to influence Spam Assassin Scoring

Josh Hamell jhamell at
Mon Mar 7 20:13:00 CET 2016


There was a similar post here in 2014:

Basic request:
 * For banned attachments, we strip attachments + PASS (and rewrite
header/inject disclaimer)
 * Vast, vast majority of this is unsolicited email
 * I would like Spam Assassin to be able to elevate scoring for these

My idea was to use an SA rule such as:
X-Amavis-Alert =~ /^BANNED, message contains.*\.js$/

But it's not being applied.  I suspect that may be due to:
 * Non deterministic order of amavis checks
 * Amavis headers are injected in immediately before delivery, and
therefore aren't available for SA to analyze.
 * My lack of experience w/ crafting SA rules

Thank you,
Josh Hamell

More information about the amavis-users mailing list