fix checking for existing SPF entry in DNS
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -111,13 +111,11 @@ function createDomainZone($domain_id, $froxlorhostname = false)
|
|||||||
// now generate all records and unset the required entries we have
|
// now generate all records and unset the required entries we have
|
||||||
foreach ($dom_entries as $entry) {
|
foreach ($dom_entries as $entry) {
|
||||||
if (array_key_exists($entry['type'], $required_entries) && array_key_exists(md5($entry['record']), $required_entries[$entry['type']])) {
|
if (array_key_exists($entry['type'], $required_entries) && array_key_exists(md5($entry['record']), $required_entries[$entry['type']])) {
|
||||||
// check for SPF entry if required
|
unset($required_entries[$entry['type']][md5($entry['record'])]);
|
||||||
if (Settings::Get('spf.use_spf') == '1' && $entry['type'] == 'TXT' && $entry['record'] == '@' && strtolower(substr($entry['content'], 0, 7)) == '"v=spf1') {
|
}
|
||||||
// unset special spf required-entry
|
if (Settings::Get('spf.use_spf') == '1' && $entry['type'] == 'TXT' && $entry['record'] == '@' && strtolower(substr($entry['content'], 0, 7)) == '"v=spf1') {
|
||||||
unset($required_entries[$entry['type']][md5("@SPF@")]);
|
// unset special spf required-entry
|
||||||
} else {
|
unset($required_entries[$entry['type']][md5("@SPF@")]);
|
||||||
unset($required_entries[$entry['type']][md5($entry['record'])]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (empty($primary_ns) && $entry['type'] == 'NS') {
|
if (empty($primary_ns) && $entry['type'] == 'NS') {
|
||||||
// use the first NS entry as primary ns
|
// use the first NS entry as primary ns
|
||||||
|
|||||||
Reference in New Issue
Block a user