.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "RBLClient 3pm" .TH RBLClient 3pm "2016-07-15" "perl v5.22.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::RBLClient \- Queries multiple Realtime Blackhole Lists in parallel .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& use Net::RBLClient; \& my $rbl = Net::RBLClient\->new; \& $rbl\->lookup(\*(Aq211.101.236.160\*(Aq); \& my @listed_by = $rbl\->listed_by; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is used to discover what \s-1RBL\s0's are listing a particular \s-1IP\s0 address. It parallelizes requests for fast response. .PP An \s-1RBL,\s0 or Realtime Blackhole List, is a list of \s-1IP\s0 addresses meeting some criteria such as involvement in Unsolicited Bulk Email. Each \s-1RBL\s0 has its own criteria for addition and removal of addresses. If you want to block email or other traffic to/from your network based on one or more \&\s-1RBL\s0's, you should carefully study the behavior of those \s-1RBL\s0's before and during such blocking. .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" .IP "new( [\s-1ARGS\s0] )" 4 .IX Item "new( [ARGS] )" Takes an optional hash of arguments: .RS 4 .IP "lists" 4 .IX Item "lists" An arraref of (sub)domains representing RBLs. In other words, each element in the array is a string similar to 'relays.somerbl.org'. Use this if you want to query a specific list of \s-1RBL\s0's \- if this argument is omitted, a large list of \s-1RBL\s0's is queried. .IP "query_txt" 4 .IX Item "query_txt" Set this to true if you want Net::RBLClient to also query for \s-1TXT\s0 records, in which many \s-1RBL\s0's store additional information about the reason for including an \s-1IP\s0 address or links to pages that contain such information. You can then retrieve these information using the \*(L"\fItxt_hash()\fR\*(R" method. .IP "max_time" 4 .IX Item "max_time" The maximum time in seconds that the lookup function should take. In fact, the function can take up to \f(CW\*(C`max_time + timeout\*(C'\fR seconds. Max_time need not be integer. Of course, if the lookup returns due to max_time, some \&\s-1DNS\s0 replies will be missed. .Sp Default: 8 seconds. .IP "timeout" 4 .IX Item "timeout" The maximum time in seconds spent awaiting each \s-1DNS\s0 reply packet. The only reason to change this is if \f(CW\*(C`max_time\*(C'\fR is decreased to a small value. .Sp Default: 1 second. .IP "max_hits" 4 .IX Item "max_hits" A hit is an affirmative response, stating that the \s-1IP\s0 address is on a certain list. If \f(CW\*(C`max_hits\*(C'\fR hits are received, \f(CW\*(C`lookup()\*(C'\fR returns immediately. This lets the calling program save time. .Sp Default: 1000 (effectively out of the picture). .IP "max_replies" 4 .IX Item "max_replies" A reply from an \s-1RBL\s0 could be affirmative or negative. Either way, it counts towards \f(CW\*(C`max_replies\*(C'\fR. \f(CW\*(C`Lookup()\*(C'\fR returns when \f(CW\*(C`max_replies\*(C'\fR replies have been received. .IP "udp_maxlen" 4 .IX Item "udp_maxlen" The maximum number of bytes read from a \s-1DNS\s0 reply packet. There's probably no reason to change this. .Sp Default: 4000 .IP "server" 4 .IX Item "server" The local nameserver to use for all queries. Should be either a resolvable hostname or a dotted quad \s-1IP\s0 address. .Sp By default, the first nameserver in /etc/resolv.conf will be used. .RE .RS 4 .RE .SH "METHODS" .IX Header "METHODS" .IP "lookup( \s-1IPADDR \s0)" 4 .IX Item "lookup( IPADDR )" Lookup one \s-1IP\s0 address on all \s-1RBL\s0's previously defined. The \s-1IP\s0 address must be expressed in dotted quad notation, like '1.2.3.4'. \f(CW\*(C`Lookup()\*(C'\fR returns 1. .IP "\fIlisted_by()\fR" 4 .IX Item "listed_by()" Return an array of \s-1RBL\s0's which block the specified \s-1IP. \s0 The \s-1RBL\s0's are indicated via the (sub)domain used for \s-1DNS\s0 query. The calling program must first call \f(CW\*(C`lookup()\*(C'\fR. .IP "\fIlisted_hash()\fR" 4 .IX Item "listed_hash()" Return a hash whose keys are the \s-1RBL\s0's which block the specified \s-1IP,\s0 represented as in \f(CW\*(C`listed_by()\*(C'\fR. If the \s-1RBL\s0 returned an A record, the value for that key will be the \s-1IP\s0 address in the A record \- typically 127.0.0.1 \- 127.0.0.4. If the \s-1RBL\s0 returned a \s-1CNAME,\s0 the value will be the hostname, typically used for a comment on why the \&\s-1IP\s0 address is listed. .IP "\fItxt_hash()\fR" 4 .IX Item "txt_hash()" Return a hash (or a reference to that hash if called in a scalar context) whose keys are the \s-1RBL\s0's which block the specified \s-1IP,\s0 represented as in \f(CW\*(C`listed_by()\*(C'\fR. If the \s-1RBL\s0 returned \s-1TXT\s0 records containing additional information, the value will contain this information (several \s-1TXT\s0 records from one \s-1RBL\s0 will be joined by semicolons, but this should not happen), if not, it will be undef. .SH "AUTHOR" .IX Header "AUTHOR" Asher Blum <\fIasher@wildspark.com\fR> .SH "CREDITS" .IX Header "CREDITS" Martin H. Sluka <\fImartin@sluka.de\fR> .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2002 Asher Blum. All rights reserved. This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.