.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 >0, 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "RBL 3pm" .TH RBL 3pm "2016-12-24" "perl v5.24.1" "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" Mail::RBL \- Perl extension to access RBL\-style host verification services .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Mail::RBL; \& \& my $list = new Mail::RBL(\*(Aqlist.org\*(Aq); \& \& # You can also specify a resolver to use with Net::DNS::Resolver \& \& my $list = new Mail::RBL(\*(Aqlist.org\*(Aq, $res); \& \& if ($list\->check($host)) { \& print "$host is in the list"; \& } \& \& my ($ip_result, $optional_info_txt) = $list\->check($host); \& # $optional_info_txt will be undef if the list does not provide TXT \& # RRs along with the A RRs. \& \& print "The list says ", ($list\->check($host))[1], " in its TXT RR\en"; \& \& my ($ip_result, $optional_info_txt) = $list\->check_rhsbl($hostname); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module eases the task of checking if a given host is in the list. The methods available are described below: .ie n .IP """\->new(suffix, resolver)""" 4 .el .IP "\f(CW\->new(suffix, resolver)\fR" 4 .IX Item "->new(suffix, resolver)" Creates a list handle. The \f(CW\*(C`suffix\*(C'\fR parameter is mandatory and specifies which suffix to append to the queries. If left unspecified, defaults to \f(CW\*(C`bl.spamcop.net\*(C'\fR. .Sp An optional \s-1DNS\s0 resolver can be specified. An object of the \&\fINet::DNS::Resolver\fR\|(3) class is expected. .ie n .IP """\->check($host)""" 4 .el .IP "\f(CW\->check($host)\fR" 4 .IX Item "->check($host)" \&\f(CW$host\fR can be either a hostname or an \s-1IP\s0 address. In the case of an \&\s-1IP\s0 Address. In the case of a hostname, all the \s-1IP\s0 addresses will be looked up and checked against the list. If \fBany\fR of the addresses is in the list, the host will be considered in the list as a whole. .Sp Returns either a \f(CW\*(C`NetAddr::IP\*(C'\fR object as returned by the \s-1RBL\s0 itself, or \f(CW\*(C`undef\*(C'\fR in case the \s-1RBL\s0 does not supply an answer. This is important because many lists inject some semantics on the \s-1DNS\s0 response value, which now can be recovered easily with the program that uses this module. .Sp In array context, any \s-1IP\s0 addresses are returned, followed by any \s-1TXT RR \s0(or undef if none). If no match is found, an empty list is returned instead. In scalar context, only the first \s-1IP\s0 address (or undef) is returned. .ie n .IP """\->check_rhsbl($host)""" 4 .el .IP "\f(CW\->check_rhsbl($host)\fR" 4 .IX Item "->check_rhsbl($host)" Analogous to \f(CW\*(C`\->check()\*(C'\fR, but queries RHSBLs instead of IP-based lists. This is useful for using lists such as some of \&\fBhttp://www.rfc\-ignorant.org/\fR. .Sp Results and return values are the same as \f(CW\*(C`\->check()\*(C'\fR. .SH "HISTORY" .IX Header "HISTORY" .Vb 4 \& $Log: RBL.pm,v $ \& Revision 1.10 2007/04/25 04:22:04 lem \& Finished adding support for the custom resolver code \- Implementation \& was incomplete \& \& Revision 1.9 2006/12/08 00:01:14 lem \& Get version straight from the CVS revision. \& \& Revision 1.8 2006/12/07 23:58:07 lem \& Allow the user to provide a Net::DNS::Resolver object to perform DNS \& resolution \- This allows finer control over how the queries are \& performed. Suggested by Eric Langheinrich. .Ve .IP "1.00" 4 .IX Item "1.00" Original version. .IP "1.01" 4 .IX Item "1.01" Minor bug fixes. Cleaned up MS-DOS line endings. Changed test cases (more and better tests). Now requires Test::More. More useful return values. Improved docs. First crypto-signed distribution of this module. .SH "AUTHOR" .IX Header "AUTHOR" Luis E. Munoz .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fINet::DNS::Resolver\fR\|(3), \fIperl\fR\|(1).