RBL(3pm)

πŸ“¦
version 1.10 Β· 2 versions
  • 1.10 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.10 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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. The suffix param is mandatory and it tells the module which suffix to append to the queries. If you leave it unspecified, it defaults to bl.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) β€” $host can 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. 1.00 β€” Original version.
  2. 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 πŸ’…βœ¨πŸ“