From 41d7d170bc4673e9a4e89a49c191b414e38ef0d7 Mon Sep 17 00:00:00 2001
From: Sergio Cambra <sergio@programatica.es>
Date: Tue, 08 Jul 2014 08:00:01 -0400
Subject: [PATCH] default servers on system config for admin use

---
 interface/web/tools/resync.php |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/interface/web/tools/resync.php b/interface/web/tools/resync.php
index 1191585..4e5f206 100644
--- a/interface/web/tools/resync.php
+++ b/interface/web/tools/resync.php
@@ -166,6 +166,20 @@
 	}
 }
 
+//* Resyncing DKIM-Keys
+if(isset($_POST['resync_dkim']) && $_POST['resync_dkim'] == 1) {
+	$db_table = 'mail_domain';
+	$index_field = 'domain_id';
+	$sql = "SELECT * FROM ".$db_table." WHERE active = 'y' AND dkim = '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 DKIM-Key: ".$rec['domain'].'<br />';
+		}
+	}
+}
+
 //* 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'");

--
Gitblit v1.9.1