forked from leftypol/leftypol
DNSBL improvements
This commit is contained in:
parent
db1f0e9446
commit
c060673bd1
2 changed files with 5 additions and 2 deletions
|
@ -1005,9 +1005,11 @@
|
|||
|
||||
foreach($config['dnsbl'] as &$blacklist) {
|
||||
$lookup = $ip . '.' . $blacklist;
|
||||
if(gethostbyname($lookup) != $lookup) {
|
||||
$host = gethostbyname($lookup);
|
||||
if($host != $looku) {
|
||||
// On NXDOMAIN (meaning it's not in the blacklist), gethostbyname() returns the host unchanged.
|
||||
error(sprintf($config['error']['dnsbl'], $blacklist));
|
||||
if(preg_match('/^127\.0\.0\./', $host) && $host != '127.0.0.10')
|
||||
error(sprintf($config['error']['dnsbl'], $blacklist));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue