From 3117f2e70389b0a3e03a683ec8b03e4e0a7eea87 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Sun, 31 Jan 2016 10:00:34 -0500
Subject: [PATCH] Merge branch 'stable-3.1'

---
 server/scripts/update_from_dev_stable.sh                      |   29 +++++
 interface/web/admin/templates/server_config_web_edit.htm      |  133 +++++++++++++++++++++-----
 server/lib/classes/monitor_tools.inc.php                      |    3 
 interface/web/client/templates/client_edit_limits.htm         |    2 
 install/update.php                                            |   28 +++-
 interface/lib/plugins/mail_user_filter_plugin.inc.php         |    1 
 interface/web/admin/lib/lang/en_server_config.lng             |    1 
 server/conf/php-fcgi-starter.master                           |    2 
 interface/web/client/templates/client_edit_address.htm        |   11 +
 server/scripts/ispconfig_update.php                           |    5 
 server/conf/vhost.conf.master                                 |    4 
 interface/lib/config.inc.php                                  |    1 
 install/lib/installer_base.lib.php                            |   17 +++
 interface/web/sites/templates/web_vhost_domain_admin_list.htm |    1 
 install/lib/install.lib.php                                   |    3 
 interface/web/client/templates/reseller_edit_limits.htm       |    2 
 interface/web/client/templates/reseller_edit_address.htm      |   11 +
 interface/web/dns/templates/dns_dmarc_edit.htm                |   14 +-
 interface/web/sites/templates/web_vhost_domain_list.htm       |    3 
 interface/web/client/templates/client_message.htm             |    3 
 20 files changed, 219 insertions(+), 55 deletions(-)

diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index f17b982..08b0f84 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -86,6 +86,9 @@
 			$mainver = array_filter($mainver);
 			$mainver = current($mainver).'.'.next($mainver);
 			switch ($mainver){
+			case "15.10":
+				$relname = "(Wily Werewolf)";
+				break;
 			case "15.04":
 				$relname = "(Vivid Vervet)";
 				break;
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index d3b3364..2ca0e54 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -68,6 +68,12 @@
 				} else {
 					$input = $autoinstall[$name];
 				}
+			} elseif($name != '' && $autoupdate[$name] != '') {
+				if($autoupdate[$name] == 'default') {
+					$input = $default;
+				} else {
+					$input = $autoupdate[$name];
+				}
 			} else {
 				$answers_str = implode(',', $answers);
 				swrite($this->lng($query).' ('.$answers_str.') ['.$default.']: ');
@@ -104,6 +110,12 @@
 				$input = $default;
 			} else {
 				$input = $autoinstall[$name];
+			}
+		} elseif($name != '' && $autoupdate[$name] != '') {
+			if($autoupdate[$name] == 'default') {
+				$input = $default;
+			} else {
+				$input = $autoupdate[$name];
 			}
 		} else {
 			swrite($this->lng($query).' ['.$default.']: ');
@@ -1660,6 +1672,11 @@
 			replaceLine('/etc/apache2/ports.conf', 'NameVirtualHost *:80', '# NameVirtualHost *:80', 1);
 			replaceLine('/etc/apache2/ports.conf', 'NameVirtualHost *:443', '# NameVirtualHost *:443', 1);
 		}
+		
+		if(is_file('/etc/apache2/mods-available/fcgid.conf')) {
+			// add or modify the parameters for fcgid.conf
+			replaceLine('/etc/apache2/mods-available/fcgid.conf','MaxRequestLen','MaxRequestLen 15728640',1);
+		}
 
 		if(is_file('/etc/apache2/apache.conf')) {
 			if(hasLine('/etc/apache2/apache.conf', 'Include sites-enabled/', 1) == false) {
diff --git a/install/update.php b/install/update.php
index 60cd81b..04c5289 100644
--- a/install/update.php
+++ b/install/update.php
@@ -177,9 +177,6 @@
 if (!$inst->get_php_version()) die('ISPConfig requieres PHP '.$inst->min_php."\n");
 $inst->is_update = true;
 
-//** Detect the installed applications
-$inst->find_installed_apps();
-
 echo "This application will update ISPConfig 3 on your server.\n\n";
 
 //* Make a backup before we start the update
@@ -304,6 +301,18 @@
 }
 //}
 
+//** Detect the installed applications
+$inst->find_installed_apps();
+
+$conf['services']['mail'] = $conf['postfix']['installed'];
+if ($conf['powerdns']['installed'] || $conf['bind']['installed'] || $conf['mydns']['installed']) $conf['services']['dns'] = true;
+if ($conf['apache']['installed'] || $conf['nginx']['installed']) $conf['services']['web'] = true;
+$conf['services']['xmpp'] =  $conf['xmpp']['installed'];;
+if ($conf['ufw']['installed'] || $conf['firewall']['installed']) $conf['services']['firewall'] = true;
+$conf['services']['vserver'] = $conf['services']['vserver'];
+$conf['services']['db'] = true;
+
+
 //** Shall the services be reconfigured during update
 $reconfigure_services_answer = $inst->simple_query('Reconfigure Services?', array('yes', 'no', 'selected'), 'yes','reconfigure_services');
 
@@ -321,12 +330,6 @@
 		if($conf['mailman']['installed'] == true && $inst->reconfigure_app('Mailman', $reconfigure_services_answer)) {
 			swriteln('Configuring Mailman');
 			$inst->configure_mailman('update');
-		}
-
-		//* Configure Jailkit
-		if($inst->reconfigure_app('Jailkit', $reconfigure_services_answer)) {
-			swriteln('Configuring Jailkit');
-			$inst->configure_jailkit();
 		}
 
 		if($conf['dovecot']['installed'] == true && $inst->reconfigure_app('Dovecot', $reconfigure_services_answer)) {
@@ -407,6 +410,13 @@
 			swriteln('Configuring Apps vhost');
 			$inst->configure_apps_vhost();
 			}
+	
+			//* Configure Jailkit
+			if($inst->reconfigure_app('Jailkit', $reconfigure_services_answer)) {
+				swriteln('Configuring Jailkit');
+				$inst->configure_jailkit();
+			}
+
 		}
 
     if($conf['services']['xmpp'] && $inst->reconfigure_app('XMPP', $reconfigure_services_answer)) {
diff --git a/interface/lib/config.inc.php b/interface/lib/config.inc.php
index 907f372..3c534f3 100644
--- a/interface/lib/config.inc.php
+++ b/interface/lib/config.inc.php
@@ -34,6 +34,7 @@
 	header("Pragma: no-cache");
 	header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
 	header("Content-Type: text/html; charset=utf-8");
+	header('X-Content-Type-Options: nosniff');
 
 	ini_set('register_globals', 0);
 }
diff --git a/interface/lib/plugins/mail_user_filter_plugin.inc.php b/interface/lib/plugins/mail_user_filter_plugin.inc.php
index e831789..40defa8 100644
--- a/interface/lib/plugins/mail_user_filter_plugin.inc.php
+++ b/interface/lib/plugins/mail_user_filter_plugin.inc.php
@@ -252,6 +252,7 @@
 
 			if($page_form->dataRecord["action"] == 'move') {
 				$content .= 'ID' . "$page_form->id" . 'EndFolder = "$DEFAULT/.' . $page_form->dataRecord['target'] . '/"' . "\n";
+				$content .= "xfilter \"/usr/bin/formail -A \\\"X-User-Mail-Filter-ID"."$page_form->id".": Yes\\\"\"" . "\n";
 				$content .= "to ". '$ID' . "$page_form->id" . 'EndFolder' . "\n";
 			} else {
 				$content .= "to /dev/null\n";
diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng
index ac7e2d5..19b08f1 100644
--- a/interface/web/admin/lib/lang/en_server_config.lng
+++ b/interface/web/admin/lib/lang/en_server_config.lng
@@ -266,6 +266,7 @@
 $wb['php_ini_check_minutes_error_empty'] = 'Please specify a value how often php.ini should be checked for changes.';
 $wb['php_ini_check_minutes_info_txt'] = '0 = no check';
 $wb['enable_spdy_txt'] = 'Makes SPDY available';
+$wb['web_settings_txt'] = 'Web Server';
 
 // New for XMPP
 $wb['xmpp_server_txt'] = 'XMPP Server';
diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm
index f32e147..372a752 100644
--- a/interface/web/admin/templates/server_config_web_edit.htm
+++ b/interface/web/admin/templates/server_config_web_edit.htm
@@ -3,13 +3,25 @@
 </div>
 <p><tmpl_var name="list_desc_txt"></p>
 
-
-        
-            <div class="form-group">
+<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
+  <div class="panel panel-default">
+    <div class="panel-heading" role="tab" id="headingWeb">
+      <h4 class="panel-title">
+        <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseWeb" aria-expanded="true" aria-controls="collapseWeb">
+          {tmpl_var name='web_settings_txt'}
+        </a>
+      </h4>
+    </div>
+    <div id="collapseWeb" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingWeb">
+      <div class="panel-body">
+	  <!-- Begin content -->
+	  <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='server_type_txt'}</label>
-                <div class="col-sm-9"><select name="server_type" id="server_type" class="form-control">
+                <div class="col-sm-9">
+					<select name="server_type" id="server_type" class="form-control">
                         {tmpl_var name='server_type'}
