[Mimedefang] Deleting spam
Marco Berizzi
pupilla at hotmail.com
Thu Aug 29 12:05:01 EDT 2002
----- Original Message -----
From: "Shawn Button" <sbutton at dtjboulder.com>
To: <mimedefang at lists.roaringpenguin.com>
Sent: Thursday, August 29, 2002 5:51 PM
Subject: [Mimedefang] Deleting spam
> Hi. I inserted the code into the mimedefang-filter like you said. It
> still continues to allow spam through and only reports over the
> threshold instead of dumping it. Did I do something wrong? (snippett):
>
> # Spam checks if SpamAssassin is installed
> if ($Features{"SpamAssassin"}) {
> if (-s "./INPUTMSG" < 100*1024) {
> # Only scan messages smaller than 100kB. Larger messages
> # are extremely unlikely to be spam, and SpamAssassin is
> # dreadfully slow on very large messages.
> my($hits, $req, $names, $report) = spam_assassin_check();
> if (hits > 13) {
******************************************
if ($hits > 13) {
******************************************
> return action_discard();
> }
> if ($hits >= $req) {
> my($score);
> if ($hits < 40) {
> $score = "*" x int($hits);
> } else {
> $score = "*" x 40;
> }
> # We add a header which looks like this:
> # X-Spam-Score: 6.8 (******) NAME_OF_TEST,NAME_OF_TEST
> # The number of asterisks in parens is the integer
part
> # of the spam score clamped to a maximum of 40.
> # MUA filters can easily be written to trigger on a
> # minimum number of asterisks...
> action_change_header("X-Spam-Score", "$hits ($score)
> $names");
>
> # If you find the SA report useful, add it, I guess...
> action_add_part($entity, "text/plain", "-suggest",
> "$report\n",
> "SpamAssassinReport.txt", "inline");
> }
> }
> }
> }
>
> # DO NOT delete the next line, or Perl will complain.
> 1;
>
> Thanks much,
>
> Shawn
>
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>
More information about the MIMEDefang
mailing list