summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2013-07-12 21:18:02 +0200
committerBenny Baumann <BenBE@geshi.org>2013-07-12 21:18:02 +0200
commit027be44fc997873f0741b78d0d1794935db1f3b7 (patch)
tree8d439e48ee4d4c8b9acb208f47ddeb6c7fbd337a
parent12ab18c8898d3bd5a62b0aab34842b8463dd9c98 (diff)
parent4774e98ecc1f9499c688284e8c51c70a6985208e (diff)
downloadcacert-devel-027be44fc997873f0741b78d0d1794935db1f3b7.tar.gz
cacert-devel-027be44fc997873f0741b78d0d1794935db1f3b7.tar.xz
cacert-devel-027be44fc997873f0741b78d0d1794935db1f3b7.zip
Merge branch 'bug-1186' into release
-rw-r--r--includes/general.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/includes/general.php b/includes/general.php
index 6e1faa9..d89c0e6 100644
--- a/includes/general.php
+++ b/includes/general.php
@@ -543,10 +543,15 @@
#echo `dig +short mx heise.de 2>&1`."-<br>\n";
$list = explode("\n", $line);
- foreach($list as $row)
- list($pri, $mxhosts[]) = explode(" ", substr(trim($row), 0, -1));
+ foreach($list as $row) {
+ if(!strstr($row, " ")) {
+ continue;
+ }
+ list($pri, $mxhosts[]) = explode(" ", trim($row), 2);
+ }
$mxhosts[] = $domain;
-#print_r($mxhosts); die;
+ array_walk($mxhosts, function(&$mx) { $mx = trim($mx, '.'); } );
+
foreach($mxhosts as $key => $domain)
{
$fp = @fsockopen($domain,25,$errno,$errstr,5);