remove domain from pdns database if removed or updated so nameserver is disabled (remove) or update of db triggered when isemaildomain option is disabled, fixes #581

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-11-17 20:14:58 +01:00
parent e184201327
commit 13c624400e
6 changed files with 229 additions and 149 deletions

View File

@@ -417,6 +417,15 @@ while ($row = $result_tasks_stmt->fetch(PDO::FETCH_ASSOC)) {
}
}
}
/**
* TYPE=11 domain has been deleted, remove from pdns database if used
*/
if ($row['type'] == '11' && Settings::Get('system.dns_server') == 'pdns')
{
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, "Removing PowerDNS entries for domain " . $row['data']['domain']);
PowerDNS::cleanDomainZone($row['data']['domain']);
}
}
if ($num_results != 0) {