[upload@pause.perl.org: CPAN Upload: S/SI/SIMON/SpamMonkey-0.02.tar.gz]

Simon Cozens simon at simon-cozens.org
Thu Mar 23 23:27:51 GMT 2006


Since you asked so nicely. Doesn't include the Email::Received stuff, (and
therefore RBL checking) of course; look for that coming when it finally passes
SpamAssassin's tests.

It's still useful; here's a generic spam-trapped comment feature for 
Maypole:

use SpamMonkey;
my $sm = SpamMonkey->new;
$sm->ready();

sub add_comment :Exported {
    my ($self, $r, $thing) = @_;
    my $res = $sm->test($r->params->{content});
    if ($res->is_spam) {
        return $self->error("I think you're a spammer, because your comment: ".
            join("\n", $res->describe_hits));
    }
    $thing->add_to_comments({
        author=> $r->params->{author},
        url => $r->params->{url},
        content => $r->params->{content},
        posted => Time::Piece->new,
    });
    $r->template("view");
}

Simon

----- Forwarded message from PAUSE <upload at pause.perl.org> -----

From: PAUSE <upload at pause.perl.org>
Subject: CPAN Upload: S/SI/SIMON/SpamMonkey-0.02.tar.gz
To: Simon Cozens <simon at simon-cozens.org>
Reply-To: cpan-testers at perl.org

The uploaded file

    SpamMonkey-0.02.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/S/SI/SIMON/SpamMonkey-0.02.tar.gz
  size: 6858 bytes
   md5: 2994361baa44bbadd50248d83471542a

No action is required on your part
Request entered by: SIMON (Simon Cozens)
Request entered on: Thu, 23 Mar 2006 23:22:54 GMT
Request completed:  Thu, 23 Mar 2006 23:24:15 GMT

Thanks,
-- 
paused, v460

----- End forwarded message -----
-- 
He is no fool who gives what he cannot keep to gain what he cannot lose.


More information about the london.pm mailing list