Use Redis for forwarded_hosts, some fixes
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
error_reporting(0);
|
||||
|
||||
function get_spf_allowed_hosts($domain)
|
||||
{
|
||||
$hosts = array();
|
||||
@@ -85,10 +87,11 @@ function get_mx_hosts($domain)
|
||||
$hosts = array();
|
||||
try {
|
||||
$mx_records = dns_get_record($domain, DNS_MX);
|
||||
foreach ($mx_records as $mx_record)
|
||||
{
|
||||
$new_hosts = get_a_hosts($mx_record['target']);
|
||||
$hosts = array_unique(array_merge($hosts,$new_hosts), SORT_REGULAR);
|
||||
if ($mx_records) {
|
||||
foreach ($mx_records as $mx_record) {
|
||||
$new_hosts = get_a_hosts($mx_record['target']);
|
||||
$hosts = array_unique(array_merge($hosts,$new_hosts), SORT_REGULAR);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
|
Reference in New Issue
Block a user