diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index 57ff99807becee59b202ea4c2524d5255ec7ef96..ecd71bf35842d5e3fa9a4aedf4c8ea1bf09e802b 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -701,7 +701,7 @@ class remoting_lib {
 		function ispconfig_sysuser_update($params,$client_id){
 			global $app;
 			$username = $app->db->quote($params["username"]);
-			$password = $app->db->quote($params["password"]);
+			$clear_password = $app->db->quote($params["password"]);
 			$client_id = intval($client_id);
 			$salt="$1$";
 			$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
@@ -709,8 +709,9 @@ class remoting_lib {
 				$salt.=$base64_alphabet[mt_rand(0,63)];
 			}
 			$salt.="$";
-			$password = crypt(stripslashes($password),$salt);
-			$sql = "UPDATE sys_user set username = '$username', passwort = '$password' WHERE client_id = $client_id";
+			$password = crypt(stripslashes($clear_password),$salt);
+			if ($clear_password) $pwstring = ", passwort = '$password'"; else $pwstring ="" ;
+			$sql = "UPDATE sys_user set username = '$username' $pwstring WHERE client_id = $client_id";
 			$app->db->query($sql);
 		}
 		
@@ -719,6 +720,8 @@ class remoting_lib {
 			$client_id = intval($client_id);
 			$sql = "DELETE FROM sys_user WHERE client_id = $client_id";
 			$app->db->query($sql);
+			$sql = "DELETE FROM sys_group WHERE client_id = $client_id";
+			$app->db->query($sql);
 		}
 
         function datalogSave($action,$primary_id, $record_old, $record_new) {
diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index 4514b5cc096ece3b9663b4a2b6803cca4f34473d..843e435b3517ad5a90b35a9ce49471359e577997 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -150,6 +150,15 @@ class page_action extends tform_actions {
 		$active = 1;
 		$language = $app->db->quote($this->dataRecord["language"]);
 		
+		$salt="$1$";
+		$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+		for ($n=0;$n<8;$n++) {
+			$salt.=$base64_alphabet[mt_rand(0,63)];
+		}
+		$salt.="$";
+		$password = crypt(stripslashes($password),$salt);
+		
+		// Create the controlpaneluser for the client
 		//Generate ssh-rsa-keys
 		exec('ssh-keygen -t rsa -C '.$username.'-rsa-key-'.time().' -f /tmp/id_rsa -N ""');
 		$app->db->query("UPDATE client SET created_at = ".time().", id_rsa = '".file_get_contents('/tmp/id_rsa')."', ssh_rsa = '".file_get_contents('/tmp/id_rsa.pub')."' WHERE client_id = ".$this->id;
@@ -157,7 +166,7 @@ class page_action extends tform_actions {
 		
 		// Create the controlpaneluser for the client
 		$sql = "INSERT INTO sys_user (username,passwort,modules,startmodule,app_theme,typ,active,language,groups,default_group,client_id)
-		VALUES ('$username',md5('$password'),'$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,".$this->id.")";
+		VALUES ('$username','$password','$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,".$this->id.")";
 		$app->db->query($sql);
 		
 		//* If the user who inserted the client is a reseller (not admin), we will have to add this new client group 
@@ -198,8 +207,15 @@ class page_action extends tform_actions {
 		// password changed
 		if($conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
 			$password = $app->db->quote($this->dataRecord["password"]);
+			$salt="$1$";
+			$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+			for ($n=0;$n<8;$n++) {
+				$salt.=$base64_alphabet[mt_rand(0,63)];
+			}
+			$salt.="$";
+			$password = crypt(stripslashes($password),$salt);
 			$client_id = $this->id;
-			$sql = "UPDATE sys_user SET passwort = md5('$password') WHERE client_id = $client_id";
+			$sql = "UPDATE sys_user SET passwort = '$password' WHERE client_id = $client_id";
 			$app->db->query($sql);
 		}
 		
@@ -232,4 +248,4 @@ class page_action extends tform_actions {
 $page = new page_action;
 $page->onLoad();
 
-?>
+?>
\ No newline at end of file
diff --git a/interface/web/client/reseller_edit.php b/interface/web/client/reseller_edit.php
index 1c9a2a1aad8575ea94d9140661b1630f2c806488..9ab636920999700dc8d803967e92a17765e996cb 100644
--- a/interface/web/client/reseller_edit.php
+++ b/interface/web/client/reseller_edit.php
@@ -150,9 +150,17 @@ class page_action extends tform_actions {
 		$active = 1;
 		$language = $app->db->quote($this->dataRecord["language"]);
 		
+		$salt="$1$";
+		$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+		for ($n=0;$n<8;$n++) {
+			$salt.=$base64_alphabet[mt_rand(0,63)];
+		}
+		$salt.="$";
+		$password = crypt(stripslashes($password),$salt);
+		
 		// Create the controlpaneluser for the reseller
 		$sql = "INSERT INTO sys_user (username,passwort,modules,startmodule,app_theme,typ,active,language,groups,default_group,client_id)
-		VALUES ('$username',md5('$password'),'$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,".$this->id.")";
+		VALUES ('$username','$password','$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,".$this->id.")";
 		$app->db->query($sql);
 		
 		//* set the number of clients to 1
@@ -188,7 +196,14 @@ class page_action extends tform_actions {
 		if($conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
 			$password = $app->db->quote($this->dataRecord["password"]);
 			$client_id = $this->id;
-			$sql = "UPDATE sys_user SET passwort = md5('$password') WHERE client_id = $client_id";
+			$salt="$1$";
+			$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+			for ($n=0;$n<8;$n++) {
+				$salt.=$base64_alphabet[mt_rand(0,63)];
+			}
+			$salt.="$";
+			$password = crypt(stripslashes($password),$salt);
+			$sql = "UPDATE sys_user SET passwort = '$password' WHERE client_id = $client_id";
 			$app->db->query($sql);
 		}
 		
diff --git a/interface/web/dashboard/dashboard.php b/interface/web/dashboard/dashboard.php
index 377f563dd51c33f1368d30c9838216aa433b6d94..a7ed82ec875bd49a2f5d40503932f8b62d55000b 100644
--- a/interface/web/dashboard/dashboard.php
+++ b/interface/web/dashboard/dashboard.php
@@ -131,7 +131,7 @@ while ($file = @readdir ($handle)) {
 
 /* Which dashlets in which column */
 /******************************************************************************/
-$leftcol_dashlets = array('modules');
+$leftcol_dashlets = array('modules','invoices');
 $rightcol_dashlets = array('limits');
 /******************************************************************************/
 
diff --git a/server/conf/bind_pri.domain.master b/server/conf/bind_pri.domain.master
index 057daad21b4030bd7dbce952b88b1f9192cce07f..0bd54b7fe968943a0d8375bd3fc1fe006fee902c 100644
--- a/server/conf/bind_pri.domain.master
+++ b/server/conf/bind_pri.domain.master
@@ -12,7 +12,7 @@ $TTL        {tmpl_var name='ttl'}
 {tmpl_var name='name'}      NS        {tmpl_var name='data'}
 </tmpl_if>
 <tmpl_if name="type" op='==' value='A'>
-{tmpl_var name='name'}      A        {tmpl_var name='data'}
+{tmpl_var name='name'} {tmpl_var name='ttl'} A        {tmpl_var name='data'}
 </tmpl_if>
 <tmpl_if name="type" op='==' value='AAAA'>
 {tmpl_var name='name'}      AAAA        {tmpl_var name='data'}
diff --git a/server/plugins-available/maildeliver_plugin.inc.php b/server/plugins-available/maildeliver_plugin.inc.php
index 33f00aee5578e4d422e996ae5688b677dff72d00..4d0b465a3492d4a5393b10a3a2b3921fa426484d 100644
--- a/server/plugins-available/maildeliver_plugin.inc.php
+++ b/server/plugins-available/maildeliver_plugin.inc.php
@@ -60,6 +60,7 @@ class maildeliver_plugin {
 		Register for the events
 		*/
 		
+		$app->plugins->registerEvent('mail_user_insert','maildeliver_plugin','update');
 		$app->plugins->registerEvent('mail_user_update','maildeliver_plugin','update');
 		$app->plugins->registerEvent('mail_user_delete','maildeliver_plugin','delete');
 		
diff --git a/server/plugins-available/maildrop_plugin.inc.php b/server/plugins-available/maildrop_plugin.inc.php
index 3b1360fce308d2aa6b42012831656662db625a6a..a0ad50e87810337e38a6c50ae08480df1ee3540e 100644
--- a/server/plugins-available/maildrop_plugin.inc.php
+++ b/server/plugins-available/maildrop_plugin.inc.php
@@ -60,6 +60,7 @@ class maildrop_plugin {
 		Register for the events
 		*/
 		
+		$app->plugins->registerEvent('mail_user_update','maildrop_plugin','insert');
 		$app->plugins->registerEvent('mail_user_update','maildrop_plugin','update');
 		$app->plugins->registerEvent('mail_user_delete','maildrop_plugin','delete');