SPUG: The Spam Problem

Creede Lambard creede at penguinsinthenight.com
Tue Apr 9 12:30:22 CDT 2002

On Tue, 9 Apr 2002, Steve Cartoon wrote:

> G'day!
>    I agree with Dancerboy back there. I've read all the posts (albeit as 
> more of a lurker than much else) and I've yet to find a one that wasn't 
> plaintext. And that's a very easy regexp to make to catch/strip  HTML tags 
> of any kind in a message. Or certain keywords that would never be used in 
> the general context of this group.

Actually it's fairly trivial with Mail::Audit (I figured since this is a
Perl newsgroup, I could mention Mail::Audit, which I've been enamored of
ever since Simon Cozens described it in The Perl Journal):

my $type = $mail->get('content-type');
chomp $type;
if ($type =~ m#text/html#) {
    $mail->put_header("X-Fall-Through: This could be spam!");

This traps about 3/4 of my spam, as well as letters from my sister, bless
her heart, who loves to send me these cute HTML-ized greeting cards that I
have to jump through hoops to read. If it wasn't for her and the possibility
that I might get a mail from someone I haven't heard from in a long time who
doesn't know better (which has happened to me a few times), I'd use the
following instead:

    $mail->reject("Quit sending me HTML mail, dag nabbit!");

Of course this is more useful to people using Unixish mail setups than those
who are on Exchange, which is a pity, because Windows could use the
capability to implement this kind of filtering.

 * .~. `(  ----------------------------------------------------------------
` / V \  . Creede Lambard                : The box said 'Requires Win 98 or
 /(   )\   creede at penguinsinthenight.com :   better', so I installed Linux.
  ^^-^^    ----------------------------------------------------------------

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org

More information about the spug-list mailing list