[Mimedefang] Gibberish in the subject line
Nels Lindquist
nlindq at maei.ca
Tue Jul 16 16:19:01 EDT 2002
On 16 Jul 2002 at 14:01, David F. Skoll wrote:
> On Tue, 16 Jul 2002, Chad Stalvey wrote:
>
> > So could you also do something like:
>
> > sub filter_begin {
> > if ($Body = Porn) {
> > return action_bounce("Porn In Body");
> > }
> > }
>
> No.
>
> Perl is not imbued with AI, you know. :-) And there's no "Body" variable.
However, with SpamAssassin integration, you might be able to fake it.
Remember that one of the things returned by spam_assassin_check is a
comma-separated list of tests for which the current message is
positive. As of version 2.31, SpamAssassin has 14 separate body
tests for words and phrases which tend to indicate porn (PORN_1,
PORN_2, etc.)
I don't think it'd be that hard to examine the return value of $tests
and count the number of occurrences of "PORN_".
It's not going to be *perfect*, of course, but I'll bet you could
catch the majority of the porn spam that way.
So you *could* do something like this:
($hits, $required, $tests, $report) = spam_assassin_check();
my ($porn) = count_porn($tests);
if ($porn >= 2) { # or whatever your threshold is
return action_bounce("No PORN, thanks.");
}
sub count_porn() would have to be written, of course. :-)
----
Nels Lindquist <*>
Information Systems Manager
Morningstar Air Express Inc.
More information about the MIMEDefang
mailing list