+dnsbl whitelist
authorshort <>
Tue, 18 Mar 2003 23:56:55 +0000 (23:56 +0000)
committershort <>
Tue, 18 Mar 2003 23:56:55 +0000 (23:56 +0000)
 - TODO: Move the list to My-Audit.pm

perlmail-accept

index 9cea4a8..43b4d62 100755 (executable)
@@ -645,6 +645,10 @@ sub Received_for
        return @r;
 }
 
+my %dnsbl_whitelist=map(($_=>1),(
+               "195.250.128.83"        # smtp3.vol.cz; 83.128.250.195.blackholes.five-ten-sg.com
+               ));
+
 # Extended Mail::Audit::MAPS
 # $domain,$full,[$timeout]
 sub dnsbl
@@ -654,7 +658,8 @@ my($domain,$full,$timeout)=@_;
        $timeout||=30;  # sec
        $Mail::Audit::MAPS::host=$domain;
        my @hosts=map({ s/^.*://; "[$_]"; }     # strip DNS part
-                       grep({ /^([^:@]*):/ && !$alternates_host{$1}; } (Received_for()))       # leave only foreign hosts
+                       grep({ /^([^:@]*):/ && !$alternates_host{$1}    # leave only foreign hosts
+                                       && !$dnsbl_whitelist{$1}; } (Received_for()))
                        );
        splice @hosts,1 if !$full && @hosts;    # "&& @hosts" to prevent: WARN: splice() offset past end of array
        {