Re: [exim] "Bad words" filtering

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Mike Cardwell
Date:  
À: exim users
Sujet: Re: [exim] "Bad words" filtering
Richard Salts wrote:

> We're currently using a custom written smtp server that filters "bad words".
> I'm thinking that I'd much prefer using a generic MTA such as exim or
> postfix, my personal preference being exim because I think it's much more
> flexible. I'm just wondering what people think would be the best way of
> achieving this.
>
> I'd prefer to have the rejection at smtp time rather than generate a bounce
> and I was thinking a few possible solutions might work.
>
> a. acl_smtp_mime with mime_regex containing the "bad words" for things with
> the appropriate $mime_content_type. The disadvantage of this being that it
> only captures the first 32K and its CPU-intensive nature.


I'd be surprised if you ever came across an email with a mime part that
didn't have a swear word in the first 32KB, but did at some point after
that. 32KB is a lot of text ... Is it worth scanning after that?

> b. Add the badwords into spamassassin rules and search $spam_report
> for matches on these rules. It is a bit of an abuse of spamassasin but it
> should work.


If you're already using spamassassin that would probably be a better
solution. No point mime decoding the email twice if you don't have to.

> c. Pipe the message through a filter transport. This is obviously my least
> preferred option as it will generate bounce messages after mail is accepted
> or effectively blackhole the message if the bounce is supressed.


Yeah, that's not a very nice solution.

Have you considered replacing swear words with ****'s instead of
rejecting messages that contain them?

--
Mike Cardwell
(https://secure.grepular.com/) (http://perlcv.com/)