Apache::AntiSpam::NoSpam - Add suffix to local-part in Email


Apache-AntiSpam documentation Contained in the Apache-AntiSpam distribution.

Index


Code Index:

NAME

Top

Apache::AntiSpam::NoSpam - Add suffix to local-part in Email

SYNOPSIS

Top

  # in httpd.conf
  <Location /antispam>
  SetHandler perl-script
  PerlHandler Apache::AntiSpam::NoSpam
  </Location>

  # filter aware
  PerlModule Apache::Filter
  SetHandler perl-script
  PerlSetVar Filter On
  PerlHandler Apache::RegistryFilter Apache::AntiSpam::NoSpam Apache::Compress

DESCRIPTION

Top

Apache::AntiSpam::NoSpam is a subclass of Apache::AntiSpam, filter module to prevent e-mail addresses exposed as is on web pages. This module adds -nospam suffix to local-part of e-mail addresses.

For example, miyagawa@cpan.org will be filtered to miyagawa-nospam@cpan.org.

This module is Filter aware, meaning that it can work within Apache::Filter framework without modification.

TODO

Top

AUTHOR

Top

Tatsuhiko Miyagawa <miyagawa@bulknews.net>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Top

Apache::AntiSpam


Apache-AntiSpam documentation Contained in the Apache-AntiSpam distribution.

package Apache::AntiSpam::NoSpam;

use strict;
use vars qw($VERSION);
$VERSION = '0.01';

use Apache::AntiSpam;
use base qw(Apache::AntiSpam);

sub antispamize {
    my($class, $email, $orig) = @_;
    $orig =~ s/\@/-nospam\@/;
    return $orig;
}    

1;
__END__