diff --git a/interface/web/tools/resync.php b/interface/web/tools/resync.php index dcc0ac28111053c030c0d2b546ae7de66023a094..5f6bd885aa96afd14c8d75187af2e659f482f2cb 100644 --- a/interface/web/tools/resync.php +++ b/interface/web/tools/resync.php @@ -118,6 +118,20 @@ if(isset($_POST['resync_db']) && $_POST['resync_db'] == 1) { } } +//* Resyncing Mailbox Domains +if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) { + $db_table = 'mail_domain'; + $index_field = 'domain_id'; + $sql = "SELECT * FROM ".$db_table." WHERE active = 'y'"; + $records = $app->db->queryAllRecords($sql); + if(is_array($records)) { + foreach($records as $rec) { + $app->db->datalogUpdate($db_table, $rec, $index_field, $rec[$index_field], true); + $msg .= "Resynced Mail Domain: ".$rec['domain'].'
'; + } + } +} + //* Resyncing Mailboxes if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) { $db_table = 'mail_user'; @@ -132,7 +146,6 @@ if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) { } } - //* Resyncing dns zones if(isset($_POST['resync_dns']) && $_POST['resync_dns'] == 1) { $zones = $app->db->queryAllRecords("SELECT id,origin,serial FROM dns_soa WHERE active = 'Y'");