#!/usr/bin/perl # # mon2generic.pl # version 1.00, 1-19-08 # # extract the GENERIC section from the sc_BlackList.conf file # or other compatible file # if (@ARGV < 2) { print qq| usage: $0 path/to/statisticst.conf /path/to/outfile.html $0 will update the output file if it is older than the input file |; exit; } my ($in,$out) = @ARGV; die "could not find '$in'\n" unless -e $in; exit if -e $out && (stat($in))[9] < (stat($out))[9]; my $conf = ''; open (F,$in) or die "could not open input file\n"; { undef local $/; $conf .= ; } close F; my $html = q| GENERIC PTR Record Criteria
GENERIC PTR Record Criteria

Generic rDNS means that a DNS query on the IP address resolves to something like: 123-45-67-8.your.isp.com, a repeating or psuedo-random-string.your.isp.com, or some similar alph-numeric sequence. The opposite of generic rDNS is a "unique reverse pointer" which is usually something like "mail.your-domain.com."

See: NS Naming Convention for Outbound Internet Email Servers

It is not unreasonable to require that a competent mail administrator should offer the accountability provided by a proper reverse pointer without having to query whois.

For the vast majority of these generic hosts, a whois on the IP points to the provider anyway. This is aggravated by the fact that very few ISPs are responsible enough to provide or publish their dynamic ranges and rarely respond aggressively to abuse complaints.

The bottom line:

  1. If you have a static IP then you should have a unique reverse pointer.
  2. When obtaining or changing providers, a unique PTR record should be a requirement.
  3. It is now trivial for an ISP to provide a unique PTR record. If they will not do so then you need a different ISP! There should be no cost for a PTR record.
  4. If you already have established static service then your ISP should provide a PTR record.
  5. Most will do so within an hour or so of a request -- but you have to ask.

|;

$conf =~ /'GENERIC'.+regexp.+=>\s+\[/s;
$' =~ /],/s;
@_ = split("\n",$`);
foreach(@_) {
  next if $_ =~ /^#/;		# remove comment lines beginning with '#'
  $html .= $_ ."\n";
}

$html .= q|
|; open(F,'>'. $out .'.tmp') or die "could not open output '${out}.tmp'"; print F $html; close F; rename $out .'.tmp', $out or die "could not rename ${out}.tmp\n";