You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by micah anderson <mi...@riseup.net> on 2014/10/24 17:59:19 UTC
trusted networks getting marked as spam
Hi,
I've got some machines that are running logcheck, they periodically send
mail to us with reports. Sometimes those mails have some spammy stuff in
them, because they are mail server logs, or web logs with some spammy
stuff in them.
I don't want spamassassin to deal with these messages, I want them to
come through no matter what. I don't want them to contribute to bayes
scoring and I don't want them ever to end up as Spam.
Unfortunately, they are, it seems mostly because URIBL scores are
hitting before the SHORTCIRCUIT/ALL_TRUSTED stuff fires, so for example:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07)
X-Spam-Flag: YES
X-Spam-Status: Yes, score=8.1 required=6.0 tests=ALL_TRUSTED,SHORTCIRCUIT,
URIBL_AB_SURBL,URIBL_BLACK,URIBL_JP_SURBL,URIBL_WS_SURBL shortcircuit=ham
autolearn=disabled version=3.4.0
I've got the IP in trusted_networks, and internal_networks and I've got
a couple shortcircuit rules like as follows:
# simple, non-network-based whitelists, locally-generated messages,
# messages via a trusted relay chain, simple
meta SC_HAM (USER_IN_WHITELIST||USER_IN_DEF_WHITELIST||USER_IN_ALL_SPAM_TO||NO_RELAYS||ALL_TRUSTED)
priority SC_HAM -1000
shortcircuit SC_HAM ham
score SC_HAM -20
meta SC_SPAM (USER_IN_BLACKLIST_TO||USER_IN_BLACKLIST)
priority SC_SPAM -950
shortcircuit SC_SPAM spam
score SC_SPAM 20
shortcircuit ALL_TRUSTED on
yet, the high scoring due to the URIBLs caused this to get classified as
Spam.
How can I get around that?
Thanks!
micah
Re: trusted networks getting marked as spam
Posted by Reindl Harald <h....@thelounge.net>.
Am 24.10.2014 um 21:18 schrieb John Hardin:
> On Fri, 24 Oct 2014, Reindl Harald wrote:
>
>> Am 24.10.2014 um 17:59 schrieb micah anderson:
>>> I've got some machines that are running logcheck, they periodically
>>> send
>>> mail to us with reports. Sometimes those mails have some spammy
>>> stuff in
>>> them, because they are mail server logs, or web logs with some spammy
>>> stuff in them.
>>>
>>> I don't want spamassassin to deal with these messages, I want them to
>>> come through no matter what. I don't want them to contribute to bayes
>>> scoring and I don't want them ever to end up as Spam.
>>>
>>> How can I get around that?
>>
>> score ALL_TRUSTED -100
>
> Bad idea. "TRUSTED" does *not* mean "no spam will ever come from there".
depends how you define trusted and configure it
for me trusted_networks contains only the local subnet or if i really
define a external host (there are 2) then the word "trust" in my meaning
is unconditional
> If this is a small set of machines under your control, and the only mail
> the generate is reporting, a better way would be to use capabilities in
> your glue layer to simply not pass any messages from those machines
> through SA in the first place
if you run SA as milter -> no way at least with postfix
you can reject by envelope and so on but you can't exclude
by mynetworks, dnswl from running the milter
Re: trusted networks getting marked as spam
Posted by John Hardin <jh...@impsec.org>.
On Fri, 24 Oct 2014, Reindl Harald wrote:
> Am 24.10.2014 um 17:59 schrieb micah anderson:
>> I've got some machines that are running logcheck, they periodically send
>> mail to us with reports. Sometimes those mails have some spammy stuff in
>> them, because they are mail server logs, or web logs with some spammy
>> stuff in them.
>>
>> I don't want spamassassin to deal with these messages, I want them to
>> come through no matter what. I don't want them to contribute to bayes
>> scoring and I don't want them ever to end up as Spam.
>>
>> How can I get around that?
>
> score ALL_TRUSTED -100
Bad idea. "TRUSTED" does *not* mean "no spam will ever come from there".
If this is a small set of machines under your control, and the only mail
the generate is reporting, a better way would be to use capabilities in
your glue layer to simply not pass any messages from those machines
through SA in the first place.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
A sword is never a killer, it is but a tool in the killer's hands.
-- Lucius Annaeus Seneca (Martial) 4BC-65AD
-----------------------------------------------------------------------
876 days since the first successful private support mission to ISS (SpaceX)
Re: trusted networks getting marked as spam
Posted by Reindl Harald <h....@thelounge.net>.
Am 24.10.2014 um 17:59 schrieb micah anderson:
> I've got some machines that are running logcheck, they periodically send
> mail to us with reports. Sometimes those mails have some spammy stuff in
> them, because they are mail server logs, or web logs with some spammy
> stuff in them.
>
> I don't want spamassassin to deal with these messages, I want them to
> come through no matter what. I don't want them to contribute to bayes
> scoring and I don't want them ever to end up as Spam.
>
> Unfortunately, they are, it seems mostly because URIBL scores are
> hitting before the SHORTCIRCUIT/ALL_TRUSTED stuff fires, so for example:
>
> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07)
> X-Spam-Flag: YES
> X-Spam-Status: Yes, score=8.1 required=6.0 tests=ALL_TRUSTED,SHORTCIRCUIT,
> URIBL_AB_SURBL,URIBL_BLACK,URIBL_JP_SURBL,URIBL_WS_SURBL shortcircuit=ham
> autolearn=disabled version=3.4.0
>
> yet, the high scoring due to the URIBLs caused this to get classified as
> Spam.
>
> How can I get around that?
score ALL_TRUSTED -100
Re: trusted networks getting marked as spam
Posted by Axb <ax...@gmail.com>.
On 10/24/2014 05:59 PM, micah anderson wrote:
>
> Hi,
>
> I've got some machines that are running logcheck, they periodically send
> mail to us with reports. Sometimes those mails have some spammy stuff in
> them, because they are mail server logs, or web logs with some spammy
> stuff in them.
>
> I don't want spamassassin to deal with these messages, I want them to
> come through no matter what. I don't want them to contribute to bayes
> scoring and I don't want them ever to end up as Spam.
>
> Unfortunately, they are, it seems mostly because URIBL scores are
> hitting before the SHORTCIRCUIT/ALL_TRUSTED stuff fires, so for example:
>
> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07)
> X-Spam-Flag: YES
> X-Spam-Status: Yes, score=8.1 required=6.0 tests=ALL_TRUSTED,SHORTCIRCUIT,
> URIBL_AB_SURBL,URIBL_BLACK,URIBL_JP_SURBL,URIBL_WS_SURBL shortcircuit=ham
> autolearn=disabled version=3.4.0
>
> I've got the IP in trusted_networks, and internal_networks and I've got
> a couple shortcircuit rules like as follows:
>
> # simple, non-network-based whitelists, locally-generated messages,
> # messages via a trusted relay chain, simple
> meta SC_HAM (USER_IN_WHITELIST||USER_IN_DEF_WHITELIST||USER_IN_ALL_SPAM_TO||NO_RELAYS||ALL_TRUSTED)
> priority SC_HAM -1000
> shortcircuit SC_HAM ham
> score SC_HAM -20
I'd lower the SC_HAM score to -500
that will make sure stuff that hits SC_HAM really sticks out...
Re: trusted networks getting marked as spam
Posted by Kris Deugau <kd...@vianet.ca>.
micah anderson wrote:
>
> Hi,
>
> I've got some machines that are running logcheck, they periodically send
> mail to us with reports. Sometimes those mails have some spammy stuff in
> them, because they are mail server logs, or web logs with some spammy
> stuff in them.
>
> I don't want spamassassin to deal with these messages,
The best way to not have SA mistag log mail like this is to not pass it
to SA in the first place.
It's usually possible to put some conditions in the glue layer that
calls SA so that SA will be bypassed entirely.
On my personal server/account, I call SA from procmail, so I can do
whatever prefiltering I like before passing the remainder to SA.
At work, we have a custom delivery agent that checks a whitelist and
blacklist before passing a message to SA; the same principle applies.
I'm pretty sure there's a bypass mechanism in most of the SMTP-level
content filter systems as well (I *know* there is in MIMEDefang, and
IIRC in amavisd-new).
> # simple, non-network-based whitelists, locally-generated messages,
> # messages via a trusted relay chain, simple
> meta SC_HAM (USER_IN_WHITELIST||USER_IN_DEF_WHITELIST||USER_IN_ALL_SPAM_TO||NO_RELAYS||ALL_TRUSTED)
> priority SC_HAM -1000
> shortcircuit SC_HAM ham
> score SC_HAM -20
> shortcircuit ALL_TRUSTED on
>
> yet, the high scoring due to the URIBLs caused this to get classified as
> Spam.
Axb's comment about making the score for SC_HAM a lot stronger should
help, and I'd recommend
shortcircuit USER_IN_WHITELIST on
shortcircuit USER_IN_DKIM_WHITELIST on
shortcircuit USER_IN_SPF_WHITELIST on
as well.
(I have those set here, although for other reasons.)
-kgd