-                    </select></div>
+                    </select>
+				</div>
             </div>
             <div class="form-group">
                 <label for="website_basedir" class="col-sm-3 control-label">{tmpl_var name='website_basedir_txt'}</label>
@@ -136,9 +148,22 @@
                     {tmpl_var name='overquota_notify_onok'}
                 </div>
             </div>
-            <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-ssl-settings" aria-expanded="false" aria-controls="toggle-ssl-settings">{tmpl_var name='ssl_settings_txt'}</button></div>
-            <div id="toggle-ssl-settings" class="collapse">
-                <div class="form-group">
+	  <!-- End content -->
+	  </div>
+	</div>
+  </div>
+  <div class="panel panel-default">
+    <div class="panel-heading" role="tab" id="headingSSL">
+      <h4 class="panel-title">
+        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSSL" aria-expanded="false" aria-controls="collapseSSL">
+          {tmpl_var name='ssl_settings_txt'}
+        </a>
+      </h4>
+    </div>
+    <div id="collapseSSL" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSSL">
+      <div class="panel-body">
+	  <!-- Begin content -->
+	                  <div class="form-group">
                     <label class="col-sm-3 control-label">{tmpl_var name='enable_sni_txt'}</label>
                     <div class="col-sm-9">
                         {tmpl_var name='enable_sni'}
@@ -158,10 +183,22 @@
                 <div class="form-group">
                     <label for="CA_pass" class="col-sm-3 control-label">{tmpl_var name='CA_pass_txt'}</label>
                     <div class="col-sm-9"><input type="password" name="CA_pass" id="CA_pass" value="{tmpl_var name='CA_pass'}" autocomplete="off" class="form-control" /></div></div>
-            </div>
-            <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-permissions" aria-expanded="false" aria-controls="toggle-permissions">{tmpl_var name='permissions_txt'}</button></div>
-            <div id="toggle-permissions" class="collapse">
-                <div class="form-group">
+	  <!-- End content -->
+	  </div>
+	</div>
+  </div>
+  <div class="panel panel-default">
+    <div class="panel-heading" role="tab" id="headingPerms">
+      <h4 class="panel-title">
+        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapsePerms" aria-expanded="false" aria-controls="collapsePerms">
+          {tmpl_var name='permissions_txt'}
+        </a>
+      </h4>
+    </div>
+    <div id="collapsePerms" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingPerms">
+      <div class="panel-body">
+	  <!-- Begin content -->
+	  <div class="form-group">
                     <label class="col-sm-3 control-label">{tmpl_var name='set_folder_permissions_on_update_txt'}</label>
                     <div class="col-sm-9">
                         {tmpl_var name='set_folder_permissions_on_update'}
