From b617e5b149b1c8b7df3068be2cd17322872ca9a7 Mon Sep 17 00:00:00 2001 From: short <> Date: Tue, 18 Mar 2003 23:56:55 +0000 Subject: [PATCH] +dnsbl whitelist - TODO: Move the list to My-Audit.pm --- perlmail-accept | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/perlmail-accept b/perlmail-accept index 9cea4a8..43b4d62 100755 --- a/perlmail-accept +++ b/perlmail-accept @@ -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 { -- 1.8.3.1