Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix handling of acceptable domains

  • Loading branch information...
commit 35e13e42a356108e70a69ed9b3fcc3533e6c6a09 1 parent f3335fc
@purcell authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 bin/postfix-policy-whois
View
5 bin/postfix-policy-whois
@@ -40,9 +40,10 @@ end
def dodgy_dns?(domain)
if ns = nameserver_for(domain)
- BLACKLIST.each do |nsmatcher, whois_rules|
- return domain, whois_rules if nsmatcher =~ ns
+ _, whois_rules = BLACKLIST.find do |nsmatcher, whois_rules|
+ nsmatcher =~ ns
end
+ return [domain, whois_rules] if whois_rules
else
parent_domain = domain.scan(/\.(.*)/).flatten.first
if parent_domain && parent_domain =~ /\./
Please sign in to comment.
Something went wrong with that request. Please try again.