NAME
Mail::Toaster::DNS - Common DNS functions
SYNOPSIS
Mail::Toaster::DNS is a grouping of DNS functions I've written.
DESCRIPTION
These functions are used by toaster-watcher to determine if RBL's are available when generating qmail's smtpd/run control file.
RblTest
use Mail::Toaster::DNS;
my $r = RblTest("bl.example.com");
if ($r) { print "bl tests good!" };
After the demise of osirusoft and the DDoS attacks currently under way against RBL operators, this little subroutine becomes one of necessity.
The routine expects to receive the zone of a blacklist to test as it's first argument and a possible debug value (set to a non-zero value) as it's second.
It will then test to make sure that name servers are found for the zone and then run several test queries against the zone to verify that the answers it returns are sane. We want to detect if a RBL operator does something like whitelist or blacklist the entire planet.
If the blacklist fails any test, the sub willl return zero and you should not use that blacklist.
GetRblTestNS
use Mail::Toaster::DNS;
GetRblTestNS($rbl);
$rbl is the reverse zone we use to test this rbl.
GetRblTestPositiveIP
use Mail::Toaster::DNS;
GetRblTestPositiveIP($rbl);
$rbl is the reverse zone we use to test this rbl. Positive test is a test that should always return a RBL match. If it should and doesn't, then we assume that RBL has been disabled by it's operator.
GetRblTestNegativeIP
use Mail::Toaster::DNS;
GetRblTestNegativeIP($rbl);
This test is difficult as RBL operators don't typically have an IP that's whitelisted. The DNS location based lists are very easy to test negatively. For the rest I'm listing my own IP as the default unless the RBL has a specific one. At the very least, my site won't get blacklisted that way. ;) I'm open to better suggestions.
AUTHOR
Matt Simerson <matt@tnpi.biz>
BUGS
None known. Report any to author.
TODO
SEE ALSO
http://www.tnpi.biz/computing/ http://www.tnpi.biz/computing/perl/MATT-Bundle/
Mail::Toaster::CGI, Mail::Toaster::DNS, Mail::Toaster::Logs, Mail::Toaster::Qmail, Mail::Toaster::Setup
COPYRIGHT
Copyright 2003, The Network People, Inc. All Rights Reserved.