[Mimedefang] SMTP error return after DATA?
Nels Lindquist
nlindq at maei.ca
Thu May 8 19:21:02 EDT 2003
On 8 May 2003 at 15:38, Myles Uyema wrote:
> I've got spamassassin tagging spam now, but I want to try taking this a
> step further. I want my mail server to reject the DATA portion of the
> e-mail if spamassassin deems it as spam.
>
> action_bounce() seems to be almost the function I'm looking for, but it
> sounds like the mail is accepted and then a new bounce e-mail is drafted.
Actually, action_bounce() does exactly what you want; it returns a
reject code during the SMTP conversation.
> Is milter/mimedefang granular enough to tell sendmail to reject the mail
> during the SMTP connection after the DATA portion is complete?
Yes.
> 552 No spam for me!
>
>
> Is this possible with action_bounce, filter_begin, or filter_end?
I think most people do their spamassassin_check() calls in
filter_end.
After your spam detection code, make sure you exit the filter_end
subroutine with "return action_bounce("No spam for me!");"
A word of caution: I wouldn't suggest bouncing e-mail at the default
detection threshold of 5. We mark everything between 5 and 10, and
bounce everything at 10 or higher, and we're rejecting the vast
majority of spam while encountering extremely few false positives.
We also quarantine a copy of all rejected mail for later review, just
in case.
----
Nels Lindquist <*>
Information Systems Manager
Morningstar Air Express Inc.
More information about the MIMEDefang
mailing list