Date: Thu, 19 Dec 2002 19:18:48 -0700 (MST) From: Warren Block <wblock@wonkity.com> To: Mxsmanic <mxsmanic@hotmail.com> Cc: FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: Getting Perl scripts to work as mail filters Message-ID: <Pine.BSF.4.21.0212191910480.61288-100000@wonkity.com> In-Reply-To: <OE23jCjWEF0HG0anlzm0000055a@hotmail.com>
index | next in thread | previous in thread | raw e-mail
On Thu, 19 Dec 2002, Mxsmanic wrote:
> I finally got it to work by piping to sendmail. Seems to be adequate for
> what I want to do.
>
> Now all I have to do is design my patented, foolproof methodology for
> distinguishing spam from real mail so that I can encode the rules in the
> script. There must be a way! Also, this may allow me to do something about
> getting rid of HTML in mail, which I can't stand.
There's nothing wrong with reinventing procmail like this, but I'm
curious why you consider it "bloated"--it's under 64K on my
system.
Anyway, here's a procmail recipe that catches a lot of spam. Not all,
but it's a start, and the regular expression should be usable in your
Perl program with few changes:
# Mail not addressed to me.
:0
* $!^((Resent-|Apparently-)?(To|Cc|Bcc)):.*${LOGNAME}
$MAILDIR/Spam-folder
-Warren Block * Rapid City, South Dakota USA
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0212191910480.61288-100000>