@@ -188,10 +225,23 @@
                 <div class="form-group">
                     <label for="connect_userid_to_webid_start" class="col-sm-3 control-label">{tmpl_var name='connect_userid_to_webid_start_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="connect_userid_to_webid_start" id="connect_userid_to_webid_start" value="{tmpl_var name='connect_userid_to_webid_start'}" class="form-control" /></div></div>
-            </div>
-            <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-php_settings" aria-expanded="false" aria-controls="toggle-php_settings">{tmpl_var name='php_settings_txt'}</button></div>
-            <div id="toggle-php_settings" class="collapse">
-                <div class="form-group apache">
+            
+	  <!-- End content -->
+	  </div>
+	</div>
+  </div>
+  <div class="panel panel-default">
+    <div class="panel-heading" role="tab" id="headingPHP">
+      <h4 class="panel-title">
+        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapsePHP" aria-expanded="false" aria-controls="collapsePHP">
+          {tmpl_var name='php_settings_txt'}
+        </a>
+      </h4>
+    </div>
+    <div id="collapsePHP" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingPHP">
+      <div class="panel-body">
+	  <!-- Begin content -->
+	  <div class="form-group apache">
                     <label for="php_ini_path_apache" class="col-sm-3 control-label">{tmpl_var name='php_ini_path_apache_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="php_ini_path_apache" id="php_ini_path_apache" value="{tmpl_var name='php_ini_path_apache'}" class="form-control" /></div></div>
                 <div class="form-group apache">
@@ -225,10 +275,22 @@
                             {tmpl_var name='php_handler'}
                         </select></div>
                 </div>
-            </div>
-            <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-apps_vhost_settings" aria-expanded="false" aria-controls="toggle-apps_vhost_settings">{tmpl_var name='apps_vhost_settings_txt'}</button></div>
-            <div id="toggle-apps_vhost_settings" class="collapse">
-				<div class="form-group">
+	  <!-- End content -->
+	  </div>
+	</div>
+  </div>
+  <div class="panel panel-default">
+    <div class="panel-heading" role="tab" id="headingApps">
+      <h4 class="panel-title">
+        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseApps" aria-expanded="false" aria-controls="collapseApps">
+          {tmpl_var name='apps_vhost_settings_txt'}
+        </a>
+      </h4>
+    </div>
+    <div id="collapseApps" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingApps">
+      <div class="panel-body">
+	  <!-- Begin content -->
+	  				<div class="form-group">
 					<label for="apps_vhost_enabled" class="col-sm-3 control-label">{tmpl_var name='apps_vhost_enabled_txt'}</label>
 					<div class="col-sm-9">{tmpl_var name='apps_vhost_enabled'}</div></div>
                 <div class="form-group">
@@ -240,10 +302,23 @@
                 <div class="form-group">
                     <label for="apps_vhost_servername" class="col-sm-3 control-label">{tmpl_var name='apps_vhost_servername_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="apps_vhost_servername" id="apps_vhost_servername" value="{tmpl_var name='apps_vhost_servername'}" class="form-control" /></div></div>
-            </div>
-            <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-awstats_settings" aria-expanded="false" aria-controls="toggle-awstats_settings">{tmpl_var name='awstats_settings_txt'}</button></div>
-            <div id="toggle-awstats_settings" class="collapse">
-                <div class="form-group">
+            
+	  <!-- End content -->
+	  </div>
+	</div>
+  </div>
+  <div class="panel panel-default">
+    <div class="panel-heading" role="tab" id="headingAWStats">
+      <h4 class="panel-title">
+        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseAWStats" aria-expanded="false" aria-controls="collapseAWStats">
+          {tmpl_var name='awstats_settings_txt'}
+        </a>
+      </h4>
+    </div>
+    <div id="collapseAWStats" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingAWStats">
+      <div class="panel-body">
+	  <!-- Begin content -->
+	  <div class="form-group">
                     <label for="awstats_conf_dir" class="col-sm-3 control-label">{tmpl_var name='awstats_conf_dir_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="awstats_conf_dir" id="awstats_conf_dir" value="{tmpl_var name='awstats_conf_dir'}" class="form-control" /></div></div>
                 <div class="form-group">
@@ -255,9 +330,13 @@
                 <div class="form-group">
                     <label for="awstats_buildstaticpages_pl" class="col-sm-3 control-label">{tmpl_var name='awstats_buildstaticpages_pl_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="awstats_buildstaticpages_pl" id="awstats_buildstaticpages_pl" value="{tmpl_var name='awstats_buildstaticpages_pl'}" class="form-control" /></div></div>
-            </div>
-        
             
+	  <!-- End content -->
+	  </div>
+	</div>
+  </div>
+</div>
+			
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
             
         <div class="clear"><div class="right">
@@ -266,7 +345,7 @@
         </div></div>
 <script language="JavaScript" type="text/javascript">
     var serverType = jQuery('#server_type').val();
-    jQuery('#server_type').replaceWith('<label for="server_Type" class="col-sm-3 control-label">'+serverType+'</label><input type="hidden" name="server_type" value="'+serverType+'">');
+    jQuery('#server_type').replaceWith('<p>'+serverType+'</p><input type="hidden" name="server_type" value="'+serverType+'">');
     adjustForm();
     jQuery('#server_type').change(function(){
         serverType = $(this).val();
diff --git a/interface/web/client/templates/client_edit_address.htm b/interface/web/client/templates/client_edit_address.htm
index c5c6cf3..1c47d04 100644
--- a/interface/web/client/templates/client_edit_address.htm
+++ b/interface/web/client/templates/client_edit_address.htm
@@ -27,9 +27,16 @@
             <div class="form-group">
                 <label for="username" class="col-sm-3 control-label">{tmpl_var name='username_txt'}*</label>
                 <div class="col-sm-9"><input type="text" name="username" id="username" value="{tmpl_var name='username'}" class="form-control" /></div></div>
-            <div class="form-group">
+			<div class="form-group">
                 <label for="password" class="col-sm-3 control-label">{tmpl_var name='password_txt'}</label>
-                <div class="col-sm-6"><input type="password" name="password" id="password" value="{tmpl_var name='password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /></div><div class="col-sm-3 input-sm">&nbsp;</div><a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a>
+                <div class="col-sm-9">
+				<div class="input-group">
+					<input type="password" name="password" id="password" value="{tmpl_var name='password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" />
+					<span class="input-group-btn">
+						<button class="btn btn-default" type="button" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</button>
+					</span>
+				</div>
+				</div>
             </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='password_strength_txt'}</label>
diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm
index f5c49b6..8c133d4 100644
--- a/interface/web/client/templates/client_edit_limits.htm
+++ b/interface/web/client/templates/client_edit_limits.htm
@@ -174,7 +174,7 @@
         </a>
       </h4>
     </div>
-    <div id="collapseMail" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingMail>
+    <div id="collapseMail" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingMail">
       <div class="panel-body">
 				<div class="form-group">
                     <label for="mail_servers" class="col-sm-3 control-label">{tmpl_var name='mail_servers_txt'}</label>
diff --git a/interface/web/client/templates/client_message.htm b/interface/web/client/templates/client_message.htm
index e65846c..7e1b1da 100644
--- a/interface/web/client/templates/client_message.htm
+++ b/interface/web/client/templates/client_message.htm
@@ -25,7 +25,8 @@
                 <div class="col-sm-9"><input type="text" name="subject" id="subject" value="{tmpl_var name='subject'}" class="form-control" /></div></div>
             <div class="form-group">
                 <label for="message" class="col-sm-3 control-label">{tmpl_var name='message_txt'}</label>
-                <div class="col-sm-9"><textarea class="form-control" name="message" id="message">{tmpl_var name='message'}</textarea></div>&nbsp;{tmpl_var name="variables_txt"}&nbsp;{tmpl_var name="message_variables"}
+                <div class="col-sm-9"><textarea class="form-control" name="message" id="message" rows="10">{tmpl_var name='message'}</textarea></div>
+				<div class="col-sm-3 col-text"></div><div class="col-sm-9 col-text">{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"} <br />{tmpl_var name='variables_description_txt'}</div>
             </div>
         
         <div class="clear"><div class="right">
diff --git a/interface/web/client/templates/reseller_edit_address.htm b/interface/web/client/templates/reseller_edit_address.htm
index d05b9fb..fa86466 100644
--- a/interface/web/client/templates/reseller_edit_address.htm
+++ b/interface/web/client/templates/reseller_edit_address.htm
@@ -27,9 +27,16 @@
             <div class="form-group">
                 <label for="username" class="col-sm-3 control-label">{tmpl_var name='username_txt'}*</label>
                 <div class="col-sm-9"><input type="text" name="username" id="username" value="{tmpl_var name='username'}" class="form-control" /></div></div>
-            <div class="form-group">
+			<div class="form-group">
                 <label for="password" class="col-sm-3 control-label">{tmpl_var name='password_txt'}</label>
-                <div class="col-sm-6"><input type="password" name="password" id="password" value="{tmpl_var name='password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /></div><div class="col-sm-3 input-sm">&nbsp;</div><a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a>
+                <div class="col-sm-9">
+				<div class="input-group">
+					<input type="password" name="password" id="password" value="{tmpl_var name='password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" />
+					<span class="input-group-btn">
+						<button class="btn btn-default" type="button" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</button>
+					</span>
+				</div>
+				</div>
             </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='password_strength_txt'}</label>
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm
index f395129..05a22ae 100644
--- a/interface/web/client/templates/reseller_edit_limits.htm
+++ b/interface/web/client/templates/reseller_edit_limits.htm
@@ -177,7 +177,7 @@
         </a>
       </h4>
     </div>
-    <div id="collapseMail" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingMail>
+    <div id="collapseMail" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingMail">
       <div class="panel-body">&nbsp;
 				<div class="form-group">
                     <label for="mail_servers" class="col-sm-3 control-label">{tmpl_var name='mail_servers_txt'}</label>
diff --git a/interface/web/dns/templates/dns_dmarc_edit.htm b/interface/web/dns/templates/dns_dmarc_edit.htm
index 798906a..644256d 100644
--- a/interface/web/dns/templates/dns_dmarc_edit.htm
+++ b/interface/web/dns/templates/dns_dmarc_edit.htm
@@ -41,7 +41,7 @@
 
             <div class="form-group">
 				<label class="col-sm-2 control-label">{tmpl_var name='dmarc_fo_txt'}</label>
-				 <div class="col-sm-3">
+				 <div class="col-sm-1">
 					<input type="checkbox" value="1" id="dmarc_fo0" name="dmarc_fo0" {tmpl_var name='dmarc_fo0'}/>
 				</div>
 				<div class="col-sm-3 input-sm">
@@ -50,7 +50,7 @@
 			</div>
             <div class="form-group">
 				<label class="col-sm-2 control-label"></label>
-				<div class="col-sm-3">
+				<div class="col-sm-1">
 					<input type="checkbox" value="1" id="dmarc_fo0" name="dmarc_fo0" {tmpl_var name='dmarc_fo1'}/>
 				</div>
 				<div class="col-sm-3 input-sm">
@@ -59,7 +59,7 @@
             </div>
             <div class="form-group">
 				<label class="col-sm-2 control-label"></label>
-				<div class="col-sm-3">
+				<div class="col-sm-1">
 					<input type="checkbox" value="1" id="dmarc_fod" name="dmarc_fod" {tmpl_var name='dmarc_fod'}/>
 				</div>
 				<div class="col-sm-3 input-sm">
@@ -68,7 +68,7 @@
             </div>
             <div class="form-group">
 				<label class="col-sm-2 control-label"></label>
-				<div class="col-sm-3">
+				<div class="col-sm-1">
 					<input type="checkbox" value="1" id="dmarc_fos" name="dmarc_fos" {tmpl_var name='dmarc_fos'}/>
 				</div>
 				<div class="col-sm-3 input-sm">
@@ -96,7 +96,7 @@
             </div>
             <div class="form-group">
                 <label class="col-sm-2 control-label">{tmpl_var name='dmarc_rf_txt'}</label>
-                 <div class="col-sm-3">
+                 <div class="col-sm-1">
                     <input type="checkbox" value="1" id="dmarc_rf_afrf" name="dmarc_fo0" {tmpl_var name='dmarc_rf_afrf'}/>
                 </div>
                 <div class="col-sm-3 input-sm">
@@ -104,8 +104,8 @@
                 </div>
             </div>
             <div class="form-group">
-                <label class="col-sm-2 control-label"></label>
-                <div class="col-sm-3">
+                <label class="col-sm-2 control-label">{tmpl_var name='dmarc_rf_iodef'}</label>
+                <div class="col-sm-1">
                     <input type="checkbox" value="1" id="dmarc_rf_iodef" name="dmarc_rf_iodef" {tmpl_var name='dmarc_rf_iodef'}/>
                 </div>
                 <div class="col-sm-3 input-sm">
diff --git a/interface/web/sites/templates/web_vhost_domain_admin_list.htm b/interface/web/sites/templates/web_vhost_domain_admin_list.htm
index 9e12930..d613d6e 100644
--- a/interface/web/sites/templates/web_vhost_domain_admin_list.htm
+++ b/interface/web/sites/templates/web_vhost_domain_admin_list.htm
@@ -46,6 +46,7 @@
                         <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}">{tmpl_var name="domain"}</a></td>
                         <td class="text-right">
 							<a href="http://{tmpl_var name="domain"}" target="_blank" class="btn btn-default formbutton-default formbutton-narrow"><span class="icon icon-link"></span></a>
+							<a href="http://{tmpl_var name="domain"}/stats/" target="_blank" class="btn btn-default formbutton-default formbutton-narrow"><span class="glyphicon glyphicon-signal"></span></a>
                             <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('sites/web_vhost_domain_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a>
                         </td>
                     </tr>
diff --git a/interface/web/sites/templates/web_vhost_domain_list.htm b/interface/web/sites/templates/web_vhost_domain_list.htm
index b40db40..b812278 100644
--- a/interface/web/sites/templates/web_vhost_domain_list.htm
+++ b/interface/web/sites/templates/web_vhost_domain_list.htm
@@ -60,7 +60,8 @@
                         <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}">{tmpl_var name="domain"}</a></td>
                         <td class="text-right">
 							<a href="http://{tmpl_var name="domain"}" target="_blank" class="btn btn-default formbutton-default formbutton-narrow"><span class="icon icon-link"></span></button>
-                            <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('sites/web_vhost_domain_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></button>
+                            <a href="http://{tmpl_var name="domain"}/stats/" target="_blank" class="btn btn-default formbutton-default formbutton-narrow"><span class="glyphicon glyphicon-signal"></span></a>
+							<a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('sites/web_vhost_domain_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></button>
                         </td>
                     </tr>
                 </tmpl_loop>
diff --git a/server/conf/php-fcgi-starter.master b/server/conf/php-fcgi-starter.master
index 679f1b2..7671a70 100644
--- a/server/conf/php-fcgi-starter.master
+++ b/server/conf/php-fcgi-starter.master
@@ -18,5 +18,5 @@
 -d suhosin.executor.func.blacklist="" \
 -d upload_tmp_dir=<tmpl_var name='document_root'>/tmp \
 -d session.save_path=<tmpl_var name='document_root'>/tmp \
--d sendmail_path="/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>" \
+-d sendmail_path="/usr/sbin/sendmail -t -i -f webmaster@<tmpl_var name='domain'>" \
 </tmpl_if> $1
\ No newline at end of file
diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master
index 104d531..3e7ec81 100644
--- a/server/conf/vhost.conf.master
+++ b/server/conf/vhost.conf.master
@@ -397,11 +397,11 @@
 		RewriteEngine on
 <tmpl_if name='seo_redirect_enabled'>
 		RewriteCond %{HTTP_HOST} <tmpl_var name='seo_redirect_operator'>^<tmpl_var name='seo_redirect_origin_domain'>$ [NC]
-		RewriteRule ^(.*)$ http<tmpl_if name='ssl_enabled'>s</tmpl_if>://<tmpl_var name='seo_redirect_target_domain'>$1 [R=301,L]
+		RewriteRule ^(.*)$ http<tmpl_if name='ssl_enabled'>s</tmpl_if>://<tmpl_var name='seo_redirect_target_domain'>$1 [R=301,NE,L]
 </tmpl_if>
 <tmpl_loop name="alias_seo_redirects">
 		RewriteCond %{HTTP_HOST} <tmpl_var name='alias_seo_redirect_operator'>^<tmpl_var name='alias_seo_redirect_origin_domain'>$ [NC]
-		RewriteRule ^(.*)$ http<tmpl_if name='ssl_enabled'>s</tmpl_if>://<tmpl_var name='alias_seo_redirect_target_domain'>$1 [R=301,L]
+		RewriteRule ^(.*)$ http<tmpl_if name='ssl_enabled'>s</tmpl_if>://<tmpl_var name='alias_seo_redirect_target_domain'>$1 [R=301,NE,L]
 </tmpl_loop>
 <tmpl_loop name="redirects">
 		RewriteCond %{HTTP_HOST}   <tmpl_var name='rewrite_domain'>$ [NC]
diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index 9b706ce..de8d085 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -62,6 +62,9 @@
 				$mainver = array_filter($mainver);
 				$mainver = current($mainver).'.'.next($mainver);
 				switch ($mainver){
+				case "15.10":
+					$relname = "(Wily Werewolf)";
+					break;
 				case "15.04":
 					$relname = "(Vivid Vervet)";
 					break;
diff --git a/server/scripts/ispconfig_update.php b/server/scripts/ispconfig_update.php
index 2a5deed..42196cd 100644
--- a/server/scripts/ispconfig_update.php
+++ b/server/scripts/ispconfig_update.php
@@ -88,7 +88,7 @@
 echo "\n\n>> Update  \n\n";
 echo "Please choose the update method. For production systems select 'stable'. \nWARNING: The update from GIT is only for development systems and may break your current setup. Do not use the GIT version on servers that host any live websites!\nNote: Update all slave server, before you update master server.\n\n";
 
-$method = simple_query('Select update method', array('stable', 'git'), 'stable');
+$method = simple_query('Select update method', array('stable', 'git-stable', 'git-master'), 'stable');
 
 if($method == 'stable') {
 	$new_version = @file_get_contents('http://www.ispconfig.org/downloads/ispconfig3_version.txt') or die('Unable to retrieve version file.');
@@ -99,6 +99,9 @@
 	} else {
 		echo "There are no updates available for ISPConfig ".ISPC_APP_VERSION."\n";
 	}
+} elseif ($method == 'git-stable') {
+	passthru('/usr/local/ispconfig/server/scripts/update_from_dev_stable.sh');
+	exit;
 } else {
 	passthru('/usr/local/ispconfig/server/scripts/update_from_dev.sh');
 	exit;
diff --git a/server/scripts/update_from_dev_stable.sh b/server/scripts/update_from_dev_stable.sh
new file mode 100644
index 0000000..1988189
--- /dev/null
+++ b/server/scripts/update_from_dev_stable.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+{
+    umask 0077 \
+    && tmpdir=`mktemp -dt "$(basename $0).XXXXXXXXXX"` \
+    && test -d "${tmpdir}" \
+    && cd "${tmpdir}"
+} || {
+    echo 'mktemp failed'
+    exit 1
+}
+
+wget -O ispconfig3-dev.tar.gz "http://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=stable-3.1"
+tar xzf ispconfig3-dev.tar.gz
+
+echo -n "Latest git version:  "
+ls -1d ispconfig3-master*
+cd ispconfig3-master*/install
+
+php -q \
+    -d disable_classes= \
+    -d disable_functions= \
+    -d open_basedir= \
+    update.php
+
+cd /tmp
+rm -rf "${tmpdir}"
+
+exit 0

--
Gitblit v1.9.1