--- cacert/includes/general.php 2014-10-28 12:21:30.724020976 +0100 +++ general.php 2014-10-28 12:34:15.754475968 +0100 @@ -537,18 +537,10 @@ if(preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\+\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/" , $email)) { list($username,$domain)=explode('@',$email,2); - $dom = escapeshellarg($domain); - $line = trim(`dig +short MX $dom 2>&1`); -#echo $email."-$dom-$line-\n"; -#echo `dig +short mx heise.de 2>&1`."-
\n"; - $list = explode("\n", $line); - foreach($list as $row) { - if(!strstr($row, " ")) { - continue; - } - list($pri, $mxhosts[]) = explode(" ", trim($row), 2); - } + $mxhosts = array(); + getmxrr($dom,$mxhosts); + $mxhosts[] = $domain; array_walk($mxhosts, function(&$mx) { $mx = trim($mx, '.'); } );