[clug] Routing spam for specific subdomain

Matt Smith clug at mattsmith.cc
Wed Oct 5 04:35:53 GMT 2005

> I need to write a Sendmail or SA rule to route all traffic sent to a
> specific subdomain that has been marked as spam to /dev/null/

Hi Steve,

If you're prepared to get your hands dirty with perl, i highly recommend
MIMEDefang (http://www.mimedefang.org).
If does exactly what you're after (and then some), and can handle multiple
domains, sub-domains, virus scanning, spam assassin calls, any other stuff
you can code in perl (gray/black/white-listing, DCC, Pyzor, Razor, invalid
helo checks etc).

There's also a commercial more featured version available, named Can-it Pro
(details from the same url above), which has a bunch more stuff packed into
it, available out of the box, with support.

There's a great mailing list support for the free version, and i'm currently
running it on at least three RedHat/Mandrake gateways with Sendmail, ClamAV,
SpamAssassin, UVScan (McAfee Linux AV scanner) plus network checks for
Spam/Virus Email gateway based detection and removal.
On all sites, I reject mail that looks too spammy (scores above 20 or so,
depending on site), accept mail that scores above 6 and redirect to a spam
drop mailbox (or /dev/null if you want to risk false-positives falling into
the ether), and accept everything else.  It can also handle unsafe file
extension blocking (reject emails with .exe .bat .lnk .whatever) which is
also nice (think back a few years to the burst of email-bourne virii with
.lnk extensions.
Basically, if you can think of how to code something in perl, MIMEDefang
will do it (and can do it at different stages of smtp transaction), and most
of the time you can reject, accept, tag, redirect, cast whatever magic you
like on the email from there.

Worth a look, even for looking's sake.


More information about the linux mailing list