From b9a3ef486ebcde18a5ade37865ff8f397185d24f Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Sun, 24 Jul 2016 05:30:59 -0400 Subject: [PATCH] Fixed #3979 Mailbox users unable to save autoresponders --- server/lib/classes/cron.d/550-bind_dnssec.inc.php | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/server/lib/classes/cron.d/550-bind_dnssec.inc.php b/server/lib/classes/cron.d/550-bind_dnssec.inc.php index 99360e0..abf6427 100644 --- a/server/lib/classes/cron.d/550-bind_dnssec.inc.php +++ b/server/lib/classes/cron.d/550-bind_dnssec.inc.php @@ -34,8 +34,7 @@ class cronjob_bind_dnssec extends cronjob { // job schedule - //protected $_schedule = '30 3 * * *'; //daily at 3:30 a.m. - protected $_schedule = '* * * * *'; //temp 4 test + protected $_schedule = '30 3 * * *'; //daily at 3:30 a.m. private function increase_serial($serial){ global $app, $conf; @@ -69,14 +68,13 @@ //TODO : change this when distribution information has been integrated into server record $filespre = (file_exists('/etc/gentoo-release')) ? 'pri/' : 'pri.'; - - $soas = $app->db->queryAllRecords('SELECT * FROM dns_soa WHERE dnssec_wanted=\'Y\' AND dnssec_initialized=\'Y\' AND dnssec_last_signed < '.(time()-(3600*24*5)+900)); //Resign zones every 5 days (expiry is 16 days so we have enough safety, 15 minutes tolerance) - + $soas = $app->db->queryAllRecords('SELECT `id`,`serial`,`origin` FROM dns_soa WHERE server_id=? AND active=\'Y\' AND dnssec_wanted=\'Y\' AND dnssec_initialized=\'Y\' AND (dnssec_last_signed < ? OR dnssec_last_signed > ?)', intval($conf['server_id']), time()-(3600*24*5)+900, time()+900); //Resign zones every 5 days (expiry is 16 days so we have enough safety, 15 minutes tolerance) + foreach ($soas as $data) { $domain = substr($data['origin'], 0, strlen($data['origin'])-1); - if (!file_exists($dns_config['bind_zonefiles_dir'].'/'.$filespre.$domain)) return false; + if (!file_exists($dns_config['bind_zonefiles_dir'].'/'.$filespre.$domain)) continue; - $app->log('DNSSEC Auto-Resign: Touching zone '.$domain, LOGLEVEL_INFO); + $app->log('DNSSEC Auto-Resign: Touching zone '.$domain, LOGLEVEL_DEBUG); $app->db->datalogUpdate('dns_soa', array("serial" => $this->increase_serial($data['serial'])), 'id', $data['id']); } -- Gitblit v1.9.1