Masatoshi Mizuno
and 1 contributors

NAME

Net::SPAMerLookup - Perl module to judge SPAMer.

SYNOPSIS

  use Net::SPAMerLookup {
    IP => [qw/ niku.2ch.net all.rbl.jp list.dsbl.org /],
    URI=> [qw/ url.rbl.jp notop.rbl.jp all.rbl.jp /],
    };
  
  my $spam= Net::SPAMerLookup->new;
  if ($spam->check_rbl($TARGET)) {
        print "It is SPAMer.";
  } else {
        print "There is no problem.";
  }
  
  # Whether SPAMer is contained in two or more objects is judged.
  if (my $spamer= $spam->is_spamer(@TARGET)) {
        print "It is SPAMer.";
  } else {
        print "There is no problem.";
  }

DESCRIPTION

SPAMer is judged by using RBL.

Please set HTTP_PROXY of the environment variable if you use Proxy.

see Net::Domain::TldMozilla.

SETTING RBL USED

When passing it to the start option.

  use Net::SPAMerLookup qw/ all.rbl.jp .....  /;

When doing by the import method.

  require Net::SPAMerLookup;
  Net::SPAMerLookup->import(qw/ all.rbl.jp ..... /);

METHODS

new

Constructor.

  my $spam= Net::SPAMerLookup;

check_rbl ([ FQDN or IP_ADDR or URL ])

'Host domain name', 'IP address', 'Mail address', and 'URL' can be passed to the argument.

HASH including information is returned when closing in passed value RBL.

0 is returned when not closing.

Following information enters for HASH that was able to be received.

  • RBL

    RBL that returns the result enters.

  • name or address

    The value enters 'Address' at 'Name' and "IP address" when the object is "Host domain name" form.

  • result

    Information returned from RBL enters by the ARRAY reference.

  if (my $result= $spam->check_rbl('samp-host-desuka.com')) {
    print <<END_INFO;
    It is SPAMer.
  
  RBL-Server: $result->{RBL}
  
  @{[ $result->{name} ? qq{Name: $result->{name}}: qq{Address: $result->{address}} ]}
  
  @{[ join "\n", @{$result->{result}} ]}
  
  END_INFO
  } else {
    print "There is no problem.";
    ......
    ...

is_error

error.

is_spamer ([TARGET_LIST])

'check_rbl' is continuously done to two or more objects.

And, HASH that 'check_rbl' returned is returned as it is if included.

  if (my $result= $spam->is_spamer(@TAGER_LIST)) {
    .........
    ....

SEE ALSO

Net::DNS, Net::Domain::TldMozilla,

AUTHOR

Masatoshi Mizuno <lushe(@)cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2008 by Bee Flag, Corp. <http://egg.bomcity.com/>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.