Block auto-replies to spam

Mark Martinec Mark.Martinec+amavis at ijs.si
Thu Oct 20 20:16:31 CEST 2011


Francis,

> We reject some inbound mail with postfix, based on block lists,
> reverse DNS returning nothing, or similar tests.  But we don't kill
> any spam inbound as tagged by spamassassin with amavisd.
> We leave that to the users to filter in their mail client.

So your outbound bounces are generated by a content filter
associated with a user's mailbox (like sieve) ???
Probably not the best idea. If it is spam, it should not be bounced.
Let a user just delete it, if it gets delivered.

> On outbound, we don't pass it through SA, but we do scan for viruses.
> 
> Most of the email sitting in our outbound queue is undeliverable
> auto-replies.  Many of them are already tagged as spam on
> the inbound pass through our SA.
> 
> Is it possible to have amavis kill auto replies when there
> is an existing spam tag in the email?

If bounces were generated by amavisd, the limit on a spam
level beyond which a bounce is suppressed is controlled by
$sa_dsn_cutoff_level .  But your case seems to be different.

There is no mechanism in amavisd to suppress outbound
bounces generated by internal hosts, apart from devising
some SpamAssassin rule, assuming outbound mail would
be content filtered.

> Looking at the deferred auto replies, I see headers such as these
> from the inbound pass, within the rfc822 attachment:
> 
> X-Spam-Flag: YES
> X-Spam-Score: 15.418
> X-Spam-Level: ***************
> 
> Maybe we should look at killing it on inbound, but it would require
> more of a policy discussion.

Avoid the problem entirely: either tag and deliver spam,
or reject it outright by using amavisd as a pre-queue (proxy)
content filter. Or use a combination: reject high scoring spam
(kill level), but tag-and-deliver medium score spam (tag2_level).

  Mark


More information about the amavis-users mailing list