WLamotte wrote:
> Sorry if this is an obvious question but why isn't there an option for
> Spamassassin to bounce spam? Sure it does a good job at filtering spam but I
> don't want it from my web(mail)server to my inbox. I want my web- or
> mailserver to bounce suspected spam. Is this a feature that could be
> implemented?
> TIA,
>
> WL
>

Although many have answered and explained why bouncing spam is a bad
idea, it's an activity that will get your mailserver blacklisted for
sure, and rejecting at SMTP time is much smarter, I felt I should chime
in with one more important fact.

SpamAssassin *CANNOT* do this. Based on how SpamAssassin interacts with
your mail tools, it would be impossible for it to try. SpamAssassin can
never directly alter the delivery of a message, as it has no control
over the message envelope. It cannot delete, bounce, or forward the
message, as those are all functions of the envelope. SA can only modify
the contents of the message data, which includes the headers, subject,
body, attachments etc. If it were to try to delete

SA could modify the To: and From: headers, but to be honest, those
headers are meaningless. They are merely suggestive text, as should be
obvious when you think about how messages addressed To: a mailing list
end up in your mailbox. Messages are not delivered based on the From and
To:, as they're delivered based on the SMTP envelope (the MAIL FROM and
RCPT TO commands). A mailing list simply resends the same messages it
receives, but uses a RCPT TO that doesn't match the To: header.

Of course, there's nothing stopping other tools that DO have control of
the message envelope from looking at SA's tags and making changes to the
message delivery, and many mail chain tools do this. Amavis,
MailScanner, qmail-scanner, mimedefang, just to name a few, all have a
wide variety of options to do different things to messages that have
been detected by SA as spam. However, this is something outside of SA's
power. SA isn't an MTA, MDA or MUA. It's a message pipe that only gets
fed the data portion of a message. That simple role limits what it can
do to a message, but also makes it usable in a broad variety of situations.

If SA were to implement spam deletion, it would have to become it's own,
or part of an existing MTA, MDA or MUA. At that point, anyone trying to
use SA with any other set of mail tools would be unable to use SA.

If SA were to become a sendmail milter, then it could reject spam
easily, but nobody could use it with qmail, postfix or exim, or any
other MTA. Also, all the folks calling SA from an MDA, such as procmail,
or MUA (mail client), such as thunderbird, would be equally unable to
use it. You can re-arrange that sentence any way you like restricting SA
to one usage model, to the exclusion of the dozen or more others...