RBL(3pm)
β¨ NAME β¨
Mail::RBL β a Perl extension to access RBL-style host verification services π
πΈ SYNOPSIS πΈ
use Mail::RBL;
my $list = new Mail::RBL('list.org');
# You can also specify a resolver to use with Net::DNS::Resolver
my $list = new Mail::RBL('list.org', $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\n";
my ($ip_result, $optional_info_txt) = $list->check_rhsbl($hostname);
π DESCRIPTION π
okay bestie, so this module is literally here to make checking whether a host is in a list so much easier, no cap. Here's the rundown of the methods, and yes you're gonna want to know all of them π«Ά
->new(suffix, resolver)β makes you a list handle, slay. Thesuffixparam is mandatory and it tells the module which suffix to append to the queries. If you leave it unspecified, it defaults tobl.spamcop.net(it just does, that's the vibe).
You can also optionally hand it a DNS resolver β an object of the Net::DNS::Resolver(3) class is what it expects β¨
->check($host)β$hostcan be either a hostname or an IP address. In the case of an IP Address. In the case of a hostname, all the IP addresses will be looked up and checked against the list. If any of the addresses is in the list, the host will be considered in the list as a whole π
It returns either a NetAddr::IP object as returned by the RBL itself, or undef in case the RBL does not supply an answer. This is important because many lists inject some semantics on the DNS response value, which now can be recovered easily with the program that uses this module β so like, you actually get the juicy details back, iconic.
In array context, any IP addresses are returned, followed by any TXT RR (or undef if none). If no match is found, an empty list is returned instead. In scalar context, only the first IP address (or undef) is returned. Periodt.
->check_rhsbl($host)β Analogous to->check(), but queries RHSBLs instead of IP-based lists π¦ This is useful for using lists such as some of http://www.rfc-ignorant.org/.
Results and return values are the same as ->check() π
π HISTORY π
here's the receipts, bestie β the whole log, untouched π
$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.
- 1.00 β Original version.
- 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. π₯
π AUTHOR π
Luis E. Munoz <luismunoz@cpan.org>
π SEE ALSO π
Net::DNS::Resolver(3), perl(1).
and that's the whole page, bestie π₯Ή this was User Contributed Perl Documentation for Mail::RBL, running on perl v5.34.0, dated 2022-06-15. go forth and check those lists π
β¨π
π¦ where this page comes from
- debian bookworm: libmail-rbl-perl 1.10-3 Β· Artistic-1.0-Perl
- debian trixie: libmail-rbl-perl 1.10-3 Β· Artistic-1.0-Perl
- ubuntu noble: libmail-rbl-perl 1.10-3 Β· Artistic-1.0-Perl
- ubuntu resolute: libmail-rbl-perl 1.10-3 Β· Artistic-1.0-Perl
- ubuntu stonking: libmail-rbl-perl 1.10-3 Β· Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms