From c6d29c1cac7714642ec9b1bd3f82f1c1fd850c74 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Tue, 19 Nov 2013 16:09:51 -0500
Subject: [PATCH] add dkim-keys to the resync-tool display dns-record for dkim in the mail-domain rewrite function domain_dkim_update in server/plugins-available/mail_plugin_dkim.inc.php change dns*.php according to commit 604c0c24ba44720e052b536abb1ae992eb0ee292

---
 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 a02ac9f..ad716f7 100644
--- a/interface/web/tools/resync.php
+++ b/interface/web/tools/resync.php
@@ -146,6 +146,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