On 1/5/2022 11:19 PM, Jered Floyd wrote:
I have an upstream mail server running spamassassin as part of a
relatively complex mail flow. This server will flag mail identified
as spam with X-Spam-Flag: YES (among other standard headers).
Some of this mail gets forwarded to another organization (also
partially under my control) which has a mailhub also running spamassassin.
I would like the downstream spamassassin to skip scanning on messages
flagged as spam, rather than wrapping in another layer of SA (or
deciding that the message is now ham after forwarding). I'm
ambivalent on if I want to re-scan messages identified as ham --
likely not, since less information about delivery is available at this
stage.
Is there a way to do this within Spamassassin config?
Notes:
1) I don't want to simply have a rule that gives existing
"X-Spam-Flag: YES" a high score -- that would generate new headers and
further MIME wrapping. I just want the original message passed on
un-edited.
2) I can get a similar result by having my downstream MTA skip the
spamassassin pipeline part for messages from the upstream mailhub
(probably by establishing an authenticated alternate delivery port),
but this is less ideal as it won't filter messages originating from
the upstream organization (and not scanned) and also seems more brittle...
Thanks,
--Jered
Pursuant to Henrik K, SA-Users post, 7/22/2021:
SA removes all X-Spam-* headers from the message, it's not possible to match
on them.
Maybe rewrite the Subject on the upstream server to something unique and
trigger on that. Beware that KAM rules (eg. KAM_MARKSPAM) might detect
most "standard" methods of Subject rewriting and add more points to the
message.
$0.02,
-- Jared Hall