fix too strict comparison for isemaildomain check in Dns-Zone generation; fixes #1003
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -75,7 +75,7 @@ class Dns
|
|||||||
if (! $isMainButSubTo) {
|
if (! $isMainButSubTo) {
|
||||||
self::addRequiredEntry('@', 'NS', $required_entries);
|
self::addRequiredEntry('@', 'NS', $required_entries);
|
||||||
}
|
}
|
||||||
if ($domain['isemaildomain'] === '1') {
|
if ($domain['isemaildomain'] == '1') {
|
||||||
self::addRequiredEntry('@', 'MX', $required_entries);
|
self::addRequiredEntry('@', 'MX', $required_entries);
|
||||||
if (Settings::Get('system.dns_createmailentry')) {
|
if (Settings::Get('system.dns_createmailentry')) {
|
||||||
foreach (array(
|
foreach (array(
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class DomainZonesTest extends TestCase
|
|||||||
global $admin_userdata;
|
global $admin_userdata;
|
||||||
|
|
||||||
Settings::Set('system.dnsenabled', 1, true);
|
Settings::Set('system.dnsenabled', 1, true);
|
||||||
|
Settings::Set('system.mxservers', 'mx.hostname.tld', true);
|
||||||
|
|
||||||
// get customer
|
// get customer
|
||||||
$json_result = Customers::getLocal($admin_userdata, array(
|
$json_result = Customers::getLocal($admin_userdata, array(
|
||||||
@@ -35,6 +36,7 @@ class DomainZonesTest extends TestCase
|
|||||||
$result = json_decode($json_result, true)['data'];
|
$result = json_decode($json_result, true)['data'];
|
||||||
$this->assertTrue(count($result) > 1);
|
$this->assertTrue(count($result) > 1);
|
||||||
$this->assertEquals('$ORIGIN test2.local.', $result[1]);
|
$this->assertEquals('$ORIGIN test2.local.', $result[1]);
|
||||||
|
$this->assertEquals('@ 604800 IN MX 10 mx.hostname.tld.', $result[count($result)-2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user