From 9e6a611833d3b807f363817225f26152164c7be6 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Wed, 27 Feb 2019 10:03:22 +0100
Subject: [PATCH 001/441] WIP add CI test to install ispconfig in a clean
 container

---
 .gitlab-ci.yml                        | 16 ++++++++++++++++
 helper_scripts/test_install_docker.sh | 21 +++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100755 helper_scripts/test_install_docker.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 736fbc3083..a81b3b5aa6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,7 @@
 # Defines stages which are to be executed
 stages:
   - syntax
+  - test
 
 #
 ### Stage syntax
@@ -13,6 +14,7 @@ syntax:lint:
   only:
     - schedules
     - web
+    - merge_requests
 
   script:
     - composer require overtrue/phplint
@@ -20,3 +22,17 @@ syntax:lint:
     - echo "For more information http://www.icosaedro.it/phplint/"
     - vendor/bin/phplint
 
+
+test:install:
+  stage: test
+  image: jerob/docker-ispconfig
+  only:
+    - schedules
+    - web
+    - merge_requests
+  script:
+    - $CI_PROJECT_DIR/helper_scripts/test_install_docker.sh
+    - apt-get update
+    - apt-get --yes install curl
+    - curl --insecure https://127.0.0.1:8080/login/
+    - ps xaf
diff --git a/helper_scripts/test_install_docker.sh b/helper_scripts/test_install_docker.sh
new file mode 100755
index 0000000000..4de61c3895
--- /dev/null
+++ b/helper_scripts/test_install_docker.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# This script is used from .gitlab-ci.yml to do an automated installation inside a docker container for testing.
+
+if [ -f /usr/local/ispconfig/interface/lib/config.inc.php ]; then
+	echo "Found an existing configfile, bailing out!"
+  exit 1
+fi
+
+mysql_install_db
+service mysql start \
+&& echo "UPDATE mysql.user SET Password = PASSWORD('pass') WHERE User = 'root';" | mysql -u root \
+&& echo "UPDATE mysql.user SET plugin='mysql_native_password' where user='root';" | mysql -u root \
+&& echo "DELETE FROM mysql.user WHERE User='';" | mysql -u root \
+&& echo "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" | mysql -u root \
+&& echo "DROP DATABASE IF EXISTS test;" | mysql -u root \
+&& echo "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';" | mysql -u root \
+&& echo "FLUSH PRIVILEGES;" | mysql -u root
+sed -i "s/^hostname=server1.example.com$/hostname=$HOSTNAME/g" /root/ispconfig3_install/install/autoinstall.ini
+
+service mysql start && php -q $CI_PROJECT_DIR/install/install.php --autoinstall=/root/ispconfig3_install/install/autoinstall.ini
-- 
GitLab


From 21a4b5944f2f4695e7c30284958678b272937ff1 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Wed, 19 Apr 2017 11:08:34 +0000
Subject: [PATCH 002/441] Merge branch 'master' into 'master'

handle the server/plugins-enabled folder based on enabled/disbaled services



See merge request !582

(cherry picked from commit 3e83d19985b1124702cd6a06c8e7486ade99798b)

f22fd0ee handle the server/plugins-enabled folder based on enabled/disbaled services
---
 .../server_services_plugin.inc.php            | 155 ++++++++++++++++++
 1 file changed, 155 insertions(+)
 create mode 100644 server/plugins-available/server_services_plugin.inc.php

diff --git a/server/plugins-available/server_services_plugin.inc.php b/server/plugins-available/server_services_plugin.inc.php
new file mode 100644
index 0000000000..29710a7285
--- /dev/null
+++ b/server/plugins-available/server_services_plugin.inc.php
@@ -0,0 +1,155 @@
+<?php
+
+/*
+Copyright (c) 2017, Florian Schaal, schaal @it UG
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+// The purpose of this plugin is to handle the server/plugins-enabled folder
+
+class server_services_plugin {
+
+	var $plugin_name = 'server_services_plugin';
+	var $class_name = 'server_services_plugin';
+
+	var $services = array('mail_server', 'web_server', 'dns_server', 'db_server', 'vserver_server', 'xmpp_server');
+
+	var $mail_plugins = array('getmail_plugin', 'mail_plugin', 'mail_plugin_dkim', 'mailman_plugin', 'postfix_filter_plugin', 'postfix_server_plugin');
+	var $courier_plugins = array('maildrop_plugin');
+	var $dovecot_plugins = array('maildeliver_plugin');
+
+	var $web_plugins = array('aps_plugin', 'cron_plugin', 'cron_jailkit_plugin', 'ftpuser_base_plugin', 'shelluser_base_plugin', 'shelluser_jailkit_plugin', 'webserver_plugin');
+	var $apache_plugins = array('apache2_plugin');
+	var $nginx_plugins = array('nginx_plugin', 'nginx_reverseproxy_plugin');
+
+	var $bind_plugins = array('bind_dlz_plugin', 'bind_plugin');
+	var $powerdns_plugins = array('powerdns_plugin');
+
+	var $db_plugins = array('mysql_clientdb_plugin');
+
+	var $openvz_plugins = array('openvz_plugin');
+
+	var $xmpp_plugins = array('xmpp_plugin');
+
+	function onInstall() {
+
+		return true;
+
+	}
+
+	function onLoad() {
+		global $app;
+
+		$app->plugins->registerEvent('server_insert', 'server_services_plugin', 'insert');
+		$app->plugins->registerEvent('server_update', 'server_services_plugin', 'update');
+		$app->plugins->registerEvent('server_delete', 'server_services_delete', 'delete');
+
+	}
+
+	function insert($event_name, $data) {
+
+		$this->update($event_name, $data);
+
+	}
+
+	function delete($event_name, $data) {
+
+		$this->update($event_name, $data);
+
+	}
+
+	function update($event_name, $data) {
+		global $app, $conf;
+
+		$app->uses('getconf');
+		$old_services = array();
+		$new_services = array();
+		foreach($this->services as $service) {
+			$old_services[$service] = $data['old'][$service];
+			$new_services[$service] = $data['new'][$service];
+		}
+		$changed_services=array_diff_assoc($new_services,$old_services);
+		foreach($changed_services as $service => $value) {
+			switch($service) {
+				case 'mail_server':
+        			$config = $app->getconf->get_server_config($conf['server_id'], 'mail');
+					$plugins = @($config['pop3_imap_daemon'] == 'dovecot')?$this->dovecot_plugins:$this->courier_plugins;
+					$plugins = array_merge($plugins, $this->mail_plugins);
+					$this->change_state($plugins, $value, $config);
+				break;
+				case 'web_server':
+        			$config = $app->getconf->get_server_config($conf['server_id'], 'web');
+					$plugins = @($config['server_type'] == 'apache')?$this->apache_plugins:$this->nginx_plugins;
+					$plugins = array_merge($plugins, $this->web_plugins);
+					$this->change_state($plugins, $value, $config);
+				break;
+				case 'dns_server':
+        			$config = $app->getconf->get_server_config($conf['server_id'], 'dns');
+					$plugins = @(isset($config['bind_user']))?$this->bind_plugins:$this->powerdns_plugins;
+					$this->change_state($plugins, $value, $config);
+				break;
+				case 'db_server':
+					$this->change_state($this->db_plugins, $value, $config);
+				break;
+				case 'vserver_server':
+					$this->change_state($this->openvz_plugins, $value, $config);
+				break;
+				case 'xmpp_server':
+					$this->change_state($this->xmpp_plugins, $value, $config);
+				break;
+			}
+		}
+
+	}
+
+	function change_state($plugins, $value, $config) {
+
+		$enabled_dir = '/usr/local/ispconfig/server/plugins-enabled/';
+		$available_dir = '/usr/local/ispconfig/server/plugins-available/';
+
+		if($value == 0) { //* disable services
+			foreach($plugins as $plugin) {
+				if(is_link($enabled_dir.$plugin.'.inc.php')) {
+					unlink($enabled_dir.$plugin.'.inc.php');
+				}
+			}
+		} 
+		if ($value == 1) { //* enable services
+			foreach($plugins as $plugin) {
+				if(is_file($available_dir.$plugin.'.inc.php') && !is_link($enabled_dir.$plugin.'.inc.php')) {
+					symlink($available_dir.$plugin.'.inc.php', $enabled_dir.$plugin.'.inc.php');
+				}
+			}
+		}
+
+	}
+	
+} // end class
+
+
+
+?>
-- 
GitLab


From 039db24f9a900b4b2c0141bfd5eb6d665dc19ed6 Mon Sep 17 00:00:00 2001
From: Robert Breithuber <brt@fdread.org>
Date: Wed, 9 Sep 2020 17:59:52 +0200
Subject: [PATCH 003/441] makes the language configurable for each site, it
 reads the "Lang" parameter from awstats.DOMAIN.conf before it gets deleted
 and adds the parameter to the content before the new config file is written.
 the "-lang" parameter is removed from the awstats-command, so the global
 value for lang in awstats.conf.local or the value in awstats.DOMAIN.conf gets
 respected. Closes #3668

---
 server/lib/classes/cron.d/150-awstats.inc.php | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/server/lib/classes/cron.d/150-awstats.inc.php b/server/lib/classes/cron.d/150-awstats.inc.php
index 891919cb02..2edf0222f0 100644
--- a/server/lib/classes/cron.d/150-awstats.inc.php
+++ b/server/lib/classes/cron.d/150-awstats.inc.php
@@ -86,7 +86,14 @@ class cronjob_awstats extends cronjob {
 			$awstats_conf_dir = $web_config['awstats_conf_dir'];
 			$awstats_website_conf_file = $web_config['awstats_conf_dir'].'/awstats.'.$domain.'.conf';
 
-			if(is_file($awstats_website_conf_file)) unlink($awstats_website_conf_file);
+			$existing_awstats_conf_array = array();
+			if(is_file($awstats_website_conf_file)) {
+				$existing_awstats_conf = file($awstats_website_conf_file);
+				foreach ($existing_awstats_conf as $line) {
+					if(preg_match("/Lang=/",$line)) $existing_awstats_conf_array['Lang'] = implode('',parse_ini_string($line));
+				}
+				unlink($awstats_website_conf_file);
+			}
 
 			$sql = "SELECT domain FROM web_domain WHERE (type = 'alias' OR type = 'subdomain') AND parent_domain_id = ?";
 			$aliases = $app->db->queryAllRecords($sql, $rec['domain_id']);
@@ -108,6 +115,8 @@ class cronjob_awstats extends cronjob {
         LogFile="/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log"
         SiteDomain="'.$domain.'"
         HostAliases="www.'.$domain.' localhost 127.0.0.1'.$aliasdomain.'"';
+				if (array_key_exists('Lang',$existing_awstats_conf_array)) $awstats_conf_file_content .='
+		Lang="'.$existing_awstats_conf_array['Lang'].'"';
 				if (isset($include_file)) {
 					file_put_contents($awstats_website_conf_file, $awstats_conf_file_content);
 				} else {
@@ -134,7 +143,7 @@ class cronjob_awstats extends cronjob {
 				}
 			}
 
-			$command = escapeshellcmd($awstats_buildstaticpages_pl) . ' -month=' . escapeshellarg($awmonth) . ' -year=' . escapeshellarg($awyear) . ' -update -config=' . escapeshellarg($domain) . ' -lang=' . escapeshellarg($conf['language']) . ' -dir=' . escapeshellarg($statsdir) . ' -awstatsprog=' . escapeshellarg($awstats_pl);
+			$command = escapeshellcmd($awstats_buildstaticpages_pl) . ' -month=' . escapeshellarg($awmonth) . ' -year=' . escapeshellarg($awyear) . ' -update -config=' . escapeshellarg($domain) . ' -dir=' . escapeshellarg($statsdir) . ' -awstatsprog=' . escapeshellarg($awstats_pl) . '";
 
 			if (date("d") == 2) {
 				$awmonth = date("m")-1;
-- 
GitLab


From 102a8bfcd55cf2b663e257bcd9a29d6516ba32ae Mon Sep 17 00:00:00 2001
From: Robert Breithuber <brt@fdread.org>
Date: Wed, 9 Sep 2020 21:04:42 +0200
Subject: [PATCH 004/441] Update 150-awstats.inc.php

---
 server/lib/classes/cron.d/150-awstats.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/classes/cron.d/150-awstats.inc.php b/server/lib/classes/cron.d/150-awstats.inc.php
index 2edf0222f0..cd981baf8a 100644
--- a/server/lib/classes/cron.d/150-awstats.inc.php
+++ b/server/lib/classes/cron.d/150-awstats.inc.php
@@ -143,7 +143,7 @@ class cronjob_awstats extends cronjob {
 				}
 			}
 
-			$command = escapeshellcmd($awstats_buildstaticpages_pl) . ' -month=' . escapeshellarg($awmonth) . ' -year=' . escapeshellarg($awyear) . ' -update -config=' . escapeshellarg($domain) . ' -dir=' . escapeshellarg($statsdir) . ' -awstatsprog=' . escapeshellarg($awstats_pl) . '";
+			$command = escapeshellcmd($awstats_buildstaticpages_pl) . ' -month=' . escapeshellarg($awmonth) . ' -year=' . escapeshellarg($awyear) . ' -update -config=' . escapeshellarg($domain) . ' -dir=' . escapeshellarg($statsdir) . ' -awstatsprog=' . escapeshellarg($awstats_pl);
 
 			if (date("d") == 2) {
 				$awmonth = date("m")-1;
-- 
GitLab


From 682be6d148814787c393ec40e3f504fc3b1f3ebf Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Fri, 11 Sep 2020 08:16:29 +0200
Subject: [PATCH 005/441] update caa-check

---
 server/lib/classes/letsencrypt.inc.php | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php
index fb67e7c00d..77be94c105 100644
--- a/server/lib/classes/letsencrypt.inc.php
+++ b/server/lib/classes/letsencrypt.inc.php
@@ -373,6 +373,17 @@ class letsencrypt {
 			if((isset($web_config['skip_le_check']) && $web_config['skip_le_check'] == 'y') || (isset($server_config['migration_mode']) && $server_config['migration_mode'] == 'y')) {
 				$le_domains[] = $temp_domain;
 			} else {
+				$le_hash_check = trim(@file_get_contents('http://' . $temp_domain . '/.well-known/acme-challenge/' . $le_rnd_file));
+				if($le_hash_check == $le_rnd_hash) {
+					$le_domains[] = $temp_domain;
+					$app->log("Verified domain " . $temp_domain . " should be reachable for letsencrypt.", LOGLEVEL_DEBUG);
+				} else {
+					$app->log("Could not verify domain " . $temp_domain . ", so excluding it from letsencrypt request.", LOGLEVEL_WARN);
+				}
+			}
+		}
+		if(!empty($le_domains)) {
+			foreach($le_domains as $idx=>$temp_domain) {
 				//check caa-record
 				$caa_check = false;
 				$caa_domain = $temp_domain;
@@ -393,20 +404,13 @@ class letsencrypt {
 					$caa_check = true;
 				}
 
-				if($caa_check === true) {
-					$le_hash_check = trim(@file_get_contents('http://' . $temp_domain . '/.well-known/acme-challenge/' . $le_rnd_file));
-					if($le_hash_check == $le_rnd_hash) {
-						$le_domains[] = $temp_domain;
-						$app->log("Verified domain " . $temp_domain . " should be reachable for letsencrypt.", LOGLEVEL_DEBUG);
-					} else {
-						$app->log("Could not verify domain " . $temp_domain . ", so excluding it from letsencrypt request.", LOGLEVEL_WARN);
-					}
-				} else {
+				if($caa_check === false) {
 					$app->log("Incomplete CAA-Records for " . $temp_domain . ", so excluding it from letsencrypt request.", LOGLEVEL_WARN);
+					unset($le_domains[$idx]);
 				}
-
 			}
 		}
+
 		$temp_domains = $le_domains;
 		unset($le_domains);
 		@unlink('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file);
-- 
GitLab


From f1e4b77e7a73f56841c4f4b985214b7764507c12 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Fri, 2 Oct 2020 11:44:41 +0200
Subject: [PATCH 006/441] Purge Apps & Addons (#5795)

---
 install/lib/installer_base.lib.php            |   3 -
 .../sql/incremental/upd_dev_collection.sql    |   6 +-
 install/sql/ispconfig3.sql                    |  90 ------
 install/tpl/config.inc.php.master             |  12 +-
 install/tpl/security_settings.ini.master      |   3 -
 interface/lib/config.inc.php                  |   4 -
 .../web/admin/form/software_package.tform.php | 128 --------
 .../web/admin/form/software_repo.tform.php    | 171 ----------
 .../admin/lib/lang/ar_software_package.lng    |   6 -
 .../lib/lang/ar_software_package_install.lng  |   6 -
 .../lib/lang/ar_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/ar_software_repo.lng   |   8 -
 .../admin/lib/lang/ar_software_repo_list.lng  |   6 -
 .../lib/lang/ar_software_update_list.lng      |   9 -
 .../admin/lib/lang/bg_software_package.lng    |   6 -
 .../lib/lang/bg_software_package_install.lng  |   6 -
 .../lib/lang/bg_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/bg_software_repo.lng   |   8 -
 .../admin/lib/lang/bg_software_repo_list.lng  |   6 -
 .../lib/lang/bg_software_update_list.lng      |   9 -
 .../admin/lib/lang/br_software_package.lng    |   6 -
 .../lib/lang/br_software_package_install.lng  |   6 -
 .../lib/lang/br_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/br_software_repo.lng   |   8 -
 .../admin/lib/lang/br_software_repo_list.lng  |   6 -
 .../lib/lang/br_software_update_list.lng      |   9 -
 .../admin/lib/lang/ca_software_package.lng    |   6 -
 .../lib/lang/ca_software_package_install.lng  |   6 -
 .../lib/lang/ca_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/ca_software_repo.lng   |   8 -
 .../admin/lib/lang/ca_software_repo_list.lng  |   6 -
 .../lib/lang/ca_software_update_list.lng      |   9 -
 .../admin/lib/lang/cz_software_package.lng    |   6 -
 .../lib/lang/cz_software_package_install.lng  |   6 -
 .../lib/lang/cz_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/cz_software_repo.lng   |   8 -
 .../admin/lib/lang/cz_software_repo_list.lng  |   6 -
 .../lib/lang/cz_software_update_list.lng      |   9 -
 .../admin/lib/lang/de_software_package.lng    |   6 -
 .../lib/lang/de_software_package_install.lng  |   6 -
 .../lib/lang/de_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/de_software_repo.lng   |   8 -
 .../admin/lib/lang/de_software_repo_list.lng  |   6 -
 .../lib/lang/de_software_update_list.lng      |   9 -
 .../admin/lib/lang/dk_software_package.lng    |   6 -
 .../lib/lang/dk_software_package_install.lng  |   6 -
 .../lib/lang/dk_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/dk_software_repo.lng   |   8 -
 .../admin/lib/lang/dk_software_repo_list.lng  |   6 -
 .../lib/lang/dk_software_update_list.lng      |   9 -
 .../admin/lib/lang/el_software_package.lng    |   6 -
 .../lib/lang/el_software_package_install.lng  |   6 -
 .../lib/lang/el_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/el_software_repo.lng   |   8 -
 .../admin/lib/lang/el_software_repo_list.lng  |   6 -
 .../lib/lang/el_software_update_list.lng      |   9 -
 .../admin/lib/lang/en_software_package.lng    |   6 -
 .../lib/lang/en_software_package_install.lng  |   6 -
 .../lib/lang/en_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/en_software_repo.lng   |   8 -
 .../admin/lib/lang/en_software_repo_list.lng  |   6 -
 .../lib/lang/en_software_update_list.lng      |   9 -
 .../admin/lib/lang/es_software_package.lng    |   6 -
 .../lib/lang/es_software_package_install.lng  |   6 -
 .../lib/lang/es_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/es_software_repo.lng   |   8 -
 .../admin/lib/lang/es_software_repo_list.lng  |   6 -
 .../lib/lang/es_software_update_list.lng      |   9 -
 .../admin/lib/lang/fi_software_package.lng    |   6 -
 .../lib/lang/fi_software_package_install.lng  |   6 -
 .../lib/lang/fi_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/fi_software_repo.lng   |   8 -
 .../admin/lib/lang/fi_software_repo_list.lng  |   6 -
 .../lib/lang/fi_software_update_list.lng      |   9 -
 .../admin/lib/lang/fr_software_package.lng    |   6 -
 .../lib/lang/fr_software_package_install.lng  |   6 -
 .../lib/lang/fr_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/fr_software_repo.lng   |   8 -
 .../admin/lib/lang/fr_software_repo_list.lng  |   6 -
 .../lib/lang/fr_software_update_list.lng      |   9 -
 .../admin/lib/lang/hr_software_package.lng    |   6 -
 .../lib/lang/hr_software_package_install.lng  |   6 -
 .../lib/lang/hr_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/hr_software_repo.lng   |   8 -
 .../admin/lib/lang/hr_software_repo_list.lng  |   6 -
 .../lib/lang/hr_software_update_list.lng      |   9 -
 .../admin/lib/lang/hu_software_package.lng    |   6 -
 .../lib/lang/hu_software_package_install.lng  |   6 -
 .../lib/lang/hu_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/hu_software_repo.lng   |   8 -
 .../admin/lib/lang/hu_software_repo_list.lng  |   6 -
 .../lib/lang/hu_software_update_list.lng      |   9 -
 .../admin/lib/lang/id_software_package.lng    |   6 -
 .../lib/lang/id_software_package_install.lng  |   6 -
 .../lib/lang/id_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/id_software_repo.lng   |   8 -
 .../admin/lib/lang/id_software_repo_list.lng  |   6 -
 .../lib/lang/id_software_update_list.lng      |   9 -
 .../admin/lib/lang/it_software_package.lng    |   6 -
 .../lib/lang/it_software_package_install.lng  |   6 -
 .../lib/lang/it_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/it_software_repo.lng   |   8 -
 .../admin/lib/lang/it_software_repo_list.lng  |   6 -
 .../lib/lang/it_software_update_list.lng      |   9 -
 .../admin/lib/lang/ja_software_package.lng    |   6 -
 .../lib/lang/ja_software_package_install.lng  |   6 -
 .../lib/lang/ja_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/ja_software_repo.lng   |   8 -
 .../admin/lib/lang/ja_software_repo_list.lng  |   6 -
 .../lib/lang/ja_software_update_list.lng      |   9 -
 .../admin/lib/lang/nl_software_package.lng    |   6 -
 .../lib/lang/nl_software_package_install.lng  |   6 -
 .../lib/lang/nl_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/nl_software_repo.lng   |   8 -
 .../admin/lib/lang/nl_software_repo_list.lng  |   6 -
 .../lib/lang/nl_software_update_list.lng      |   9 -
 .../admin/lib/lang/pl_software_package.lng    |   6 -
 .../lib/lang/pl_software_package_install.lng  |   6 -
 .../lib/lang/pl_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/pl_software_repo.lng   |   8 -
 .../admin/lib/lang/pl_software_repo_list.lng  |   6 -
 .../lib/lang/pl_software_update_list.lng      |   9 -
 .../admin/lib/lang/pt_software_package.lng    |   6 -
 .../lib/lang/pt_software_package_install.lng  |   6 -
 .../lib/lang/pt_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/pt_software_repo.lng   |   8 -
 .../admin/lib/lang/pt_software_repo_list.lng  |   6 -
 .../lib/lang/pt_software_update_list.lng      |   9 -
 .../admin/lib/lang/ro_software_package.lng    |   6 -
 .../lib/lang/ro_software_package_install.lng  |   6 -
 .../lib/lang/ro_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/ro_software_repo.lng   |   8 -
 .../admin/lib/lang/ro_software_repo_list.lng  |   6 -
 .../lib/lang/ro_software_update_list.lng      |   9 -
 .../admin/lib/lang/ru_software_package.lng    |   6 -
 .../lib/lang/ru_software_package_install.lng  |   6 -
 .../lib/lang/ru_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/ru_software_repo.lng   |   8 -
 .../admin/lib/lang/ru_software_repo_list.lng  |   6 -
 .../lib/lang/ru_software_update_list.lng      |   9 -
 .../admin/lib/lang/se_software_package.lng    |   6 -
 .../lib/lang/se_software_package_install.lng  |   6 -
 .../lib/lang/se_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/se_software_repo.lng   |   8 -
 .../admin/lib/lang/se_software_repo_list.lng  |   6 -
 .../lib/lang/se_software_update_list.lng      |   9 -
 .../admin/lib/lang/sk_software_package.lng    |   6 -
 .../lib/lang/sk_software_package_install.lng  |   6 -
 .../lib/lang/sk_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/sk_software_repo.lng   |   8 -
 .../admin/lib/lang/sk_software_repo_list.lng  |   6 -
 .../lib/lang/sk_software_update_list.lng      |   9 -
 .../admin/lib/lang/tr_software_package.lng    |   6 -
 .../lib/lang/tr_software_package_install.lng  |   6 -
 .../lib/lang/tr_software_package_list.lng     |  13 -
 .../web/admin/lib/lang/tr_software_repo.lng   |   8 -
 .../admin/lib/lang/tr_software_repo_list.lng  |   6 -
 .../lib/lang/tr_software_update_list.lng      |   9 -
 interface/web/admin/lib/module.conf.php       |  24 --
 .../web/admin/list/software_repo.list.php     |  78 -----
 interface/web/admin/software_package_del.php  |  57 ----
 interface/web/admin/software_package_edit.php |  60 ----
 .../web/admin/software_package_install.php    | 179 -----------
 interface/web/admin/software_package_list.php | 200 ------------
 interface/web/admin/software_repo_del.php     |  53 ---
 interface/web/admin/software_repo_edit.php    |  60 ----
 interface/web/admin/software_repo_list.php    |  52 ---
 interface/web/admin/software_update_list.php  | 204 ------------
 .../admin/templates/software_package_edit.htm |  22 --
 .../templates/software_package_install.htm    |  31 --
 .../admin/templates/software_package_list.htm |  55 ----
 .../admin/templates/software_repo_edit.htm    |  26 --
 .../admin/templates/software_repo_list.htm    |  58 ----
 .../admin/templates/software_update_list.htm  |  53 ---
 security/README.txt                           |  22 +-
 server/mods-available/server_module.inc.php   |  11 +-
 .../software_update_plugin.inc.php            | 303 ------------------
 177 files changed, 16 insertions(+), 3149 deletions(-)
 delete mode 100644 interface/web/admin/form/software_package.tform.php
 delete mode 100644 interface/web/admin/form/software_repo.tform.php
 delete mode 100644 interface/web/admin/lib/lang/ar_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/ar_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/ar_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ar_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/ar_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ar_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/bg_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/bg_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/bg_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/bg_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/bg_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/bg_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/br_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/br_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/br_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/br_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/br_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/br_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ca_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/ca_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/ca_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ca_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/ca_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ca_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/cz_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/cz_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/cz_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/cz_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/cz_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/cz_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/de_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/de_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/de_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/de_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/de_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/de_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/dk_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/dk_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/dk_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/dk_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/dk_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/dk_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/el_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/el_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/el_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/el_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/el_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/el_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/en_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/en_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/en_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/en_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/en_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/en_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/es_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/es_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/es_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/es_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/es_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/es_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/fi_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/fi_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/fi_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/fi_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/fi_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/fi_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/fr_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/fr_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/fr_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/fr_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/fr_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/fr_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/hr_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/hr_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/hr_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/hr_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/hr_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/hr_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/hu_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/hu_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/hu_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/hu_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/hu_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/hu_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/id_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/id_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/id_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/id_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/id_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/id_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/it_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/it_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/it_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/it_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/it_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/it_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ja_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/ja_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/ja_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ja_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/ja_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ja_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/nl_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/nl_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/nl_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/nl_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/nl_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/nl_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/pl_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/pl_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/pl_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/pl_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/pl_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/pl_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/pt_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/pt_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/pt_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/pt_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/pt_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/pt_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ro_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/ro_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/ro_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ro_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/ro_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ro_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ru_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/ru_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/ru_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ru_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/ru_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/ru_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/se_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/se_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/se_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/se_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/se_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/se_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/sk_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/sk_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/sk_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/sk_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/sk_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/sk_software_update_list.lng
 delete mode 100644 interface/web/admin/lib/lang/tr_software_package.lng
 delete mode 100644 interface/web/admin/lib/lang/tr_software_package_install.lng
 delete mode 100644 interface/web/admin/lib/lang/tr_software_package_list.lng
 delete mode 100644 interface/web/admin/lib/lang/tr_software_repo.lng
 delete mode 100644 interface/web/admin/lib/lang/tr_software_repo_list.lng
 delete mode 100644 interface/web/admin/lib/lang/tr_software_update_list.lng
 delete mode 100644 interface/web/admin/list/software_repo.list.php
 delete mode 100644 interface/web/admin/software_package_del.php
 delete mode 100644 interface/web/admin/software_package_edit.php
 delete mode 100644 interface/web/admin/software_package_install.php
 delete mode 100644 interface/web/admin/software_package_list.php
 delete mode 100644 interface/web/admin/software_repo_del.php
 delete mode 100644 interface/web/admin/software_repo_edit.php
 delete mode 100644 interface/web/admin/software_repo_list.php
 delete mode 100644 interface/web/admin/software_update_list.php
 delete mode 100644 interface/web/admin/templates/software_package_edit.htm
 delete mode 100644 interface/web/admin/templates/software_package_install.htm
 delete mode 100644 interface/web/admin/templates/software_package_list.htm
 delete mode 100644 interface/web/admin/templates/software_repo_edit.htm
 delete mode 100644 interface/web/admin/templates/software_repo_list.htm
 delete mode 100644 interface/web/admin/templates/software_update_list.htm
 delete mode 100644 server/plugins-available/software_update_plugin.inc.php

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index c82fd16537..ff6110c1e8 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -646,9 +646,6 @@ class installer_base {
 				if ($verbose){
 					echo $query ."\n";
 				}
-				if(!$this->dbmaster->query($query, $value['db'] . '.software_update_inst', $value['user'], $host)) {
-					$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
-				}
 
 				$query = "GRANT SELECT, UPDATE(`updated`) ON ?? TO ?@?";
 				if ($verbose){
diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 8b13789179..89585deb9c 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1 +1,5 @@
-
+-- Purge apps & addons installer (#5795)
+DROP TABLE 'software_package';
+DROP TABLE 'software_repo';
+DROP TABLE 'software_update';
+DROP TABLE 'software_update_inst';
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 67f0f3bdcb..3ef6388e9c 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -1461,88 +1461,6 @@ CREATE TABLE `shell_user` (
 
 -- --------------------------------------------------------
 
---
--- Table structure for table  `software_package`
---
-
-CREATE TABLE `software_package` (
-  `package_id` int(11) unsigned NOT NULL auto_increment,
-  `software_repo_id` int(11) unsigned NOT NULL DEFAULT '0',
-  `package_name` varchar(64) NOT NULL DEFAULT '',
-  `package_title` varchar(64) NOT NULL DEFAULT '',
-  `package_description` text,
-  `package_version` varchar(8) default NULL,
-  `package_type` enum('ispconfig','app','web') NOT NULL default 'app',
-  `package_installable` enum('yes','no','key') NOT NULL default 'yes',
-  `package_requires_db` enum('no','mysql') NOT NULL default 'no',
-  `package_remote_functions` text,
-  `package_key` varchar(255) NOT NULL DEFAULT '',
-  `package_config` text,
-  PRIMARY KEY  (`package_id`),
-  UNIQUE KEY `package_name` (`package_name`)
-) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table  `software_repo`
---
-
-CREATE TABLE `software_repo` (
-  `software_repo_id` int(11) unsigned NOT NULL auto_increment,
-  `sys_userid` int(11) unsigned NOT NULL default '0',
-  `sys_groupid` int(11) unsigned NOT NULL default '0',
-  `sys_perm_user` varchar(5) default NULL,
-  `sys_perm_group` varchar(5) default NULL,
-  `sys_perm_other` varchar(5) default NULL,
-  `repo_name` varchar(64) default NULL,
-  `repo_url` varchar(255) default NULL,
-  `repo_username` varchar(64) default NULL,
-  `repo_password` varchar(64) default NULL,
-  `active` enum('n','y') NOT NULL default 'y',
-  PRIMARY KEY  (`software_repo_id`)
-) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table  `software_update`
---
-
-CREATE TABLE `software_update` (
-  `software_update_id` int(11) unsigned NOT NULL auto_increment,
-  `software_repo_id` int(11) unsigned NOT NULL DEFAULT '0',
-  `package_name` varchar(64) NOT NULL DEFAULT '',
-  `update_url` varchar(255) NOT NULL DEFAULT '',
-  `update_md5` varchar(255) NOT NULL DEFAULT '',
-  `update_dependencies` varchar(255) NOT NULL DEFAULT '',
-  `update_title` varchar(64) NOT NULL DEFAULT '',
-  `v1` tinyint(1) NOT NULL default '0',
-  `v2` tinyint(1) NOT NULL default '0',
-  `v3` tinyint(1) NOT NULL default '0',
-  `v4` tinyint(1) NOT NULL default '0',
-  `type` enum('full','update') NOT NULL default 'full',
-  PRIMARY KEY  (`software_update_id`)
-) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table  `software_update_inst`
---
-
-CREATE TABLE `software_update_inst` (
-  `software_update_inst_id` int(11) unsigned NOT NULL auto_increment,
-  `software_update_id` int(11) unsigned NOT NULL default '0',
-  `package_name` varchar(64) NOT NULL DEFAULT '',
-  `server_id` int(11) unsigned NOT NULL DEFAULT '0',
-  `status` enum('none','installing','installed','deleting','deleted','failed') NOT NULL default 'none',
-  PRIMARY KEY  (`software_update_inst_id`),
-  UNIQUE KEY `software_update_id` (`software_update_id`,`package_name`,`server_id`)
-) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
 --
 -- Table structure for table  `spamfilter_policy`
 --
@@ -2528,14 +2446,6 @@ INSERT INTO `help_faq_sections` VALUES (1,'General',0,NULL,NULL,NULL,NULL,NULL);
 
 -- --------------------------------------------------------
 
---
--- Dumping data for table `software_repo`
---
-
-INSERT INTO `software_repo` (`software_repo_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `repo_name`, `repo_url`, `repo_username`, `repo_password`, `active`) VALUES (1, 1, 1, 'riud', 'riud', '', 'ISPConfig Addons', 'http://repo.ispconfig.org/addons/', '', '', 'n');
-
--- --------------------------------------------------------
-
 --
 -- Dumping data for table `spamfilter_policy`
 --
diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master
index 946a3ee505..bd5cc8f47f 100644
--- a/install/tpl/config.inc.php.master
+++ b/install/tpl/config.inc.php.master
@@ -33,11 +33,11 @@ if( !empty($_SERVER['DOCUMENT_ROOT']) ) {
 	Header("Pragma: no-cache");
 	Header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
 	Header("Content-Type: text/html; charset=utf-8");
-	
+
 	//** Set a few php.ini values
 	ini_set('register_globals',0);
 	ini_set('magic_quotes_gpc', 0);
-	
+
 	if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS']) || isset($_REQUEST['s']) || isset($_REQUEST['s_old']) || isset($_REQUEST['conf'])) {
 		die('Internal Error: var override attempt detected');
 		exit;
@@ -127,8 +127,8 @@ $conf['init_scripts'] = '/etc/init.d';
 $conf['interface_modules_enabled'] = 'dashboard,mail,sites,dns,tools,help';
 
 //** Demo mode
-/* The demo mode is an option to restrict certain actions in the interface like 
-*  changing the password of users with sys_userid < 3 etc. to be 
+/* The demo mode is an option to restrict certain actions in the interface like
+*  changing the password of users with sys_userid < 3 etc. to be
 *  able to run the ISPConfig interface as online demo. It does not
 *  affect the server part. The demo mode should be always set to false
 *  on every normal installation
@@ -141,10 +141,6 @@ $conf['log_file'] = $conf['ispconfig_log_dir'].$conf['fs_div'].'ispconfig.log';
 $conf['log_priority'] = {ispconfig_log_priority}; // 0 = Debug, 1 = Warning, 2 = Error
 
 
-//** Allow software package installations
-$conf['software_updates_enabled'] = false;
-
-
 //** Themes
 $conf['theme'] = '{theme}';
 $conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ...
diff --git a/install/tpl/security_settings.ini.master b/install/tpl/security_settings.ini.master
index c135652e17..02b1058074 100644
--- a/install/tpl/security_settings.ini.master
+++ b/install/tpl/security_settings.ini.master
@@ -12,8 +12,6 @@ admin_allow_del_cpuser=superadmin
 admin_allow_cpuser_group=superadmin
 admin_allow_firewall_config=superadmin
 admin_allow_osupdate=superadmin
-admin_allow_software_packages=superadmin
-admin_allow_software_repo=superadmin
 remote_api_allowed=yes
 password_reset_allowed=yes
 session_regenerate_id=yes
@@ -44,4 +42,3 @@ warn_new_admin=yes
 warn_passwd_change=no
 warn_shadow_change=no
 warn_group_change=no
-
diff --git a/interface/lib/config.inc.php b/interface/lib/config.inc.php
index ccda3717e1..c5d14d79cd 100644
--- a/interface/lib/config.inc.php
+++ b/interface/lib/config.inc.php
@@ -128,10 +128,6 @@ $conf['log_file'] = $conf['ispconfig_log_dir'].'/ispconfig.log';
 $conf['log_priority'] = 0; // 0 = Debug, 1 = Warning, 2 = Error
 
 
-//** Allow software package installations
-$conf['software_updates_enabled'] = false;
-
-
 //** Themes
 $conf['theme'] = 'default';
 $conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ...
diff --git a/interface/web/admin/form/software_package.tform.php b/interface/web/admin/form/software_package.tform.php
deleted file mode 100644
index b8368d5457..0000000000
--- a/interface/web/admin/form/software_package.tform.php
+++ /dev/null
@@ -1,128 +0,0 @@
-<?php
-
-/*
-Copyright (c) 2008, Till Brehm, projektfarm Gmbh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-	Form Definition
-
-	Tabellendefinition
-
-	Datentypen:
-	- INTEGER (Wandelt Ausdrücke in Int um)
-	- DOUBLE
-	- CURRENCY (Formatiert Zahlen nach Währungsnotation)
-	- VARCHAR (kein weiterer Format Check)
-	- TEXT (kein weiterer Format Check)
-	- DATE (Datumsformat, Timestamp Umwandlung)
-
-	Formtype:
-	- TEXT (normales Textfeld)
-	- TEXTAREA (normales Textfeld)
-	- PASSWORD (Feldinhalt wird nicht angezeigt)
-	- SELECT (Gibt Werte als option Feld aus)
-	- RADIO
-	- CHECKBOX
-	- FILE
-
-	VALUE:
-	- Wert oder Array
-
-	Hinweis:
-	Das ID-Feld ist nicht bei den Table Values einzufügen.
-
-
-*/
-
-$form["title"]    = "Software Package";
-$form["description"]  = "Modify software package details";
-$form["name"]    = "software_package";
-$form["action"]   = "software_package_edit.php";
-$form["db_table"]  = "software_package";
-$form["db_table_idx"] = "package_id";
-$form["db_history"]  = "no";
-$form["tab_default"] = "software_package";
-$form["list_default"] = "software_package_list.php";
-$form["auth"]   = 'yes';
-
-$form["auth_preset"]["userid"]  = 0; // 0 = id of the user, > 0 id must match with id of current user
-$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
-$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
-$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
-$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
-
-$form["tabs"]['software_package'] = array (
-	'title'  => "Software Package",
-	'width'  => 80,
-	'template'  => "templates/software_package_edit.htm",
-	'fields'  => array (
-		//#################################
-		// Beginn Datenbankfelder
-		//#################################
-		'package_title' => array (
-			'datatype' => 'VARCHAR',
-			'formtype' => 'TEXT',
-			'filters'   => array(
-					0 => array( 'event' => 'SAVE',
-					'type' => 'STRIPTAGS'),
-					1 => array( 'event' => 'SAVE',
-					'type' => 'STRIPNL')
-			),
-			'validators' => '',
-			'default' => '',
-			'value'  => '',
-			'separator' => '',
-			'width'  => '40',
-			'maxlength' => '40',
-			'rows'  => '',
-			'cols'  => ''
-		),
-		'package_key' => array (
-			'datatype' => 'VARCHAR',
-			'formtype' => 'TEXT',
-			'filters'   => array(
-					0 => array( 'event' => 'SAVE',
-					'type' => 'STRIPTAGS'),
-					1 => array( 'event' => 'SAVE',
-					'type' => 'STRIPNL')
-			),
-			'validators' => '',
-			'default' => '',
-			'value'  => '',
-			'separator' => '',
-			'width'  => '40',
-			'maxlength' => '40',
-			'rows'  => '',
-			'cols'  => ''
-		),
-		//#################################
-		// ENDE Datenbankfelder
-		//#################################
-	)
-);
-?>
diff --git a/interface/web/admin/form/software_repo.tform.php b/interface/web/admin/form/software_repo.tform.php
deleted file mode 100644
index cbf68b3a35..0000000000
--- a/interface/web/admin/form/software_repo.tform.php
+++ /dev/null
@@ -1,171 +0,0 @@
-<?php
-
-/*
-Copyright (c) 2008, Till Brehm, projektfarm Gmbh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-	Form Definition
-
-	Tabellendefinition
-
-	Datentypen:
-	- INTEGER (Wandelt Ausdrücke in Int um)
-	- DOUBLE
-	- CURRENCY (Formatiert Zahlen nach Währungsnotation)
-	- VARCHAR (kein weiterer Format Check)
-	- TEXT (kein weiterer Format Check)
-	- DATE (Datumsformat, Timestamp Umwandlung)
-
-	Formtype:
-	- TEXT (normales Textfeld)
-	- TEXTAREA (normales Textfeld)
-	- PASSWORD (Feldinhalt wird nicht angezeigt)
-	- SELECT (Gibt Werte als option Feld aus)
-	- RADIO
-	- CHECKBOX
-	- FILE
-
-	VALUE:
-	- Wert oder Array
-
-	Hinweis:
-	Das ID-Feld ist nicht bei den Table Values einzufügen.
-
-
-*/
-
-$form["title"]    = "Software Repository";
-$form["description"]  = "Software Repository which may contain addons or updates";
-$form["name"]    = "software_repo";
-$form["action"]   = "software_repo_edit.php";
-$form["db_table"]  = "software_repo";
-$form["db_table_idx"] = "software_repo_id";
-$form["db_history"]  = "no";
-$form["tab_default"] = "software_repo";
-$form["list_default"] = "software_repo_list.php";
-$form["auth"]   = 'yes';
-
-$form["auth_preset"]["userid"]  = 0; // 0 = id of the user, > 0 id must match with id of current user
-$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
-$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
-$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
-$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
-
-$form["tabs"]['software_repo'] = array (
-	'title'  => "Repository",
-	'width'  => 80,
-	'template'  => "templates/software_repo_edit.htm",
-	'fields'  => array (
-		//#################################
-		// Beginn Datenbankfelder
-		//#################################
-		'repo_name' => array (
-			'datatype' => 'VARCHAR',
-			'formtype' => 'TEXT',
-			'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
-					'errmsg'=> 'repo_name_empty'),
-				1 => array ( 'type' => 'UNIQUE',
-					'errmsg'=> 'repo_name_unique'),
-			),
-			'filters'   => array(
-					0 => array( 'event' => 'SAVE',
-					'type' => 'STRIPTAGS'),
-					1 => array( 'event' => 'SAVE',
-					'type' => 'STRIPNL')
-			),
-			'default' => '',
-			'value'  => '',
-			'separator' => '',
-			'width'  => '40',
-			'maxlength' => '40',
-			'rows'  => '',
-			'cols'  => ''
-		),
-		'repo_url' => array (
-			'datatype' => 'VARCHAR',
-			'formtype' => 'TEXT',
-			'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
-					'errmsg'=> 'repo_name_empty'),
-				1 => array ( 'type' => 'UNIQUE',
-					'errmsg'=> 'repo_name_unique'),
-			),
-			'filters'   => array(
-					0 => array( 'event' => 'SAVE',
-					'type' => 'STRIPTAGS'),
-					1 => array( 'event' => 'SAVE',
-					'type' => 'STRIPNL')
-			),
-			'default' => '',
-			'value'  => '',
-			'separator' => '',
-			'width'  => '40',
-			'maxlength' => '40',
-			'rows'  => '',
-			'cols'  => ''
-		),
-		'repo_username' => array (
-			'datatype' => 'VARCHAR',
-			'formtype' => 'TEXT',
-			'filters'   => array(
-					0 => array( 'event' => 'SAVE',
-					'type' => 'STRIPTAGS'),
-					1 => array( 'event' => 'SAVE',
-					'type' => 'STRIPNL')
-			),
-			'default' => '',
-			'value'  => '',
-			'separator' => '',
-			'width'  => '30',
-			'maxlength' => '30',
-			'rows'  => '',
-			'cols'  => ''
-		),
-		'repo_password' => array (
-			'datatype' => 'VARCHAR',
-			'formtype' => 'PASSWORD',
-			'encryption' => 'CLEARTEXT',
-			'default' => '',
-			'value'  => '',
-			'separator' => '',
-			'width'  => '30',
-			'maxlength' => '30',
-			'rows'  => '',
-			'cols'  => ''
-		),
-		'active' => array (
-			'datatype' => 'VARCHAR',
-			'formtype' => 'CHECKBOX',
-			'default' => 'y',
-			'value'  => array(0 => 'n', 1 => 'y')
-		),
-		//#################################
-		// ENDE Datenbankfelder
-		//#################################
-	)
-);
-?>
diff --git a/interface/web/admin/lib/lang/ar_software_package.lng b/interface/web/admin/lib/lang/ar_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/ar_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/ar_software_package_install.lng b/interface/web/admin/lib/lang/ar_software_package_install.lng
deleted file mode 100644
index 5c8b756434..0000000000
--- a/interface/web/admin/lib/lang/ar_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Install software package';
-$wb['install_key_txt'] = 'Enter install key';
-$wb['btn_save_txt'] = 'Start Installation';
-$wb['btn_cancel_txt'] = 'Cancel';
-?>
diff --git a/interface/web/admin/lib/lang/ar_software_package_list.lng b/interface/web/admin/lib/lang/ar_software_package_list.lng
deleted file mode 100644
index 9fa53867bc..0000000000
--- a/interface/web/admin/lib/lang/ar_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Software packages';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Package';
-$wb['package_description_txt'] = 'Description';
-$wb['action_txt'] = 'Action';
-$wb['toolsarea_head_txt'] = 'Packages';
-$wb['repoupdate_txt'] = 'Update package list';
-$wb['package_id_txt'] = 'local App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/ar_software_repo.lng b/interface/web/admin/lib/lang/ar_software_repo.lng
deleted file mode 100644
index f2cbbb2c25..0000000000
--- a/interface/web/admin/lib/lang/ar_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'User (optional)';
-$wb['repo_password_txt'] = 'Password (optional)';
-$wb['active_txt'] = 'Active';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/ar_software_repo_list.lng b/interface/web/admin/lib/lang/ar_software_repo_list.lng
deleted file mode 100644
index b7a219ffa8..0000000000
--- a/interface/web/admin/lib/lang/ar_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repository';
-$wb['active_txt'] = 'Active';
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/ar_software_update_list.lng b/interface/web/admin/lib/lang/ar_software_update_list.lng
deleted file mode 100644
index fe7639125c..0000000000
--- a/interface/web/admin/lib/lang/ar_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Software updates';
-$wb['server_select_txt'] = 'Select server';
-$wb['installed_txt'] = 'Action';
-$wb['update_title_txt'] = 'Update';
-$wb['version_txt'] = 'Version';
-$wb['action_txt'] = 'Action';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/bg_software_package.lng b/interface/web/admin/lib/lang/bg_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/bg_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/bg_software_package_install.lng b/interface/web/admin/lib/lang/bg_software_package_install.lng
deleted file mode 100644
index 0c9bd116c3..0000000000
--- a/interface/web/admin/lib/lang/bg_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Исталиране на софтуерни пакети';
-$wb['install_key_txt'] = 'Инсталационен ключ';
-$wb['btn_save_txt'] = 'Стартирай инсталацията';
-$wb['btn_cancel_txt'] = 'Отказ';
-?>
diff --git a/interface/web/admin/lib/lang/bg_software_package_list.lng b/interface/web/admin/lib/lang/bg_software_package_list.lng
deleted file mode 100644
index e251c95fbd..0000000000
--- a/interface/web/admin/lib/lang/bg_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Софтуерни пакети';
-$wb['installed_txt'] = 'Статус';
-$wb['package_title_txt'] = 'Пакет';
-$wb['package_description_txt'] = 'Описание';
-$wb['action_txt'] = 'Действие';
-$wb['toolsarea_head_txt'] = 'Пакети';
-$wb['repoupdate_txt'] = 'Обновяване на пакетите ';
-$wb['package_id_txt'] = 'local App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/bg_software_repo.lng b/interface/web/admin/lib/lang/bg_software_repo.lng
deleted file mode 100644
index f515654345..0000000000
--- a/interface/web/admin/lib/lang/bg_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Потребител (не е задължително)';
-$wb['repo_password_txt'] = 'Парола (не е задължително)';
-$wb['active_txt'] = 'Активен';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/bg_software_repo_list.lng b/interface/web/admin/lib/lang/bg_software_repo_list.lng
deleted file mode 100644
index 6471d70614..0000000000
--- a/interface/web/admin/lib/lang/bg_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Хранилище';
-$wb['active_txt'] = 'Активен';
-$wb['repo_name_txt'] = 'Хранилище';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/bg_software_update_list.lng b/interface/web/admin/lib/lang/bg_software_update_list.lng
deleted file mode 100644
index c7fa6e07f5..0000000000
--- a/interface/web/admin/lib/lang/bg_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Ъпдейт на софтуера';
-$wb['installed_txt'] = 'Действие';
-$wb['update_title_txt'] = 'Ъпдейт';
-$wb['version_txt'] = 'Версия';
-$wb['action_txt'] = 'Действие';
-$wb['server_select_txt'] = 'Избери сървър';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/br_software_package.lng b/interface/web/admin/lib/lang/br_software_package.lng
deleted file mode 100644
index 94ccc930de..0000000000
--- a/interface/web/admin/lib/lang/br_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Título do pacote';
-$wb['package_key_txt'] = 'Chave do pacote';
-$wb['Software Package'] = 'Pacote de software';
-$wb['Modify software package details'] = 'Alterar detalhes do pacote de software';
-?>
diff --git a/interface/web/admin/lib/lang/br_software_package_install.lng b/interface/web/admin/lib/lang/br_software_package_install.lng
deleted file mode 100644
index 0fcccf939e..0000000000
--- a/interface/web/admin/lib/lang/br_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Instalar pacote de software';
-$wb['install_key_txt'] = 'Insira a chave de instalação';
-$wb['btn_save_txt'] = 'Iniciar instalação';
-$wb['btn_cancel_txt'] = 'Cancelar';
-?>
diff --git a/interface/web/admin/lib/lang/br_software_package_list.lng b/interface/web/admin/lib/lang/br_software_package_list.lng
deleted file mode 100644
index de62e3d305..0000000000
--- a/interface/web/admin/lib/lang/br_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Pacotes de APPs e complementos';
-$wb['installed_txt'] = 'Estado';
-$wb['package_title_txt'] = 'Pacote';
-$wb['package_description_txt'] = 'Descrição';
-$wb['action_txt'] = 'Ação';
-$wb['toolsarea_head_txt'] = 'Pacotes';
-$wb['repoupdate_txt'] = 'Atualizar lista de pacotes';
-$wb['package_id_txt'] = 'ID local do APP';
-$wb['no_packages_txt'] = 'Nenhum pacote disponível.';
-$wb['edit_txt'] = 'Editar';
-$wb['delete_txt'] = 'Remover';
-?>
diff --git a/interface/web/admin/lib/lang/br_software_repo.lng b/interface/web/admin/lib/lang/br_software_repo.lng
deleted file mode 100644
index dbc14e2032..0000000000
--- a/interface/web/admin/lib/lang/br_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repositório';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Usuário (opcional)';
-$wb['repo_password_txt'] = 'Senha (opcional)';
-$wb['active_txt'] = 'Ativo';
-$wb['Software Repository which may contain addons or updates'] = 'Repositório de software pode conter complementos ou atualizações';
-?>
diff --git a/interface/web/admin/lib/lang/br_software_repo_list.lng b/interface/web/admin/lib/lang/br_software_repo_list.lng
deleted file mode 100644
index 6941c7f147..0000000000
--- a/interface/web/admin/lib/lang/br_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repositório';
-$wb['active_txt'] = 'Ativo';
-$wb['repo_name_txt'] = 'Repositório';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/br_software_update_list.lng b/interface/web/admin/lib/lang/br_software_update_list.lng
deleted file mode 100644
index 0dff3a245c..0000000000
--- a/interface/web/admin/lib/lang/br_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Atualizações de Software';
-$wb['server_select_txt'] = 'Selecionar o servidor';
-$wb['installed_txt'] = 'Ação';
-$wb['update_title_txt'] = 'Atualizar';
-$wb['version_txt'] = 'Versão';
-$wb['action_txt'] = 'Ação';
-$wb['no_updates_txt'] = 'Nenhuma atualização disponível.';
-?>
diff --git a/interface/web/admin/lib/lang/ca_software_package.lng b/interface/web/admin/lib/lang/ca_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/ca_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/ca_software_package_install.lng b/interface/web/admin/lib/lang/ca_software_package_install.lng
deleted file mode 100644
index 5c8b756434..0000000000
--- a/interface/web/admin/lib/lang/ca_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Install software package';
-$wb['install_key_txt'] = 'Enter install key';
-$wb['btn_save_txt'] = 'Start Installation';
-$wb['btn_cancel_txt'] = 'Cancel';
-?>
diff --git a/interface/web/admin/lib/lang/ca_software_package_list.lng b/interface/web/admin/lib/lang/ca_software_package_list.lng
deleted file mode 100644
index 2909d8376e..0000000000
--- a/interface/web/admin/lib/lang/ca_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Apps & Addon packages';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Package';
-$wb['package_description_txt'] = 'Description';
-$wb['action_txt'] = 'Action';
-$wb['toolsarea_head_txt'] = 'Packages';
-$wb['repoupdate_txt'] = 'Update package list';
-$wb['package_id_txt'] = 'local App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/ca_software_repo.lng b/interface/web/admin/lib/lang/ca_software_repo.lng
deleted file mode 100644
index f2cbbb2c25..0000000000
--- a/interface/web/admin/lib/lang/ca_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'User (optional)';
-$wb['repo_password_txt'] = 'Password (optional)';
-$wb['active_txt'] = 'Active';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/ca_software_repo_list.lng b/interface/web/admin/lib/lang/ca_software_repo_list.lng
deleted file mode 100644
index b7a219ffa8..0000000000
--- a/interface/web/admin/lib/lang/ca_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repository';
-$wb['active_txt'] = 'Active';
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/ca_software_update_list.lng b/interface/web/admin/lib/lang/ca_software_update_list.lng
deleted file mode 100644
index fe7639125c..0000000000
--- a/interface/web/admin/lib/lang/ca_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Software updates';
-$wb['server_select_txt'] = 'Select server';
-$wb['installed_txt'] = 'Action';
-$wb['update_title_txt'] = 'Update';
-$wb['version_txt'] = 'Version';
-$wb['action_txt'] = 'Action';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_package.lng b/interface/web/admin/lib/lang/cz_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/cz_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_package_install.lng b/interface/web/admin/lib/lang/cz_software_package_install.lng
deleted file mode 100644
index 0d079ef6d3..0000000000
--- a/interface/web/admin/lib/lang/cz_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Instalace software';
-$wb['install_key_txt'] = 'Enter install key';
-$wb['btn_save_txt'] = 'Spustit instalaci';
-$wb['btn_cancel_txt'] = 'Zrušit';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_package_list.lng b/interface/web/admin/lib/lang/cz_software_package_list.lng
deleted file mode 100644
index 6896a9feb4..0000000000
--- a/interface/web/admin/lib/lang/cz_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Softwarové balíčky';
-$wb['installed_txt'] = 'Stav';
-$wb['package_title_txt'] = 'Balíček';
-$wb['package_description_txt'] = 'Popis';
-$wb['action_txt'] = 'Akce';
-$wb['toolsarea_head_txt'] = 'Balíčky';
-$wb['repoupdate_txt'] = 'Aktualizace seznamu balíků';
-$wb['package_id_txt'] = 'místní App-ID';
-$wb['no_packages_txt'] = 'Žádné balíčky nejsou k dispozici';
-$wb['edit_txt'] = 'Upravit';
-$wb['delete_txt'] = 'Smazat';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_repo.lng b/interface/web/admin/lib/lang/cz_software_repo.lng
deleted file mode 100644
index bd7bc9d0f2..0000000000
--- a/interface/web/admin/lib/lang/cz_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Název zdroje';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Uživatel (volitelné)';
-$wb['repo_password_txt'] = 'Heslo (volitelné)';
-$wb['active_txt'] = 'Aktivní';
-$wb['Software Repository which may contain addons or updates'] = 'Softwarové zdroje, které mohou obsahovat addony nebo aktualizace';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_repo_list.lng b/interface/web/admin/lib/lang/cz_software_repo_list.lng
deleted file mode 100644
index ca04f41dcf..0000000000
--- a/interface/web/admin/lib/lang/cz_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Zdroje repozitářů';
-$wb['active_txt'] = 'Aktivní';
-$wb['repo_name_txt'] = 'Název zdroje';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_update_list.lng b/interface/web/admin/lib/lang/cz_software_update_list.lng
deleted file mode 100644
index c48ad8ce30..0000000000
--- a/interface/web/admin/lib/lang/cz_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Softwarové aktualizace';
-$wb['server_select_txt'] = 'Vybrat server';
-$wb['installed_txt'] = 'Akce';
-$wb['update_title_txt'] = 'Aktualizovat';
-$wb['version_txt'] = 'Verze';
-$wb['action_txt'] = 'Akce';
-$wb['no_updates_txt'] = 'Žádné aktualizace nejsou k dispozici';
-?>
diff --git a/interface/web/admin/lib/lang/de_software_package.lng b/interface/web/admin/lib/lang/de_software_package.lng
deleted file mode 100644
index 13b3d996c3..0000000000
--- a/interface/web/admin/lib/lang/de_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Softwarepaket Titel';
-$wb['package_key_txt'] = 'Softwarepaket Schlüssel';
-$wb['Software Package'] = 'Softwarepaket';
-$wb['Modify software package details'] = 'Softwarepaket Einstellungen bearbeiten';
-?>
diff --git a/interface/web/admin/lib/lang/de_software_package_install.lng b/interface/web/admin/lib/lang/de_software_package_install.lng
deleted file mode 100644
index 1ef69d13d3..0000000000
--- a/interface/web/admin/lib/lang/de_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Softwarepaket installieren';
-$wb['install_key_txt'] = 'Installationskey eingeben';
-$wb['btn_save_txt'] = 'Installation starten';
-$wb['btn_cancel_txt'] = 'Abbrechen';
-?>
diff --git a/interface/web/admin/lib/lang/de_software_package_list.lng b/interface/web/admin/lib/lang/de_software_package_list.lng
deleted file mode 100644
index 75b7504390..0000000000
--- a/interface/web/admin/lib/lang/de_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Softwarepakete';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Paket';
-$wb['package_description_txt'] = 'Beschreibung';
-$wb['action_txt'] = 'Aktion';
-$wb['toolsarea_head_txt'] = 'Pakete';
-$wb['repoupdate_txt'] = 'Softwarepakete Liste updaten';
-$wb['package_id_txt'] = 'Lokale App ID';
-$wb['no_packages_txt'] = 'Keine Pakete verfügbar';
-$wb['edit_txt'] = 'Bearbeiten';
-$wb['delete_txt'] = 'Löschen';
-?>
diff --git a/interface/web/admin/lib/lang/de_software_repo.lng b/interface/web/admin/lib/lang/de_software_repo.lng
deleted file mode 100644
index 242611cd08..0000000000
--- a/interface/web/admin/lib/lang/de_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Benutzername (optional)';
-$wb['repo_password_txt'] = 'Passwort (optional)';
-$wb['active_txt'] = 'Aktiv';
-$wb['Software Repository which may contain addons or updates'] = 'Software Archiv, das Add-Ons oder Updates enthalten kann';
-?>
diff --git a/interface/web/admin/lib/lang/de_software_repo_list.lng b/interface/web/admin/lib/lang/de_software_repo_list.lng
deleted file mode 100644
index db6f49fd4e..0000000000
--- a/interface/web/admin/lib/lang/de_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repository';
-$wb['active_txt'] = 'Aktiv';
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/de_software_update_list.lng b/interface/web/admin/lib/lang/de_software_update_list.lng
deleted file mode 100644
index cf31e88154..0000000000
--- a/interface/web/admin/lib/lang/de_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Softwareupdates';
-$wb['server_select_txt'] = 'Server wählen';
-$wb['installed_txt'] = 'Aktion';
-$wb['update_title_txt'] = 'Update';
-$wb['version_txt'] = 'Version';
-$wb['action_txt'] = 'Aktion';
-$wb['no_updates_txt'] = 'Keine Updates verfügbar';
-?>
diff --git a/interface/web/admin/lib/lang/dk_software_package.lng b/interface/web/admin/lib/lang/dk_software_package.lng
deleted file mode 100644
index 86f45dc91e..0000000000
--- a/interface/web/admin/lib/lang/dk_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Pakke Titel';
-$wb['package_key_txt'] = 'Pakke Nøgle';
-$wb['Software Package'] = 'Software Pakke';
-$wb['Modify software package details'] = 'Ændre software pakke detaljer';
-?>
diff --git a/interface/web/admin/lib/lang/dk_software_package_install.lng b/interface/web/admin/lib/lang/dk_software_package_install.lng
deleted file mode 100644
index fd9211652c..0000000000
--- a/interface/web/admin/lib/lang/dk_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Install software pakke';
-$wb['install_key_txt'] = 'Indtast installations nøgle';
-$wb['btn_save_txt'] = 'Start Installation';
-$wb['btn_cancel_txt'] = 'Annullere';
-?>
diff --git a/interface/web/admin/lib/lang/dk_software_package_list.lng b/interface/web/admin/lib/lang/dk_software_package_list.lng
deleted file mode 100644
index 3fb5399eae..0000000000
--- a/interface/web/admin/lib/lang/dk_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Apps & Tilføjelses pakker';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Pakke';
-$wb['package_description_txt'] = 'Beskrivelse';
-$wb['action_txt'] = 'Handling';
-$wb['toolsarea_head_txt'] = 'Pakker';
-$wb['repoupdate_txt'] = 'Opdater pakke listen';
-$wb['package_id_txt'] = 'lokal App-ID';
-$wb['no_packages_txt'] = 'Ingen pakker tilgængelig';
-$wb['edit_txt'] = 'Rediger';
-$wb['delete_txt'] = 'Slet';
-?>
diff --git a/interface/web/admin/lib/lang/dk_software_repo.lng b/interface/web/admin/lib/lang/dk_software_repo.lng
deleted file mode 100644
index 2c506cdc6b..0000000000
--- a/interface/web/admin/lib/lang/dk_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Arkiv';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Bruger (valgfri)';
-$wb['repo_password_txt'] = 'Adgangskode (valgfri)';
-$wb['active_txt'] = 'Aktiv';
-$wb['Software Repository which may contain addons or updates'] = 'Software Arkiv som kan indeholde tilføjelser eller opdateringer';
-?>
diff --git a/interface/web/admin/lib/lang/dk_software_repo_list.lng b/interface/web/admin/lib/lang/dk_software_repo_list.lng
deleted file mode 100644
index aa33919cbd..0000000000
--- a/interface/web/admin/lib/lang/dk_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Arkiv';
-$wb['active_txt'] = 'Aktiv';
-$wb['repo_name_txt'] = 'Arkiv';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/dk_software_update_list.lng b/interface/web/admin/lib/lang/dk_software_update_list.lng
deleted file mode 100644
index 8a8e8686af..0000000000
--- a/interface/web/admin/lib/lang/dk_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Software opdateringer';
-$wb['server_select_txt'] = 'Vælg server';
-$wb['installed_txt'] = 'Handling';
-$wb['update_title_txt'] = 'Opdater';
-$wb['version_txt'] = 'Version';
-$wb['action_txt'] = 'Handling';
-$wb['no_updates_txt'] = 'Ingen opdateringer tilgængelig';
-?>
diff --git a/interface/web/admin/lib/lang/el_software_package.lng b/interface/web/admin/lib/lang/el_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/el_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/el_software_package_install.lng b/interface/web/admin/lib/lang/el_software_package_install.lng
deleted file mode 100644
index 5e3d0fd402..0000000000
--- a/interface/web/admin/lib/lang/el_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Εγκατάσταση πακέτου λογισμικού';
-$wb['install_key_txt'] = 'Εισαγωγή κλειδιού εγκατάστασης';
-$wb['btn_save_txt'] = 'Εκκίνηση εγκατάστασης';
-$wb['btn_cancel_txt'] = 'Ακύρωση';
-?>
diff --git a/interface/web/admin/lib/lang/el_software_package_list.lng b/interface/web/admin/lib/lang/el_software_package_list.lng
deleted file mode 100644
index 1553ea1cea..0000000000
--- a/interface/web/admin/lib/lang/el_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Πακέτα Εφαρμογών & Πρόσθετων';
-$wb['installed_txt'] = 'Κατάσταση';
-$wb['package_title_txt'] = 'Πακέτο';
-$wb['package_description_txt'] = 'Περιγραφή';
-$wb['action_txt'] = 'Ενέργεια';
-$wb['toolsarea_head_txt'] = 'Πακέτα';
-$wb['repoupdate_txt'] = 'Ενημέρωση λίστας πακκέτων';
-$wb['package_id_txt'] = 'τοπικό App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/el_software_repo.lng b/interface/web/admin/lib/lang/el_software_repo.lng
deleted file mode 100644
index 3b12d3fd87..0000000000
--- a/interface/web/admin/lib/lang/el_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Αποθετήριο';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Χρήστης (Προαιρετικό)';
-$wb['repo_password_txt'] = 'Συνθηματικό (Προαιρετικό)';
-$wb['active_txt'] = 'Ενεργό';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/el_software_repo_list.lng b/interface/web/admin/lib/lang/el_software_repo_list.lng
deleted file mode 100644
index deb896a719..0000000000
--- a/interface/web/admin/lib/lang/el_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Αποθετήριο';
-$wb['active_txt'] = 'Ενεργό';
-$wb['repo_name_txt'] = 'Αποθετήριο';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/el_software_update_list.lng b/interface/web/admin/lib/lang/el_software_update_list.lng
deleted file mode 100644
index 42100d0c89..0000000000
--- a/interface/web/admin/lib/lang/el_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Αναβαθμίσεις Λογισμικού';
-$wb['server_select_txt'] = 'Επιλογή server';
-$wb['installed_txt'] = 'Ενέργεια';
-$wb['update_title_txt'] = 'Ενημέρωση';
-$wb['version_txt'] = 'Έκδοση';
-$wb['action_txt'] = 'Ενέργεια';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/en_software_package.lng b/interface/web/admin/lib/lang/en_software_package.lng
deleted file mode 100644
index 5850719890..0000000000
--- a/interface/web/admin/lib/lang/en_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/en_software_package_install.lng b/interface/web/admin/lib/lang/en_software_package_install.lng
deleted file mode 100644
index d6ec373abb..0000000000
--- a/interface/web/admin/lib/lang/en_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Install software package';
-$wb['install_key_txt'] = 'Enter install key';
-$wb['btn_save_txt'] = 'Start Installation';
-$wb['btn_cancel_txt'] = 'Cancel';
-?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/en_software_package_list.lng b/interface/web/admin/lib/lang/en_software_package_list.lng
deleted file mode 100644
index 2909d8376e..0000000000
--- a/interface/web/admin/lib/lang/en_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Apps & Addon packages';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Package';
-$wb['package_description_txt'] = 'Description';
-$wb['action_txt'] = 'Action';
-$wb['toolsarea_head_txt'] = 'Packages';
-$wb['repoupdate_txt'] = 'Update package list';
-$wb['package_id_txt'] = 'local App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/en_software_repo.lng b/interface/web/admin/lib/lang/en_software_repo.lng
deleted file mode 100644
index 38c163507e..0000000000
--- a/interface/web/admin/lib/lang/en_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'User (optional)';
-$wb['repo_password_txt'] = 'Password (optional)';
-$wb['active_txt'] = 'Active';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/en_software_repo_list.lng b/interface/web/admin/lib/lang/en_software_repo_list.lng
deleted file mode 100644
index 15b16e2d5b..0000000000
--- a/interface/web/admin/lib/lang/en_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repository';
-$wb['active_txt'] = 'Active';
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/en_software_update_list.lng b/interface/web/admin/lib/lang/en_software_update_list.lng
deleted file mode 100644
index fe7639125c..0000000000
--- a/interface/web/admin/lib/lang/en_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Software updates';
-$wb['server_select_txt'] = 'Select server';
-$wb['installed_txt'] = 'Action';
-$wb['update_title_txt'] = 'Update';
-$wb['version_txt'] = 'Version';
-$wb['action_txt'] = 'Action';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/es_software_package.lng b/interface/web/admin/lib/lang/es_software_package.lng
deleted file mode 100644
index af80e4a479..0000000000
--- a/interface/web/admin/lib/lang/es_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['Modify software package details'] = 'Modificar los detalles del paquete de aplicación';
-$wb['package_key_txt'] = 'Clave del paquete';
-$wb['package_title_txt'] = 'Título del paquete';
-$wb['Software Package'] = 'Paquete de aplicación';
-?>
diff --git a/interface/web/admin/lib/lang/es_software_package_install.lng b/interface/web/admin/lib/lang/es_software_package_install.lng
deleted file mode 100644
index 838af344ec..0000000000
--- a/interface/web/admin/lib/lang/es_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['btn_cancel_txt'] = 'Cancelar';
-$wb['btn_save_txt'] = 'Iniciar instalación';
-$wb['head_txt'] = 'Instalar paquete de aplicación';
-$wb['install_key_txt'] = 'Ingrese la clave de instalación';
-?>
diff --git a/interface/web/admin/lib/lang/es_software_package_list.lng b/interface/web/admin/lib/lang/es_software_package_list.lng
deleted file mode 100644
index c1837c7a82..0000000000
--- a/interface/web/admin/lib/lang/es_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['action_txt'] = 'Acción';
-$wb['delete_txt'] = 'Borrar';
-$wb['edit_txt'] = 'Editar';
-$wb['installed_txt'] = 'Estado';
-$wb['list_head_txt'] = 'Apps & paquetes adicionales';
-$wb['no_packages_txt'] = 'No hay paquetes disponibles';
-$wb['package_description_txt'] = 'Descripción';
-$wb['package_id_txt'] = 'ID local de App';
-$wb['package_title_txt'] = 'Paquete';
-$wb['repoupdate_txt'] = 'Actualizar lista de paquetes';
-$wb['toolsarea_head_txt'] = 'Paquetes';
-?>
diff --git a/interface/web/admin/lib/lang/es_software_repo.lng b/interface/web/admin/lib/lang/es_software_repo.lng
deleted file mode 100644
index 26382bd503..0000000000
--- a/interface/web/admin/lib/lang/es_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['active_txt'] = 'Habilitado';
-$wb['repo_name_txt'] = 'Repositorio';
-$wb['repo_password_txt'] = 'Contraseña (opcional)';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Usuario (opcional)';
-$wb['Software Repository which may contain addons or updates'] = 'Repositorio de aplicaciones que puede contener complementos o actualizaciones';
-?>
diff --git a/interface/web/admin/lib/lang/es_software_repo_list.lng b/interface/web/admin/lib/lang/es_software_repo_list.lng
deleted file mode 100644
index f6a624bd7d..0000000000
--- a/interface/web/admin/lib/lang/es_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['active_txt'] = 'Habilitado';
-$wb['list_head_txt'] = 'Repositorio';
-$wb['repo_name_txt'] = 'Repositorio';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/es_software_update_list.lng b/interface/web/admin/lib/lang/es_software_update_list.lng
deleted file mode 100644
index 827c60e299..0000000000
--- a/interface/web/admin/lib/lang/es_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['action_txt'] = 'Acción';
-$wb['installed_txt'] = 'Acción';
-$wb['list_head_txt'] = 'Actualizaciones de aplicaciones';
-$wb['no_updates_txt'] = 'No hay actualizaciones';
-$wb['server_select_txt'] = 'Seleccionar servidor';
-$wb['update_title_txt'] = 'Actualizar';
-$wb['version_txt'] = 'Versión';
-?>
diff --git a/interface/web/admin/lib/lang/fi_software_package.lng b/interface/web/admin/lib/lang/fi_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/fi_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/fi_software_package_install.lng b/interface/web/admin/lib/lang/fi_software_package_install.lng
deleted file mode 100644
index 5c8b756434..0000000000
--- a/interface/web/admin/lib/lang/fi_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Install software package';
-$wb['install_key_txt'] = 'Enter install key';
-$wb['btn_save_txt'] = 'Start Installation';
-$wb['btn_cancel_txt'] = 'Cancel';
-?>
diff --git a/interface/web/admin/lib/lang/fi_software_package_list.lng b/interface/web/admin/lib/lang/fi_software_package_list.lng
deleted file mode 100644
index 87a9e193b5..0000000000
--- a/interface/web/admin/lib/lang/fi_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Ohjelmapaketit';
-$wb['installed_txt'] = 'Ohjelmapaketin tila';
-$wb['package_title_txt'] = 'Ohjelmapaketti';
-$wb['package_description_txt'] = 'Ohjelmapaketin kuvaus';
-$wb['action_txt'] = 'Toiminto';
-$wb['toolsarea_head_txt'] = 'Packages';
-$wb['repoupdate_txt'] = 'Update package list';
-$wb['package_id_txt'] = 'local App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/fi_software_repo.lng b/interface/web/admin/lib/lang/fi_software_repo.lng
deleted file mode 100644
index f875f428b6..0000000000
--- a/interface/web/admin/lib/lang/fi_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Ohjelmapakettien varasto';
-$wb['repo_url_txt'] = 'Varaston internetosoite';
-$wb['repo_username_txt'] = 'Käyttäjätunnus (valinnainen)';
-$wb['repo_password_txt'] = 'Salasana (valinnnainen)';
-$wb['active_txt'] = 'Käytössä';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/fi_software_repo_list.lng b/interface/web/admin/lib/lang/fi_software_repo_list.lng
deleted file mode 100644
index bde844c99f..0000000000
--- a/interface/web/admin/lib/lang/fi_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Ohjelmapakettien varastot';
-$wb['active_txt'] = 'Käytössä';
-$wb['repo_name_txt'] = 'Ohjelmapakettien varasto';
-$wb['repo_url_txt'] = 'Ohjelmapakettien varaston osoite';
-?>
diff --git a/interface/web/admin/lib/lang/fi_software_update_list.lng b/interface/web/admin/lib/lang/fi_software_update_list.lng
deleted file mode 100644
index 7871958353..0000000000
--- a/interface/web/admin/lib/lang/fi_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Ohjelmapäivitykset';
-$wb['installed_txt'] = 'Toiminto';
-$wb['update_title_txt'] = 'Päivitä';
-$wb['version_txt'] = 'Versio';
-$wb['action_txt'] = 'Toiminto';
-$wb['server_select_txt'] = 'Valitse palvelin';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/fr_software_package.lng b/interface/web/admin/lib/lang/fr_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/fr_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/fr_software_package_install.lng b/interface/web/admin/lib/lang/fr_software_package_install.lng
deleted file mode 100644
index 39f643d3e6..0000000000
--- a/interface/web/admin/lib/lang/fr_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Installer un paquet logiciel';
-$wb['install_key_txt'] = 'Entrez la clef dinstallation';
-$wb['btn_save_txt'] = 'Démarrer linstallation';
-$wb['btn_cancel_txt'] = 'Annuler';
-?>
diff --git a/interface/web/admin/lib/lang/fr_software_package_list.lng b/interface/web/admin/lib/lang/fr_software_package_list.lng
deleted file mode 100644
index 405b9e296f..0000000000
--- a/interface/web/admin/lib/lang/fr_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Paquets de logiciels';
-$wb['installed_txt'] = 'Statut';
-$wb['package_title_txt'] = 'Paquet';
-$wb['package_description_txt'] = 'Description';
-$wb['action_txt'] = 'Action';
-$wb['toolsarea_head_txt'] = 'Packages';
-$wb['repoupdate_txt'] = 'Mettre à jour la liste des paquets';
-$wb['package_id_txt'] = 'App-ID locale';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/fr_software_repo.lng b/interface/web/admin/lib/lang/fr_software_repo.lng
deleted file mode 100644
index f65c955d52..0000000000
--- a/interface/web/admin/lib/lang/fr_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Référence';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Utilisateur (optionnel)';
-$wb['repo_password_txt'] = 'Mot de passe (optionnel)';
-$wb['active_txt'] = 'Actif';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/fr_software_repo_list.lng b/interface/web/admin/lib/lang/fr_software_repo_list.lng
deleted file mode 100644
index 56749896bb..0000000000
--- a/interface/web/admin/lib/lang/fr_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Référence';
-$wb['active_txt'] = 'Actif';
-$wb['repo_name_txt'] = 'Référence';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/fr_software_update_list.lng b/interface/web/admin/lib/lang/fr_software_update_list.lng
deleted file mode 100644
index 8fb67a0310..0000000000
--- a/interface/web/admin/lib/lang/fr_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Mise à jour des logiciels';
-$wb['installed_txt'] = 'Action';
-$wb['update_title_txt'] = 'Mise à jour';
-$wb['version_txt'] = 'Version';
-$wb['action_txt'] = 'Action';
-$wb['server_select_txt'] = 'Sélectionnez le serveur';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/hr_software_package.lng b/interface/web/admin/lib/lang/hr_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/hr_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/hr_software_package_install.lng b/interface/web/admin/lib/lang/hr_software_package_install.lng
deleted file mode 100644
index 22d7e0ce7a..0000000000
--- a/interface/web/admin/lib/lang/hr_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Instaliraj softverski paket';
-$wb['install_key_txt'] = 'Unesi instalacijski ključ';
-$wb['btn_save_txt'] = 'Pokreni instalaciju';
-$wb['btn_cancel_txt'] = 'Odustani';
-?>
diff --git a/interface/web/admin/lib/lang/hr_software_package_list.lng b/interface/web/admin/lib/lang/hr_software_package_list.lng
deleted file mode 100644
index 3722c5cff4..0000000000
--- a/interface/web/admin/lib/lang/hr_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Aplikacije i dodatni paketi';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Paketi';
-$wb['package_description_txt'] = 'Opis';
-$wb['action_txt'] = 'Akcija';
-$wb['toolsarea_head_txt'] = 'Paketi';
-$wb['repoupdate_txt'] = 'Osvježi listu paketa';
-$wb['package_id_txt'] = 'lokalni App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/hr_software_repo.lng b/interface/web/admin/lib/lang/hr_software_repo.lng
deleted file mode 100644
index bbfb2e2db2..0000000000
--- a/interface/web/admin/lib/lang/hr_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repozitoriji';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Korisničko ime (opcionalno)';
-$wb['repo_password_txt'] = 'Å ifra (opcionalno)';
-$wb['active_txt'] = 'Aktivno';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/hr_software_repo_list.lng b/interface/web/admin/lib/lang/hr_software_repo_list.lng
deleted file mode 100644
index b79045bd76..0000000000
--- a/interface/web/admin/lib/lang/hr_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repozitorij';
-$wb['active_txt'] = 'Aktivno';
-$wb['repo_name_txt'] = 'Repozitorij';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/hr_software_update_list.lng b/interface/web/admin/lib/lang/hr_software_update_list.lng
deleted file mode 100644
index 2250a186a3..0000000000
--- a/interface/web/admin/lib/lang/hr_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Softverske nadogradnje';
-$wb['server_select_txt'] = 'Izaberi server';
-$wb['installed_txt'] = 'Akcija';
-$wb['update_title_txt'] = 'Nadogradi';
-$wb['version_txt'] = 'Verzija';
-$wb['action_txt'] = 'Akcija';
-$wb['no_updates_txt'] = 'Nema nadogradnji';
-?>
diff --git a/interface/web/admin/lib/lang/hu_software_package.lng b/interface/web/admin/lib/lang/hu_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/hu_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/hu_software_package_install.lng b/interface/web/admin/lib/lang/hu_software_package_install.lng
deleted file mode 100644
index 6dc8be3f89..0000000000
--- a/interface/web/admin/lib/lang/hu_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Szoftvercsomag telepítése';
-$wb['install_key_txt'] = 'Enter install key';
-$wb['btn_save_txt'] = 'Start Installation';
-$wb['btn_cancel_txt'] = 'Mégsem';
-?>
diff --git a/interface/web/admin/lib/lang/hu_software_package_list.lng b/interface/web/admin/lib/lang/hu_software_package_list.lng
deleted file mode 100644
index 430583ce8a..0000000000
--- a/interface/web/admin/lib/lang/hu_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Szoftver csomag';
-$wb['installed_txt'] = 'Állapot';
-$wb['package_title_txt'] = 'Csomag';
-$wb['package_description_txt'] = 'Leírás';
-$wb['action_txt'] = 'Művelet';
-$wb['toolsarea_head_txt'] = 'Csomagok';
-$wb['repoupdate_txt'] = 'Csomaglista frissítése';
-$wb['package_id_txt'] = 'local App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/hu_software_repo.lng b/interface/web/admin/lib/lang/hu_software_repo.lng
deleted file mode 100644
index 3c578e3694..0000000000
--- a/interface/web/admin/lib/lang/hu_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'Cím';
-$wb['repo_username_txt'] = 'Felhasználó (opcionális)';
-$wb['repo_password_txt'] = 'Jelszó (opcionális)';
-$wb['active_txt'] = 'Aktív';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/hu_software_repo_list.lng b/interface/web/admin/lib/lang/hu_software_repo_list.lng
deleted file mode 100644
index f5e7aabcb2..0000000000
--- a/interface/web/admin/lib/lang/hu_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repository';
-$wb['active_txt'] = 'Aktív';
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'Cím';
-?>
diff --git a/interface/web/admin/lib/lang/hu_software_update_list.lng b/interface/web/admin/lib/lang/hu_software_update_list.lng
deleted file mode 100644
index c2edc83217..0000000000
--- a/interface/web/admin/lib/lang/hu_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Szoftver frissítések';
-$wb['installed_txt'] = 'Művelet';
-$wb['update_title_txt'] = 'Frissítés';
-$wb['version_txt'] = 'Verzió';
-$wb['action_txt'] = 'Művelet';
-$wb['server_select_txt'] = 'Válasszon szervert';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/id_software_package.lng b/interface/web/admin/lib/lang/id_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/id_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/id_software_package_install.lng b/interface/web/admin/lib/lang/id_software_package_install.lng
deleted file mode 100644
index 9e966893ca..0000000000
--- a/interface/web/admin/lib/lang/id_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Pasang paket perangkat lunak';
-$wb['install_key_txt'] = 'Masukkan kunci pemasangan';
-$wb['btn_save_txt'] = 'Mulai Pemasangan';
-$wb['btn_cancel_txt'] = 'Batal';
-?>
diff --git a/interface/web/admin/lib/lang/id_software_package_list.lng b/interface/web/admin/lib/lang/id_software_package_list.lng
deleted file mode 100644
index 02642be6e2..0000000000
--- a/interface/web/admin/lib/lang/id_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Paket-paket Perangkat Lunak';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Paket';
-$wb['package_description_txt'] = 'Keterangan';
-$wb['action_txt'] = 'Aktif';
-$wb['toolsarea_head_txt'] = 'Paket';
-$wb['repoupdate_txt'] = 'Mutakhirkan daftar paket';
-$wb['package_id_txt'] = 'App-ID lokal';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/id_software_repo.lng b/interface/web/admin/lib/lang/id_software_repo.lng
deleted file mode 100644
index 1c3b0305b4..0000000000
--- a/interface/web/admin/lib/lang/id_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repositori';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Pengguna (opsional)';
-$wb['repo_password_txt'] = 'Sandi (opsional)';
-$wb['active_txt'] = 'Aktif';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/id_software_repo_list.lng b/interface/web/admin/lib/lang/id_software_repo_list.lng
deleted file mode 100644
index 63444907f3..0000000000
--- a/interface/web/admin/lib/lang/id_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repositori';
-$wb['active_txt'] = 'Aktif';
-$wb['repo_name_txt'] = 'Repositori';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/id_software_update_list.lng b/interface/web/admin/lib/lang/id_software_update_list.lng
deleted file mode 100644
index f789a0e72c..0000000000
--- a/interface/web/admin/lib/lang/id_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Pemutakhiran Perangkat Lunak';
-$wb['server_select_txt'] = 'Pilih server';
-$wb['installed_txt'] = 'Tindakan';
-$wb['update_title_txt'] = 'Mutakhirkan';
-$wb['version_txt'] = 'Versi';
-$wb['action_txt'] = 'Tindakan';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/it_software_package.lng b/interface/web/admin/lib/lang/it_software_package.lng
deleted file mode 100644
index d2e123cf85..0000000000
--- a/interface/web/admin/lib/lang/it_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Titolo pacchetto';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Pacchetto Software';
-$wb['Modify software package details'] = 'Modifica dettagli pacchetto software';
-?>
diff --git a/interface/web/admin/lib/lang/it_software_package_install.lng b/interface/web/admin/lib/lang/it_software_package_install.lng
deleted file mode 100644
index 1e210d5894..0000000000
--- a/interface/web/admin/lib/lang/it_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Installa pacchetto software';
-$wb['install_key_txt'] = 'Inserisci chiave pacchetto';
-$wb['btn_save_txt'] = 'Avvia installazione';
-$wb['btn_cancel_txt'] = 'Annulla';
-?>
diff --git a/interface/web/admin/lib/lang/it_software_package_list.lng b/interface/web/admin/lib/lang/it_software_package_list.lng
deleted file mode 100644
index 5ab82417de..0000000000
--- a/interface/web/admin/lib/lang/it_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Pacchetti Software';
-$wb['installed_txt'] = 'Stato';
-$wb['package_title_txt'] = 'Pacchetto';
-$wb['package_description_txt'] = 'Descrizione';
-$wb['action_txt'] = 'Action';
-$wb['toolsarea_head_txt'] = 'Pacchetti';
-$wb['repoupdate_txt'] = 'Aggiorna elenco pacchetti';
-$wb['package_id_txt'] = 'local App-ID';
-$wb['no_packages_txt'] = 'Nessun pacchetto disponibile';
-$wb['edit_txt'] = 'Modifica';
-$wb['delete_txt'] = 'Elimina';
-?>
diff --git a/interface/web/admin/lib/lang/it_software_repo.lng b/interface/web/admin/lib/lang/it_software_repo.lng
deleted file mode 100644
index 76b0182697..0000000000
--- a/interface/web/admin/lib/lang/it_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Utente (facoltativo)';
-$wb['repo_password_txt'] = 'Password (facoltativa)';
-$wb['active_txt'] = 'Attivo';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository che può contenere aggiunte o aggiornamenti';
-?>
diff --git a/interface/web/admin/lib/lang/it_software_repo_list.lng b/interface/web/admin/lib/lang/it_software_repo_list.lng
deleted file mode 100644
index 4db52118ec..0000000000
--- a/interface/web/admin/lib/lang/it_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repository';
-$wb['active_txt'] = 'Attivo';
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'Indirizzo';
-?>
diff --git a/interface/web/admin/lib/lang/it_software_update_list.lng b/interface/web/admin/lib/lang/it_software_update_list.lng
deleted file mode 100644
index cc264b84ec..0000000000
--- a/interface/web/admin/lib/lang/it_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Aggiornamento programmi';
-$wb['installed_txt'] = 'Azione';
-$wb['update_title_txt'] = 'Aggiornamento';
-$wb['version_txt'] = 'Versione';
-$wb['action_txt'] = 'Azione';
-$wb['server_select_txt'] = 'Selezionare server';
-$wb['no_updates_txt'] = 'Nessun aggiornamento disponibile';
-?>
diff --git a/interface/web/admin/lib/lang/ja_software_package.lng b/interface/web/admin/lib/lang/ja_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/ja_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/ja_software_package_install.lng b/interface/web/admin/lib/lang/ja_software_package_install.lng
deleted file mode 100644
index 5c8b756434..0000000000
--- a/interface/web/admin/lib/lang/ja_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Install software package';
-$wb['install_key_txt'] = 'Enter install key';
-$wb['btn_save_txt'] = 'Start Installation';
-$wb['btn_cancel_txt'] = 'Cancel';
-?>
diff --git a/interface/web/admin/lib/lang/ja_software_package_list.lng b/interface/web/admin/lib/lang/ja_software_package_list.lng
deleted file mode 100644
index e5352e91e7..0000000000
--- a/interface/web/admin/lib/lang/ja_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'ソフトウェアパッケージ';
-$wb['installed_txt'] = '状態';
-$wb['package_title_txt'] = 'パッケージ';
-$wb['package_description_txt'] = '説明';
-$wb['action_txt'] = '操作';
-$wb['toolsarea_head_txt'] = 'Packages';
-$wb['repoupdate_txt'] = 'Update package list';
-$wb['package_id_txt'] = 'local App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/ja_software_repo.lng b/interface/web/admin/lib/lang/ja_software_repo.lng
deleted file mode 100644
index c95399a54e..0000000000
--- a/interface/web/admin/lib/lang/ja_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'リポジトリー';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'ユーザー(必要があれば)';
-$wb['repo_password_txt'] = 'パスワード(必要があれば)';
-$wb['active_txt'] = '有効';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/ja_software_repo_list.lng b/interface/web/admin/lib/lang/ja_software_repo_list.lng
deleted file mode 100644
index a7d06d8fde..0000000000
--- a/interface/web/admin/lib/lang/ja_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'リポジトリー';
-$wb['active_txt'] = '有効';
-$wb['repo_name_txt'] = 'リポジトリー';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/ja_software_update_list.lng b/interface/web/admin/lib/lang/ja_software_update_list.lng
deleted file mode 100644
index f0ecf5711b..0000000000
--- a/interface/web/admin/lib/lang/ja_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'ソフトウェアの更新';
-$wb['server_select_txt'] = 'サーバーを選択してください';
-$wb['installed_txt'] = '操作';
-$wb['update_title_txt'] = 'æ›´æ–°';
-$wb['version_txt'] = 'バージョン';
-$wb['action_txt'] = '操作';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/nl_software_package.lng b/interface/web/admin/lib/lang/nl_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/nl_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/nl_software_package_install.lng b/interface/web/admin/lib/lang/nl_software_package_install.lng
deleted file mode 100644
index 87150b8cf1..0000000000
--- a/interface/web/admin/lib/lang/nl_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Install softwarepakket';
-$wb['install_key_txt'] = 'Voer installatie sleutel in';
-$wb['btn_save_txt'] = 'Start installatie';
-$wb['btn_cancel_txt'] = 'Annuleren';
-?>
diff --git a/interface/web/admin/lib/lang/nl_software_package_list.lng b/interface/web/admin/lib/lang/nl_software_package_list.lng
deleted file mode 100644
index 44aaa563ad..0000000000
--- a/interface/web/admin/lib/lang/nl_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Apps & Addon pakketten';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Pakket';
-$wb['package_description_txt'] = 'Omschrijving';
-$wb['action_txt'] = 'Actie';
-$wb['toolsarea_head_txt'] = 'Pakketten';
-$wb['repoupdate_txt'] = 'Update pakketlijst';
-$wb['package_id_txt'] = 'lokaal App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/nl_software_repo.lng b/interface/web/admin/lib/lang/nl_software_repo.lng
deleted file mode 100644
index 665c4197a2..0000000000
--- a/interface/web/admin/lib/lang/nl_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'User (optionieel)';
-$wb['repo_password_txt'] = 'Password (optionieel)';
-$wb['active_txt'] = 'Actief';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/nl_software_repo_list.lng b/interface/web/admin/lib/lang/nl_software_repo_list.lng
deleted file mode 100644
index fc05fc269b..0000000000
--- a/interface/web/admin/lib/lang/nl_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repository';
-$wb['active_txt'] = 'Actief';
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/nl_software_update_list.lng b/interface/web/admin/lib/lang/nl_software_update_list.lng
deleted file mode 100644
index 0d05c85594..0000000000
--- a/interface/web/admin/lib/lang/nl_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Software updates';
-$wb['server_select_txt'] = 'Selecteer server';
-$wb['installed_txt'] = 'Actie';
-$wb['update_title_txt'] = 'Update';
-$wb['version_txt'] = 'Versie';
-$wb['action_txt'] = 'Actie';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/pl_software_package.lng b/interface/web/admin/lib/lang/pl_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/pl_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/pl_software_package_install.lng b/interface/web/admin/lib/lang/pl_software_package_install.lng
deleted file mode 100644
index fd2f2930dd..0000000000
--- a/interface/web/admin/lib/lang/pl_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Instalacja pakietu oprogramowania';
-$wb['install_key_txt'] = 'Podaj klucz instalacyjny';
-$wb['btn_save_txt'] = 'Start instalacji';
-$wb['btn_cancel_txt'] = 'Przerwij';
-?>
diff --git a/interface/web/admin/lib/lang/pl_software_package_list.lng b/interface/web/admin/lib/lang/pl_software_package_list.lng
deleted file mode 100644
index cb47abc46d..0000000000
--- a/interface/web/admin/lib/lang/pl_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Pakiety z oprogramowaniem';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Pakiet';
-$wb['package_description_txt'] = 'Opis';
-$wb['action_txt'] = 'Akcja';
-$wb['toolsarea_head_txt'] = 'Pakiety';
-$wb['repoupdate_txt'] = 'Aktualizuj listę pakietów';
-$wb['package_id_txt'] = 'lokalny App-ID';
-$wb['no_packages_txt'] = 'Brak dostępnych pakietów';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/pl_software_repo.lng b/interface/web/admin/lib/lang/pl_software_repo.lng
deleted file mode 100644
index 1cc3dbb61c..0000000000
--- a/interface/web/admin/lib/lang/pl_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repozytorium';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Użytkownik (Opcjonalnie)';
-$wb['repo_password_txt'] = 'Hasło (Opcjonalnie)';
-$wb['active_txt'] = 'Aktywny';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/pl_software_repo_list.lng b/interface/web/admin/lib/lang/pl_software_repo_list.lng
deleted file mode 100644
index 7ca6af9f9f..0000000000
--- a/interface/web/admin/lib/lang/pl_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repozytoria';
-$wb['active_txt'] = 'Aktywny';
-$wb['repo_name_txt'] = 'Repozytoria';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/pl_software_update_list.lng b/interface/web/admin/lib/lang/pl_software_update_list.lng
deleted file mode 100644
index aa49fba4e7..0000000000
--- a/interface/web/admin/lib/lang/pl_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Aktualizacje oprogramowania';
-$wb['server_select_txt'] = 'Wybierz serwer';
-$wb['installed_txt'] = 'Akcja';
-$wb['update_title_txt'] = 'Aktualizacja';
-$wb['version_txt'] = 'Wersja';
-$wb['action_txt'] = 'Akcja';
-$wb['no_updates_txt'] = 'Nie ma dostępnych aktualizacji';
-?>
diff --git a/interface/web/admin/lib/lang/pt_software_package.lng b/interface/web/admin/lib/lang/pt_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/pt_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/pt_software_package_install.lng b/interface/web/admin/lib/lang/pt_software_package_install.lng
deleted file mode 100644
index 5c8b756434..0000000000
--- a/interface/web/admin/lib/lang/pt_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Install software package';
-$wb['install_key_txt'] = 'Enter install key';
-$wb['btn_save_txt'] = 'Start Installation';
-$wb['btn_cancel_txt'] = 'Cancel';
-?>
diff --git a/interface/web/admin/lib/lang/pt_software_package_list.lng b/interface/web/admin/lib/lang/pt_software_package_list.lng
deleted file mode 100644
index 1ec77bdd15..0000000000
--- a/interface/web/admin/lib/lang/pt_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Pacotes de Software';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Pacote';
-$wb['package_description_txt'] = 'Descrição';
-$wb['action_txt'] = 'Acção';
-$wb['toolsarea_head_txt'] = 'Packages';
-$wb['repoupdate_txt'] = 'Update package list';
-$wb['package_id_txt'] = 'local App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/pt_software_repo.lng b/interface/web/admin/lib/lang/pt_software_repo.lng
deleted file mode 100644
index 436758e687..0000000000
--- a/interface/web/admin/lib/lang/pt_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repositório';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Utilizador (opcional)';
-$wb['repo_password_txt'] = 'Senha (opcional)';
-$wb['active_txt'] = 'Activo';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/pt_software_repo_list.lng b/interface/web/admin/lib/lang/pt_software_repo_list.lng
deleted file mode 100644
index 5afba6d5e3..0000000000
--- a/interface/web/admin/lib/lang/pt_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repositório';
-$wb['active_txt'] = 'Activo';
-$wb['repo_name_txt'] = 'Repositório';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/pt_software_update_list.lng b/interface/web/admin/lib/lang/pt_software_update_list.lng
deleted file mode 100644
index 12fd9e2fa9..0000000000
--- a/interface/web/admin/lib/lang/pt_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Actualizações de Programas';
-$wb['server_select_txt'] = 'Seleccione o servidor';
-$wb['installed_txt'] = 'Acções';
-$wb['update_title_txt'] = 'Actualizar';
-$wb['version_txt'] = 'Versão';
-$wb['action_txt'] = 'Acção';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/ro_software_package.lng b/interface/web/admin/lib/lang/ro_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/ro_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/ro_software_package_install.lng b/interface/web/admin/lib/lang/ro_software_package_install.lng
deleted file mode 100644
index 5c8b756434..0000000000
--- a/interface/web/admin/lib/lang/ro_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Install software package';
-$wb['install_key_txt'] = 'Enter install key';
-$wb['btn_save_txt'] = 'Start Installation';
-$wb['btn_cancel_txt'] = 'Cancel';
-?>
diff --git a/interface/web/admin/lib/lang/ro_software_package_list.lng b/interface/web/admin/lib/lang/ro_software_package_list.lng
deleted file mode 100644
index 4a8dcbcbf0..0000000000
--- a/interface/web/admin/lib/lang/ro_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Pachete Software ';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Pachet';
-$wb['package_description_txt'] = 'Descriere';
-$wb['action_txt'] = 'Actiune';
-$wb['toolsarea_head_txt'] = 'Packages';
-$wb['repoupdate_txt'] = 'Update package list';
-$wb['package_id_txt'] = 'local App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/ro_software_repo.lng b/interface/web/admin/lib/lang/ro_software_repo.lng
deleted file mode 100644
index f2cbbb2c25..0000000000
--- a/interface/web/admin/lib/lang/ro_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'User (optional)';
-$wb['repo_password_txt'] = 'Password (optional)';
-$wb['active_txt'] = 'Active';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/ro_software_repo_list.lng b/interface/web/admin/lib/lang/ro_software_repo_list.lng
deleted file mode 100644
index b7a219ffa8..0000000000
--- a/interface/web/admin/lib/lang/ro_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repository';
-$wb['active_txt'] = 'Active';
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/ro_software_update_list.lng b/interface/web/admin/lib/lang/ro_software_update_list.lng
deleted file mode 100644
index 1e85d6de5f..0000000000
--- a/interface/web/admin/lib/lang/ro_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Software update';
-$wb['server_select_txt'] = 'Selectie server';
-$wb['installed_txt'] = 'Actiune';
-$wb['update_title_txt'] = 'Update';
-$wb['version_txt'] = 'Versiune';
-$wb['action_txt'] = 'Actiune';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/ru_software_package.lng b/interface/web/admin/lib/lang/ru_software_package.lng
deleted file mode 100644
index 490184dd92..0000000000
--- a/interface/web/admin/lib/lang/ru_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Название пакета';
-$wb['package_key_txt'] = 'Ключ пакета';
-$wb['Software Package'] = 'Пакет ПО';
-$wb['Modify software package details'] = 'Изменить детали пакета программного обеспечения';
-?>
diff --git a/interface/web/admin/lib/lang/ru_software_package_install.lng b/interface/web/admin/lib/lang/ru_software_package_install.lng
deleted file mode 100644
index 21efc7d562..0000000000
--- a/interface/web/admin/lib/lang/ru_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Установить пакет ПО';
-$wb['install_key_txt'] = 'Ввод ключа установки';
-$wb['btn_save_txt'] = 'Начать установку';
-$wb['btn_cancel_txt'] = 'Отменить';
-?>
diff --git a/interface/web/admin/lib/lang/ru_software_package_list.lng b/interface/web/admin/lib/lang/ru_software_package_list.lng
deleted file mode 100644
index 791cfa33ae..0000000000
--- a/interface/web/admin/lib/lang/ru_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Пакеты ПО';
-$wb['installed_txt'] = 'Статус';
-$wb['package_title_txt'] = 'Пакет';
-$wb['package_description_txt'] = 'Описание';
-$wb['action_txt'] = 'Действие';
-$wb['toolsarea_head_txt'] = 'Packages';
-$wb['repoupdate_txt'] = 'Обновить сисок пакетов';
-$wb['package_id_txt'] = 'Локальный App-ID';
-$wb['no_packages_txt'] = 'Нет доступных пакетов';
-$wb['edit_txt'] = 'Изменить';
-$wb['delete_txt'] = 'Удалить';
-?>
diff --git a/interface/web/admin/lib/lang/ru_software_repo.lng b/interface/web/admin/lib/lang/ru_software_repo.lng
deleted file mode 100644
index 5aec8763c1..0000000000
--- a/interface/web/admin/lib/lang/ru_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Репозиторий';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Логин (опционально)';
-$wb['repo_password_txt'] = 'Пароль (опционально)';
-$wb['active_txt'] = 'Активен?';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/ru_software_repo_list.lng b/interface/web/admin/lib/lang/ru_software_repo_list.lng
deleted file mode 100644
index ed307454ae..0000000000
--- a/interface/web/admin/lib/lang/ru_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Репозитории';
-$wb['active_txt'] = 'Активно';
-$wb['repo_name_txt'] = 'Репозиторий';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/ru_software_update_list.lng b/interface/web/admin/lib/lang/ru_software_update_list.lng
deleted file mode 100644
index dde28811d5..0000000000
--- a/interface/web/admin/lib/lang/ru_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Обновление ПО';
-$wb['installed_txt'] = 'Действие';
-$wb['update_title_txt'] = 'Обновить';
-$wb['version_txt'] = 'Версия';
-$wb['action_txt'] = 'Действие';
-$wb['server_select_txt'] = 'Выберите сервер';
-$wb['no_updates_txt'] = 'Нет доступных обновлений';
-?>
diff --git a/interface/web/admin/lib/lang/se_software_package.lng b/interface/web/admin/lib/lang/se_software_package.lng
deleted file mode 100644
index 086902db0c..0000000000
--- a/interface/web/admin/lib/lang/se_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Pakettitel';
-$wb['package_key_txt'] = 'Packetnyckel';
-$wb['Software Package'] = 'Mjukvarupaket';
-$wb['Modify software package details'] = 'Redigera mjukvarupaketets uppgifter';
-?>
diff --git a/interface/web/admin/lib/lang/se_software_package_install.lng b/interface/web/admin/lib/lang/se_software_package_install.lng
deleted file mode 100644
index 434fc4bc98..0000000000
--- a/interface/web/admin/lib/lang/se_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Installera mjukvarupaket';
-$wb['install_key_txt'] = 'Fyll i installationsnyckel';
-$wb['btn_save_txt'] = 'Påbörja installation';
-$wb['btn_cancel_txt'] = 'Avbryt';
-?>
diff --git a/interface/web/admin/lib/lang/se_software_package_list.lng b/interface/web/admin/lib/lang/se_software_package_list.lng
deleted file mode 100644
index c0222e1ba4..0000000000
--- a/interface/web/admin/lib/lang/se_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Mjukvarupaket';
-$wb['installed_txt'] = 'Status';
-$wb['package_title_txt'] = 'Paket';
-$wb['package_description_txt'] = 'Beskrivning';
-$wb['action_txt'] = 'Händelse';
-$wb['toolsarea_head_txt'] = 'Paket';
-$wb['repoupdate_txt'] = 'Uppdatera paketlista';
-$wb['package_id_txt'] = 'lokalt App-ID';
-$wb['no_packages_txt'] = 'Inga paket tillgängliga';
-$wb['edit_txt'] = 'Redigera';
-$wb['delete_txt'] = 'Radera';
-?>
diff --git a/interface/web/admin/lib/lang/se_software_repo.lng b/interface/web/admin/lib/lang/se_software_repo.lng
deleted file mode 100644
index a0e0de6822..0000000000
--- a/interface/web/admin/lib/lang/se_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Bibliotek';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Användare (Frivilligt)';
-$wb['repo_password_txt'] = 'Lösenord (Frivilligt)';
-$wb['active_txt'] = 'Aktiv';
-$wb['Software Repository which may contain addons or updates'] = 'Pragarmvarubibliotek som kan innehålla uppdateringar eller tillägg';
-?>
diff --git a/interface/web/admin/lib/lang/se_software_repo_list.lng b/interface/web/admin/lib/lang/se_software_repo_list.lng
deleted file mode 100644
index b7a219ffa8..0000000000
--- a/interface/web/admin/lib/lang/se_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Repository';
-$wb['active_txt'] = 'Active';
-$wb['repo_name_txt'] = 'Repository';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/se_software_update_list.lng b/interface/web/admin/lib/lang/se_software_update_list.lng
deleted file mode 100644
index 0cf7c0eddc..0000000000
--- a/interface/web/admin/lib/lang/se_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Programvaruuppdateringar';
-$wb['installed_txt'] = 'Händelse';
-$wb['update_title_txt'] = 'Uppdatera';
-$wb['version_txt'] = 'Version';
-$wb['action_txt'] = 'Händelse';
-$wb['server_select_txt'] = 'Välj server';
-$wb['no_updates_txt'] = 'Inga tillgängliga uppdateringar';
-?>
diff --git a/interface/web/admin/lib/lang/sk_software_package.lng b/interface/web/admin/lib/lang/sk_software_package.lng
deleted file mode 100644
index faffe38217..0000000000
--- a/interface/web/admin/lib/lang/sk_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Package Title';
-$wb['package_key_txt'] = 'Package Key';
-$wb['Software Package'] = 'Software Package';
-$wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/sk_software_package_install.lng b/interface/web/admin/lib/lang/sk_software_package_install.lng
deleted file mode 100644
index 5c8b756434..0000000000
--- a/interface/web/admin/lib/lang/sk_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Install software package';
-$wb['install_key_txt'] = 'Enter install key';
-$wb['btn_save_txt'] = 'Start Installation';
-$wb['btn_cancel_txt'] = 'Cancel';
-?>
diff --git a/interface/web/admin/lib/lang/sk_software_package_list.lng b/interface/web/admin/lib/lang/sk_software_package_list.lng
deleted file mode 100644
index 502a3a2237..0000000000
--- a/interface/web/admin/lib/lang/sk_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Softvérové balíky';
-$wb['installed_txt'] = 'Stav';
-$wb['package_title_txt'] = 'Balíky';
-$wb['package_description_txt'] = 'Popis';
-$wb['action_txt'] = 'Akcia';
-$wb['toolsarea_head_txt'] = 'Packages';
-$wb['repoupdate_txt'] = 'Update package list';
-$wb['package_id_txt'] = 'local App-ID';
-$wb['no_packages_txt'] = 'No packages available';
-$wb['edit_txt'] = 'Edit';
-$wb['delete_txt'] = 'Delete';
-?>
diff --git a/interface/web/admin/lib/lang/sk_software_repo.lng b/interface/web/admin/lib/lang/sk_software_repo.lng
deleted file mode 100644
index 263614f50c..0000000000
--- a/interface/web/admin/lib/lang/sk_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Skladisko';
-$wb['repo_url_txt'] = 'URL';
-$wb['repo_username_txt'] = 'Uživateľ (voliteľný)';
-$wb['repo_password_txt'] = 'Heslo (voliteľné)';
-$wb['active_txt'] = 'Aktivovať';
-$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
-?>
diff --git a/interface/web/admin/lib/lang/sk_software_repo_list.lng b/interface/web/admin/lib/lang/sk_software_repo_list.lng
deleted file mode 100644
index c77d4a3846..0000000000
--- a/interface/web/admin/lib/lang/sk_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Skladisko';
-$wb['active_txt'] = 'Aktívne';
-$wb['repo_name_txt'] = 'Skladisko';
-$wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/sk_software_update_list.lng b/interface/web/admin/lib/lang/sk_software_update_list.lng
deleted file mode 100644
index 9a04707c3e..0000000000
--- a/interface/web/admin/lib/lang/sk_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Aktualizácia softvéru';
-$wb['server_select_txt'] = 'Vyberte server';
-$wb['installed_txt'] = 'Akcia';
-$wb['update_title_txt'] = 'Aktualizácia ';
-$wb['version_txt'] = 'Verzia';
-$wb['action_txt'] = 'Akcia';
-$wb['no_updates_txt'] = 'No updates available';
-?>
diff --git a/interface/web/admin/lib/lang/tr_software_package.lng b/interface/web/admin/lib/lang/tr_software_package.lng
deleted file mode 100644
index addda60195..0000000000
--- a/interface/web/admin/lib/lang/tr_software_package.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['package_title_txt'] = 'Paket Başlığı';
-$wb['package_key_txt'] = 'Paket Anahtarı';
-$wb['Software Package'] = 'Yazılım Paketi';
-$wb['Modify software package details'] = 'Yazılım paketi bilgilerini düzenle';
-?>
diff --git a/interface/web/admin/lib/lang/tr_software_package_install.lng b/interface/web/admin/lib/lang/tr_software_package_install.lng
deleted file mode 100644
index fe7dd26e73..0000000000
--- a/interface/web/admin/lib/lang/tr_software_package_install.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['head_txt'] = 'Yazılım Paketi Yükleme';
-$wb['install_key_txt'] = 'Yükleme anahtarını yazın';
-$wb['btn_save_txt'] = 'Yüklemeyi Başlat';
-$wb['btn_cancel_txt'] = 'Geri';
-?>
diff --git a/interface/web/admin/lib/lang/tr_software_package_list.lng b/interface/web/admin/lib/lang/tr_software_package_list.lng
deleted file mode 100644
index 1838ff94cf..0000000000
--- a/interface/web/admin/lib/lang/tr_software_package_list.lng
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Yazılım Paketleri';
-$wb['installed_txt'] = 'Durum';
-$wb['package_title_txt'] = 'Paket';
-$wb['package_description_txt'] = 'Açıklama';
-$wb['action_txt'] = 'İşlem';
-$wb['toolsarea_head_txt'] = 'Paketler';
-$wb['repoupdate_txt'] = 'Paket Listesini Güncelle';
-$wb['package_id_txt'] = 'yerel uygulama kodu';
-$wb['no_packages_txt'] = 'Henüz kullanılabilecek bir paket yok';
-$wb['edit_txt'] = 'Düzenle';
-$wb['delete_txt'] = 'Sil';
-?>
diff --git a/interface/web/admin/lib/lang/tr_software_repo.lng b/interface/web/admin/lib/lang/tr_software_repo.lng
deleted file mode 100644
index 13e113967f..0000000000
--- a/interface/web/admin/lib/lang/tr_software_repo.lng
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$wb['repo_name_txt'] = 'Depo';
-$wb['repo_url_txt'] = 'İnternet Adresi';
-$wb['repo_username_txt'] = 'Kullanıcı Adı (isteğe bağlı)';
-$wb['repo_password_txt'] = 'Parola (isteğe bağlı)';
-$wb['active_txt'] = 'Etkin';
-$wb['Software Repository which may contain addons or updates'] = 'Eklenti ya da güncellemeleri içeren yazılım deposu';
-?>
diff --git a/interface/web/admin/lib/lang/tr_software_repo_list.lng b/interface/web/admin/lib/lang/tr_software_repo_list.lng
deleted file mode 100644
index 5e2fdf5b92..0000000000
--- a/interface/web/admin/lib/lang/tr_software_repo_list.lng
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Depolar';
-$wb['active_txt'] = 'Etkin';
-$wb['repo_name_txt'] = 'Depo';
-$wb['repo_url_txt'] = 'İnternet Adresi';
-?>
diff --git a/interface/web/admin/lib/lang/tr_software_update_list.lng b/interface/web/admin/lib/lang/tr_software_update_list.lng
deleted file mode 100644
index a462d90faa..0000000000
--- a/interface/web/admin/lib/lang/tr_software_update_list.lng
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$wb['list_head_txt'] = 'Yazılım Güncellemeleri';
-$wb['server_select_txt'] = 'Sunucu Seçin';
-$wb['installed_txt'] = 'İşlem';
-$wb['update_title_txt'] = 'Güncelleme';
-$wb['version_txt'] = 'Sürüm';
-$wb['action_txt'] = 'İşlem';
-$wb['no_updates_txt'] = 'Henüz bir güncelleme yok';
-?>
diff --git a/interface/web/admin/lib/module.conf.php b/interface/web/admin/lib/module.conf.php
index 124656b7f3..59b2e1ffc1 100644
--- a/interface/web/admin/lib/module.conf.php
+++ b/interface/web/admin/lib/module.conf.php
@@ -92,30 +92,6 @@ $module['nav'][] = array(   'title'     => 'Interface',
 	'items'     => $items);
 
 
-// cleanup
-unset($items);
-
-
-$items[] = array(   'title'  => 'Repositories',
-	'target'  => 'content',
-	'link' => 'admin/software_repo_list.php',
-	'html_id'   => 'software_repo_list');
-
-$items[] = array(   'title'  => 'Packages',
-	'target'  => 'content',
-	'link' => 'admin/software_package_list.php',
-	'html_id'   => 'software_package_list');
-
-$items[] = array(   'title'  => 'Updates',
-	'target'  => 'content',
-	'link' => 'admin/software_update_list.php',
-	'html_id'   => 'software_update_list');
-
-$module['nav'][] = array(   'title'     => 'Software',
-	'open'  => 1,
-	'items' => $items);
-
-
 // cleanup
 unset($items);
 
diff --git a/interface/web/admin/list/software_repo.list.php b/interface/web/admin/list/software_repo.list.php
deleted file mode 100644
index 0e172ace99..0000000000
--- a/interface/web/admin/list/software_repo.list.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-
-/*
-	Datatypes:
-	- INTEGER
-	- DOUBLE
-	- CURRENCY
-	- VARCHAR
-	- TEXT
-	- DATE
-*/
-
-
-
-// Name of the list
-$liste["name"]     = "software_repo";
-
-// Database table
-$liste["table"]    = "software_repo";
-
-// Index index field of the database table
-$liste["table_idx"]   = "software_repo_id";
-
-// Search Field Prefix
-$liste["search_prefix"]  = "search_";
-
-// Records per page
-$liste["records_per_page"]  = "15";
-
-// Script File of the list
-$liste["file"]    = "software_repo_list.php";
-
-// Script file of the edit form
-$liste["edit_file"]   = "software_repo_edit.php";
-
-// Script File of the delete script
-$liste["delete_file"]  = "software_repo_del.php";
-
-// Paging Template
-$liste["paging_tpl"]  = "templates/paging.tpl.htm";
-
-// Enable auth
-$liste["auth"]    = "yes";
-
-
-/*****************************************************
-* Suchfelder
-*****************************************************/
-
-$liste["item"][] = array( 'field'  => "active",
-	'datatype' => "VARCHAR",
-	'formtype' => "SELECT",
-	'op'  => "=",
-	'prefix' => "",
-	'suffix' => "",
-	'width'  => "",
-	'value'  => array('y' => $app->lng('yes_txt'), 'n' => $app->lng('no_txt')));
-
-$liste["item"][] = array( 'field'  => "repo_name",
-	'datatype' => "VARCHAR",
-	'formtype' => "TEXT",
-	'op'  => "like",
-	'prefix' => "%",
-	'suffix' => "%",
-	'width'  => "",
-	'value'  => "");
-
-
-$liste["item"][] = array( 'field'  => "repo_url",
-	'datatype' => "VARCHAR",
-	'formtype' => "TEXT",
-	'op'  => "like",
-	'prefix' => "%",
-	'suffix' => "%",
-	'width'  => "",
-	'value'  => "");
-
-?>
diff --git a/interface/web/admin/software_package_del.php b/interface/web/admin/software_package_del.php
deleted file mode 100644
index e1387f39c4..0000000000
--- a/interface/web/admin/software_package_del.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-
-/*
-Copyright (c) 2012, Till Brehm, projektfarm Gmbh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-require_once '../../lib/config.inc.php';
-require_once '../../lib/app.inc.php';
-
-//* Check permissions for module
-$app->auth->check_module_permissions('admin');
-$app->auth->check_security_permissions('admin_allow_software_packages');
-if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
-
-// Check CSRF Token
-$app->auth->csrf_token_check('GET');
-
-$software_update_inst_id = $app->functions->intval($_GET['software_update_inst_id']);
-
-if($software_update_inst_id > 0) {
-	$app->db->datalogDelete('software_update_inst', 'software_update_inst_id', $software_update_inst_id);
-	//header('Location: admin/software_package_list.php');
-	die('HEADER_REDIRECT: admin/software_package_list.php');
-} else {
-	die('Invalid ID');
-}
-
-
-
-
-
-
-?>
diff --git a/interface/web/admin/software_package_edit.php b/interface/web/admin/software_package_edit.php
deleted file mode 100644
index 65555d3a35..0000000000
--- a/interface/web/admin/software_package_edit.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/*
-Copyright (c) 2008, Till Brehm, projektfarm Gmbh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-/******************************************
-* Begin Form configuration
-******************************************/
-
-$tform_def_file = "form/software_package.tform.php";
-
-/******************************************
-* End Form configuration
-******************************************/
-
-require_once '../../lib/config.inc.php';
-require_once '../../lib/app.inc.php';
-
-//* Check permissions for module
-$app->auth->check_module_permissions('admin');
-$app->auth->check_security_permissions('admin_allow_software_packages');
-if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
-
-// Loading classes
-$app->uses('tpl,tform,tform_actions');
-$app->load('tform_actions');
-
-class page_action extends tform_actions {
-
-}
-
-$page = new page_action;
-$page->onLoad();
-
-?>
diff --git a/interface/web/admin/software_package_install.php b/interface/web/admin/software_package_install.php
deleted file mode 100644
index 6a5326d51a..0000000000
--- a/interface/web/admin/software_package_install.php
+++ /dev/null
@@ -1,179 +0,0 @@
-<?php
-
-/*
-Copyright (c) 2010, Till Brehm, projektfarm Gmbh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-require_once '../../lib/config.inc.php';
-require_once '../../lib/app.inc.php';
-
-//* Check permissions for module
-$app->auth->check_module_permissions('admin');
-$app->auth->check_security_permissions('admin_allow_software_packages');
-
-//* This is only allowed for administrators
-if(!$app->auth->is_admin()) die('only allowed for administrators.');
-
-// Check CSRF Token
-if(count($_POST) > 0) {
-	$app->auth->csrf_token_check('POST');
-} else {
-	$app->auth->csrf_token_check('GET');
-}
-
-$package_name = $_REQUEST['package'];
-$install_server_id = $app->functions->intval($_REQUEST['server_id']);
-$install_key = trim($_REQUEST['install_key']);
-
-$package = $app->db->queryOneRecord("SELECT * FROM software_package WHERE package_name = ?", $package_name);
-
-$install_key_verified = false;
-$message_err = '';
-$message_ok = '';
-
-//* verify the key
-if($package['package_installable'] == 'key' && $install_key != '') {
-
-	$repo = $app->db->queryOneRecord("SELECT * FROM software_repo WHERE software_repo_id = ?", $package['software_repo_id']);
-
-	$client = new SoapClient(null, array('location' => $repo['repo_url'],
-			'uri'      => $repo['repo_url']));
-
-	$install_key_verified = $client->check_installable($package_name, $install_key, $repo['repo_username'], $repo['repo_password']);
-
-	if($install_key_verified == false) {
-		//$install_key = '';
-		$message_err = 'Verification of the key failed.';
-	} else {
-		// Store the verified key into the database
-		$app->db->datalogUpdate('software_package', array("package_key" => $install_key), 'package_id', $package['package_id']);
-	}
-} else {
-	$message_ok = 'Please enter the software key for the package.';
-}
-
-//* Install packages, if all requirements are fullfilled.
-if($install_server_id > 0 && $package_name != '' && ($package['package_installable'] == 'yes' || $install_key_verified == true)) {
-	$sql = "SELECT software_update_id, package_name, update_title FROM software_update WHERE type = 'full' AND package_name = ? ORDER BY v1 DESC, v2 DESC, v3 DESC, v4 DESC LIMIT 0,1";
-	$tmp = $app->db->queryOneRecord($sql, $package_name);
-	$software_update_id = $tmp['software_update_id'];
-
-	//* if package requires a DB and there is no data for a db in config, then we create this data now
-	if($package['package_requires_db'] == 'mysql') {
-		$app->uses('ini_parser,getconf');
-
-		$package_config_array = array();
-		if(trim($package['package_config']) != '') {
-			$package_config_array = $app->ini_parser->parse_ini_string(stripslashes($package['package_config']));
-		}
-
-		if(!isset($package_config_array['mysql'])) {
-			$package_config_array['mysql'] = array( 'database_name' => 'ispapp'.$package['package_id'],
-				'database_user' => 'ispapp'.$package['package_id'],
-				'database_password' => md5(mt_rand()),
-				'database_host' => 'localhost');
-			$package_config_str = $app->ini_parser->get_ini_string($package_config_array);
-			$package['package_config'] = $package_config_str;
-			$app->db->datalogUpdate('software_package', array("package_config" => $package_config_str), 'package_id', $package['package_id']);
-		}
-	}
-
-	//* If the packages requires a remote user
-	if($package['package_remote_functions'] != '') {
-
-		if(trim($package['package_config']) != '') {
-			$package_config_array = $app->ini_parser->parse_ini_string(stripslashes($package['package_config']));
-		}
-
-		if(!isset($package_config_array['remote_api'])) {
-			$remote_user = 'ispapp'.$package['package_id'];
-			$remote_password = md5(mt_rand());
-			$remote_functions = $package['package_remote_functions'];
-
-			$package_config_array['remote_api'] = array(
-				'remote_hostname' => $_SERVER['HTTP_HOST'],
-				'remote_user'   => $remote_user,
-				'remote_password'  => $remote_password
-			);
-
-			$package_config_str = $app->ini_parser->get_ini_string($package_config_array);
-			$package['package_config'] = $package_config_str;
-			$remote_password_md5 = md5($remote_password);
-			$app->db->datalogUpdate('software_package', array("package_config" => $package_config_str), 'package_id', $package['package_id']);
-
-			$sql = "INSERT INTO `remote_user` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `remote_username`, `remote_password`, `remote_functions`) VALUES
-					(1, 1, 'riud', 'riud', '', ?, ?, ?)";
-			$app->db->query($sql, $remote_user, $remote_password_md5, $remote_functions);
-
-		}
-
-	}
-
-	//* Add the record to start the install process
-	$insert_data = array(
-		"package_name" => $package_name,
-		"server_id" => $install_server_id,
-		"software_update_id" => $software_update_id,
-		"status" => 'installing'
-	);
-	$app->db->datalogInsert('software_update_inst', $insert_data, 'software_update_inst_id');
-	$message_ok = 'Starting package installation '."<a href=\"#\" onclick=\"ISPConfig.submitForm('pageForm','admin/software_package_list.php');\">".$app->lng('next')."</a>";
-
-}
-
-if(count($_POST) > 2 && $install_key == '') {
-	$message_ok = 'Please enter the software key.';
-}
-
-//* Show key input form
-if($package['package_installable'] == 'key' && !$install_key_verified) {
-	$insert_key = true;
-} else {
-	$insert_key = false;
-}
-
-// Loading the template
-$app->uses('tpl');
-$app->tpl->newTemplate("form.tpl.htm");
-$app->tpl->setInclude('content_tpl', 'templates/software_package_install.htm');
-
-$app->tpl->setVar('message_ok', $message_ok);
-$app->tpl->setVar('message_err', $message_err);
-$app->tpl->setVar('insert_key', $insert_key);
-$app->tpl->setVar('install_key', $install_key);
-$app->tpl->setVar('package_name', $package_name);
-$app->tpl->setVar('server_id', $install_server_id);
-
-
-include_once 'lib/lang/en_software_package_install.lng';
-$app->tpl->setVar($wb);
-
-
-$app->tpl_defaults();
-$app->tpl->pparse();
-
-?>
diff --git a/interface/web/admin/software_package_list.php b/interface/web/admin/software_package_list.php
deleted file mode 100644
index 8a21696c7f..0000000000
--- a/interface/web/admin/software_package_list.php
+++ /dev/null
@@ -1,200 +0,0 @@
-<?php
-
-/*
-Copyright (c) 2008, Till Brehm, projektfarm Gmbh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-require_once '../../lib/config.inc.php';
-require_once '../../lib/app.inc.php';
-
-//* Check permissions for module
-$app->auth->check_module_permissions('admin');
-
-//* This is only allowed for administrators
-if(!$app->auth->is_admin()) die('only allowed for administrators.');
-
-//* Get the latest packages from the repositorys and insert them in the local database
-$packages_added = 0;
-$repos = $app->db->queryAllRecords("SELECT software_repo_id, repo_url, repo_username, repo_password FROM software_repo WHERE active = 'y'");
-if(is_array($repos) && isset($_GET['action']) && $_GET['action'] == 'repoupdate' ) {
-	foreach($repos as $repo) {
-		$client = new SoapClient(null, array('location' => $repo['repo_url'],
-				'uri'      => $repo['repo_url']));
-
-		$packages = $client->get_packages($repo['repo_username'], $repo['repo_password']);
-		if(is_array($packages)) {
-			foreach($packages as $p) {
-				$package_name = $p['name'];
-				$tmp = $app->db->queryOneRecord("SELECT package_id FROM software_package WHERE package_name = ?", $package_name);
-
-				$package_title = $p['title'];
-				$package_description = $p['description'];
-				$software_repo_id = $app->functions->intval($repo['software_repo_id']);
-				$package_type = $p['type'];
-				$package_installable = $p['installable'];
-				$package_requires_db = $p['requires_db'];
-				$package_remote_functions = $p['remote_functions'];
-
-				if(empty($tmp['package_id'])) {
-					$insert_data = array(
-						"software_repo_id" => $software_repo_id,
-						"package_name" => $package_name, 
-						"package_title" => $package_title, 
-						"package_description" => $package_description,
-						"package_type" => $package_type,
-						"package_installable" => $package_installable,
-						"package_requires_db" => $package_requires_db,
-						"package_remote_functions" => $package_remote_functions
-						);
-					$app->db->datalogInsert('software_package', $insert_data, 'package_id');
-					$packages_added++;
-				} else {
-					$update_data = array(
-						"software_repo_id" => $software_repo_id,
-						"package_title" => $package_title, 
-						"package_description" => $package_description,
-						"package_type" => $package_type,
-						"package_installable" => $package_installable,
-						"package_requires_db" => $package_requires_db,
-						"package_remote_functions" => $package_remote_functions
-						);
-					//echo $update_data;
-					$app->db->datalogUpdate('software_package', $update_data, 'package_id', $tmp['package_id']);
-				}
-			}
-		}
-
-		$packages = $app->db->queryAllRecords("SELECT software_package.package_name, v1, v2, v3, v4 FROM software_package LEFT JOIN software_update ON ( software_package.package_name = software_update.package_name ) GROUP BY package_name ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC");
-		if(is_array($packages)) {
-			foreach($packages as $p) {
-
-				$version = $p['v1'].'.'.$p['v2'].'.'.$p['v3'].'.'.$p['v4'];
-				$updates = $client->get_updates($p['package_name'], $version, $repo['repo_username'], $repo['repo_password']);
-
-				if(is_array($updates)) {
-					foreach($updates as $u) {
-
-						$version_array = explode('.', $u['version']);
-						$v1 = $app->functions->intval($version_array[0]);
-						$v2 = $app->functions->intval($version_array[1]);
-						$v3 = $app->functions->intval($version_array[2]);
-						$v4 = $app->functions->intval($version_array[3]);
-
-						$package_name = $u['package_name'];
-						$software_repo_id = $app->functions->intval($repo['software_repo_id']);
-						$update_url = $u['url'];
-						$update_md5 = $u['md5'];
-						$update_dependencies = (isset($u['dependencies']))?$u['dependencies']:'';
-						$update_title = $u['title'];
-						$type = $u['type'];
-
-						// Check that we do not have this update in the database yet
-						$sql = "SELECT * FROM software_update WHERE package_name = ? and v1 = ? and v2 = ? and v3 = ? and v4 = ?";
-						$tmp = $app->db->queryOneRecord($sql, $package_name, $v1, $v2, $v3, $v4);
-						if(!isset($tmp['software_update_id'])) {
-							$insert_data = array(
-								"software_repo_id" => $software_repo_id,
-								"package_name" => $package_name,
-								"update_url" => $update_url,
-								"update_md5" => $update_md5,
-								"update_dependencies" => $update_dependencies,
-								"update_title" => $update_title,
-								"v1" => $v1,
-								"v2" => $v2,
-								"v3" => $v3,
-								"v4" => $v4,
-								"type" => $type
-							);
-							$app->db->datalogInsert('software_update', $insert_data, 'software_update_id');
-						}
-
-					}
-				}
-			}
-		}
-	}
-}
-
-// Show the list in the interface
-// Loading the template
-$app->uses('tpl');
-$app->tpl->newTemplate("form.tpl.htm");
-$app->tpl->setInclude('content_tpl', 'templates/software_package_list.htm');
-
-$csrf_token = $app->auth->csrf_token_get('software_package_list');
-$_csrf_id = $csrf_token['csrf_id'];
-$_csrf_key = $csrf_token['csrf_key'];
-
-$servers = $app->db->queryAllRecords('SELECT server_id, server_name FROM server ORDER BY server_name');
-$packages = $app->db->queryAllRecords('SELECT * FROM software_package');
-if(is_array($packages) && count($packages) > 0) {
-	foreach($packages as $key => $p) {
-		$installed_txt = '';
-		foreach($servers as $s) {
-			$inst = $app->db->queryOneRecord("SELECT * FROM software_update, software_update_inst WHERE software_update_inst.software_update_id = software_update.software_update_id AND software_update_inst.package_name = ? AND server_id = ?", $p["package_name"], $s["server_id"]);
-			$version = $inst['v1'].'.'.$inst['v2'].'.'.$inst['v3'].'.'.$inst['v4'];
-
-			if($inst['status'] == 'installed') {
-				$installed_txt .= $s['server_name'].": ".$app->lng("Installed version $version")."<br />";
-			} elseif ($inst['status'] == 'installing') {
-				$installed_txt .= $s['server_name'].": ".$app->lng("Installation in progress")."<br />";
-			} elseif ($inst['status'] == 'failed') {
-				$installed_txt .= $s['server_name'].": ".$app->lng("Installation failed")."<br />";
-			} elseif ($inst['status'] == 'deleting') {
-				$installed_txt .= $s['server_name'].": ".$app->lng("Deletion in progress")."<br />";
-			} else {
-				if($p['package_installable'] == 'no') {
-					$installed_txt .= $s['server_name'].": ".$app->lng("Package can not be installed.")."<br />";
-				} else {
-					$installed_txt .= $s['server_name'].": <a href=\"#\" data-load-content=\"admin/software_package_install.php?package=".$p["package_name"]."&server_id=".$s["server_id"]."&_csrf_key=".$_csrf_key."&_csrf_id=".$_csrf_id."\">Install now</a><br />";
-				}
-			}
-		}
-		$packages[$key]['software_update_inst_id'] = intval($inst['software_update_inst_id']);
-		$packages[$key]['installed'] = $installed_txt;
-		$packages[$key]['csrf_id'] = $_csrf_id;
-		$packages[$key]['csrf_key'] = $_csrf_key;
-	}
-	$app->tpl->setVar('has_packages', 1);
-} else {
-	$app->tpl->setVar('has_packages', 0);
-}
-
-
-
-$app->tpl->setLoop('records', $packages);
-
-$language = (isset($_SESSION['s']['language']))?$_SESSION['s']['language']:$conf['language'];
-include_once 'lib/lang/'.$app->functions->check_language($language).'_software_package_list.lng';
-$app->tpl->setVar($wb);
-
-
-$app->tpl_defaults();
-$app->tpl->pparse();
-
-
-?>
diff --git a/interface/web/admin/software_repo_del.php b/interface/web/admin/software_repo_del.php
deleted file mode 100644
index 630993717c..0000000000
--- a/interface/web/admin/software_repo_del.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-/*
-Copyright (c) 2008, Till Brehm, projektfarm Gmbh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/******************************************
-* Begin Form configuration
-******************************************/
-
-$list_def_file = "list/software_repo.list.php";
-$tform_def_file = "form/software_repo.tform.php";
-
-/******************************************
-* End Form configuration
-******************************************/
-
-require_once '../../lib/config.inc.php';
-require_once '../../lib/app.inc.php';
-
-//* Check permissions for module
-$app->auth->check_module_permissions('admin');
-$app->auth->check_security_permissions('admin_allow_software_repo');
-if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
-
-$app->uses("tform_actions");
-$app->tform_actions->onDelete();
-
-?>
diff --git a/interface/web/admin/software_repo_edit.php b/interface/web/admin/software_repo_edit.php
deleted file mode 100644
index 6d52da2b56..0000000000
--- a/interface/web/admin/software_repo_edit.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/*
-Copyright (c) 2008, Till Brehm, projektfarm Gmbh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-/******************************************
-* Begin Form configuration
-******************************************/
-
-$tform_def_file = "form/software_repo.tform.php";
-
-/******************************************
-* End Form configuration
-******************************************/
-
-require_once '../../lib/config.inc.php';
-require_once '../../lib/app.inc.php';
-
-//* Check permissions for module
-$app->auth->check_module_permissions('admin');
-$app->auth->check_security_permissions('admin_allow_software_repo');
-if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
-
-// Loading classes
-$app->uses('tpl,tform,tform_actions');
-$app->load('tform_actions');
-
-class page_action extends tform_actions {
-
-}
-
-$page = new page_action;
-$page->onLoad();
-
-?>
diff --git a/interface/web/admin/software_repo_list.php b/interface/web/admin/software_repo_list.php
deleted file mode 100644
index b8afc8f9bc..0000000000
--- a/interface/web/admin/software_repo_list.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/*
-Copyright (c) 2008, Till Brehm, projektfarm Gmbh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-require_once '../../lib/config.inc.php';
-require_once '../../lib/app.inc.php';
-
-/******************************************
-* Begin Form configuration
-******************************************/
-
-$list_def_file = "list/software_repo.list.php";
-
-/******************************************
-* End Form configuration
-******************************************/
-
-//* Check permissions for module
-$app->auth->check_module_permissions('admin');
-
-$app->uses('listform_actions');
-
-$app->listform_actions->onLoad();
-
-
-?>
diff --git a/interface/web/admin/software_update_list.php b/interface/web/admin/software_update_list.php
deleted file mode 100644
index 6d680c0ec1..0000000000
--- a/interface/web/admin/software_update_list.php
+++ /dev/null
@@ -1,204 +0,0 @@
-<?php
-
-/*
-Copyright (c) 2008, Till Brehm, projektfarm Gmbh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-require_once '../../lib/config.inc.php';
-require_once '../../lib/app.inc.php';
-
-//* Check permissions for module
-$app->auth->check_module_permissions('admin');
-$app->auth->check_security_permissions('admin_allow_software_packages');
-
-//* This is only allowed for administrators
-if(!$app->auth->is_admin()) die('only allowed for administrators.');
-
-//* Get the latest updates from the repositorys and insert them in the local database
-$updates_added = 0;
-$repos = $app->db->queryAllRecords("SELECT software_repo_id, repo_url, repo_username, repo_password FROM software_repo WHERE active = 'y'");
-if(is_array($repos)) {
-	foreach($repos as $repo) {
-
-		/*
-		SELECT software_package.package_name, v1, v2, v3, v4
-		FROM software_package
-		LEFT JOIN software_update ON ( software_package.package_name = software_update.package_name )
-		LEFT JOIN software_update_inst ON ( software_update.software_update_id = software_update_inst.software_update_id )
-		GROUP BY package_name
-		ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC
-		*/
-
-		$client = new SoapClient(null, array('location' => $repo['repo_url'],
-				'uri'      => $repo['repo_url']));
-
-		$packages = $app->db->queryAllRecords("SELECT software_package.package_name, v1, v2, v3, v4 FROM software_package LEFT JOIN software_update ON ( software_package.package_name = software_update.package_name ) GROUP BY package_name ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC");
-		if(is_array($packages)) {
-			foreach($packages as $p) {
-
-				$version = $p['v1'].'.'.$p['v2'].'.'.$p['v3'].'.'.$p['v4'];
-				$updates = $client->get_updates($p['package_name'], $version, $repo['repo_username'], $repo['repo_password']);
-
-				if(is_array($updates)) {
-					foreach($updates as $u) {
-
-						$version_array = explode('.', $u['version']);
-						$v1 = $app->functions->intval($version_array[0]);
-						$v2 = $app->functions->intval($version_array[1]);
-						$v3 = $app->functions->intval($version_array[2]);
-						$v4 = $app->functions->intval($version_array[3]);
-
-						$package_name = $u['package_name'];
-						$software_repo_id = $app->functions->intval($repo['software_repo_id']);
-						$update_url = $u['url'];
-						$update_md5 = $u['md5'];
-						$update_dependencies = (isset($u['dependencies']))?$u['dependencies']:'';
-						$update_title = $u['title'];
-						$type = $u['type'];
-
-						// Check that we do not have this update in the database yet
-						$sql = "SELECT * FROM software_update WHERE package_name = ? and v1 = ? and v2 = ? and v3 = ? and v4 = ?";
-						$tmp = $app->db->queryOneRecord($sql, $package_name, $v1, $v2, $v3, $v4);
-						if(!isset($tmp['software_update_id'])) {
-							// Insert the update in the datbase
-							$sql = "INSERT INTO software_update (software_repo_id, package_name, update_url, update_md5, update_dependencies, update_title, v1, v2, v3, v4, type)
-							VALUES ($software_repo_id, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
-							//die($sql);
-							$app->db->query($sql, $package_name, $update_url, $update_md5, $update_dependencies, $update_title, $v1, $v2, $v3, $v4, $type);
-						}
-
-					}
-				}
-			}
-		}
-	}
-}
-
-
-//* Install packages, if GET Request
-if(isset($_GET['action']) && $_GET['action'] == 'install' && $_GET['package'] != '' && $_GET['server_id'] > 0) {
-	$package_name = $_GET['package'];
-	$server_id = $app->functions->intval($_GET['server_id']);
-	$software_update_id = $app->functions->intval($_GET['id']);
-
-	$insert_data = array(
-		"package_name" => $package_name,
-		"server_id" => $server_id,
-		"software_update_id" => $software_update_id,
-		"status" => 'installing'
-	);
-	$app->db->datalogInsert('software_update_inst', $insert_data, 'software_update_inst_id');
-
-}
-
-
-
-// Show the list in the interface
-// Loading the template
-$app->uses('tpl');
-$app->tpl->newTemplate("form.tpl.htm");
-$app->tpl->setInclude('content_tpl', 'templates/software_update_list.htm');
-
-/*
-SELECT software_package.package_name, software_package.package_title, software_update.update_title, v1, v2, v3, v4, software_update_inst.status
-		FROM software_package
-		LEFT JOIN software_update ON ( software_package.package_name = software_update.package_name )
-		LEFT JOIN software_update_inst ON ( software_update.software_update_id = software_update_inst.software_update_id )
-GROUP BY software_update.software_update_id
-		ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC
-*/
-
-
-
-if(isset($_POST["server_id"]) && $_POST["server_id"] > 0) {
-	$server_id = $app->functions->intval($_POST["server_id"]);
-} else {
-	$server_id = 1;
-}
-
-$servers = $app->db->queryAllRecords('SELECT server_id, server_name FROM server ORDER BY server_name');
-foreach($servers as $key => $server) {
-	if($server['server_id'] == $server_id) {
-		$servers[$key]['selected'] = 'selected';
-	} else {
-		$servers[$key]['selected'] = '';
-	}
-}
-
-$app->tpl->setLoop('servers', $servers);
-
-$sql = "SELECT v1, v2, v3, v4, software_update.update_title, software_update.software_update_id, software_update.package_name, v1, v2, v3, v4, software_update_inst.status
-		FROM software_update LEFT JOIN software_update_inst ON ( software_update.software_update_id = software_update_inst.software_update_id )
-		WHERE server_id = $server_id
-		GROUP BY software_update.package_name
-		ORDER BY software_update.package_name ASC, v1 DESC , v2 DESC , v3 DESC , v4 DESC";
-
-$installed_packages = $app->db->queryAllRecords($sql);
-
-
-$records_out = array();
-
-if(is_array($installed_packages)) {
-	foreach($installed_packages as $ip) {
-
-		// Get version number of the latest installed version
-		$sql = "SELECT v1, v2, v3, v4 FROM software_update, software_update_inst WHERE software_update.software_update_id = software_update_inst.software_update_id AND server_id = ? ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC LIMIT 0,1";
-		$lu = $app->db->queryOneRecord($sql, $server_id);
-
-		// Get all installable updates
-		$sql = "SELECT * FROM software_update WHERE v1 >= ? AND v2 >= ? AND v3 >= ? AND v4 >= ? AND package_name = ? ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC";
-		$updates = $app->db->queryAllRecords($sql, $lu['v1'], $lu['v2'], $lu['v3'], $lu['v4'], $ip['package_name']);
-		//die($sql);
-
-		if(is_array($updates)) {
-			// Delete the last record as it is already installed
-			unset($updates[count($updates)-1]);
-
-			foreach($updates as $key => $u) {
-				$version = $u['v1'].'.'.$u['v2'].'.'.$u['v3'].'.'.$u['v4'];
-				$installed_txt = "<a href=\"#\" data-load-content=\"admin/software_update_list.php?action=install&package=".$u["package_name"]."&id=".$u["software_update_id"]."&server_id=".$server_id."\">Install Update</a><br />";
-				$records_out[] = array('version' => $version, 'update_title' => $u["update_title"], 'installed' => $installed_txt);
-
-			}
-		}
-	}
-}
-
-
-
-$app->tpl->setLoop('records', $records_out);
-
-$language = (isset($_SESSION['s']['language']))?$_SESSION['s']['language']:$conf['language'];
-include_once 'lib/lang/'.$app->functions->check_language($language).'_software_update_list.lng';
-$app->tpl->setVar($wb);
-
-
-$app->tpl_defaults();
-$app->tpl->pparse();
-
-
-?>
diff --git a/interface/web/admin/templates/software_package_edit.htm b/interface/web/admin/templates/software_package_edit.htm
deleted file mode 100644
index 2569c267f0..0000000000
--- a/interface/web/admin/templates/software_package_edit.htm
+++ /dev/null
@@ -1,22 +0,0 @@
-<div class='page-header'>
-	<h1><tmpl_var name="list_head_txt"></h1>
-</div>
-<p><tmpl_var name="list_desc_txt"></p>
-
-
-        
-            <div class="form-group">
-                <label for="package_title" class="col-sm-3 control-label">{tmpl_var name='package_title_txt'}</label>
-                {tmpl_var name='package_title'}<input name="package_title" id="package_title" value="{tmpl_var name='package_title'}" size="40" maxlength="40" type="hidden" class="textInput" />
-            </div>
-            <div class="form-group">
-                <label for="package_key" class="col-sm-3 control-label">{tmpl_var name='package_key_txt'}</label>
-                <div class="col-sm-9"><input type="text" name="package_key" id="package_key" value="{tmpl_var name='package_key'}" class="form-control" /></div></div>
-        
-            
-        <input type="hidden" name="id" value="{tmpl_var name='id'}">
-            
-        <div class="clear"><div class="right">
-            <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/software_package_edit.php">{tmpl_var name='btn_save_txt'}</button>
-            <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/software_package_list.php">{tmpl_var name='btn_cancel_txt'}</button>
-        </div></div>
\ No newline at end of file
diff --git a/interface/web/admin/templates/software_package_install.htm b/interface/web/admin/templates/software_package_install.htm
deleted file mode 100644
index 8524b3c087..0000000000
--- a/interface/web/admin/templates/software_package_install.htm
+++ /dev/null
@@ -1,31 +0,0 @@
-<div class='page-header'>
-	<h1><tmpl_var name="head_txt"></h1>
-</div>
-<p><tmpl_var name="desc_txt"></p>
-
-<div class="panel panel_software_repo">
-    <tmpl_if name="message_err">
-        <div id="errorMsg"><tmpl_var name="message_err"></div>
-    </tmpl_if>
-    <tmpl_if name="message_ok">
-        <div id="OKMsg"><tmpl_var name="message_ok"></div>
-    </tmpl_if>
-    <tmpl_if name="insert_key">
-        <div class="pnl_formsarea">
-            
-                <p>&nbsp;</p>
-                <div class="form-group">
-                    <label for="install_key" class="col-sm-3 control-label">{tmpl_var name='install_key_txt'}</label>
-                    <div class="col-sm-9"><input type="text" name="install_key" id="install_key" value="{tmpl_var name='install_key'}" class="form-control" /></div></div>
-                    
-                <input type="hidden" name="package" value="{tmpl_var name='package_name'}">
-                <input type="hidden" name="server_id" value="{tmpl_var name='server_id'}">
-                <p>&nbsp;</p>
-                <div class="clear"><div class="right">
-                    <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/software_package_install.php">{tmpl_var name='btn_save_txt'}</button>
-                    <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/software_package_list.php">{tmpl_var name='btn_cancel_txt'}</button>
-                </div></div>
-            
-        </div>
-    </tmpl_if>
-</div>
\ No newline at end of file
diff --git a/interface/web/admin/templates/software_package_list.htm b/interface/web/admin/templates/software_package_list.htm
deleted file mode 100644
index e69e3780af..0000000000
--- a/interface/web/admin/templates/software_package_list.htm
+++ /dev/null
@@ -1,55 +0,0 @@
-<div class='page-header'>
-	<h1><tmpl_var name="list_head_txt"></h1>
-</div>
-<p><tmpl_var name="list_desc_txt"></p>
-
-
-        <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p>
-            
-                <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/software_package_list.php?action=repoupdate">{tmpl_var name="repoupdate_txt"}</button>
-            
-        
-
-    
-        <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p>
-            <div class="table-wrapper marginTop15">
-<table class="table">
-                <thead class="dark form-group-sm">
-                    <tr>
-                        <th data-column="installed"><tmpl_var name="installed_txt"></th>
-                        <th data-column="package_title"><tmpl_var name="package_title_txt"></th>
-                        <th data-column="package_description"><tmpl_var name="package_description_txt"></th>
-                        <th data-column="package_id"><tmpl_var name="package_id_txt"></th>
-                        <th class="small-col text-right">{tmpl_var name='search_limit'}</th>
-                    </tr>
-                </thead>
-                <tbody>
-					<tmpl_loop name="records">
-                        <tmpl_if name="has_packages">
-						<tr>
-                            <td>{tmpl_var name="installed"}</td>
-                            <td>{tmpl_var name="package_title"}</td>
-                            <td>{tmpl_var name="package_description"}</td>
-                            <td>ispapp{tmpl_var name="package_id"}</td>
-							<td class="text-right">
-								<a class="btn btn-default formbutton-default formbutton-narrow" data-load-content="admin/software_package_edit.php?id={tmpl_var name='package_id'}"><span class="icon icon-edit"></span></a>
-                                <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/software_package_del.php?software_update_inst_id={tmpl_var name='software_update_inst_id'}&_csrf_id={tmpl_var name='csrf_id'}&_csrf_key={tmpl_var name='csrf_key'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a>
-                            </td>
-                        </tr>
-						</tmpl_if>
-                    </tmpl_loop>
-                    <tmpl_unless name="records">
-                        <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
-                            <td colspan="5">{tmpl_var name='no_packages_txt'}</td>
-                        </tr>
-                    </tmpl_unless>
-                </tbody>
-                <tfoot>
-                    <tr>
-                        <td colspan="5"></td>
-                    </tr>
-                </tfoot>
-            </table>
-</div>
-        
-    
\ No newline at end of file
diff --git a/interface/web/admin/templates/software_repo_edit.htm b/interface/web/admin/templates/software_repo_edit.htm
deleted file mode 100644
index a43ea74900..0000000000
--- a/interface/web/admin/templates/software_repo_edit.htm
+++ /dev/null
@@ -1,26 +0,0 @@
-            <div class="form-group">
-                <label for="repo_name" class="col-sm-3 control-label">{tmpl_var name='repo_name_txt'}</label>
-                <div class="col-sm-9"><input type="text" name="repo_name" id="repo_name" value="{tmpl_var name='repo_name'}" class="form-control" /></div></div>
-            <div class="form-group">
-                <label for="repo_url" class="col-sm-3 control-label">{tmpl_var name='repo_url_txt'}</label>
-                <div class="col-sm-9"><input type="text" name="repo_url" id="repo_url" value="{tmpl_var name='repo_url'}" class="form-control" /></div></div>
-            <div class="form-group">
-                <label for="repo_username" class="col-sm-3 control-label">{tmpl_var name='repo_username_txt'}</label>
-                <div class="col-sm-9"><input type="text" name="repo_username" id="repo_username" value="{tmpl_var name='repo_username'}" autocomplete="off" class="form-control" /></div></div>
-            <div class="form-group">
-                <label for="repo_password" class="col-sm-3 control-label">{tmpl_var name='repo_password_txt'}</label>
-                <div class="col-sm-9"><input type="password" name="repo_password" id="repo_password" value="{tmpl_var name='repo_password'}" autocomplete="off" class="form-control" /></div></div>
-            <div class="form-group">
-                <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
-                <div class="col-sm-9">
-                    {tmpl_var name='active'}
-                </div>
-            </div>
-        
-            
-        <input type="hidden" name="id" value="{tmpl_var name='id'}">
-            
-        <div class="clear"><div class="right">
-            <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/software_repo_edit.php">{tmpl_var name='btn_save_txt'}</button>
-            <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/software_repo_list.php">{tmpl_var name='btn_cancel_txt'}</button>
-        </div></div>
diff --git a/interface/web/admin/templates/software_repo_list.htm b/interface/web/admin/templates/software_repo_list.htm
deleted file mode 100644
index d408896de6..0000000000
--- a/interface/web/admin/templates/software_repo_list.htm
+++ /dev/null
@@ -1,58 +0,0 @@
-<div class='page-header'>
-	<h1><tmpl_var name="list_head_txt"></h1>
-</div>
-<p><tmpl_var name="list_desc_txt"></p>
-
-
-        <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p>
-            
-                <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/software_repo_edit.php">{tmpl_var name="add_new_record_txt"}</button>
-            
-        
-
-    
-        <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p>
-            <div class="table-wrapper marginTop15">
-<table class="table">
-                <thead class="dark form-group-sm">
-                    <tr>
-                        <th class="tiny-col" data-column="active"><tmpl_var name="active_txt"></th>
-                        <th data-column="repo_name"><tmpl_var name="repo_name_txt"></th>
-                        <th data-column="repo_url"><tmpl_var name="repo_url_txt"></th>
-                        <th class="text-right">&nbsp;</th>
-                    </tr>
-                    <tr>
-                        <td><select class="form-control" name="search_active">{tmpl_var name='search_active'}</select></td>
-                        <td><input class="form-control" type="text" name="search_repo_name" value="{tmpl_var name='search_repo_name'}" /></td>
-                        <td><input class="form-control" type="text" name="search_repo_url" value="{tmpl_var name='search_repo_url'}" /></td>
-                        <td class="text-right">
-                            <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/software_repo_list.php"><span class="icon icon-filter"></span></button>
-                        </td>
-                    </tr>
-                </thead>
-                <tbody>
-                    <tmpl_loop name="records">
-                        <tr>
-                            <td><a href="#" data-load-content="admin/software_repo_edit.php?id={tmpl_var name='id'}">{tmpl_var name="active"}</a></td>
-                            <td><a href="#" data-load-content="admin/software_repo_edit.php?id={tmpl_var name='id'}">{tmpl_var name="repo_name"}</a></td>
-                            <td><a href="#" data-load-content="admin/software_repo_edit.php?id={tmpl_var name='id'}">{tmpl_var name="repo_url"}</a></td>
-                            <td class="text-right">
-                                <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/software_repo_del.php?id={tmpl_var name='id'}&_csrf_id={tmpl_var name='csrf_id'}&_csrf_key={tmpl_var name='csrf_key'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a>
-                            </td>
-                        </tr>
-                    </tmpl_loop>
-                    <tmpl_unless name="records">
-                        <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
-                            <td colspan="4">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
-                        </tr>
-                    </tmpl_unless>
-                </tbody>
-                <tfoot>
-                    <tr>
-                        <td colspan="4"><tmpl_var name="paging"></td>
-                    </tr>
-                </tfoot>
-            </table>
-</div>
-        
-    
\ No newline at end of file
diff --git a/interface/web/admin/templates/software_update_list.htm b/interface/web/admin/templates/software_update_list.htm
deleted file mode 100644
index 6776b66a7a..0000000000
--- a/interface/web/admin/templates/software_update_list.htm
+++ /dev/null
@@ -1,53 +0,0 @@
-<div class='page-header'>
-	<h1><tmpl_var name="list_head_txt"></h1>
-</div>
-<p><tmpl_var name="list_desc_txt"></p>
-
-
-        <legend>Tools</legend>
-            
-                <div class="form-group">
-                    <label for="server_id" class="col-sm-3 control-label">{tmpl_var name='server_select_txt'}</label>
-                    <div class="col-sm-9"><select name="server_id" id="server_id" class="form-control" onChange="ISPConfig.submitForm('pageForm','admin/software_update_list.php');">
-                        <tmpl_loop name="servers">
-                            <option value="{tmpl_var name='server_id'}" {tmpl_var name='selected'}>{tmpl_var name='server_name'}</option>
-                        </tmpl_loop>
-                    </select></div>
-                
-        
-    </div>
-  
-    
-        <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p>
-            <div class="table-wrapper marginTop15">
-<table class="table">
-                <thead class="dark form-group-sm">
-                    <tr>
-                        <th data-column="installed"><tmpl_var name="installed_txt"></th>
-                        <th data-column="update_title"><tmpl_var name="update_title_txt"></th>
-                        <th data-column="version"><tmpl_var name="version_txt"></th>
-                    </tr>
-                </thead>
-                <tbody>
-                    <tmpl_loop name="records">
-                        <tr>
-                            <td>{tmpl_var name="installed"}</td>
-                            <td>{tmpl_var name="update_title"}</td>
-                            <td>{tmpl_var name="version"}</td>
-                        </tr>
-                    </tmpl_loop>
-                    <tmpl_unless name="records">
-                        <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
-                            <td colspan="3">{tmpl_var name='no_updates_txt'}</td>
-                        </tr>
-                    </tmpl_unless>
-                </tbody>
-                <tfoot>
-                    <tr>
-                        <td colspan="3"></td>
-                    </tr>
-                </tfoot>
-            </table>
-</div>
-        
-    
\ No newline at end of file
diff --git a/security/README.txt b/security/README.txt
index b42cbaabb4..1825b981f2 100644
--- a/security/README.txt
+++ b/security/README.txt
@@ -1,7 +1,7 @@
 
 Description for security_settings.ini values.
 
-The option "superadmin" means that a setting is only available to the admin user with userid 1 in the interface. 
+The option "superadmin" means that a setting is only available to the admin user with userid 1 in the interface.
 If there are other amdins, then they cant access this setting.
 
 -----------------------------------------------------------
@@ -57,14 +57,6 @@ Setting:     admin_allow_osupdate
 Options:     yes/no/superadmin
 Description: Disables System > OS update
 
-Setting:     admin_allow_software_packages
-Options:     yes/no/superadmin
-Description: Disables System > Apps & Addons > Packages and Update
-
-Setting:     admin_allow_software_repo
-Options:     yes/no/superadmin
-Description: Disables System > Apps & Addons > Repo
-
 Setting:     remote_api_allowed
 Options:     yes/no
 Description: Disables the remote API
@@ -80,13 +72,13 @@ Description: Enables the Intrusion Detection System
 Setting:     ids_log_level
 Options:     1 (number, default = 1)
 Description: IDS score that triggers the log in /usr/local/ispconfig/interface/temp/ids.log
-             This log can be used to feed the whitelist. 
-			 
+             This log can be used to feed the whitelist.
+
 			 Example:
-			 
+
 			 cat /usr/local/ispconfig/interface/temp/ids.log >> /usr/local/ispconfig/security/ids.whitelist
 			 rm -f /usr/local/ispconfig/interface/temp/ids.log
-			 
+
 			 If you want to use a custom whitelist, then store it as /usr/local/ispconfig/security/ids.whitelist.custom
 
 Setting:     ids_warn_level
@@ -95,7 +87,7 @@ Description: When the IDS score exceeds this level, a error message is logged in
 
 Setting:     ids_block_level
 Options:     100 (number, default = 100)
-Description: When the IDS score exceeds this level, a error message is shown to the user and further processing is blocked. A score of 100 will most likely never be reached. 
+Description: When the IDS score exceeds this level, a error message is shown to the user and further processing is blocked. A score of 100 will most likely never be reached.
              We have choosen such a high score as default until we have more complete whitelists for this new feature.
 
 Setting:     sql_scan_enabled
@@ -135,5 +127,3 @@ Description: Warn by email when /etc/shadow has been changed.
 Setting:     warn_group_change
 Options:     yes/no
 Description: Warn by email when /etc/group has been changed.
-
-
diff --git a/server/mods-available/server_module.inc.php b/server/mods-available/server_module.inc.php
index bc846cf530..92a50c5128 100644
--- a/server/mods-available/server_module.inc.php
+++ b/server/mods-available/server_module.inc.php
@@ -40,10 +40,7 @@ class server_module {
 		'server_ip_delete',
 		'firewall_insert',
 		'firewall_update',
-		'firewall_delete',
-		'software_update_inst_insert',
-		'software_update_inst_update',
-		'software_update_inst_delete');
+		'firewall_delete');
 
 	//* This function is called during ispconfig installation to determine
 	//  if a symlink shall be created for this plugin.
@@ -81,7 +78,6 @@ class server_module {
 		$app->modules->registerTableHook('server', 'server_module', 'process');
 		$app->modules->registerTableHook('server_ip', 'server_module', 'process');
 		$app->modules->registerTableHook('firewall', 'server_module', 'process');
-		$app->modules->registerTableHook('software_update_inst', 'server_module', 'process');
 
 		// Register service
 		//$app->services->registerService('httpd','web_module','restartHttpd');
@@ -112,11 +108,6 @@ class server_module {
 			if($action == 'u') $app->plugins->raiseEvent('firewall_update', $data);
 			if($action == 'd') $app->plugins->raiseEvent('firewall_delete', $data);
 			break;
-		case 'software_update_inst':
-			if($action == 'i') $app->plugins->raiseEvent('software_update_inst_insert', $data);
-			if($action == 'u') $app->plugins->raiseEvent('software_update_inst_update', $data);
-			if($action == 'd') $app->plugins->raiseEvent('software_update_inst_delete', $data);
-			break;
 		} // end switch
 	} // end function
 
diff --git a/server/plugins-available/software_update_plugin.inc.php b/server/plugins-available/software_update_plugin.inc.php
deleted file mode 100644
index 2626d1e756..0000000000
--- a/server/plugins-available/software_update_plugin.inc.php
+++ /dev/null
@@ -1,303 +0,0 @@
-<?php
-
-/*
-Copyright (c) 2007-2012, Till Brehm, projektfarm Gmbh, Oliver Vogel www.muv.com
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-class software_update_plugin {
-
-	var $plugin_name = 'software_update_plugin';
-	var $class_name  = 'software_update_plugin';
-
-	//* This function is called during ispconfig installation to determine
-	//  if a symlink shall be created for this plugin.
-	public function onInstall() {
-		global $conf;
-
-		return true;
-
-	}
-
-
-	/*
-	 	This function is called when the plugin is loaded
-	*/
-
-	public function onLoad() {
-		global $app;
-
-		/*
-		Register for the events
-		*/
-
-		$app->plugins->registerEvent('software_update_inst_insert', $this->plugin_name, 'process');
-		//$app->plugins->registerEvent('software_update_inst_update',$this->plugin_name,'process');
-		//$app->plugins->registerEvent('software_update_inst_delete',$this->plugin_name,'process');
-
-		//* Register for actions
-		$app->plugins->registerAction('os_update', $this->plugin_name, 'os_update');
-
-
-	}
-
-	private function set_install_status($inst_id, $status) {
-		global $app;
-
-		$app->db->query("UPDATE software_update_inst SET status = ? WHERE software_update_inst_id = ?", $status, $inst_id);
-		$app->dbmaster->query("UPDATE software_update_inst SET status = ? WHERE software_update_inst_id = ?", $status, $inst_id);
-	}
-
-	public function process($event_name, $data) {
-		global $app, $conf;
-
-		//* Get the info of the package:
-		$software_update_id = intval($data["new"]["software_update_id"]);
-		$software_update = $app->db->queryOneRecord("SELECT * FROM software_update WHERE software_update_id = ?", $software_update_id);
-		$software_package = $app->db->queryOneRecord("SELECT * FROM software_package WHERE package_name = ?", $software_update['package_name']);
-
-		if($software_package['package_type'] == 'ispconfig' && !$conf['software_updates_enabled'] == true) {
-			$app->log('Software Updates not enabled on this server. To enable updates, set $conf["software_updates_enabled"] = true; in config.inc.php', LOGLEVEL_WARN);
-			$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-			return false;
-		}
-
-		$installuser = '';
-		if($software_package['package_type'] == 'ispconfig') {
-			$installuser = '';
-		} elseif ($software_package['package_type'] == 'app') {
-			$installuser = 'ispapps';
-		} else {
-			$app->log('package_type not supported', LOGLEVEL_WARN);
-			$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-			return false;
-		}
-
-		$temp_dir = '/tmp/'.md5(uniqid(rand()));
-		$app->log("The temp dir is $temp_dir", LOGLEVEL_DEBUG);
-		mkdir($temp_dir);
-		if($installuser != '') chown($temp_dir, $installuser);
-
-		if(!is_dir($temp_dir)) {
-			$app->log("Unable to create temp directory.", LOGLEVEL_WARN);
-			$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-			return false;
-		}
-
-		//* Replace placeholders in download URL
-		$software_update["update_url"] = str_replace('{key}', $software_package['package_key'], $software_update["update_url"]);
-
-		//* Download the update package
-		if($installuser == '') {
-			$cmd = "cd ? && wget ?";
-			$app->system->exec_safe($cmd, $temp_dir, $software_update["update_url"]);
-		} else {
-			$cmd = "cd $temp_dir && wget ".$software_update["update_url"];
-			$app->system->exec_safe("su -c ? ?", $cmd, $installuser);
-		}
-		$app->log("Downloading the update file from: ".$software_update["update_url"], LOGLEVEL_DEBUG);
-
-		//$url_parts = parse_url($software_update["update_url"]);
-		//$update_filename = basename($url_parts["path"]);
-		//* Find the name of the zip file which contains the app.
-		$tmp_dir_handle = dir($temp_dir);
-		$update_filename = '';
-		while (false !== ($t = $tmp_dir_handle->read())) {
-			if($t != '.' && $t != '..' && is_file($temp_dir.'/'.$t) && substr($t, -4) == '.zip') {
-				$update_filename = $t;
-			}
-		}
-		$tmp_dir_handle->close();
-		unset($tmp_dir_handle);
-		unset($t);
-
-		if($update_filename == '') {
-			$app->log("No package file found. Download failed? Installation aborted.", LOGLEVEL_WARN);
-			$app->system->exec_safe("rm -rf ?", $temp_dir);
-			$app->log("Deleting the temp directory $temp_dir", LOGLEVEL_DEBUG);
-			$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-			return false;
-		}
-
-		$app->log("The update filename is $update_filename", LOGLEVEL_DEBUG);
-
-		if(is_file($temp_dir.'/'.$update_filename)) {
-
-			//* Checking the md5sum
-			if(md5_file($temp_dir.'/'.$update_filename) != $software_update["update_md5"]) {
-				$app->log("The md5 sum of the downloaded file is incorrect. Update aborted.", LOGLEVEL_WARN);
-				$app->system->exec_safe("rm -rf ", $temp_dir);
-				$app->log("Deleting the temp directory $temp_dir", LOGLEVEL_DEBUG);
-				$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-				return false;
-			} else {
-				$app->log("MD5 checksum of the downloaded file verified.", LOGLEVEL_DEBUG);
-			}
-
-
-			//* unpacking the update
-			
-			if($installuser == '') {
-				$cmd = "cd ? && unzip ?";
-				$app->system->exec_safe($cmd, $temp_dir, $update_filename);
-			} else {
-				$cmd = "cd $temp_dir && unzip $update_filename";
-				$app->system->exec_safe("su -c ? ?", $cmd, $installuser);
-			}
-
-			//* Create a database, if the package requires one
-			if($software_package['package_type'] == 'app' && $software_package['package_requires_db'] == 'mysql') {
-
-				$app->uses('ini_parser');
-				$package_config = $app->ini_parser->parse_ini_string(stripslashes($software_package['package_config']));
-
-				$this->create_app_db($package_config['mysql']);
-				$app->log("Creating the app DB.", LOGLEVEL_DEBUG);
-
-				//* Load the sql dump into the database
-				if(is_file($temp_dir.'/setup.sql')) {
-					$db_config = $package_config['mysql'];
-					if( $db_config['database_user'] != '' &&
-						$db_config['database_password'] != '' &&
-						$db_config['database_name'] != '' &&
-						$db_config['database_host'] != '') {
-						$app->system->exec_safe("mysql --default-character-set=utf8 --force -h ? -u ? ? < ?", $db_config['database_host'], $db_config['database_user'], $db_config['database_name'], $temp_dir.'/setup.sql');
-						$app->log("Loading setup.sql dump into the app db.", LOGLEVEL_DEBUG);
-					}
-				}
-
-			}
-
-			//* Save the package config file as app.ini
-			if($software_package['package_config'] != '') {
-				file_put_contents($temp_dir.'/app.ini', $software_package['package_config']);
-				$app->log("Writing ".$temp_dir.'/app.ini', LOGLEVEL_DEBUG);
-			}
-
-			if(is_file($temp_dir.'/setup.sh')) {
-				// Execute the setup script
-				$app->system->exec_safe('chmod +x ?', $temp_dir.'/setup.sh');
-				$app->log("Executing setup.sh file in directory $temp_dir", LOGLEVEL_DEBUG);
-				
-				if($installuser == '') {
-					$cmd = 'cd ? && ./setup.sh > package_install.log';
-					$app->system->exec_safe($cmd, $temp_dir);
-				} else {
-					$cmd = 'cd '.$temp_dir.' && ./setup.sh > package_install.log';
-					$app->system->exec_safe("su -c ? ?", $cmd, $installuser);
-				}
-
-				$log_data = @file_get_contents("{$temp_dir}/package_install.log");
-				if(preg_match("'.*\[OK\]\s*$'is", $log_data)) {
-					$app->log("Installation successful", LOGLEVEL_DEBUG);
-					$app->log($log_data, LOGLEVEL_DEBUG);
-					$this->set_install_status($data["new"]["software_update_inst_id"], "installed");
-				} else {
-					$app->log("Installation failed:\n\n" . $log_data, LOGLEVEL_WARN);
-					$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-				}
-			} else {
-				$app->log("setup.sh file not found", LOGLEVEL_ERROR);
-				$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-			}
-		} else {
-			$app->log("Download of the update file failed", LOGLEVEL_WARN);
-			$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-		}
-
-		if($temp_dir != '' && $temp_dir != '/') $app->system->exec_safe("rm -rf ?", $temp_dir);
-		$app->log("Deleting the temp directory $temp_dir", LOGLEVEL_DEBUG);
-	}
-
-	private function create_app_db($db_config) {
-		global $app, $conf;
-
-		if( $db_config['database_user'] != '' &&
-			$db_config['database_password'] != '' &&
-			$db_config['database_name'] != '' &&
-			$db_config['database_host'] != '') {
-
-			if(!include ISPC_LIB_PATH.'/mysql_clientdb.conf') {
-				$app->log('Unable to open'.ISPC_LIB_PATH.'/mysql_clientdb.conf', LOGLEVEL_ERROR);
-				return;
-			}
-
-			if($db_config['database_user'] == 'root') {
-				$app->log('User root not allowed for App databases', LOGLEVEL_WARNING);
-				return;
-			}
-
-			//* Connect to the database
-			$link = mysqli_connect($clientdb_host, $clientdb_user, $clientdb_password);
-			if (!$link) {
-				$app->log('Unable to connect to the database'.mysqli_connect_error(), LOGLEVEL_ERROR);
-				return;
-			}
-
-			$query_charset_table = '';
-
-			//* Create the new database
-			if (mysqli_query($link,'CREATE DATABASE '.mysqli_real_escape_string($link, $db_config['database_name']).$query_charset_table, $link)) {
-				$app->log('Created MySQL database: '.$db_config['database_name'], LOGLEVEL_DEBUG);
-			} else {
-				$app->log('Unable to connect to the database'.mysqli_error($link), LOGLEVEL_ERROR);
-			}
-
-			if(mysqli_query("GRANT ALL ON ".mysqli_real_escape_string($link, $db_config['database_name']).".* TO '".mysqli_real_escape_string($link, $db_config['database_user'])."'@'".$db_config['database_host']."' IDENTIFIED BY '".mysqli_real_escape_string($link, $db_config['database_password'])."';", $link)) {
-				$app->log('Created MySQL user: '.$db_config['database_user'], LOGLEVEL_DEBUG);
-			} else {
-				$app->log('Unable to create database user'.$db_config['database_user'].' '.mysqli_error($link), LOGLEVEL_ERROR);
-			}
-
-			mysqli_close($link);
-
-		}
-
-	}
-
-	//* Operating system update
-	public function os_update($action_name, $data) {
-		global $app;
-
-		//** Debian and compatible Linux distributions
-		if(file_exists('/etc/debian_version')) {
-			exec("apt-get update");
-			exec("apt-get upgrade -y");
-			$app->log('Execeuted Debian / Ubuntu update', LOGLEVEL_DEBUG);
-		}
-
-		//** Gentoo Linux
-		if(file_exists('/etc/gentoo-release')) {
-			exec("glsa-check -f --nocolor affected");
-			$app->log('Execeuted Gentoo update', LOGLEVEL_DEBUG);
-		}
-
-		return 'ok';
-	}
-
-} // end class
-
-?>
-- 
GitLab


From 68514e475d10d3fa118710443468cac57cbc9347 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Tue, 6 Oct 2020 13:08:47 +0200
Subject: [PATCH 007/441] Hide SSL cert options when LE is enabled (#5692)

---
 interface/web/sites/lib/lang/ar_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/bg_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/br_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/ca_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/cz_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/de_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/dk_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/el_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/en_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/es_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/fi_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/fr_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/hr_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/hu_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/id_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/it_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/ja_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/nl_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/pl_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/pt_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/ro_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/ru_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/se_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/sk_web_vhost_domain.lng   | 1 +
 interface/web/sites/lib/lang/tr_web_vhost_domain.lng   | 1 +
 interface/web/sites/templates/web_vhost_domain_ssl.htm | 7 ++++++-
 interface/web/sites/web_vhost_domain_edit.php          | 1 +
 27 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
index 2fd132c9e7..9e6ecf1031 100644
--- a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
index 573fe63a45..1ec9cfc8da 100644
--- a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/br_web_vhost_domain.lng b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
index 835ceeae4d..aa51b046f7 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
@@ -201,3 +201,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
index 65c21fd2dd..e53dea6f5e 100644
--- a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
index 5d3caf5c90..8f26a1f281 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
index 3b13009ab7..96a9cd2ab4 100644
--- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
index 7721691a60..85eba59b87 100644
--- a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/el_web_vhost_domain.lng b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
index 8628dff841..5fb605f665 100644
--- a/interface/web/sites/lib/lang/el_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
index f633076dbb..64dc34eb2f 100644
--- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
@@ -201,3 +201,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/es_web_vhost_domain.lng b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
index e9d49604f2..01657cfc76 100644
--- a/interface/web/sites/lib/lang/es_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
index b0ede66c4d..28febb070f 100644
--- a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
index c43f5c97d5..fbd25b6b62 100644
--- a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
index 1645ef8eb5..82d3fe44b5 100644
--- a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
index 32a65e6502..9026d7175f 100644
--- a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/id_web_vhost_domain.lng b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
index 4bc0395328..da5a174bb1 100644
--- a/interface/web/sites/lib/lang/id_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/it_web_vhost_domain.lng b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
index 3d1e16fe2e..ff34ccbd57 100644
--- a/interface/web/sites/lib/lang/it_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
index 3ca7f658f5..e10ad8825f 100644
--- a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
index afe2da94b8..d47674bc17 100644
--- a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
index e0b6a596e5..f43bef55b5 100644
--- a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
index 58a256f652..2bd6ed1b94 100644
--- a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
index 9554f4643f..76818f7078 100644
--- a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
index 538b329fb4..668813cc2b 100644
--- a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/se_web_vhost_domain.lng b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
index af1a6f1b9e..8ce4c56516 100644
--- a/interface/web/sites/lib/lang/se_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
index e2cfa27c0f..93736fd80b 100644
--- a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
@@ -196,3 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
index 6b7fe3793e..66c0c68757 100644
--- a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
@@ -198,3 +198,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
+$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
diff --git a/interface/web/sites/templates/web_vhost_domain_ssl.htm b/interface/web/sites/templates/web_vhost_domain_ssl.htm
index 686b5e67fd..736f5ca5ca 100644
--- a/interface/web/sites/templates/web_vhost_domain_ssl.htm
+++ b/interface/web/sites/templates/web_vhost_domain_ssl.htm
@@ -10,7 +10,7 @@
   </div>
 </tmpl_if>
 
-
+<tmpl_if name="is_le_enabled" op="==" value="n">
 			<tmpl_if name='show_helper_links'>
 				<div id="show_helper_links" style="display:none;">
 					<label></label>
@@ -65,6 +65,11 @@
                     {tmpl_var name='ssl_action'}
                 </select></div>
             </div>
+          <tmpl_else>
+              <div class="alert alert-info" style="text-align:center">
+                {tmpl_var name='ssl_options_hidden_txt'}
+              </div>
+            </tmpl_if>
 
 
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php
index 9e65f91062..9b1117fb2b 100644
--- a/interface/web/sites/web_vhost_domain_edit.php
+++ b/interface/web/sites/web_vhost_domain_edit.php
@@ -755,6 +755,7 @@ class page_action extends tform_actions {
 			if(intval($tmp_sys_group['client_id']) > 0) $tmp_client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", intval($tmp_sys_group['client_id']));
 			if(is_array($tmp_client) && !empty($tmp_client) && trim($this->dataRecord['ssl_organisation']) == '' && trim($this->dataRecord['ssl_locality']) == '' && trim($this->dataRecord['ssl_state']) == '' && trim($this->dataRecord['ssl_organisation_unit']) == '') $app->tpl->setVar("show_helper_links", true);
 			$app->tpl->setVar('is_ssl_enabled', $tmp_web['ssl']);
+			$app->tpl->setVar('is_le_enabled', $tmp_web['ssl_letsencrypt']);
 		}
 
 		$sys_config = $app->getconf->get_global_config('misc');
-- 
GitLab


From 74f042e1b6127786028b5ebb4d878b374fe75a14 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Tue, 6 Oct 2020 19:58:06 +0200
Subject: [PATCH 008/441] Use correct path for AWStats (#4993)

---
 install/dist/conf/centos72.conf.php | 3 +++
 install/dist/conf/centos80.conf.php | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/install/dist/conf/centos72.conf.php b/install/dist/conf/centos72.conf.php
index 221cc5d7c4..8bb2ca5239 100644
--- a/install/dist/conf/centos72.conf.php
+++ b/install/dist/conf/centos72.conf.php
@@ -96,6 +96,9 @@ $conf['web']['apps_vhost_servername'] = '';
 $conf['web']['apps_vhost_user'] = 'ispapps';
 $conf['web']['apps_vhost_group'] = 'ispapps';
 
+//* AWStats settings
+$conf['awstats']['pl'] = '/usr/share/awstats/wwwroot/cgi-bin/awstats.pl';
+
 //* Fastcgi
 $conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
 $conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
diff --git a/install/dist/conf/centos80.conf.php b/install/dist/conf/centos80.conf.php
index 04257d4dfe..0411fb9ce5 100644
--- a/install/dist/conf/centos80.conf.php
+++ b/install/dist/conf/centos80.conf.php
@@ -96,6 +96,9 @@ $conf['web']['apps_vhost_servername'] = '';
 $conf['web']['apps_vhost_user'] = 'ispapps';
 $conf['web']['apps_vhost_group'] = 'ispapps';
 
+//* AWStats settings
+$conf['awstats']['pl'] = '/usr/share/awstats/wwwroot/cgi-bin/awstats.pl';
+
 //* Fastcgi
 $conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
 $conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
-- 
GitLab


From 25d018cf06cb3f845aba494f750f6fbf2b0fb215 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Tue, 6 Oct 2020 20:04:19 +0200
Subject: [PATCH 009/441] Make retrieving subdomain zones possible and allow 63
 char TLDs (#4522 and #3500)

---
 interface/lib/classes/remote.d/dns.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php
index 3129c6a3a2..b65dd63c8d 100644
--- a/interface/lib/classes/remote.d/dns.inc.php
+++ b/interface/lib/classes/remote.d/dns.inc.php
@@ -249,7 +249,7 @@ class remoting_dns extends remoting {
 			return false;
 		}
 
-		if(!preg_match('/^[a-z0-9][a-z0-9\-]+[a-z0-9](\.[a-z]{2,4})+$/i', $origin)){
+		if(!preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9\-]{2,63}$/', $origin)){
 			throw new SoapFault('no_domain_found', 'Invalid domain name.');
 			return false;
 		}
-- 
GitLab


From 150a818602d8cb96ee2c59c88ef1918e0f3f639b Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Tue, 6 Oct 2020 21:00:16 +0200
Subject: [PATCH 010/441] Friendly labels for redirect types (#4987)

---
 interface/web/sites/form/web_childdomain.tform.php      | 2 +-
 interface/web/sites/form/web_vhost_domain.tform.php     | 2 +-
 interface/web/sites/lib/lang/ar_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/ar_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/ar_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/ar_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/ar_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/bg_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/bg_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/bg_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/bg_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/bg_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/br_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/br_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/br_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/br_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/br_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/br_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/ca_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/ca_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/ca_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/ca_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/ca_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/ca_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/cz_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/cz_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/cz_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/cz_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/cz_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/de_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/de_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/de_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/de_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/de_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/de_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/dk_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/dk_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/dk_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/dk_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/dk_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/dk_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/el_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/el_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/el_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/el_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/el_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/el_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/en_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/en_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/en_web_domain.lng          | 6 +++++-
 interface/web/sites/lib/lang/en_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/en_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/en_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/es_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/es_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/es_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/es_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/es_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/es_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/fi_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/fi_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/fi_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/fi_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/fi_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/fi_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/fr_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/fr_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/fr_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/fr_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/fr_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/fr_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/hr_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/hr_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/hr_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/hr_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/hr_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/hu_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/hu_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/hu_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/hu_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/hu_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/hu_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/id_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/id_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/id_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/id_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/id_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/id_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/it_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/it_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/it_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/it_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/it_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/it_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/ja_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/ja_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/ja_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/ja_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/ja_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/ja_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/nl_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/nl_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/nl_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/nl_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/nl_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/nl_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/pl_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/pl_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/pl_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/pl_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/pl_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/pl_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/pt_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/pt_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/pt_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/pt_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/pt_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/pt_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/ro_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/ro_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/ro_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/ro_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/ro_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/ro_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/ru_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/ru_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/ru_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/ru_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/ru_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/ru_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/se_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/se_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/se_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/se_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/se_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/se_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/sk_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/sk_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/sk_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/sk_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/sk_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/sk_web_vhost_subdomain.lng | 4 ++++
 interface/web/sites/lib/lang/tr_web_aliasdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/tr_web_childdomain.lng     | 4 ++++
 interface/web/sites/lib/lang/tr_web_domain.lng          | 4 ++++
 interface/web/sites/lib/lang/tr_web_subdomain.lng       | 4 ++++
 interface/web/sites/lib/lang/tr_web_vhost_domain.lng    | 4 ++++
 interface/web/sites/lib/lang/tr_web_vhost_subdomain.lng | 4 ++++
 152 files changed, 603 insertions(+), 3 deletions(-)

diff --git a/interface/web/sites/form/web_childdomain.tform.php b/interface/web/sites/form/web_childdomain.tform.php
index 01132a75dc..6d4f96e437 100644
--- a/interface/web/sites/form/web_childdomain.tform.php
+++ b/interface/web/sites/form/web_childdomain.tform.php
@@ -119,7 +119,7 @@ $form["tabs"]['domain'] = array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'SELECT',
 			'default' => 'y',
-			'value'  => array('' => 'no_redirect_txt', 'no' => 'no_flag_txt', 'R' => 'R', 'L' => 'L', 'R,L' => 'R,L', 'R=301,L' => 'R=301,L', 'last' => 'last', 'break' => 'break', 'redirect' => 'redirect', 'permanent' => 'permanent', 'proxy' => 'proxy')
+			'value'  => array('' => 'no_redirect_txt', 'no' => 'no_flag_txt', 'R' => 'r_redirect_txt', 'L' => 'l_redirect_txt', 'R,L' => 'r_l_redirect_txt', 'R=301,L' => 'r_301_l_redirect_txt', 'last' => 'last', 'break' => 'break', 'redirect' => 'redirect', 'permanent' => 'permanent', 'proxy' => 'proxy')
 		),
 		'redirect_path' => array (
 			'datatype' => 'VARCHAR',
diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php
index f5bca55eea..ef365259b8 100644
--- a/interface/web/sites/form/web_vhost_domain.tform.php
+++ b/interface/web/sites/form/web_vhost_domain.tform.php
@@ -397,7 +397,7 @@ $form["tabs"]['redirect'] = array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'SELECT',
 			'default' => '',
-			'value'  => array('' => 'no_redirect_txt', 'no' => 'no_flag_txt', 'R' => 'R', 'L' => 'L', 'R,L' => 'R,L', 'R=301,L' => 'R=301,L', 'last' => 'last', 'break' => 'break', 'redirect' => 'redirect', 'permanent' => 'permanent', 'proxy' => 'proxy')
+			'value'  => array('' => 'no_redirect_txt', 'no' => 'no_flag_txt', 'R' => 'r_redirect_txt', 'L' => 'l_redirect_txt', 'R,L' => 'r_l_redirect_txt', 'R=301,L' => 'r_301_l_redirect_txt', 'last' => 'last', 'break' => 'break', 'redirect' => 'redirect', 'permanent' => 'permanent', 'proxy' => 'proxy')
 		),
 		'redirect_path' => array (
 			'datatype' => 'VARCHAR',
diff --git a/interface/web/sites/lib/lang/ar_web_aliasdomain.lng b/interface/web/sites/lib/lang/ar_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/ar_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/ar_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ar_web_childdomain.lng b/interface/web/sites/lib/lang/ar_web_childdomain.lng
index ac527cfc06..525aab760d 100644
--- a/interface/web/sites/lib/lang/ar_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/ar_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ar_web_domain.lng b/interface/web/sites/lib/lang/ar_web_domain.lng
index 24e21f60cf..de91cfa039 100644
--- a/interface/web/sites/lib/lang/ar_web_domain.lng
+++ b/interface/web/sites/lib/lang/ar_web_domain.lng
@@ -14,6 +14,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ar_web_subdomain.lng b/interface/web/sites/lib/lang/ar_web_subdomain.lng
index 7d0e55e3a1..22bd9033c0 100644
--- a/interface/web/sites/lib/lang/ar_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/ar_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
index 2fd132c9e7..743975c735 100644
--- a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
@@ -14,6 +14,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/bg_web_aliasdomain.lng b/interface/web/sites/lib/lang/bg_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/bg_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/bg_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/bg_web_childdomain.lng b/interface/web/sites/lib/lang/bg_web_childdomain.lng
index 730e802e40..9287b16d8d 100644
--- a/interface/web/sites/lib/lang/bg_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/bg_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Домейн';
 $wb['type_txt'] = 'Тип';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Активен';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/bg_web_domain.lng b/interface/web/sites/lib/lang/bg_web_domain.lng
index e5fde7b07a..9e5f9c608a 100644
--- a/interface/web/sites/lib/lang/bg_web_domain.lng
+++ b/interface/web/sites/lib/lang/bg_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Домейн';
 $wb['type_txt'] = 'Тип';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Активен';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/bg_web_subdomain.lng b/interface/web/sites/lib/lang/bg_web_subdomain.lng
index 371a19cba5..9a1ba3b288 100644
--- a/interface/web/sites/lib/lang/bg_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/bg_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Домейн';
 $wb['type_txt'] = 'Тип';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Активен';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
index 573fe63a45..a574765fb3 100644
--- a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Домейн';
 $wb['type_txt'] = 'Тип';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Активен';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/br_web_aliasdomain.lng b/interface/web/sites/lib/lang/br_web_aliasdomain.lng
index a996b897cf..0654ea4329 100644
--- a/interface/web/sites/lib/lang/br_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/br_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Pai';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/br_web_childdomain.lng b/interface/web/sites/lib/lang/br_web_childdomain.lng
index 67b8f6f732..982c25cbe3 100644
--- a/interface/web/sites/lib/lang/br_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/br_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domínio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Pai';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/br_web_domain.lng b/interface/web/sites/lib/lang/br_web_domain.lng
index bf23ab8089..76b35cf533 100644
--- a/interface/web/sites/lib/lang/br_web_domain.lng
+++ b/interface/web/sites/lib/lang/br_web_domain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Pai';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/br_web_subdomain.lng b/interface/web/sites/lib/lang/br_web_subdomain.lng
index abe7883027..e8fca3e048 100644
--- a/interface/web/sites/lib/lang/br_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/br_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domínio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Pai';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/br_web_vhost_domain.lng b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
index 835ceeae4d..e9457617f8 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Pai';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
 $wb['document_root_txt'] = 'Document-root';
diff --git a/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng
index 90558b0af7..5d90aa1b25 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng
@@ -23,6 +23,10 @@ $wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Pai';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ca_web_aliasdomain.lng b/interface/web/sites/lib/lang/ca_web_aliasdomain.lng
index f604bb84a9..300827df24 100644
--- a/interface/web/sites/lib/lang/ca_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/ca_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Dossier invalide. Ne saisissez pas de ./ (slash
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Site Web parent';
 $wb['redirect_type_txt'] = 'Type de redirection';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Chemin de redirection';
 $wb['active_txt'] = 'Actif';
 $wb['document_root_txt'] = 'Dossier racine';
diff --git a/interface/web/sites/lib/lang/ca_web_childdomain.lng b/interface/web/sites/lib/lang/ca_web_childdomain.lng
index ce3fde0ace..2ef375ccb1 100644
--- a/interface/web/sites/lib/lang/ca_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/ca_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ca_web_domain.lng b/interface/web/sites/lib/lang/ca_web_domain.lng
index 780d3f899e..99c79954d6 100644
--- a/interface/web/sites/lib/lang/ca_web_domain.lng
+++ b/interface/web/sites/lib/lang/ca_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domaine';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Site web parent';
 $wb['redirect_type_txt'] = 'Type de redirection';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Chemin de redirection';
 $wb['active_txt'] = 'Actif';
 $wb['document_root_txt'] = 'Racine du document';
diff --git a/interface/web/sites/lib/lang/ca_web_subdomain.lng b/interface/web/sites/lib/lang/ca_web_subdomain.lng
index 44a6c822f4..4b97842bf3 100644
--- a/interface/web/sites/lib/lang/ca_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/ca_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domaine';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Site web parent';
 $wb['redirect_type_txt'] = 'Type de redirection';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Chemin de redirection';
 $wb['active_txt'] = 'Actif';
 $wb['document_root_txt'] = 'Racine du document';
diff --git a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
index 65c21fd2dd..7eef0f38dd 100644
--- a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/ca_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/ca_web_vhost_subdomain.lng
index e59ff9496f..c5ef06416a 100644
--- a/interface/web/sites/lib/lang/ca_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/ca_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/cz_web_aliasdomain.lng b/interface/web/sites/lib/lang/cz_web_aliasdomain.lng
index 8231f198e2..633f0d9462 100644
--- a/interface/web/sites/lib/lang/cz_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/cz_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Rodičovské webové stránky';
 $wb['redirect_type_txt'] = 'Typ přesměrování';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Cesta přesměrování';
 $wb['active_txt'] = 'Aktivní';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/cz_web_childdomain.lng b/interface/web/sites/lib/lang/cz_web_childdomain.lng
index c2befac393..e00f0facfd 100644
--- a/interface/web/sites/lib/lang/cz_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/cz_web_childdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Rodičovské webové stránky';
 $wb['redirect_type_txt'] = 'Typ přesměrování';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Cesta přesměrování';
 $wb['active_txt'] = 'Aktivní';
 $wb['document_root_txt'] = 'Kořenový adresář dokumentů';
diff --git a/interface/web/sites/lib/lang/cz_web_domain.lng b/interface/web/sites/lib/lang/cz_web_domain.lng
index eb500239df..5ae091394c 100644
--- a/interface/web/sites/lib/lang/cz_web_domain.lng
+++ b/interface/web/sites/lib/lang/cz_web_domain.lng
@@ -14,6 +14,10 @@ $wb['domain_txt'] = 'Doména';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Rodičovská webová stránka';
 $wb['redirect_type_txt'] = 'Typ přesměrování';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Cesta přesměrování';
 $wb['active_txt'] = 'Aktivní';
 $wb['document_root_txt'] = 'Kořenový adresář dokumentů';
diff --git a/interface/web/sites/lib/lang/cz_web_subdomain.lng b/interface/web/sites/lib/lang/cz_web_subdomain.lng
index 208f0c5599..1bea3aa5da 100644
--- a/interface/web/sites/lib/lang/cz_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/cz_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Doména';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Rodičovská web stránka';
 $wb['redirect_type_txt'] = 'Typ přesměrování';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Cesta přesměrování';
 $wb['active_txt'] = 'Aktivní';
 $wb['document_root_txt'] = 'Kořenový adresář dokumentů';
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
index 5d3caf5c90..1135080be6 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
@@ -21,6 +21,10 @@ $wb['type_txt'] = 'Verze';
 $wb['host_txt'] = 'Název hostitele';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['redirect_type_txt'] = 'Typ přesměrování';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Cesta přesměrování';
 $wb['active_txt'] = 'Aktivní';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng
index 2b13a2626b..7a2374d6dd 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Název hostitele';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Verze';
 $wb['redirect_type_txt'] = 'Typ přesměrování';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Cesta přesměrování';
 $wb['active_txt'] = 'Aktivní';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/de_web_aliasdomain.lng b/interface/web/sites/lib/lang/de_web_aliasdomain.lng
index d177a3bdc2..9a073c533f 100644
--- a/interface/web/sites/lib/lang/de_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/de_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Ungültige Ordnerangabe. Bitte geben Sie keinen
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Hauptwebseite';
 $wb['redirect_type_txt'] = 'Weiterleitungstyp';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Weiterleitungsziel';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/de_web_childdomain.lng b/interface/web/sites/lib/lang/de_web_childdomain.lng
index 7e2b6d274f..28b33f291c 100644
--- a/interface/web/sites/lib/lang/de_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/de_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Zugehörige Webseite';
 $wb['redirect_type_txt'] = 'Weiterleitungstyp';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Weiterleitungsziel';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/de_web_domain.lng b/interface/web/sites/lib/lang/de_web_domain.lng
index 867ea6a851..7c41fe99e1 100644
--- a/interface/web/sites/lib/lang/de_web_domain.lng
+++ b/interface/web/sites/lib/lang/de_web_domain.lng
@@ -15,6 +15,10 @@ $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Zugehörige Webseite';
 $wb['web_folder_error_regex'] = 'Ungültige Verzeichnisangabe, bitte keinen / eingeben.';
 $wb['redirect_type_txt'] = 'Weiterleitungstyp';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Weiterleitungspfad';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/de_web_subdomain.lng b/interface/web/sites/lib/lang/de_web_subdomain.lng
index 7dcf2c19d8..030d43a905 100644
--- a/interface/web/sites/lib/lang/de_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/de_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Zugehörige Webseite';
 $wb['redirect_type_txt'] = 'Weiterleitungstyp';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Weiterleitungsziel';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
index 3b13009ab7..27424cc9d0 100644
--- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
@@ -15,6 +15,10 @@ $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Zugehörige Webseite';
 $wb['web_folder_error_regex'] = 'Ungültige Verzeichnisangabe, bitte keinen / eingeben.';
 $wb['redirect_type_txt'] = 'Weiterleitungstyp';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Weiterleitungspfad';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/de_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/de_web_vhost_subdomain.lng
index 31002b7a17..5941e822e4 100644
--- a/interface/web/sites/lib/lang/de_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/de_web_vhost_subdomain.lng
@@ -19,6 +19,10 @@ $wb['host_txt'] = 'Host';
 $wb['type_txt'] = 'Typ';
 $wb['web_folder_error_regex'] = 'Ungültige Ordnerangabe, bitte keinen / eingeben.';
 $wb['redirect_type_txt'] = 'Redirect-Typ';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect-Pfad';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/dk_web_aliasdomain.lng b/interface/web/sites/lib/lang/dk_web_aliasdomain.lng
index d1174a2fbf..c667758550 100644
--- a/interface/web/sites/lib/lang/dk_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/dk_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Ugyldig mappe indtastet. Indtast ikke en skrås
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Øvre Webside';
 $wb['redirect_type_txt'] = 'Omdiriger Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Omdiriger Sti';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Dokumentrod';
diff --git a/interface/web/sites/lib/lang/dk_web_childdomain.lng b/interface/web/sites/lib/lang/dk_web_childdomain.lng
index ce3fde0ace..2ef375ccb1 100644
--- a/interface/web/sites/lib/lang/dk_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/dk_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/dk_web_domain.lng b/interface/web/sites/lib/lang/dk_web_domain.lng
index de29ea9dea..36d6d945c1 100644
--- a/interface/web/sites/lib/lang/dk_web_domain.lng
+++ b/interface/web/sites/lib/lang/dk_web_domain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Ugyldigt folder entered. Please do not enter a
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Webside';
 $wb['redirect_type_txt'] = 'Omdiriger Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Omdiriger Path';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/dk_web_subdomain.lng b/interface/web/sites/lib/lang/dk_web_subdomain.lng
index ad8b881718..74d9155dcf 100644
--- a/interface/web/sites/lib/lang/dk_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/dk_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domæne';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Webside';
 $wb['redirect_type_txt'] = 'Omdiriger Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Omdiriger Path';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
index 7721691a60..a45cc33e60 100644
--- a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/dk_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/dk_web_vhost_subdomain.lng
index 5ee456f019..48e1542a6e 100644
--- a/interface/web/sites/lib/lang/dk_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/dk_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Værtsnavn';
 $wb['web_folder_error_regex'] = 'Ugyldigt folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Omdiriger Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Omdiriger Path';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/el_web_aliasdomain.lng b/interface/web/sites/lib/lang/el_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/el_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/el_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/el_web_childdomain.lng b/interface/web/sites/lib/lang/el_web_childdomain.lng
index 91d235178c..1a867eb93a 100644
--- a/interface/web/sites/lib/lang/el_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/el_web_childdomain.lng
@@ -16,6 +16,10 @@ $wb['server_id_txt'] = 'Server';
 $wb['type_txt'] = 'Τύπος';
 $wb['parent_domain_id_txt'] = 'Γονικό Website';
 $wb['redirect_type_txt'] = 'Τύπος ανακατεύθυνσης';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Διαδρομή ανακατεύθυνσης';
 $wb['active_txt'] = 'Ενεργή';
 $wb['document_root_txt'] = 'Ριζικός φάκελος';
diff --git a/interface/web/sites/lib/lang/el_web_domain.lng b/interface/web/sites/lib/lang/el_web_domain.lng
index 34294a2470..d5104c5e14 100644
--- a/interface/web/sites/lib/lang/el_web_domain.lng
+++ b/interface/web/sites/lib/lang/el_web_domain.lng
@@ -16,6 +16,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Τύπος';
 $wb['parent_domain_id_txt'] = 'Γονικό Website';
 $wb['redirect_type_txt'] = 'Τύπος Ανακατεύθυνσης';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Διαδρομή Ανακατεύθυνσης';
 $wb['active_txt'] = 'Ενεργό';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/el_web_subdomain.lng b/interface/web/sites/lib/lang/el_web_subdomain.lng
index e668979c93..051e0ab258 100644
--- a/interface/web/sites/lib/lang/el_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/el_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Τύπος';
 $wb['parent_domain_id_txt'] = 'Γονικό Website';
 $wb['redirect_type_txt'] = 'Τύπος ανακατεύθυνσης';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Διαδρομή ανακατεύθυνσης';
 $wb['active_txt'] = 'Ενεργή';
 $wb['document_root_txt'] = 'Ριζικός φάκελος';
diff --git a/interface/web/sites/lib/lang/el_web_vhost_domain.lng b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
index 8628dff841..9a326e5d3b 100644
--- a/interface/web/sites/lib/lang/el_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
@@ -16,6 +16,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Τύπος';
 $wb['parent_domain_id_txt'] = 'Γονικό Website';
 $wb['redirect_type_txt'] = 'Τύπος Ανακατεύθυνσης';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Διαδρομή Ανακατεύθυνσης';
 $wb['active_txt'] = 'Ενεργό';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/el_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/el_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/el_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/el_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/en_web_aliasdomain.lng b/interface/web/sites/lib/lang/en_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/en_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/en_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/en_web_childdomain.lng b/interface/web/sites/lib/lang/en_web_childdomain.lng
index 584913df44..a420777d64 100644
--- a/interface/web/sites/lib/lang/en_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/en_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/en_web_domain.lng b/interface/web/sites/lib/lang/en_web_domain.lng
index 6e1c16124f..7204a89fdc 100644
--- a/interface/web/sites/lib/lang/en_web_domain.lng
+++ b/interface/web/sites/lib/lang/en_web_domain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
@@ -134,4 +138,4 @@ $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
 $wb['nginx_directive_blocked_error'] = 'Nginx directive blocked by security settings:';
-?>
\ No newline at end of file
+?>
diff --git a/interface/web/sites/lib/lang/en_web_subdomain.lng b/interface/web/sites/lib/lang/en_web_subdomain.lng
index 1591efb4b9..8a794c150b 100644
--- a/interface/web/sites/lib/lang/en_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/en_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
index f633076dbb..e5476b84e6 100644
--- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/en_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/en_web_vhost_subdomain.lng
index 73ed3b86e7..512a8169fc 100644
--- a/interface/web/sites/lib/lang/en_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/en_web_vhost_subdomain.lng
@@ -23,6 +23,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/es_web_aliasdomain.lng b/interface/web/sites/lib/lang/es_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/es_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/es_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/es_web_childdomain.lng b/interface/web/sites/lib/lang/es_web_childdomain.lng
index fb4d5ee995..dff0fa5828 100644
--- a/interface/web/sites/lib/lang/es_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/es_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Dominio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Sitio web padre';
 $wb['redirect_type_txt'] = 'Tipo de redirección';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Ruta de redirección';
 $wb['active_txt'] = 'Activar';
 $wb['document_root_txt'] = 'DocumentRoot';
diff --git a/interface/web/sites/lib/lang/es_web_domain.lng b/interface/web/sites/lib/lang/es_web_domain.lng
index dd3aaebcde..44e8ea9eaa 100644
--- a/interface/web/sites/lib/lang/es_web_domain.lng
+++ b/interface/web/sites/lib/lang/es_web_domain.lng
@@ -16,6 +16,10 @@ $wb['domain_txt'] = 'Dominio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Sitio web padre';
 $wb['redirect_type_txt'] = 'Tipo redirección';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Ruta redirección';
 $wb['active_txt'] = 'Activar';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/es_web_subdomain.lng b/interface/web/sites/lib/lang/es_web_subdomain.lng
index 6def83f3fd..351ee96baf 100644
--- a/interface/web/sites/lib/lang/es_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/es_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Dominio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Sitio web padre';
 $wb['redirect_type_txt'] = 'Tipo de redirección';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Ruta de redirección';
 $wb['active_txt'] = 'Activar';
 $wb['document_root_txt'] = 'DocumentRoot';
diff --git a/interface/web/sites/lib/lang/es_web_vhost_domain.lng b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
index e9d49604f2..943d896c5e 100644
--- a/interface/web/sites/lib/lang/es_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
@@ -16,6 +16,10 @@ $wb['domain_txt'] = 'Dominio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Sitio web padre';
 $wb['redirect_type_txt'] = 'Tipo de redirección';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Ruta de redirección';
 $wb['active_txt'] = 'Activar';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/es_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/es_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/es_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/es_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/fi_web_aliasdomain.lng b/interface/web/sites/lib/lang/fi_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/fi_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/fi_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/fi_web_childdomain.lng b/interface/web/sites/lib/lang/fi_web_childdomain.lng
index 070d2266ad..b076c1db93 100644
--- a/interface/web/sites/lib/lang/fi_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/fi_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Verkkotunnus';
 $wb['type_txt'] = 'Tyyppi';
 $wb['parent_domain_id_txt'] = 'Pääsivu';
 $wb['redirect_type_txt'] = 'Edelleenohjauksen tyyppi';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Edelleenohjausosoite';
 $wb['active_txt'] = 'Käytössä';
 $wb['document_root_txt'] = 'Dokumentikansio';
diff --git a/interface/web/sites/lib/lang/fi_web_domain.lng b/interface/web/sites/lib/lang/fi_web_domain.lng
index 3ed5eea10c..88dcdedf87 100644
--- a/interface/web/sites/lib/lang/fi_web_domain.lng
+++ b/interface/web/sites/lib/lang/fi_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Verkkotunnus';
 $wb['type_txt'] = 'Tyyppi';
 $wb['parent_domain_id_txt'] = 'Pääsivusto';
 $wb['redirect_type_txt'] = 'Edelleenohjauksen tyyppi';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Edelleenohjausosoite';
 $wb['active_txt'] = 'Käytössä';
 $wb['document_root_txt'] = 'Dokumenttikansio';
diff --git a/interface/web/sites/lib/lang/fi_web_subdomain.lng b/interface/web/sites/lib/lang/fi_web_subdomain.lng
index 8889bd62a3..cb60b1692a 100644
--- a/interface/web/sites/lib/lang/fi_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/fi_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Verkkotunnus';
 $wb['type_txt'] = 'Tyyppi';
 $wb['parent_domain_id_txt'] = 'Pääsivu';
 $wb['redirect_type_txt'] = 'Edelleenohjauksen tyyppi';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Edelleenohjausosoite';
 $wb['active_txt'] = 'Käytössä';
 $wb['document_root_txt'] = 'Dokumentikansio';
diff --git a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
index b0ede66c4d..e699c446ff 100644
--- a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Verkkotunnus';
 $wb['type_txt'] = 'Tyyppi';
 $wb['parent_domain_id_txt'] = 'Pääsivusto';
 $wb['redirect_type_txt'] = 'Edelleenohjauksen tyyppi';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Edelleenohjausosoite';
 $wb['active_txt'] = 'Käytössä';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/fi_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/fi_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/fi_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/fi_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/fr_web_aliasdomain.lng b/interface/web/sites/lib/lang/fr_web_aliasdomain.lng
index 6d301b64f6..08cd4223ec 100644
--- a/interface/web/sites/lib/lang/fr_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/fr_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Dossier invalide. Ne saisissez pas de ./ (slash
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Site Web parent';
 $wb['redirect_type_txt'] = 'Type de redirection';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Chemin de redirection';
 $wb['active_txt'] = 'Actif';
 $wb['document_root_txt'] = 'Dossier racine';
diff --git a/interface/web/sites/lib/lang/fr_web_childdomain.lng b/interface/web/sites/lib/lang/fr_web_childdomain.lng
index 5a8cdcb0a1..8edd20a834 100644
--- a/interface/web/sites/lib/lang/fr_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/fr_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domaine';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Site web parent';
 $wb['redirect_type_txt'] = 'Type de redirection';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Chemin de redirection';
 $wb['active_txt'] = 'Actif';
 $wb['document_root_txt'] = 'Racine du document';
diff --git a/interface/web/sites/lib/lang/fr_web_domain.lng b/interface/web/sites/lib/lang/fr_web_domain.lng
index d5fcbc37c6..c7ae07c1e4 100644
--- a/interface/web/sites/lib/lang/fr_web_domain.lng
+++ b/interface/web/sites/lib/lang/fr_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domaine';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Site web parent';
 $wb['redirect_type_txt'] = 'Type de redirection';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Chemin de redirection';
 $wb['active_txt'] = 'Actif';
 $wb['document_root_txt'] = 'Racine du document';
diff --git a/interface/web/sites/lib/lang/fr_web_subdomain.lng b/interface/web/sites/lib/lang/fr_web_subdomain.lng
index d57818e2d5..286ae826e6 100644
--- a/interface/web/sites/lib/lang/fr_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/fr_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domaine';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Site web parent';
 $wb['redirect_type_txt'] = 'Type de redirection';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Chemin de redirection';
 $wb['active_txt'] = 'Actif';
 $wb['document_root_txt'] = 'Racine du document';
diff --git a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
index c43f5c97d5..b52822b6c0 100644
--- a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domaine';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Site web parent';
 $wb['redirect_type_txt'] = 'Type de redirection';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Chemin de redirection';
 $wb['active_txt'] = 'Actif';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/fr_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/fr_web_vhost_subdomain.lng
index 433f4d029b..7b8245d717 100644
--- a/interface/web/sites/lib/lang/fr_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/fr_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/hr_web_aliasdomain.lng b/interface/web/sites/lib/lang/hr_web_aliasdomain.lng
index 6caba05f81..94cab0a276 100644
--- a/interface/web/sites/lib/lang/hr_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/hr_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Neispravan direktorij. Nemojte koristiti slash.
 $wb['type_txt'] = 'Vrsta';
 $wb['parent_domain_id_txt'] = 'Glavna web stranica';
 $wb['redirect_type_txt'] = 'Vrsta redirekcije';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Putanja redirekcije';
 $wb['active_txt'] = 'Aktivno';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/hr_web_childdomain.lng b/interface/web/sites/lib/lang/hr_web_childdomain.lng
index 760fe40724..55e11b2511 100644
--- a/interface/web/sites/lib/lang/hr_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/hr_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domena';
 $wb['type_txt'] = 'Vrsta';
 $wb['parent_domain_id_txt'] = 'Početna web stranica';
 $wb['redirect_type_txt'] = 'Vrsta redirekcije';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirekcijska putanja';
 $wb['active_txt'] = 'Aktivno';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/hr_web_domain.lng b/interface/web/sites/lib/lang/hr_web_domain.lng
index a73bb164dd..9159a99b78 100644
--- a/interface/web/sites/lib/lang/hr_web_domain.lng
+++ b/interface/web/sites/lib/lang/hr_web_domain.lng
@@ -16,6 +16,10 @@ $wb['domain_txt'] = 'Domena';
 $wb['type_txt'] = 'Vrsta';
 $wb['parent_domain_id_txt'] = 'Glavna web stranica';
 $wb['redirect_type_txt'] = 'Vrsta redirekcije';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Aktivno';
 $wb['document_root_txt'] = 'Početni direktorij';
diff --git a/interface/web/sites/lib/lang/hr_web_subdomain.lng b/interface/web/sites/lib/lang/hr_web_subdomain.lng
index 76fb2901d9..3f450a540b 100644
--- a/interface/web/sites/lib/lang/hr_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/hr_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domena';
 $wb['type_txt'] = 'Vrsta';
 $wb['parent_domain_id_txt'] = 'Početna web stranica';
 $wb['redirect_type_txt'] = 'Vrsta redirekcije';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirekcijska putanja';
 $wb['active_txt'] = 'Aktivno';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
index 1645ef8eb5..e14b1ac826 100644
--- a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
@@ -16,6 +16,10 @@ $wb['domain_txt'] = 'Domena';
 $wb['type_txt'] = 'Vrsta';
 $wb['parent_domain_id_txt'] = 'Glavna web stranica';
 $wb['redirect_type_txt'] = 'Vrsta redirekcije';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Aktivno';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng
index 6463732d3b..c3167cc892 100644
--- a/interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Neispravan direktorij. Nemojte koristiti slash.';
 $wb['type_txt'] = 'Vrsta';
 $wb['redirect_type_txt'] = 'Vrsta redirekcije';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirekcijska putanja';
 $wb['active_txt'] = 'Aktivno';
 $wb['document_root_txt'] = 'Početna putanja (documentroot)';
diff --git a/interface/web/sites/lib/lang/hu_web_aliasdomain.lng b/interface/web/sites/lib/lang/hu_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/hu_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/hu_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/hu_web_childdomain.lng b/interface/web/sites/lib/lang/hu_web_childdomain.lng
index 31c87e6851..cca02071af 100644
--- a/interface/web/sites/lib/lang/hu_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/hu_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Típus';
 $wb['parent_domain_id_txt'] = 'Szülő webhely';
 $wb['redirect_type_txt'] = 'Átirányítás típusa';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Az Átirányitás útvonala';
 $wb['active_txt'] = 'Aktív';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/hu_web_domain.lng b/interface/web/sites/lib/lang/hu_web_domain.lng
index f229a4f42f..679de0f22d 100644
--- a/interface/web/sites/lib/lang/hu_web_domain.lng
+++ b/interface/web/sites/lib/lang/hu_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Tipus';
 $wb['parent_domain_id_txt'] = 'Szülő Weboldal';
 $wb['redirect_type_txt'] = 'Átirányítás tipusa';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Átirányítás útvonal';
 $wb['active_txt'] = 'Aktív';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/hu_web_subdomain.lng b/interface/web/sites/lib/lang/hu_web_subdomain.lng
index 15fd85e9b6..4c200e15af 100644
--- a/interface/web/sites/lib/lang/hu_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/hu_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Típus';
 $wb['parent_domain_id_txt'] = 'Szülő webhely';
 $wb['redirect_type_txt'] = 'Átirányítás típusa';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Az Átirányitás útvonala';
 $wb['active_txt'] = 'Aktív';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
index 32a65e6502..d9a35c8663 100644
--- a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Tipus';
 $wb['parent_domain_id_txt'] = 'Szülő Weboldal';
 $wb['redirect_type_txt'] = 'Átirányítás tipusa';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Átirányítás útvonal';
 $wb['active_txt'] = 'Aktív';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/hu_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/hu_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/hu_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/hu_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/id_web_aliasdomain.lng b/interface/web/sites/lib/lang/id_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/id_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/id_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/id_web_childdomain.lng b/interface/web/sites/lib/lang/id_web_childdomain.lng
index 071bb54f66..b6b77f038a 100644
--- a/interface/web/sites/lib/lang/id_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/id_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Tipe';
 $wb['parent_domain_id_txt'] = 'Situs Web Induk';
 $wb['redirect_type_txt'] = 'Tipe Pengalihan';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Path Pengalihan';
 $wb['active_txt'] = 'Aktif';
 $wb['document_root_txt'] = 'Root Dokumen';
diff --git a/interface/web/sites/lib/lang/id_web_domain.lng b/interface/web/sites/lib/lang/id_web_domain.lng
index 19a9edafb9..e50dd6c771 100644
--- a/interface/web/sites/lib/lang/id_web_domain.lng
+++ b/interface/web/sites/lib/lang/id_web_domain.lng
@@ -14,6 +14,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Tipe';
 $wb['parent_domain_id_txt'] = 'Situs Web Induk';
 $wb['redirect_type_txt'] = 'Tipe Pengalihan';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Path Pengalihan';
 $wb['active_txt'] = 'Aktif';
 $wb['document_root_txt'] = 'Root Dokumen';
diff --git a/interface/web/sites/lib/lang/id_web_subdomain.lng b/interface/web/sites/lib/lang/id_web_subdomain.lng
index 7c7f6f717d..04ef922b42 100644
--- a/interface/web/sites/lib/lang/id_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/id_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Tipe';
 $wb['parent_domain_id_txt'] = 'Situs Web Induk';
 $wb['redirect_type_txt'] = 'Tipe Pengalihan';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Path Pengalihan';
 $wb['active_txt'] = 'Aktif';
 $wb['document_root_txt'] = 'Root Dokumen';
diff --git a/interface/web/sites/lib/lang/id_web_vhost_domain.lng b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
index 4bc0395328..f63d628971 100644
--- a/interface/web/sites/lib/lang/id_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
@@ -14,6 +14,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Tipe';
 $wb['parent_domain_id_txt'] = 'Situs Web Induk';
 $wb['redirect_type_txt'] = 'Tipe Pengalihan';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Path Pengalihan';
 $wb['active_txt'] = 'Aktif';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/id_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/id_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/id_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/id_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/it_web_aliasdomain.lng b/interface/web/sites/lib/lang/it_web_aliasdomain.lng
index cd6950e25d..ee30db96a0 100644
--- a/interface/web/sites/lib/lang/it_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/it_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Percorso inserito non valido. Non inserire slas
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Sito Parent';
 $wb['redirect_type_txt'] = 'Tipo di Redirect';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Attivo';
 $wb['document_root_txt'] = 'Cartella del sito';
diff --git a/interface/web/sites/lib/lang/it_web_childdomain.lng b/interface/web/sites/lib/lang/it_web_childdomain.lng
index 4f38645962..ed48eae876 100644
--- a/interface/web/sites/lib/lang/it_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/it_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Dominio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Tipo Redirect';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Percorso Redirect';
 $wb['active_txt'] = 'Attivo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/it_web_domain.lng b/interface/web/sites/lib/lang/it_web_domain.lng
index a4551002c0..b05f2a1557 100644
--- a/interface/web/sites/lib/lang/it_web_domain.lng
+++ b/interface/web/sites/lib/lang/it_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Dominio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Sito Web di riferimento';
 $wb['redirect_type_txt'] = 'Tipo Reinderizzamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Percorso Reinderizzamento';
 $wb['active_txt'] = 'Attivo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/it_web_subdomain.lng b/interface/web/sites/lib/lang/it_web_subdomain.lng
index 0b751623e3..e3438eaf75 100644
--- a/interface/web/sites/lib/lang/it_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/it_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Dominio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Tipo Redirect';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Percorso Redirect';
 $wb['active_txt'] = 'Attivo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/it_web_vhost_domain.lng b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
index 3d1e16fe2e..34f41cde4a 100644
--- a/interface/web/sites/lib/lang/it_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Dominio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Tipo Redirect';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Percorso Redirect';
 $wb['active_txt'] = 'Attivo';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/it_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/it_web_vhost_subdomain.lng
index 117145e22c..f391fc1473 100644
--- a/interface/web/sites/lib/lang/it_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/it_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Nome Host';
 $wb['web_folder_error_regex'] = 'Cartella inserita non valida. Per favore non inserire uno slash.';
 $wb['type_txt'] = 'Tipo';
 $wb['redirect_type_txt'] = 'Tipo reinderizzamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Percorso Reinderizzamento';
 $wb['active_txt'] = 'Attivo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ja_web_aliasdomain.lng b/interface/web/sites/lib/lang/ja_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/ja_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/ja_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ja_web_childdomain.lng b/interface/web/sites/lib/lang/ja_web_childdomain.lng
index 4773557212..6126b7eb78 100644
--- a/interface/web/sites/lib/lang/ja_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/ja_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'ドメイン';
 $wb['type_txt'] = '種別';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'リダイレクトの方式';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'リダイレクト先';
 $wb['active_txt'] = '有効';
 $wb['document_root_txt'] = 'ドキュメントルート';
diff --git a/interface/web/sites/lib/lang/ja_web_domain.lng b/interface/web/sites/lib/lang/ja_web_domain.lng
index bbc5a1f883..bcfc527c7c 100644
--- a/interface/web/sites/lib/lang/ja_web_domain.lng
+++ b/interface/web/sites/lib/lang/ja_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'ドメイン';
 $wb['type_txt'] = '種別';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'リダイレクトの方式';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'リダイレクト先';
 $wb['active_txt'] = '有効';
 $wb['document_root_txt'] = 'ドキュメントルート';
diff --git a/interface/web/sites/lib/lang/ja_web_subdomain.lng b/interface/web/sites/lib/lang/ja_web_subdomain.lng
index 1478b3c657..f01d5414e7 100644
--- a/interface/web/sites/lib/lang/ja_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/ja_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'ドメイン';
 $wb['type_txt'] = '種別';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'リダイレクトの方式';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'リダイレクト先';
 $wb['active_txt'] = '有効';
 $wb['document_root_txt'] = 'ドキュメントルート';
diff --git a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
index 3ca7f658f5..211bee025c 100644
--- a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'ドメイン';
 $wb['type_txt'] = '種別';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'リダイレクトの方式';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'リダイレクト先';
 $wb['active_txt'] = '有効';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/ja_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/ja_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/ja_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/ja_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/nl_web_aliasdomain.lng b/interface/web/sites/lib/lang/nl_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/nl_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/nl_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/nl_web_childdomain.lng b/interface/web/sites/lib/lang/nl_web_childdomain.lng
index 2f2b897f02..1f3e69e46a 100644
--- a/interface/web/sites/lib/lang/nl_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/nl_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domein';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent website';
 $wb['redirect_type_txt'] = 'Redirect type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect pad';
 $wb['active_txt'] = 'Actief';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/nl_web_domain.lng b/interface/web/sites/lib/lang/nl_web_domain.lng
index bba9afd810..80ff5f9284 100644
--- a/interface/web/sites/lib/lang/nl_web_domain.lng
+++ b/interface/web/sites/lib/lang/nl_web_domain.lng
@@ -16,6 +16,10 @@ $wb['domain_txt'] = 'Domein';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent website';
 $wb['redirect_type_txt'] = 'Redirect type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect pad';
 $wb['active_txt'] = 'Actief';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/nl_web_subdomain.lng b/interface/web/sites/lib/lang/nl_web_subdomain.lng
index 8245760ede..3e7dec1bb9 100644
--- a/interface/web/sites/lib/lang/nl_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/nl_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domein';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent website';
 $wb['redirect_type_txt'] = 'Redirect type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect pad';
 $wb['active_txt'] = 'Actief';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
index afe2da94b8..d5ab513f7d 100644
--- a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
@@ -16,6 +16,10 @@ $wb['domain_txt'] = 'Domein';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent website';
 $wb['redirect_type_txt'] = 'Redirect type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect pad';
 $wb['active_txt'] = 'Actief';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/nl_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/nl_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/nl_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/nl_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/pl_web_aliasdomain.lng b/interface/web/sites/lib/lang/pl_web_aliasdomain.lng
index 5aa998be20..f7a846c7ff 100644
--- a/interface/web/sites/lib/lang/pl_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/pl_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Wpisano nieprawidłowy folder. Proszę nie wpis
 $wb['type_txt'] = 'Rodzaj';
 $wb['parent_domain_id_txt'] = 'Strona macierzysta';
 $wb['redirect_type_txt'] = 'Rodzaj przekierowania';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Ścieżka przekierowania';
 $wb['active_txt'] = 'Aktywny';
 $wb['document_root_txt'] = 'Document root';
diff --git a/interface/web/sites/lib/lang/pl_web_childdomain.lng b/interface/web/sites/lib/lang/pl_web_childdomain.lng
index 5000369d19..983b690d43 100644
--- a/interface/web/sites/lib/lang/pl_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/pl_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domena';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Macierzysta strona www';
 $wb['redirect_type_txt'] = 'Typ przekierowania';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Ścieżka przekierowania';
 $wb['active_txt'] = 'Aktywny';
 $wb['document_root_txt'] = 'Główny katalog';
diff --git a/interface/web/sites/lib/lang/pl_web_domain.lng b/interface/web/sites/lib/lang/pl_web_domain.lng
index 2aabd34099..fdcbbb38bc 100644
--- a/interface/web/sites/lib/lang/pl_web_domain.lng
+++ b/interface/web/sites/lib/lang/pl_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domena';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Macierzysta strona www';
 $wb['redirect_type_txt'] = 'Rodzaj przekierowania';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Ścieżka przekierowania';
 $wb['active_txt'] = 'Aktywny';
 $wb['document_root_txt'] = 'Katalog strony';
diff --git a/interface/web/sites/lib/lang/pl_web_subdomain.lng b/interface/web/sites/lib/lang/pl_web_subdomain.lng
index 491b38d036..1cee4adca0 100644
--- a/interface/web/sites/lib/lang/pl_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/pl_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domena';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Macierzysta strona www';
 $wb['redirect_type_txt'] = 'Typ przekierowania';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Ścieżka przekierowania';
 $wb['active_txt'] = 'Aktywny';
 $wb['document_root_txt'] = 'Główny katalog';
diff --git a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
index e0b6a596e5..64530f5615 100644
--- a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domena';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Macierzysta strona www';
 $wb['redirect_type_txt'] = 'Rodzaj przekierowania';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Ścieżka przekierowania';
 $wb['active_txt'] = 'Aktywny';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/pl_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/pl_web_vhost_subdomain.lng
index 63de4b9a64..300ce3080a 100644
--- a/interface/web/sites/lib/lang/pl_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/pl_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Nazwa hosta';
 $wb['web_folder_error_regex'] = 'Wpisano nieprawidłowy folder. Proszę nie dopisywać znaku slash: / ';
 $wb['type_txt'] = 'Rodzaj';
 $wb['redirect_type_txt'] = 'Rodzaj przekierowania';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Ścieżka przekierowania';
 $wb['active_txt'] = 'Aktywny';
 $wb['document_root_txt'] = 'Document root';
diff --git a/interface/web/sites/lib/lang/pt_web_aliasdomain.lng b/interface/web/sites/lib/lang/pt_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/pt_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/pt_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/pt_web_childdomain.lng b/interface/web/sites/lib/lang/pt_web_childdomain.lng
index 56f715f7e2..92470d9609 100644
--- a/interface/web/sites/lib/lang/pt_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/pt_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domínio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Parente';
 $wb['redirect_type_txt'] = 'Tipo do Redireccionamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Pasta do Redireccionamento';
 $wb['active_txt'] = 'Activo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/pt_web_domain.lng b/interface/web/sites/lib/lang/pt_web_domain.lng
index 74ca235a26..609cd92411 100644
--- a/interface/web/sites/lib/lang/pt_web_domain.lng
+++ b/interface/web/sites/lib/lang/pt_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domínio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Parente';
 $wb['redirect_type_txt'] = 'Tipo Redireccionamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Pasta de redireccionamento';
 $wb['active_txt'] = 'Activo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/pt_web_subdomain.lng b/interface/web/sites/lib/lang/pt_web_subdomain.lng
index b705643f2a..823654e7e3 100644
--- a/interface/web/sites/lib/lang/pt_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/pt_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domínio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Parente';
 $wb['redirect_type_txt'] = 'Tipo do Redireccionamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Pasta do Redireccionamento';
 $wb['active_txt'] = 'Activo';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
index 58a256f652..a5cfa9876d 100644
--- a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domínio';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Parente';
 $wb['redirect_type_txt'] = 'Tipo Redireccionamento';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Pasta de redireccionamento';
 $wb['active_txt'] = 'Activo';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/pt_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/pt_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/pt_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/pt_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ro_web_aliasdomain.lng b/interface/web/sites/lib/lang/ro_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/ro_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/ro_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ro_web_childdomain.lng b/interface/web/sites/lib/lang/ro_web_childdomain.lng
index 93d642308f..ed01c5c28e 100644
--- a/interface/web/sites/lib/lang/ro_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/ro_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ro_web_domain.lng b/interface/web/sites/lib/lang/ro_web_domain.lng
index a0f7b6fe41..b1b2197f6b 100644
--- a/interface/web/sites/lib/lang/ro_web_domain.lng
+++ b/interface/web/sites/lib/lang/ro_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Tip';
 $wb['parent_domain_id_txt'] = 'Parinte Website';
 $wb['redirect_type_txt'] = 'Redirect Tip';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ro_web_subdomain.lng b/interface/web/sites/lib/lang/ro_web_subdomain.lng
index 83e036c6bd..fa21fc624a 100644
--- a/interface/web/sites/lib/lang/ro_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/ro_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
index 9554f4643f..d4e46c8016 100644
--- a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Tip';
 $wb['parent_domain_id_txt'] = 'Parinte Website';
 $wb['redirect_type_txt'] = 'Redirect Tip';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/ro_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/ro_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/ro_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/ro_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ru_web_aliasdomain.lng b/interface/web/sites/lib/lang/ru_web_aliasdomain.lng
index 9b59281c2f..5f2f052aa1 100644
--- a/interface/web/sites/lib/lang/ru_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/ru_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Неверный ввод папки. Пожа
 $wb['type_txt'] = 'Тип';
 $wb['parent_domain_id_txt'] = 'Родительский Web-сайт';
 $wb['redirect_type_txt'] = 'Тип редиректа';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Путь редиректа';
 $wb['active_txt'] = 'Активно';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ru_web_childdomain.lng b/interface/web/sites/lib/lang/ru_web_childdomain.lng
index a5c5b4e55b..fed47ffc8f 100644
--- a/interface/web/sites/lib/lang/ru_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/ru_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Домен';
 $wb['type_txt'] = 'Тип';
 $wb['parent_domain_id_txt'] = 'Родительский Web-сайт';
 $wb['redirect_type_txt'] = 'Тип редиректа';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Путь редиректа';
 $wb['active_txt'] = 'Активно';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ru_web_domain.lng b/interface/web/sites/lib/lang/ru_web_domain.lng
index be1e39e8a8..829df57658 100644
--- a/interface/web/sites/lib/lang/ru_web_domain.lng
+++ b/interface/web/sites/lib/lang/ru_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Домен';
 $wb['type_txt'] = 'Тип';
 $wb['parent_domain_id_txt'] = 'Дочерний Web-сайт';
 $wb['redirect_type_txt'] = 'Тип редиректа';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Путь редиректа';
 $wb['active_txt'] = 'Активно';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ru_web_subdomain.lng b/interface/web/sites/lib/lang/ru_web_subdomain.lng
index 6efdee1ab7..9ad6da9728 100644
--- a/interface/web/sites/lib/lang/ru_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/ru_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Домен';
 $wb['type_txt'] = 'Тип';
 $wb['parent_domain_id_txt'] = 'Родительский Web-сайт';
 $wb['redirect_type_txt'] = 'Тип редиректа';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Путь редиректа';
 $wb['active_txt'] = 'Активно';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
index 538b329fb4..a57188cf95 100644
--- a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Домен';
 $wb['type_txt'] = 'Тип';
 $wb['parent_domain_id_txt'] = 'Дочерний Web-сайт';
 $wb['redirect_type_txt'] = 'Тип редиректа';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Путь редиректа';
 $wb['active_txt'] = 'Активно';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/ru_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/ru_web_vhost_subdomain.lng
index a679065ce6..d459fcd076 100644
--- a/interface/web/sites/lib/lang/ru_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/ru_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Хост';
 $wb['web_folder_error_regex'] = 'Неверный ввод папки. Пожалуйста, не вводите слеш.';
 $wb['type_txt'] = 'Тип';
 $wb['redirect_type_txt'] = 'Тип редиректа';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Путь редиректа';
 $wb['active_txt'] = 'Активно';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/se_web_aliasdomain.lng b/interface/web/sites/lib/lang/se_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/se_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/se_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/se_web_childdomain.lng b/interface/web/sites/lib/lang/se_web_childdomain.lng
index e0d6e42476..5a94d73986 100644
--- a/interface/web/sites/lib/lang/se_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/se_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/se_web_domain.lng b/interface/web/sites/lib/lang/se_web_domain.lng
index 511a4bca81..0599c35692 100644
--- a/interface/web/sites/lib/lang/se_web_domain.lng
+++ b/interface/web/sites/lib/lang/se_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domän';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Föräldrawebbsida';
 $wb['redirect_type_txt'] = 'Omdirigeringstyp';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Omdirigeringssökväg';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Dokumentroot';
diff --git a/interface/web/sites/lib/lang/se_web_subdomain.lng b/interface/web/sites/lib/lang/se_web_subdomain.lng
index 578755cf26..76ccd26105 100644
--- a/interface/web/sites/lib/lang/se_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/se_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domän';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Föräldrawebbsida';
 $wb['redirect_type_txt'] = 'Omdirigeringstyp';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Omdirigeringssökväg';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Dokumentroot';
diff --git a/interface/web/sites/lib/lang/se_web_vhost_domain.lng b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
index af1a6f1b9e..f08d66dce1 100644
--- a/interface/web/sites/lib/lang/se_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Domän';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Föräldrawebbsida';
 $wb['redirect_type_txt'] = 'Omdirigeringstyp';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Omdirigeringssökväg';
 $wb['active_txt'] = 'Aktiv';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/se_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/se_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/se_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/se_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/sk_web_aliasdomain.lng b/interface/web/sites/lib/lang/sk_web_aliasdomain.lng
index de094c3086..0a2d659ab4 100644
--- a/interface/web/sites/lib/lang/sk_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/sk_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a s
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/sk_web_childdomain.lng b/interface/web/sites/lib/lang/sk_web_childdomain.lng
index 3d9a68638c..dd97981e5c 100644
--- a/interface/web/sites/lib/lang/sk_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/sk_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Doména';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Materská webová stránka';
 $wb['redirect_type_txt'] = 'Typ presmerovanie';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Cesta presmerovania';
 $wb['active_txt'] = 'Aktívne';
 $wb['document_root_txt'] = 'DocumentRoot';
diff --git a/interface/web/sites/lib/lang/sk_web_domain.lng b/interface/web/sites/lib/lang/sk_web_domain.lng
index c4ba44a51e..dbb58ff397 100644
--- a/interface/web/sites/lib/lang/sk_web_domain.lng
+++ b/interface/web/sites/lib/lang/sk_web_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Doména';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Aktívne';
 $wb['document_root_txt'] = 'DocumentRoot';
diff --git a/interface/web/sites/lib/lang/sk_web_subdomain.lng b/interface/web/sites/lib/lang/sk_web_subdomain.lng
index 1fb1ec65d0..651938eebd 100644
--- a/interface/web/sites/lib/lang/sk_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/sk_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Doména';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Materská webová stránka';
 $wb['redirect_type_txt'] = 'Typ presmerovanie';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Cesta presmerovania';
 $wb['active_txt'] = 'Aktívne';
 $wb['document_root_txt'] = 'DocumentRoot';
diff --git a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
index e2cfa27c0f..c9eb66987a 100644
--- a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Doména';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Aktívne';
 $wb['document_root_txt'] = 'Document Root';
diff --git a/interface/web/sites/lib/lang/sk_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/sk_web_vhost_subdomain.lng
index 47b9e1aff2..13e1558aa6 100644
--- a/interface/web/sites/lib/lang/sk_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/sk_web_vhost_subdomain.lng
@@ -22,6 +22,10 @@ $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Redirect Path';
 $wb['active_txt'] = 'Active';
 $wb['document_root_txt'] = 'Documentroot';
diff --git a/interface/web/sites/lib/lang/tr_web_aliasdomain.lng b/interface/web/sites/lib/lang/tr_web_aliasdomain.lng
index 015f10d2fc..cc7b8b70df 100644
--- a/interface/web/sites/lib/lang/tr_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/tr_web_aliasdomain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Yazdığınız klasör geçersiz. / karakterini
 $wb['type_txt'] = 'Tür';
 $wb['parent_domain_id_txt'] = 'Üst Web Sitesi';
 $wb['redirect_type_txt'] = 'Yönlendirme Türü';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Yönlendirme Yolu';
 $wb['active_txt'] = 'Etkin';
 $wb['document_root_txt'] = 'Kök Klasör';
diff --git a/interface/web/sites/lib/lang/tr_web_childdomain.lng b/interface/web/sites/lib/lang/tr_web_childdomain.lng
index 1e8693389c..f396a3cfb0 100644
--- a/interface/web/sites/lib/lang/tr_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/tr_web_childdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Etki Alanı';
 $wb['type_txt'] = 'Tür';
 $wb['parent_domain_id_txt'] = 'Ana Web Sitesi';
 $wb['redirect_type_txt'] = 'Yönlendirme Türü';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Yönlendirme Yolu';
 $wb['active_txt'] = 'Etkin';
 $wb['document_root_txt'] = 'Belge Kök Klasörü';
diff --git a/interface/web/sites/lib/lang/tr_web_domain.lng b/interface/web/sites/lib/lang/tr_web_domain.lng
index 7ebba4cd71..f1f4a19938 100644
--- a/interface/web/sites/lib/lang/tr_web_domain.lng
+++ b/interface/web/sites/lib/lang/tr_web_domain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Yazdığınız klasör geçersiz. Lütfen böl
 $wb['type_txt'] = 'Tür';
 $wb['parent_domain_id_txt'] = 'Üst Web Sitesi';
 $wb['redirect_type_txt'] = 'Yönlendirme Türü';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Yönlendirme Yolu';
 $wb['active_txt'] = 'Etkin';
 $wb['document_root_txt'] = 'Kök Klasör';
diff --git a/interface/web/sites/lib/lang/tr_web_subdomain.lng b/interface/web/sites/lib/lang/tr_web_subdomain.lng
index 5b703e3a32..24763f307b 100644
--- a/interface/web/sites/lib/lang/tr_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/tr_web_subdomain.lng
@@ -13,6 +13,10 @@ $wb['domain_txt'] = 'Etki Alanı';
 $wb['type_txt'] = 'Tür';
 $wb['parent_domain_id_txt'] = 'Üst Web Sitesi';
 $wb['redirect_type_txt'] = 'Yönlendirme Türü';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Yönlendirme Yolu';
 $wb['active_txt'] = 'Etkin';
 $wb['document_root_txt'] = 'Kök Klasör';
diff --git a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
index 6b7fe3793e..4561970e90 100644
--- a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
@@ -18,6 +18,10 @@ $wb['web_folder_error_regex'] = 'Yazdığınız klasör geçersiz. Lütfen / kar
 $wb['type_txt'] = 'Tür';
 $wb['parent_domain_id_txt'] = 'Üst Web Sitesi';
 $wb['redirect_type_txt'] = 'Yönlendirme Türü';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Yönlendirme Yolu';
 $wb['active_txt'] = 'Etkin';
 $wb['document_root_txt'] = 'Kök Klasör';
diff --git a/interface/web/sites/lib/lang/tr_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/tr_web_vhost_subdomain.lng
index e5f47865d4..8fb06e2802 100644
--- a/interface/web/sites/lib/lang/tr_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/tr_web_vhost_subdomain.lng
@@ -23,6 +23,10 @@ $wb['web_folder_error_regex'] = 'Yazılan klasör geçersiz. Lütfen / karakteri
 $wb['type_txt'] = 'Tür';
 $wb['parent_domain_id_txt'] = 'Üst Web Sitesi';
 $wb['redirect_type_txt'] = 'Yönlendirme Türü';
+$wb['r_redirect_txt'] = 'R (Temporary redirect)';
+$wb['l_redirect_txt'] = 'L (Last redirect rule)';
+$wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
+$wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Yönlendirme Yolu';
 $wb['active_txt'] = 'Etkin';
 $wb['document_root_txt'] = 'Kök Klasör';
-- 
GitLab


From 048d0cc508dc4a52859ec4e7b4d7651947ab8c1c Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Tue, 6 Oct 2020 21:05:48 +0200
Subject: [PATCH 011/441] Fix wrong content location (#5808)

---
 interface/web/sites/templates/web_vhost_domain_admin_list.htm | 2 +-
 interface/web/sites/templates/web_vhost_domain_list.htm       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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 85458f7329..74849d548d 100644
--- a/interface/web/sites/templates/web_vhost_domain_admin_list.htm
+++ b/interface/web/sites/templates/web_vhost_domain_admin_list.htm
@@ -42,7 +42,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="active"}</a></td>
                         <tmpl_if name="vhostdomain_type" value="domain"><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="sys_groupid"}</a></td></tmpl_if>
                         <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="server_id"}</a></td>
-						<tmpl_if name="vhostdomain_type" op="!=" value="domain"><td><a href="#" data-load-content="sites/web_vhost_aliasdomain_edit.php?id={tmpl_var name='id'}" data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='parent_domain_id'}">{tmpl_var name="parent_domain_id"}</a></td></tmpl_if>
+						<tmpl_if name="vhostdomain_type" op="!=" value="domain"><td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}" data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='parent_domain_id'}">{tmpl_var name="parent_domain_id"}</a></td></tmpl_if>
                         <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}" data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='domain'}">{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>
diff --git a/interface/web/sites/templates/web_vhost_domain_list.htm b/interface/web/sites/templates/web_vhost_domain_list.htm
index 3726a707f4..e3db359f31 100644
--- a/interface/web/sites/templates/web_vhost_domain_list.htm
+++ b/interface/web/sites/templates/web_vhost_domain_list.htm
@@ -56,7 +56,7 @@
                     	<tmpl_if name="vhostdomain_type" value="domain"><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_id"}</a></td></tmpl_if>
                         <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="active"}</a></td>
                         <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}" data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='server_id'}">{tmpl_var name="server_id"}</a></td>
-						<tmpl_if name="vhostdomain_type" op="!=" value="domain"><td><a href="#" data-load-content="sites/web_vhost_aliasdomain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="parent_domain_id"}</a></td></tmpl_if>
+						<tmpl_if name="vhostdomain_type" op="!=" value="domain"><td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="parent_domain_id"}</a></td></tmpl_if>
                         <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}" data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='domain'}">{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>
-- 
GitLab


From 4e9dfce8159c4d1a554d13dc78bc2fc630502dc6 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Tue, 6 Oct 2020 21:22:42 +0200
Subject: [PATCH 012/441] Do not allow DB quota = 0 when db quota client limit
 > 0 (#4355)

---
 interface/web/sites/database_edit.php        | 11 ++++++++---
 interface/web/sites/lib/lang/ar_database.lng |  1 +
 interface/web/sites/lib/lang/bg_database.lng |  1 +
 interface/web/sites/lib/lang/br_database.lng |  1 +
 interface/web/sites/lib/lang/ca_database.lng |  1 +
 interface/web/sites/lib/lang/cz_database.lng |  1 +
 interface/web/sites/lib/lang/de_database.lng |  1 +
 interface/web/sites/lib/lang/dk_database.lng |  1 +
 interface/web/sites/lib/lang/el_database.lng |  1 +
 interface/web/sites/lib/lang/en_database.lng |  1 +
 interface/web/sites/lib/lang/es_database.lng |  1 +
 interface/web/sites/lib/lang/fi_database.lng |  1 +
 interface/web/sites/lib/lang/fr_database.lng |  1 +
 interface/web/sites/lib/lang/hr_database.lng |  1 +
 interface/web/sites/lib/lang/hu_database.lng |  1 +
 interface/web/sites/lib/lang/id_database.lng |  1 +
 interface/web/sites/lib/lang/it_database.lng |  1 +
 interface/web/sites/lib/lang/ja_database.lng |  1 +
 interface/web/sites/lib/lang/nl_database.lng |  1 +
 interface/web/sites/lib/lang/pl_database.lng |  1 +
 interface/web/sites/lib/lang/pt_database.lng |  1 +
 interface/web/sites/lib/lang/ro_database.lng |  1 +
 interface/web/sites/lib/lang/ru_database.lng |  1 +
 interface/web/sites/lib/lang/se_database.lng |  1 +
 interface/web/sites/lib/lang/sk_database.lng |  1 +
 interface/web/sites/lib/lang/tr_database.lng |  1 +
 26 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php
index 22f3302c6c..279ccbaf95 100644
--- a/interface/web/sites/database_edit.php
+++ b/interface/web/sites/database_edit.php
@@ -211,6 +211,11 @@ class page_action extends tform_actions {
 					unset($global_config);
 					unset($dbname_prefix);
 				}
+				
+				//* ensure that quota value is not 0 when quota is set for client
+				if($client['limit_database_quota'] > 0 && isset($_POST["database_quota"]) && $_POST["database_quota"] == 0) {
+					$app->tform->errorMessage .= $app->tform->lng("limit_database_quota_not_0_txt")."<br>";
+				}
 
 				if($client['parent_client_id'] > 0) {
 					// Get the limits of the reseller
@@ -357,7 +362,7 @@ class page_action extends tform_actions {
 		if($tmp['server_id'] && $tmp['server_id'] != $this->dataRecord['server_id']) {
 			// we need remote access rights for this server, so get it's ip address
 			$server_config = $app->getconf->get_server_config($tmp['server_id'], 'server');
-			
+
 			// Add default remote_ips from Main Configuration.
 			$remote_ips = explode(",", $global_config['default_remote_dbserver']);
 			if (!in_array($server_config['ip_address'], $default_remote_db)) { $remote_ips[] = $server_config['ip_address']; }
@@ -380,7 +385,7 @@ class page_action extends tform_actions {
 				}
 			}
 		}
-		
+
 		if ($app->tform->errorMessage == '') {
 			// force update of the used database user
 			if($this->dataRecord['database_user_id']) {
@@ -442,7 +447,7 @@ class page_action extends tform_actions {
 		if($tmp['server_id'] && $tmp['server_id'] != $this->dataRecord['server_id']) {
 			// we need remote access rights for this server, so get it's ip address
 			$server_config = $app->getconf->get_server_config($tmp['server_id'], 'server');
-			
+
 			// Add default remote_ips from Main Configuration.
 			$remote_ips = explode(",", $global_config['default_remote_dbserver']);
 			if (!in_array($server_config['ip_address'], $default_remote_db)) { $remote_ips[] = $server_config['ip_address']; }
diff --git a/interface/web/sites/lib/lang/ar_database.lng b/interface/web/sites/lib/lang/ar_database.lng
index bfd17a693c..f081f1dce8 100644
--- a/interface/web/sites/lib/lang/ar_database.lng
+++ b/interface/web/sites/lib/lang/ar_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/bg_database.lng b/interface/web/sites/lib/lang/bg_database.lng
index a6afea58ba..675bbdd8c9 100644
--- a/interface/web/sites/lib/lang/bg_database.lng
+++ b/interface/web/sites/lib/lang/bg_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/br_database.lng b/interface/web/sites/lib/lang/br_database.lng
index 3690ee9cf8..2e5fcd72e5 100644
--- a/interface/web/sites/lib/lang/br_database.lng
+++ b/interface/web/sites/lib/lang/br_database.lng
@@ -46,4 +46,5 @@ $wb['globalsearch_suggestions_text_txt'] = 'Sugestões';
 $wb['limit_database_quota_txt'] = 'Cota do banco de dados';
 $wb['limit_database_quota_error_notint'] = 'O limite da cota do banco de dados deve ser um número.';
 $wb['limit_database_quota_free_txt'] = 'Limite da cota do banco de dados disponível';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/ca_database.lng b/interface/web/sites/lib/lang/ca_database.lng
index 9905e65d00..5a49db5f75 100644
--- a/interface/web/sites/lib/lang/ca_database.lng
+++ b/interface/web/sites/lib/lang/ca_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/cz_database.lng b/interface/web/sites/lib/lang/cz_database.lng
index edb031a1d3..931360d8ca 100644
--- a/interface/web/sites/lib/lang/cz_database.lng
+++ b/interface/web/sites/lib/lang/cz_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Prosím vyberte uživatele databáze pro tut
 $wb['limit_database_quota_txt'] = 'Kvóta databáze';
 $wb['limit_database_quota_error_notint'] = 'Limit databázové kvóty musí být číslo.';
 $wb['limit_database_quota_free_txt'] = 'Max. dostupná DB kvóta je ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/de_database.lng b/interface/web/sites/lib/lang/de_database.lng
index 891306c485..9f7a102ca3 100644
--- a/interface/web/sites/lib/lang/de_database.lng
+++ b/interface/web/sites/lib/lang/de_database.lng
@@ -46,4 +46,5 @@ $wb['globalsearch_suggestions_text_txt'] = 'Vorschläge';
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/dk_database.lng b/interface/web/sites/lib/lang/dk_database.lng
index e788a05687..70ac3b45dd 100644
--- a/interface/web/sites/lib/lang/dk_database.lng
+++ b/interface/web/sites/lib/lang/dk_database.lng
@@ -46,4 +46,5 @@ $wb['globalsearch_suggestions_text_txt'] = 'Forslag';
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/el_database.lng b/interface/web/sites/lib/lang/el_database.lng
index d64c194412..d3c1555a7c 100644
--- a/interface/web/sites/lib/lang/el_database.lng
+++ b/interface/web/sites/lib/lang/el_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/en_database.lng b/interface/web/sites/lib/lang/en_database.lng
index b094d45ade..4c3e653873 100644
--- a/interface/web/sites/lib/lang/en_database.lng
+++ b/interface/web/sites/lib/lang/en_database.lng
@@ -46,4 +46,5 @@ $wb['globalsearch_suggestions_text_txt'] = 'Suggestions';
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt']='Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/es_database.lng b/interface/web/sites/lib/lang/es_database.lng
index 95c021c157..512d297da0 100644
--- a/interface/web/sites/lib/lang/es_database.lng
+++ b/interface/web/sites/lib/lang/es_database.lng
@@ -46,4 +46,5 @@ $wb['select_dbuser_txt'] = 'Seleccionar usuario de base de datos';
 $wb['select_site_txt'] = '- Seleccionar sitio -';
 $wb['server_id_txt'] = 'Servidor';
 $wb['type_txt'] = 'Tipo';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/fi_database.lng b/interface/web/sites/lib/lang/fi_database.lng
index 846bb40f41..397cdbf031 100644
--- a/interface/web/sites/lib/lang/fi_database.lng
+++ b/interface/web/sites/lib/lang/fi_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/fr_database.lng b/interface/web/sites/lib/lang/fr_database.lng
index 50dc4851e0..77e1d561cb 100644
--- a/interface/web/sites/lib/lang/fr_database.lng
+++ b/interface/web/sites/lib/lang/fr_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/hr_database.lng b/interface/web/sites/lib/lang/hr_database.lng
index 1afaa78e87..f1c7d0db2e 100644
--- a/interface/web/sites/lib/lang/hr_database.lng
+++ b/interface/web/sites/lib/lang/hr_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/hu_database.lng b/interface/web/sites/lib/lang/hu_database.lng
index 9cbb6398d0..cb27357b97 100644
--- a/interface/web/sites/lib/lang/hu_database.lng
+++ b/interface/web/sites/lib/lang/hu_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/id_database.lng b/interface/web/sites/lib/lang/id_database.lng
index bea0128d05..90d3833217 100644
--- a/interface/web/sites/lib/lang/id_database.lng
+++ b/interface/web/sites/lib/lang/id_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/it_database.lng b/interface/web/sites/lib/lang/it_database.lng
index 7ee6a1e216..007daaa002 100644
--- a/interface/web/sites/lib/lang/it_database.lng
+++ b/interface/web/sites/lib/lang/it_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Per favore selezionare un utente per questo
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/ja_database.lng b/interface/web/sites/lib/lang/ja_database.lng
index bfd17a693c..f081f1dce8 100644
--- a/interface/web/sites/lib/lang/ja_database.lng
+++ b/interface/web/sites/lib/lang/ja_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/nl_database.lng b/interface/web/sites/lib/lang/nl_database.lng
index 9cbf52692c..d9bbfb0693 100644
--- a/interface/web/sites/lib/lang/nl_database.lng
+++ b/interface/web/sites/lib/lang/nl_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/pl_database.lng b/interface/web/sites/lib/lang/pl_database.lng
index b38029e7f9..57294f0a40 100644
--- a/interface/web/sites/lib/lang/pl_database.lng
+++ b/interface/web/sites/lib/lang/pl_database.lng
@@ -46,4 +46,5 @@ $wb['globalsearch_suggestions_text_txt'] = 'Sugestie';
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/pt_database.lng b/interface/web/sites/lib/lang/pt_database.lng
index e43e7f6b31..9da316d039 100644
--- a/interface/web/sites/lib/lang/pt_database.lng
+++ b/interface/web/sites/lib/lang/pt_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/ro_database.lng b/interface/web/sites/lib/lang/ro_database.lng
index 48acc975c2..73f2b3eb63 100644
--- a/interface/web/sites/lib/lang/ro_database.lng
+++ b/interface/web/sites/lib/lang/ro_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/ru_database.lng b/interface/web/sites/lib/lang/ru_database.lng
index 0f5eaf3180..478be40597 100644
--- a/interface/web/sites/lib/lang/ru_database.lng
+++ b/interface/web/sites/lib/lang/ru_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Пожалуйста, выберите по
 $wb['limit_database_quota_txt'] = 'Квота базы данных';
 $wb['limit_database_quota_error_notint'] = 'Лимит квоты базы данных должен быть числом.';
 $wb['limit_database_quota_free_txt'] = 'Макс. доступная квота базы данных.';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/se_database.lng b/interface/web/sites/lib/lang/se_database.lng
index e93c07cfc7..bf3f3fabfe 100644
--- a/interface/web/sites/lib/lang/se_database.lng
+++ b/interface/web/sites/lib/lang/se_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Vänligen välj en databasanvändare för de
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/sk_database.lng b/interface/web/sites/lib/lang/sk_database.lng
index 7776a5b460..7b8b53f2ab 100644
--- a/interface/web/sites/lib/lang/sk_database.lng
+++ b/interface/web/sites/lib/lang/sk_database.lng
@@ -46,4 +46,5 @@ $wb['database_user_missing_txt'] = 'Please select a database user for this datab
 $wb['limit_database_quota_txt'] = 'Database quota';
 $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
 $wb['limit_database_quota_free_txt'] = 'Max. available DB quota ';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
diff --git a/interface/web/sites/lib/lang/tr_database.lng b/interface/web/sites/lib/lang/tr_database.lng
index f443bbb620..9f8d200e43 100644
--- a/interface/web/sites/lib/lang/tr_database.lng
+++ b/interface/web/sites/lib/lang/tr_database.lng
@@ -46,4 +46,5 @@ $wb['globalsearch_suggestions_text_txt'] = 'Öneriler';
 $wb['limit_database_quota_txt'] = 'Veritabanı Kotası';
 $wb['limit_database_quota_error_notint'] = 'Veritabanı kotası bir sayı olmalıdır';
 $wb['limit_database_quota_free_txt'] = 'Kullanılabilecek en fazla veritabanı kotası';
+$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
 ?>
-- 
GitLab


From b07e42942fab7de324ee0ddf4b38b36cafcffaa9 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Wed, 7 Oct 2020 14:53:11 +0200
Subject: [PATCH 013/441] Make disabling webs on overtraffic optional (#3937)

---
 install/tpl/server.ini.master                            | 1 +
 interface/web/admin/form/server_config.tform.php         | 6 ++++++
 interface/web/admin/lib/lang/ar_server_config.lng        | 1 +
 interface/web/admin/lib/lang/bg_server_config.lng        | 1 +
 interface/web/admin/lib/lang/br_server_config.lng        | 1 +
 interface/web/admin/lib/lang/ca_server_config.lng        | 1 +
 interface/web/admin/lib/lang/cz_server_config.lng        | 1 +
 interface/web/admin/lib/lang/de_server_config.lng        | 1 +
 interface/web/admin/lib/lang/dk_server_config.lng        | 1 +
 interface/web/admin/lib/lang/el_server_config.lng        | 1 +
 interface/web/admin/lib/lang/en_server_config.lng        | 1 +
 interface/web/admin/lib/lang/es_server_config.lng        | 1 +
 interface/web/admin/lib/lang/fi_server_config.lng        | 1 +
 interface/web/admin/lib/lang/fr_server_config.lng        | 1 +
 interface/web/admin/lib/lang/hr_server_config.lng        | 1 +
 interface/web/admin/lib/lang/hu_server_config.lng        | 1 +
 interface/web/admin/lib/lang/id_server_config.lng        | 1 +
 interface/web/admin/lib/lang/it_server_config.lng        | 1 +
 interface/web/admin/lib/lang/ja_server_config.lng        | 1 +
 interface/web/admin/lib/lang/nl_server_config.lng        | 1 +
 interface/web/admin/lib/lang/pl_server_config.lng        | 1 +
 interface/web/admin/lib/lang/pt_server_config.lng        | 1 +
 interface/web/admin/lib/lang/ro_server_config.lng        | 1 +
 interface/web/admin/lib/lang/ru_server_config.lng        | 1 +
 interface/web/admin/lib/lang/se_server_config.lng        | 1 +
 interface/web/admin/lib/lang/sk_server_config.lng        | 1 +
 interface/web/admin/lib/lang/tr_server_config.lng        | 1 +
 interface/web/admin/templates/server_config_web_edit.htm | 6 ++++++
 server/lib/classes/cron.d/300-quota_notify.inc.php       | 8 +++++---
 29 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master
index 4d65fe934f..175617605a 100644
--- a/install/tpl/server.ini.master
+++ b/install/tpl/server.ini.master
@@ -112,6 +112,7 @@ connect_userid_to_webid=n
 connect_userid_to_webid_start=10000
 web_folder_protection=y
 php_ini_check_minutes=1
+overtraffic_disable_web=y
 overquota_notify_admin=y
 overquota_notify_client=y
 overquota_notify_freq=7
diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index 6ecda7872f..b25785c283 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -1015,6 +1015,12 @@ $form["tabs"]['web'] = array(
 			'default' => 'y',
 			'value' => array(0 => 'n', 1 => 'y')
 		),
+		'overtraffic_disable_web' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
 		'overquota_notify_admin' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng
index ad648de1c6..b95b3567e6 100644
--- a/interface/web/admin/lib/lang/ar_server_config.lng
+++ b/interface/web/admin/lib/lang/ar_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng
index b2b655eca2..fcd34e7292 100644
--- a/interface/web/admin/lib/lang/bg_server_config.lng
+++ b/interface/web/admin/lib/lang/bg_server_config.lng
@@ -191,6 +191,7 @@ $wb['website_autoalias_txt'] = 'Website auto alias';
 $wb['website_autoalias_note_txt'] = 'Placeholders:';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng
index a598861731..390612d166 100644
--- a/interface/web/admin/lib/lang/br_server_config.lng
+++ b/interface/web/admin/lib/lang/br_server_config.lng
@@ -198,6 +198,7 @@ $wb['enable_ip_wildcard_txt'] = 'Habilitar curingas de IP (*)';
 $wb['web_folder_protection_txt'] = 'Tornar pastas web imutáveis (atributos estendidos)';
 $wb['overtraffic_notify_admin_txt'] = 'Enviar notificação de tráfego excedido para o administrador';
 $wb['overtraffic_notify_client_txt'] = 'Enviar notificação de tráfego excedido para o cliente';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Por favor, nomes de host válidos para RBLs.';
 $wb['overquota_notify_admin_txt'] = 'Enviar alerta da cota para o administrador';
 $wb['overquota_notify_client_txt'] = 'Enviar alerta da cota para o cliente';
diff --git a/interface/web/admin/lib/lang/ca_server_config.lng b/interface/web/admin/lib/lang/ca_server_config.lng
index e4e663e01a..2e02e31c6b 100644
--- a/interface/web/admin/lib/lang/ca_server_config.lng
+++ b/interface/web/admin/lib/lang/ca_server_config.lng
@@ -194,6 +194,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng
index 76a37e86f0..ea8d6dd731 100644
--- a/interface/web/admin/lib/lang/cz_server_config.lng
+++ b/interface/web/admin/lib/lang/cz_server_config.lng
@@ -177,6 +177,7 @@ $wb['enable_ip_wildcard_txt'] = 'Aktivovat IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Při překročení limitu přenesených dat, poslat oznámení adminovi';
 $wb['overtraffic_notify_client_txt'] = 'Při překročení limitu přenesených dat, poslat oznámení klientovi';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Poslat varování o překročení nebo vyčerpání kvót adminovi';
 $wb['overquota_notify_client_txt'] = 'Poslat varování o překročení nebo vyčerpání kvót klientovi';
diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng
index bc6225745f..e287b9a622 100644
--- a/interface/web/admin/lib/lang/de_server_config.lng
+++ b/interface/web/admin/lib/lang/de_server_config.lng
@@ -197,6 +197,7 @@ $wb['enable_ip_wildcard_txt'] = 'IP Adressen Wildcard (*) aktivieren';
 $wb['web_folder_protection_txt'] = 'Webverzeichnis unveränderlich machen (erweiterte Attribute)';
 $wb['overtraffic_notify_admin_txt'] = 'Überschreiten des Datentransfer Limits an den Administrator senden';
 $wb['overtraffic_notify_client_txt'] = 'Überschreiten des Datentransfer Limits an den Kunden senden';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Bitte geben Sie gültige RBL-Hostnamen an.';
 $wb['overquota_notify_admin_txt'] = 'Quota-Warnungen an den Administrator senden';
 $wb['overquota_notify_client_txt'] = 'Quota-Warnungen an den Kunden senden';
diff --git a/interface/web/admin/lib/lang/dk_server_config.lng b/interface/web/admin/lib/lang/dk_server_config.lng
index dda39b38a6..77a29251d5 100644
--- a/interface/web/admin/lib/lang/dk_server_config.lng
+++ b/interface/web/admin/lib/lang/dk_server_config.lng
@@ -180,6 +180,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Gør web mapper immume (udvidede attributter)';
 $wb['overtraffic_notify_admin_txt'] = 'Send over-trafik meddelelse til admin';
 $wb['overtraffic_notify_client_txt'] = 'Send over-trafik meddelelse til kunde';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Angiv gyldige RBL værtsnavne.';
 $wb['overquota_notify_admin_txt'] = 'Send kvote advarsler til admin';
 $wb['overquota_notify_client_txt'] = 'Send kvote advarsler til kunde';
diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng
index 9dfadedc5d..0913624503 100644
--- a/interface/web/admin/lib/lang/el_server_config.lng
+++ b/interface/web/admin/lib/lang/el_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng
index e609a339d5..3df6f02dfb 100644
--- a/interface/web/admin/lib/lang/en_server_config.lng
+++ b/interface/web/admin/lib/lang/en_server_config.lng
@@ -204,6 +204,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng
index 7f3289a583..fadf3180c0 100644
--- a/interface/web/admin/lib/lang/es_server_config.lng
+++ b/interface/web/admin/lib/lang/es_server_config.lng
@@ -228,6 +228,7 @@ $wb['php_open_basedir_error_regex'] = 'El open_basedir para PHP es inválido.';
 $wb['php_open_basedir_txt'] = 'open_basedir para PHP';
 $wb['php_settings_txt'] = 'Opciones de PHP';
 $wb['pop3_imap_daemon_txt'] = 'Servicio POP3/IMAP';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Por favor especifique nombres de host RBL válidos.';
 $wb['realtime_blackhole_list_note_txt'] = '(Separe las listas RBL con una coma)';
 $wb['realtime_blackhole_list_txt'] = 'Lista de filtrado en tiempo real';
diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng
index 7ab81469b7..ec974d3249 100644
--- a/interface/web/admin/lib/lang/fi_server_config.lng
+++ b/interface/web/admin/lib/lang/fi_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng
index 0924bd4a41..a413c4214d 100644
--- a/interface/web/admin/lib/lang/fr_server_config.lng
+++ b/interface/web/admin/lib/lang/fr_server_config.lng
@@ -179,6 +179,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng
index 97b74e15f9..4eb3574d45 100644
--- a/interface/web/admin/lib/lang/hr_server_config.lng
+++ b/interface/web/admin/lib/lang/hr_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng
index 22a0725992..73f0181f3d 100644
--- a/interface/web/admin/lib/lang/hu_server_config.lng
+++ b/interface/web/admin/lib/lang/hu_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng
index 48627dd614..3555ba3288 100644
--- a/interface/web/admin/lib/lang/id_server_config.lng
+++ b/interface/web/admin/lib/lang/id_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng
index a2e824450b..39b7161ddf 100644
--- a/interface/web/admin/lib/lang/it_server_config.lng
+++ b/interface/web/admin/lib/lang/it_server_config.lng
@@ -179,6 +179,7 @@ $wb['enable_ip_wildcard_txt'] = 'Abilita  IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Imposta cartelle sito in moaniera non modificabile (attributi estesi)';
 $wb['overtraffic_notify_admin_txt'] = 'Trasmetti notifiche superamento traffico ad admin';
 $wb['overtraffic_notify_client_txt'] = 'Trasmetti notifiche superamento traffico al cliente';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Per cortesia specificare nomi host RBL validi.';
 $wb['overquota_notify_admin_txt'] = 'Trasmetti allarmi quota ad admin';
 $wb['overquota_notify_client_txt'] = 'Trasmetti allarmi quota al cliente';
diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng
index 135c7ef51e..a50922639c 100644
--- a/interface/web/admin/lib/lang/ja_server_config.lng
+++ b/interface/web/admin/lib/lang/ja_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng
index 29bed0ec44..9ef50bb6c1 100644
--- a/interface/web/admin/lib/lang/nl_server_config.lng
+++ b/interface/web/admin/lib/lang/nl_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng
index 524018773f..af839bb2e3 100644
--- a/interface/web/admin/lib/lang/pl_server_config.lng
+++ b/interface/web/admin/lib/lang/pl_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Prześlij informacje o przekroczeniu transferu do admina';
 $wb['overtraffic_notify_client_txt'] = 'Prześlij informacje o przekroczeniu transferu do klienta';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng
index bf3ae9f8c2..6b581c8593 100644
--- a/interface/web/admin/lib/lang/pt_server_config.lng
+++ b/interface/web/admin/lib/lang/pt_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng
index 5b5294daba..e15c99fb67 100644
--- a/interface/web/admin/lib/lang/ro_server_config.lng
+++ b/interface/web/admin/lib/lang/ro_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng
index 6499caa292..3465d2120d 100644
--- a/interface/web/admin/lib/lang/ru_server_config.lng
+++ b/interface/web/admin/lib/lang/ru_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Включить IP подстановочны
 $wb['web_folder_protection_txt'] = 'Сделать веб-папки неизменяемыми (расширенные атрибуты)';
 $wb['overtraffic_notify_admin_txt'] = 'Присылать уведомление трафика администратору';
 $wb['overtraffic_notify_client_txt'] = 'Присылать уведомление трафика клиенту';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Пожалуйста, укажите действительные имена хостов RBL.';
 $wb['overquota_notify_admin_txt'] = 'Присылать предупреждения квоты администратору';
 $wb['overquota_notify_client_txt'] = 'Присылать предупреждения квоты клиенту';
diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng
index cedb605b78..9bbbcc80ac 100644
--- a/interface/web/admin/lib/lang/se_server_config.lng
+++ b/interface/web/admin/lib/lang/se_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng
index bacb2e02ad..1b96cf57ad 100644
--- a/interface/web/admin/lib/lang/sk_server_config.lng
+++ b/interface/web/admin/lib/lang/sk_server_config.lng
@@ -191,6 +191,7 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng
index f925618721..84210ce9b8 100644
--- a/interface/web/admin/lib/lang/tr_server_config.lng
+++ b/interface/web/admin/lib/lang/tr_server_config.lng
@@ -198,6 +198,7 @@ $wb['enable_ip_wildcard_txt'] = 'IP Genel Karakteri (*) Kullanılsın';
 $wb['web_folder_protection_txt'] = 'Web klasörleri ayarlanamasın (genişletilmiş öznitelikler)';
 $wb['overtraffic_notify_admin_txt'] = 'Trafik Aşımı Bildirimi Yöneticiye Gönderilsin';
 $wb['overtraffic_notify_client_txt'] = 'Trafik Aşımı Bildirimi Müşteriye Gönderilsin';
+$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
 $wb['rbl_error_regex'] = 'Lütfen geçerli RBL sunucu adları yazın.';
 $wb['overquota_notify_admin_txt'] = 'Kota Uyarıları Yöneticiye Gönderilsin';
 $wb['overquota_notify_client_txt'] = 'Kota Uyarıları Müşteriye Gönderilsin';
diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm
index f98226c104..ca1d54344c 100644
--- a/interface/web/admin/templates/server_config_web_edit.htm
+++ b/interface/web/admin/templates/server_config_web_edit.htm
@@ -138,6 +138,12 @@
                 <div class="col-sm-9">
                     {tmpl_var name='overtraffic_notify_client'}
                 </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">{tmpl_var name='overtraffic_disable_web_txt'}</label>
+                <div class="col-sm-9">
+                    {tmpl_var name='overtraffic_disable_web'}
+                </div>
             </div>
 			<div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='overquota_notify_admin_txt'}</label>
diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php
index 2a12f6fd3f..ad18f17c9b 100644
--- a/server/lib/classes/cron.d/300-quota_notify.inc.php
+++ b/server/lib/classes/cron.d/300-quota_notify.inc.php
@@ -81,9 +81,11 @@ class cronjob_quota_notify extends cronjob {
 					$web_traffic = round($tmp['total_traffic_bytes']/1024/1024);
 
 					if($web_traffic_quota > 0 && $web_traffic > $web_traffic_quota) {
-						$app->dbmaster->datalogUpdate('web_domain', array("traffic_quota_lock" => 'y', "active" => 'n'), 'domain_id', $rec['domain_id']);
-						$app->log('Traffic quota for '.$rec['domain'].' exceeded. Disabling website.', LOGLEVEL_DEBUG);
-
+						//* Lock website
+						if ($web_config['overtraffic_disable_web'] == 'y') {
+							$app->dbmaster->datalogUpdate('web_domain', array("traffic_quota_lock" => 'y', "active" => 'n'), 'domain_id', $rec['domain_id']);
+							$app->log('Traffic quota for '.$rec['domain'].' exceeded. Disabling website.', LOGLEVEL_DEBUG);
+						}
 						//* Send traffic notifications
 						if($rec['traffic_quota_lock'] != 'y' && ($web_config['overtraffic_notify_admin'] == 'y' || $web_config['overtraffic_notify_client'] == 'y')) {
 
-- 
GitLab


From 54987a9ce57f4186940c2e00422cf10b3b0ff8c7 Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Wed, 7 Oct 2020 15:35:05 +0200
Subject: [PATCH 014/441] try to detect the correct OpenSSL version and
 activate TLS 1.3 if available for Nginx systems

---
 server/conf/nginx_vhost.conf.master           |   7 +-
 .../100-monitor_needs_restarting.inc.php      | 243 ++++++++++++++++++
 server/lib/classes/system.inc.php             |  21 ++
 server/plugins-available/nginx_plugin.inc.php |   4 +
 4 files changed, 274 insertions(+), 1 deletion(-)
 create mode 100644 server/lib/classes/cron.d/100-monitor_needs_restarting.inc.php

diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index bfa94f8fb3..f6addcc44d 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -18,7 +18,12 @@ server {
         listen <tmpl_var name='ip_address'>:<tmpl_var name='proxy_protocol_https'> ssl proxy_protocol;
 </tmpl_if>
 </tmpl_if>
-		ssl_protocols TLSv1.2;
+
+<tmpl_if name='openssl_version' op='>=' value='1.1.1' format='version'>
+<tmpl_var name="ssl_comment">ssl_protocols TLSv1.3 TLSv1.2;
+<tmpl_else>
+<tmpl_var name="ssl_comment">ssl_protocols TLSv1.2;
+</tmpl_if>
 		# ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
 		# ssl_prefer_server_ciphers on;
 <tmpl_if name='ipv6_enabled'>
diff --git a/server/lib/classes/cron.d/100-monitor_needs_restarting.inc.php b/server/lib/classes/cron.d/100-monitor_needs_restarting.inc.php
new file mode 100644
index 0000000000..cab5f68edb
--- /dev/null
+++ b/server/lib/classes/cron.d/100-monitor_needs_restarting.inc.php
@@ -0,0 +1,243 @@
+<?php
+
+/*
+Copyright (c) 2013, Marius Cramer, pixcept KG
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+class cronjob_monitor_system_update extends cronjob {
+
+	// job schedule
+	protected $_schedule = '0 * * * *';
+	protected $_run_at_new = true;
+
+	private $_tools = null;
+
+	/* this function is optional if it contains no custom code */
+	public function onPrepare() {
+		global $app;
+
+		parent::onPrepare();
+	}
+
+	/* this function is optional if it contains no custom code */
+	public function onBeforeRun() {
+		global $app;
+
+		return parent::onBeforeRun();
+	}
+
+	public function onRunJob() {
+		global $app, $conf;
+
+		$app->uses('getconf');
+		$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
+		if($server_config['monitor_system_updates'] == 'n') return;
+		
+		/* used for all monitor cronjobs */
+		$app->load('monitor_tools');
+		$this->_tools = new monitor_tools();
+		/* end global section for monitor cronjobs */
+
+		/* the id of the server as int */
+		$server_id = intval($conf['server_id']);
+
+		/** The type of the data */
+
+
+		$type = 'system_update';
+
+		/* This monitoring is only available on Debian or Ubuntu */
+		if (file_exists('/etc/debian_version')) {
+
+			/*
+			 * first update the "apt database"
+			 */
+			shell_exec('while fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ; do sleep 2; done; apt-get update');
+
+			/*
+			 * Then test the upgrade.
+			 * if there is any output, then there is a needed update
+			 */
+			$aptData = shell_exec('while fuser /var/lib/dpkg/lock >/dev/null 2>&1 || fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ; do sleep 2; done; apt-get -s -qq dist-upgrade');
+			if ($aptData == '') {
+				/* There is nothing to update! */
+				$state = 'ok';
+			} else {
+				/*
+				 * There is something to update! this is in most cases not critical, so we can
+				 * do a system-update once a month or so...
+				 */
+				$state = 'info';
+			}
+
+			/*
+			 * Fetch the output
+			 */
+			$data['output'] = $aptData;
+		} elseif (file_exists('/etc/gentoo-release')) {
+
+			/*
+			 * first update the portage tree
+			 */
+
+			// In keeping with gentoo's rsync policy, don't update to frequently (every four hours - taken from http://www.gentoo.org/doc/en/source_mirrors.xml)
+			$do_update = true;
+			if (file_exists('/usr/portage/metadata/timestamp.chk')) {
+				$datetime = file_get_contents('/usr/portage/metadata/timestamp.chk');
+				$datetime = trim($datetime);
+
+				$dstamp = strtotime($datetime);
+				if ($dstamp) {
+					$checkat = $dstamp + 14400; // + 4hours
+					if (mktime() < $checkat) {
+						$do_update = false;
+					}
+				}
+			}
+
+			if ($do_update) {
+				shell_exec('emerge --sync --quiet');
+			}
+
+			/*
+			 * Then test the upgrade.
+			 * if there is any output, then there is a needed update
+			 */
+			$emergeData = shell_exec('glsa-check -t affected');
+			if ($emergeData == '') {
+				/* There is nothing to update! */
+				$state = 'ok';
+				$data['output'] = 'No unapplied GLSA\'s found on the system.';
+			} else {
+				/* There is something to update! */
+				$state = 'info';
+				$data['output'] = shell_exec('glsa-check -pv --nocolor affected 2>/dev/null');
+			}
+		} elseif (file_exists('/etc/SuSE-release')) {
+
+			/*
+			 * update and find the upgrade.
+			 * if there is any output, then there is a needed update
+			 */
+			$aptData = shell_exec('zypper -q lu');
+			if ($aptData == '') {
+				/* There is nothing to update! */
+				$state = 'ok';
+			} else {
+				/*
+				 * There is something to update! this is in most cases not critical, so we can
+				 * do a system-update once a month or so...
+				 */
+				$state = 'info';
+			}
+
+			/*
+			 * Fetch the output
+			 */
+			$data['output'] = shell_exec('zypper lu');
+
+		} elseif(file_exists('/etc/redhat-release')) {
+                        /*
+                         * update and find the upgrade.
+                         * if there is any output, then there is a needed update
+                         */
+
+			/* try to figure out the default package manager first */
+                        if(file_exists('/usr/bin/dnf') && (is_link('/usr/bin/yum'))) {
+                                $rhPkgMgr = 'dnf';
+                        } elseif(file_exists('/usr/bin/dnf') && (!file_exists('/usr/bin/yum'))) {
+                                $rhPkgMgr = 'dnf';
+                        } else {
+                                $rhPkgMgr = 'yum';
+                        }
+
+			$aptData = shell_exec($rhPkgMgr. ' -q list updates');
+
+                        if ($aptData == '') {
+                                /* There is nothing to update! */
+                                $state = 'ok';
+                        } else {
+                                /*
+                                 * There is something to update! this is in most cases not critical, so we can
+                                 * do a system-update once a month or so...
+                                 */
+                                $state = 'info';
+                        }
+
+                        /*
+                         * Fetch the output
+			 */
+
+                        $data['output'] = shell_exec($rhPkgMgr. ' -q list updates');
+            
+	        } else {
+			/*
+			 * It is not Debian/Ubuntu, so there is no data and no state
+			 *
+			 * no_state, NOT unknown, because "unknown" is shown as state
+			 * inside the GUI. no_state is hidden.
+			 *
+			 * We have to write NO DATA inside the DB, because the GUI
+			 * could not know, if there is any dat, or not...
+			 */
+			$state = 'no_state';
+			$data['output'] = '';
+		}
+
+		$res = array();
+		$res['server_id'] = $server_id;
+		$res['type'] = $type;
+		$res['data'] = $data;
+		$res['state'] = $state;
+
+		//* Ensure that output is encoded so that it does not break the serialize
+		//$res['data']['output'] = htmlentities($res['data']['output']);
+		$res['data']['output'] = htmlentities($res['data']['output'], ENT_QUOTES, 'UTF-8');
+
+		/*
+		 * Insert the data into the database
+		 */
+		$sql = 'REPLACE INTO monitor_data (server_id, type, created, data, state) ' .
+			'VALUES (?, ?, UNIX_TIMESTAMP(), ?, ?)';
+		$app->dbmaster->query($sql, $res['server_id'], $res['type'], serialize($res['data']), $res['state']);
+
+		/* The new data is written, now we can delete the old one */
+		$this->_tools->delOldRecords($res['type'], $res['server_id']);
+
+		parent::onRunJob();
+	}
+
+	/* this function is optional if it contains no custom code */
+	public function onAfterRun() {
+		global $app;
+
+		parent::onAfterRun();
+	}
+
+}
+
+?>
diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 32afb9943c..bcaef1f2c4 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2087,6 +2087,27 @@ class system{
 		}
 	}
 
+        function getopensslversion($get_minor = false) {
+                global $app;
+                if($this->is_installed('openssl')) $cmd = 'openssl version';
+                else {
+			$app->log("Could not check OpenSSL version, openssl not found.", LOGLEVEL_DEBUG);
+                        return '1.0.1';
+                }
+                exec($cmd, $output, $return_var);
+                if($return_var != 0 || !$output[0]) {
+			$app->log("Could not check OpenSSL version, openssl did not return any data.", LOGLEVEL_WARN);
+                        return '1.0.1';
+                }
+                if(preg_match('/OpenSSL\s*(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
+			return $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) && $get_minor == true ? '.' . $matches[5] : '');
+                } else {
+			$app->log("Could not check OpenSSL version, did not find version string in openssl output.", LOGLEVEL_WARN);
+			return '1.0.1';
+                }
+
+        }
+
 	function getapacheversion($get_minor = false) {
 		global $app;
 
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index c361d3f62f..bdc2c0e276 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1621,6 +1621,10 @@ class nginx_plugin {
 		// set logging variable
 		$vhost_data['logging'] = $web_config['logging'];
 
+		$app->log("Found OpenSSL version: " . $app->system->getopensslversion($get_minor = true), LOGLEVEL_DEBUG);
+
+		$vhost_data['openssl_version'] = $app->system->getopensslversion($get_minor = true);
+		
 		$tpl->setVar($vhost_data);
 
 		$server_alias = array();
-- 
GitLab


From 541b7f0f47a2f597c57be8189d0f633837a39d26 Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Wed, 7 Oct 2020 15:36:07 +0200
Subject: [PATCH 015/441] removed leftovers

---
 .../100-monitor_needs_restarting.inc.php      | 243 ------------------
 1 file changed, 243 deletions(-)
 delete mode 100644 server/lib/classes/cron.d/100-monitor_needs_restarting.inc.php

diff --git a/server/lib/classes/cron.d/100-monitor_needs_restarting.inc.php b/server/lib/classes/cron.d/100-monitor_needs_restarting.inc.php
deleted file mode 100644
index cab5f68edb..0000000000
--- a/server/lib/classes/cron.d/100-monitor_needs_restarting.inc.php
+++ /dev/null
@@ -1,243 +0,0 @@
-<?php
-
-/*
-Copyright (c) 2013, Marius Cramer, pixcept KG
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-class cronjob_monitor_system_update extends cronjob {
-
-	// job schedule
-	protected $_schedule = '0 * * * *';
-	protected $_run_at_new = true;
-
-	private $_tools = null;
-
-	/* this function is optional if it contains no custom code */
-	public function onPrepare() {
-		global $app;
-
-		parent::onPrepare();
-	}
-
-	/* this function is optional if it contains no custom code */
-	public function onBeforeRun() {
-		global $app;
-
-		return parent::onBeforeRun();
-	}
-
-	public function onRunJob() {
-		global $app, $conf;
-
-		$app->uses('getconf');
-		$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
-		if($server_config['monitor_system_updates'] == 'n') return;
-		
-		/* used for all monitor cronjobs */
-		$app->load('monitor_tools');
-		$this->_tools = new monitor_tools();
-		/* end global section for monitor cronjobs */
-
-		/* the id of the server as int */
-		$server_id = intval($conf['server_id']);
-
-		/** The type of the data */
-
-
-		$type = 'system_update';
-
-		/* This monitoring is only available on Debian or Ubuntu */
-		if (file_exists('/etc/debian_version')) {
-
-			/*
-			 * first update the "apt database"
-			 */
-			shell_exec('while fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ; do sleep 2; done; apt-get update');
-
-			/*
-			 * Then test the upgrade.
-			 * if there is any output, then there is a needed update
-			 */
-			$aptData = shell_exec('while fuser /var/lib/dpkg/lock >/dev/null 2>&1 || fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ; do sleep 2; done; apt-get -s -qq dist-upgrade');
-			if ($aptData == '') {
-				/* There is nothing to update! */
-				$state = 'ok';
-			} else {
-				/*
-				 * There is something to update! this is in most cases not critical, so we can
-				 * do a system-update once a month or so...
-				 */
-				$state = 'info';
-			}
-
-			/*
-			 * Fetch the output
-			 */
-			$data['output'] = $aptData;
-		} elseif (file_exists('/etc/gentoo-release')) {
-
-			/*
-			 * first update the portage tree
-			 */
-
-			// In keeping with gentoo's rsync policy, don't update to frequently (every four hours - taken from http://www.gentoo.org/doc/en/source_mirrors.xml)
-			$do_update = true;
-			if (file_exists('/usr/portage/metadata/timestamp.chk')) {
-				$datetime = file_get_contents('/usr/portage/metadata/timestamp.chk');
-				$datetime = trim($datetime);
-
-				$dstamp = strtotime($datetime);
-				if ($dstamp) {
-					$checkat = $dstamp + 14400; // + 4hours
-					if (mktime() < $checkat) {
-						$do_update = false;
-					}
-				}
-			}
-
-			if ($do_update) {
-				shell_exec('emerge --sync --quiet');
-			}
-
-			/*
-			 * Then test the upgrade.
-			 * if there is any output, then there is a needed update
-			 */
-			$emergeData = shell_exec('glsa-check -t affected');
-			if ($emergeData == '') {
-				/* There is nothing to update! */
-				$state = 'ok';
-				$data['output'] = 'No unapplied GLSA\'s found on the system.';
-			} else {
-				/* There is something to update! */
-				$state = 'info';
-				$data['output'] = shell_exec('glsa-check -pv --nocolor affected 2>/dev/null');
-			}
-		} elseif (file_exists('/etc/SuSE-release')) {
-
-			/*
-			 * update and find the upgrade.
-			 * if there is any output, then there is a needed update
-			 */
-			$aptData = shell_exec('zypper -q lu');
-			if ($aptData == '') {
-				/* There is nothing to update! */
-				$state = 'ok';
-			} else {
-				/*
-				 * There is something to update! this is in most cases not critical, so we can
-				 * do a system-update once a month or so...
-				 */
-				$state = 'info';
-			}
-
-			/*
-			 * Fetch the output
-			 */
-			$data['output'] = shell_exec('zypper lu');
-
-		} elseif(file_exists('/etc/redhat-release')) {
-                        /*
-                         * update and find the upgrade.
-                         * if there is any output, then there is a needed update
-                         */
-
-			/* try to figure out the default package manager first */
-                        if(file_exists('/usr/bin/dnf') && (is_link('/usr/bin/yum'))) {
-                                $rhPkgMgr = 'dnf';
-                        } elseif(file_exists('/usr/bin/dnf') && (!file_exists('/usr/bin/yum'))) {
-                                $rhPkgMgr = 'dnf';
-                        } else {
-                                $rhPkgMgr = 'yum';
-                        }
-
-			$aptData = shell_exec($rhPkgMgr. ' -q list updates');
-
-                        if ($aptData == '') {
-                                /* There is nothing to update! */
-                                $state = 'ok';
-                        } else {
-                                /*
-                                 * There is something to update! this is in most cases not critical, so we can
-                                 * do a system-update once a month or so...
-                                 */
-                                $state = 'info';
-                        }
-
-                        /*
-                         * Fetch the output
-			 */
-
-                        $data['output'] = shell_exec($rhPkgMgr. ' -q list updates');
-            
-	        } else {
-			/*
-			 * It is not Debian/Ubuntu, so there is no data and no state
-			 *
-			 * no_state, NOT unknown, because "unknown" is shown as state
-			 * inside the GUI. no_state is hidden.
-			 *
-			 * We have to write NO DATA inside the DB, because the GUI
-			 * could not know, if there is any dat, or not...
-			 */
-			$state = 'no_state';
-			$data['output'] = '';
-		}
-
-		$res = array();
-		$res['server_id'] = $server_id;
-		$res['type'] = $type;
-		$res['data'] = $data;
-		$res['state'] = $state;
-
-		//* Ensure that output is encoded so that it does not break the serialize
-		//$res['data']['output'] = htmlentities($res['data']['output']);
-		$res['data']['output'] = htmlentities($res['data']['output'], ENT_QUOTES, 'UTF-8');
-
-		/*
-		 * Insert the data into the database
-		 */
-		$sql = 'REPLACE INTO monitor_data (server_id, type, created, data, state) ' .
-			'VALUES (?, ?, UNIX_TIMESTAMP(), ?, ?)';
-		$app->dbmaster->query($sql, $res['server_id'], $res['type'], serialize($res['data']), $res['state']);
-
-		/* The new data is written, now we can delete the old one */
-		$this->_tools->delOldRecords($res['type'], $res['server_id']);
-
-		parent::onRunJob();
-	}
-
-	/* this function is optional if it contains no custom code */
-	public function onAfterRun() {
-		global $app;
-
-		parent::onAfterRun();
-	}
-
-}
-
-?>
-- 
GitLab


From 9ffe21723f6ed3d7e0511d713cd35ddf700efadc Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Wed, 7 Oct 2020 19:34:32 +0200
Subject: [PATCH 016/441] added extra checks for TLS 1.3 availability

---
 server/conf/nginx_vhost.conf.master           |  8 +++--
 server/lib/classes/system.inc.php             | 29 +++++++++++++++++--
 server/plugins-available/nginx_plugin.inc.php | 19 ++++++++++--
 3 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index f6addcc44d..1752b83ab5 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -19,10 +19,12 @@ server {
 </tmpl_if>
 </tmpl_if>
 
-<tmpl_if name='openssl_version' op='>=' value='1.1.1' format='version'>
-<tmpl_var name="ssl_comment">ssl_protocols TLSv1.3 TLSv1.2;
+<tmpl_if name='tls13_available' op='>=' value='1.1.1' format='version'>
+<tmpl_var name="ssl_protocols">
+	ssl_protocols TLSv1.3 TLSv1.2;
 <tmpl_else>
-<tmpl_var name="ssl_comment">ssl_protocols TLSv1.2;
+<tmpl_var name="ssl_protocols">
+	ssl_protocols TLSv1.2;
 </tmpl_if>
 		# ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
 		# ssl_prefer_server_ciphers on;
diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index bcaef1f2c4..b592211dd5 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2094,7 +2094,8 @@ class system{
 			$app->log("Could not check OpenSSL version, openssl not found.", LOGLEVEL_DEBUG);
                         return '1.0.1';
                 }
-                exec($cmd, $output, $return_var);
+
+		exec($cmd, $output, $return_var);
                 if($return_var != 0 || !$output[0]) {
 			$app->log("Could not check OpenSSL version, openssl did not return any data.", LOGLEVEL_WARN);
                         return '1.0.1';
@@ -2106,7 +2107,31 @@ class system{
 			return '1.0.1';
                 }
 
-        }
+	}
+
+	function getnginxversion($get_minor = false) {
+		global $app;
+
+		if($this->is_installed('nginx')) $cmd = 'nginx -v 2>&1';
+		else {
+                        $app->log("Could not check Nginx version, nginx not found.", LOGLEVEL_DEBUG);
+                        return false;
+                }
+
+		exec($cmd, $output, $return_var);
+
+		if($return_var != 0 || !$output[0]) {
+                        $app->log("Could not check Nginx version, nginx did not return any data.", LOGLEVEL_WARN);
+                        return false;
+		}
+
+		if(preg_match('/nginx version: nginx\/\s*(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
+			return $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) && $get_minor == true ? '.' . $matches[5] : '');
+                } else {
+                        $app->log("Could not check Nginx version, did not find version string in nginx output.", LOGLEVEL_WARN);
+                        return false;
+                }
+	}
 
 	function getapacheversion($get_minor = false) {
 		global $app;
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index bdc2c0e276..5439efeb2f 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1621,10 +1621,23 @@ class nginx_plugin {
 		// set logging variable
 		$vhost_data['logging'] = $web_config['logging'];
 
-		$app->log("Found OpenSSL version: " . $app->system->getopensslversion($get_minor = true), LOGLEVEL_DEBUG);
+                // check if OpenSSL and Nginx supports TLS 1.3
+		//$app->log("Found OpenSSL version: " . $app->system->getopensslversion($get_minor = true), LOGLEVEL_DEBUG);
+		$nginx_version = $app->system->getnginxversion(true);
+		$openssl_version = $app->system->getopensslversion(true);
 
-		$vhost_data['openssl_version'] = $app->system->getopensslversion($get_minor = true);
-		
+		$app->system->exec_safe('nginx -V 2>&1', $output, $return_var);
+
+		if(preg_match('/built with OpenSSL\s*(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
+                        $nginx_openssl_ver = $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) ? '.' . $matches[5] : '');
+                } 
+
+		if(version_compare($app->system->getopensslversion(true), $nginx_openssl_ver, '>=')) {
+			if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($app->system->getopensslversion(true), '1.1.1', '>='))) {
+				$app->log('Enable TLS 1.3 for: '.$domain, LOGLEVEL_DEBUG);
+				$vhost_data['tls13_available'] = $app->system->getopensslversion(true);
+			}
+		}
 		$tpl->setVar($vhost_data);
 
 		$server_alias = array();
-- 
GitLab


From 57c1e8591237dbb452f2c152d8ae1254ffda8ace Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Fri, 20 Dec 2019 17:05:20 +0100
Subject: [PATCH 017/441] Dutch for parent_client_id_txt

---
 interface/web/client/lib/lang/nl_client.lng | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/client/lib/lang/nl_client.lng b/interface/web/client/lib/lang/nl_client.lng
index 586f773bc6..cd9f6e1742 100644
--- a/interface/web/client/lib/lang/nl_client.lng
+++ b/interface/web/client/lib/lang/nl_client.lng
@@ -154,7 +154,7 @@ $wb['gender_m_txt'] = 'Mr.';
 $wb['gender_f_txt'] = 'Ms.';
 $wb['added_by_txt'] = 'Added by';
 $wb['added_date_txt'] = 'Added date';
-$wb['parent_client_id_txt'] = 'Client of reseller';
+$wb['parent_client_id_txt'] = 'Client van reseller';
 $wb['none_txt'] = 'none';
 $wb['email_error_empty'] = 'Email is empty';
 $wb['xmpp_limits_txt'] = 'XMPP Limits';
-- 
GitLab


From d58f5b64bfa648910b764b9112528b9fe9459025 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Thu, 16 Jul 2020 14:44:10 +0200
Subject: [PATCH 018/441] Add noscript message to main page

---
 interface/web/themes/default/templates/main.tpl.htm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm
index 39622548aa..a6da294582 100644
--- a/interface/web/themes/default/templates/main.tpl.htm
+++ b/interface/web/themes/default/templates/main.tpl.htm
@@ -102,6 +102,7 @@
 		<div class='clear'>
           <!-- content -->
           <div id='content' class='right'>
+			<noscript>This page needs JavaScript to be enabled.</noscript>
 			<form method="post" action="" id="pageForm" name="pageForm" enctype="multipart/form-data" class='form-horizontal' role='form'>
 				<div id="pageContent" data-startpage="{tmpl_var name="startpage"}"><!-- AJAX CONTENT --></div>
 			</form>
-- 
GitLab


From dd965fcdd135ac1e66d2497ac89d3e115827e46b Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Fri, 17 Jul 2020 08:49:47 +0200
Subject: [PATCH 019/441] Remove stale HTML from tools index page

Was only cousing a white box to be visible, no content.
---
 interface/web/tools/templates/index.htm | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/interface/web/tools/templates/index.htm b/interface/web/tools/templates/index.htm
index 951c43b564..9b184791ef 100644
--- a/interface/web/tools/templates/index.htm
+++ b/interface/web/tools/templates/index.htm
@@ -3,19 +3,3 @@
 </div>
 <p><tmpl_var name="page_desc_txt"></p>
 
-<div class="panel panel_tools_interface">
-
-    <div class="pnl_formsarea">
-        
-            <h2 class="frmTextHead"></h2><p>&nbsp;</p>
-            
-        
-        
-        <input type="hidden" name="id" value="{tmpl_var name='id'}">
-            
-        <div class="clear"><div class="right">
-            &nbsp;
-        </div></div>
-    </div>
-  
-</div>
\ No newline at end of file
-- 
GitLab


From b28e2cfb8fe1ad5d5c95f611ceac3428f011b91c Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Wed, 26 Aug 2020 11:26:44 +0200
Subject: [PATCH 020/441] Match layout of CHECKBOXARRAY for new and edit.

On the new form it was a mess with all checkboxed in a row, on edit it was a nice list.
Especially visible on the Remote user form.
---
 interface/lib/classes/tform_base.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php
index 91a855872c..a26722a804 100644
--- a/interface/lib/classes/tform_base.inc.php
+++ b/interface/lib/classes/tform_base.inc.php
@@ -697,7 +697,7 @@ class tform_base {
 								if(trim($tvl) == trim($k)) $checked = ' CHECKED';
 							}
 							// $out .= "<label for=\"".$key."[]\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"checkbox\" $checked /> $v</label>\r\n";
-							$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"checkbox\" $checked /> $v</label> &nbsp;\r\n";
+							$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"checkbox\" $checked /> $v</label><br/>\r\n";
 							$elementNo++;
 						}
 					}
-- 
GitLab


From 6c2c59e5d37d1a77a5406af40fec5141f21cf389 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Mon, 28 Sep 2020 14:25:02 +0200
Subject: [PATCH 021/441] Monitor MySQL on the configured port, not always on
 3306

---
 server/lib/classes/monitor_tools.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index 31e36836d5..6e91cb42ce 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -460,7 +460,7 @@ class monitor_tools {
 		/* Monitor MySQL Server */
 		$data['mysqlserver'] = -1; // unknown - not needed
 		if ($services['db_server'] == 1) {
-			if ($this->_checkTcp('localhost', 3306)) {
+                       if ($this->_checkTcp($conf['db_host'], $conf['db_port'])) {
 				$data['mysqlserver'] = 1;
 			} else {
 				$data['mysqlserver'] = 0;
-- 
GitLab


From dd22c2e5f893dac1fbb0afb04cd3ca808dfb07c4 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Wed, 7 Oct 2020 22:11:21 +0200
Subject: [PATCH 022/441] Fix DNS record list sorting, fixes #4431

---
 interface/web/dns/templates/dns_a_list.htm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/dns/templates/dns_a_list.htm b/interface/web/dns/templates/dns_a_list.htm
index e3e5486763..3c877ead26 100644
--- a/interface/web/dns/templates/dns_a_list.htm
+++ b/interface/web/dns/templates/dns_a_list.htm
@@ -62,7 +62,7 @@
                     <td><input class="form-control" type="text" name="search_aux" value="{tmpl_var name='search_aux'}" /></td>
                     <td><input class="form-control" type="text" name="search_ttl" value="{tmpl_var name='search_ttl'}" /></td>
                     <td class="text-right">
-                        <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="return ISPConfig.changeTab('dns_records','dns/dns_soa_edit.php');"><span class="icon icon-filter"></span></button>
+                        <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="return ISPConfig.changeTab('dns_records','dns/dns_soa_edit.php');" data-form-action="dns/dns_a_list.php"><span class="icon icon-filter"></span></button>
                     </td>
                 </tr>
             </thead>
-- 
GitLab


From 244e0564ddb5cc1cef32fd8fc8e4fcf203c04ff3 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 8 Oct 2020 08:36:57 +0200
Subject: [PATCH 023/441] Wrong order of arguments for in_array

---
 interface/web/dashboard/dashlets/databasequota.php | 2 +-
 interface/web/dashboard/dashlets/quota.php         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php
index ad2439e398..4b06599d1c 100644
--- a/interface/web/dashboard/dashlets/databasequota.php
+++ b/interface/web/dashboard/dashlets/databasequota.php
@@ -12,7 +12,7 @@ class dashlet_databasequota {
                }
 
 		$modules = explode(',', $_SESSION['s']['user']['modules']);
-		if (!in_array($modules, 'sites')) {
+		if(!in_array('sites', $modules)) {
 			return '';
 		}
 
diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php
index 443517b0bc..f1c46051d1 100644
--- a/interface/web/dashboard/dashlets/quota.php
+++ b/interface/web/dashboard/dashlets/quota.php
@@ -12,7 +12,7 @@ class dashlet_quota {
 		}
 
 		$modules = explode(',', $_SESSION['s']['user']['modules']);
-		if (!in_array($modules, 'sites')) {
+		if(!in_array('sites', $modules)) {
 			return '';
 		}
 
-- 
GitLab


From 4f8639b5934286acf8ba4724b3ac0f1afd00e934 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Thu, 8 Oct 2020 14:57:27 +0200
Subject: [PATCH 024/441] Apply autofocus to ajax loaded pages

---
 interface/web/dns/templates/dns_a_edit.htm                   | 2 +-
 interface/web/mail/templates/mail_aliasdomain_edit.htm       | 2 +-
 interface/web/mail/templates/mail_user_mailbox_edit.htm      | 2 +-
 interface/web/themes/default/assets/javascripts/ispconfig.js | 3 +++
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/interface/web/dns/templates/dns_a_edit.htm b/interface/web/dns/templates/dns_a_edit.htm
index 0754bf9395..592999de7e 100644
--- a/interface/web/dns/templates/dns_a_edit.htm
+++ b/interface/web/dns/templates/dns_a_edit.htm
@@ -1,6 +1,6 @@
                    <div class="form-group">
                 <label for="name" class="col-sm-3 control-label">{tmpl_var name='name_txt'}</label>
-                <div class="col-sm-9"><input type="text" name="name" id="name" value="{tmpl_var name='name'}" class="form-control" /></div><p class="formHint">{tmpl_var name='name_hint_txt'}</p>
+                <div class="col-sm-9"><input type="text" name="name" id="name" value="{tmpl_var name='name'}" class="form-control" autofocus /></div><p class="formHint">{tmpl_var name='name_hint_txt'}</p>
             </div>
             <div class="form-group">
                 <label for="data" class="col-sm-3 control-label">{tmpl_var name='data_txt'}</label>
diff --git a/interface/web/mail/templates/mail_aliasdomain_edit.htm b/interface/web/mail/templates/mail_aliasdomain_edit.htm
index a18ff0e3db..8413ff3f8f 100644
--- a/interface/web/mail/templates/mail_aliasdomain_edit.htm
+++ b/interface/web/mail/templates/mail_aliasdomain_edit.htm
@@ -1,6 +1,6 @@
             <div class="form-group">
                 <label for="destination" class="col-sm-3 control-label">{tmpl_var name='source_txt'}</label>
-                <div class="col-sm-9"><select name="source" id="source" class="form-control">
+                <div class="col-sm-9"><select name="source" id="source" class="form-control" autofocus>
                     {tmpl_var name='source_domain'}
                 </select></div>
             </div>
diff --git a/interface/web/mail/templates/mail_user_mailbox_edit.htm b/interface/web/mail/templates/mail_user_mailbox_edit.htm
index cd7ffcf0b6..170ab15db0 100644
--- a/interface/web/mail/templates/mail_user_mailbox_edit.htm
+++ b/interface/web/mail/templates/mail_user_mailbox_edit.htm
@@ -1,6 +1,6 @@
             <div class="form-group">
                 <label for="name" class="col-sm-3 control-label">{tmpl_var name='name_txt'}</label>
-                <div class="col-sm-6"><input type="text" name="name" id="name" value="{tmpl_var name='name'}" class="form-control" /></div><div class="col-sm-3 input-sm"> &nbsp; {tmpl_var name='name_optional_txt'}
+                <div class="col-sm-6"><input type="text" name="name" id="name" value="{tmpl_var name='name'}" class="form-control" autofocus /></div><div class="col-sm-3 input-sm"> &nbsp; {tmpl_var name='name_optional_txt'}
             </div></div>
 			<div class="form-group">
                 <label class="col-sm-3 control-label"><em>*</em> {tmpl_var name='email_txt'}</label>
diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js
index 26cfb0a9e4..c634ff7fb2 100644
--- a/interface/web/themes/default/assets/javascripts/ispconfig.js
+++ b/interface/web/themes/default/assets/javascripts/ispconfig.js
@@ -137,6 +137,9 @@ var ISPConfig = {
 		});
 		$('[data-toggle="tooltip"]').tooltip({
 		});
+
+		$('input[autofocus]').focus();
+
 		// grab all password fields and set the readonly prop to prevent password managers to fill in new password
 		$('input[type="password"]').each(function() {
 			$(this).prop('readonly', true)
-- 
GitLab


From 6322f58c30093fac56c04d91666ba1d1b80cc3fc Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 8 Oct 2020 16:08:38 +0200
Subject: [PATCH 025/441] Update mysql_clientdb_plugin.inc.php

---
 .../mysql_clientdb_plugin.inc.php             | 51 +++++++++++--------
 1 file changed, 31 insertions(+), 20 deletions(-)

diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php
index 75b6729760..aa09b3d81c 100644
--- a/server/plugins-available/mysql_clientdb_plugin.inc.php
+++ b/server/plugins-available/mysql_clientdb_plugin.inc.php
@@ -150,16 +150,21 @@ class mysql_clientdb_plugin {
 				$link->query("CREATE USER '".$link->escape_string($database_user)."'@'$db_host'");
 				$app->log("CREATE USER '".$link->escape_string($database_user)."'@'$db_host'", LOGLEVEL_DEBUG);
 
-				// set the password
-				// MySQL < 5.7 and MariadB 10
-				if(!$link->query("UPDATE mysql.user SET `Password` = '".$link->escape_string($database_password)."' WHERE `Host` = '".$db_host."' AND `User` = '".$link->escape_string($database_user)."'")) {
-					if($this->getDatabaseType($link) == 'mysql' && $this->getDatabaseVersion($link, true) >= 8) {
-						// for MySQL >= 8, we set authentication plugin to old mode to ensure that older additional php versions can still connect to the database
-						if(!$link->query("UPDATE mysql.user SET `authentication_string` = '".$link->escape_string($database_password)."', `plugin` = 'mysql_native_password' WHERE `Host` = '".$db_host."' AND `User` = '".$link->escape_string($database_user)."'")) $success = false;
-					} else {
-						// MySQL 5.7, the Password field has been renamed to authentication_string
-						if(!$link->query("UPDATE mysql.user SET `authentication_string` = '".$link->escape_string($database_password)."' WHERE `Host` = '".$db_host."' AND `User` = '".$link->escape_string($database_user)."'")) $success = false;
-					}
+				// mariadb or mysql < 5.7
+				if($this->getDatabaseType($link) == 'mariadb' || version_compare($this->getDatabaseVersion($link), '5.7', '<')) {
+					$query = sprintf("SET PASSWORD FOR '%s'@'%s' = '%s'",
+						$link->escape_string($data['new']['database_user']),
+						$db_host,
+						$link->escape_string($data['new']['database_password']));
+					if(!$link->query($query)) $success = false;
+				}
+				// mysql >= 5.7
+				else {
+					$query = sprintf("ALTER USER IF EXISTS '%s'@'%s' IDENTIFIED WITH mysql_native_password AS '%s'",
+						$link->escape_string($data['new']['database_user']),
+						$db_host,
+						$link->escape_string($data['new']['database_password']));
+					if(!$link->query($query)) $success = false;
 				}
 				
 				$app->log("PASSWORD SET FOR '".$link->escape_string($database_user)."'@'$db_host' success? " . ($success ? 'yes' : 'no'), LOGLEVEL_DEBUG);
@@ -182,15 +187,21 @@ class mysql_clientdb_plugin {
 				//if(!$link->query("SET PASSWORD FOR '".$link->escape_string($database_user)."'@'$db_host' = '".$link->escape_string($database_password)."'")) $success = false;
 				// SET PASSWORD for already hashed passwords is not supported by latest MySQL 5.7 anymore, so we have to set the hashed password directly
 				if(trim($database_password) != '') {
-					// MySQL < 5.7 and MariadB 10
-					if(!$link->query("UPDATE mysql.user SET `Password` = '".$link->escape_string($database_password)."' WHERE `Host` = '".$db_host."' AND `User` = '".$link->escape_string($database_user)."'")) {
-						if($this->getDatabaseType($link) == 'mysql' && $this->getDatabaseVersion($link, true) >= 8) {
-							// for MySQL >= 8, we set authentication plugin to old mode to ensure that older additional php versions can still connect to the database
-							if(!$link->query("UPDATE mysql.user SET `authentication_string` = '".$link->escape_string($database_password)."', `plugin` = 'mysql_native_password' WHERE `Host` = '".$db_host."' AND `User` = '".$link->escape_string($database_user)."'")) $success = false;
-						} else {
-							// MySQL 5.7, the Password field has been renamed to authentication_string
-							if(!$link->query("UPDATE mysql.user SET `authentication_string` = '".$link->escape_string($database_password)."' WHERE `Host` = '".$db_host."' AND `User` = '".$link->escape_string($database_user)."'")) $success = false;
-						}
+					// mariadb or mysql < 5.7
+					if($this->getDatabaseType($link) == 'mariadb' || version_compare($this->getDatabaseVersion($link), '5.7', '<')) {
+						$query = sprintf("SET PASSWORD FOR '%s'@'%s' = '%s'",
+							$link->escape_string($data['new']['database_user']),
+							$db_host,
+							$link->escape_string($data['new']['database_password']));
+						if(!$link->query($query)) $success = false;
+					}
+					// mysql >= 5.7
+					else {
+						$query = sprintf("ALTER USER IF EXISTS '%s'@'%s' IDENTIFIED WITH mysql_native_password AS '%s'",
+							$link->escape_string($data['new']['database_user']),
+							$db_host,
+							$link->escape_string($data['new']['database_password']));
+						if(!$link->query($query)) $success = false;
 					}
 					if($success == true) $link->query("FLUSH PRIVILEGES");
 				}
@@ -836,4 +847,4 @@ class mysql_clientdb_plugin {
 
 } // end class
 
-?>
+?>
\ No newline at end of file
-- 
GitLab


From 21b1c30c47cc5f0e45e493e84ff65532fcfce1a7 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 8 Oct 2020 16:19:04 +0200
Subject: [PATCH 026/441] Update mysql_clientdb_plugin.inc.php

---
 .../mysql_clientdb_plugin.inc.php                | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php
index aa09b3d81c..4d637ef37f 100644
--- a/server/plugins-available/mysql_clientdb_plugin.inc.php
+++ b/server/plugins-available/mysql_clientdb_plugin.inc.php
@@ -153,17 +153,17 @@ class mysql_clientdb_plugin {
 				// mariadb or mysql < 5.7
 				if($this->getDatabaseType($link) == 'mariadb' || version_compare($this->getDatabaseVersion($link), '5.7', '<')) {
 					$query = sprintf("SET PASSWORD FOR '%s'@'%s' = '%s'",
-						$link->escape_string($data['new']['database_user']),
+						$link->escape_string($database_user),
 						$db_host,
-						$link->escape_string($data['new']['database_password']));
+						$link->escape_string($database_password));
 					if(!$link->query($query)) $success = false;
 				}
 				// mysql >= 5.7
 				else {
 					$query = sprintf("ALTER USER IF EXISTS '%s'@'%s' IDENTIFIED WITH mysql_native_password AS '%s'",
-						$link->escape_string($data['new']['database_user']),
+						$link->escape_string($database_user),
 						$db_host,
-						$link->escape_string($data['new']['database_password']));
+						$link->escape_string($database_password));
 					if(!$link->query($query)) $success = false;
 				}
 				
@@ -190,17 +190,17 @@ class mysql_clientdb_plugin {
 					// mariadb or mysql < 5.7
 					if($this->getDatabaseType($link) == 'mariadb' || version_compare($this->getDatabaseVersion($link), '5.7', '<')) {
 						$query = sprintf("SET PASSWORD FOR '%s'@'%s' = '%s'",
-							$link->escape_string($data['new']['database_user']),
+							$link->escape_string($database_user),
 							$db_host,
-							$link->escape_string($data['new']['database_password']));
+							$link->escape_string($database_password));
 						if(!$link->query($query)) $success = false;
 					}
 					// mysql >= 5.7
 					else {
 						$query = sprintf("ALTER USER IF EXISTS '%s'@'%s' IDENTIFIED WITH mysql_native_password AS '%s'",
-							$link->escape_string($data['new']['database_user']),
+							$link->escape_string($database_user),
 							$db_host,
-							$link->escape_string($data['new']['database_password']));
+							$link->escape_string($database_password));
 						if(!$link->query($query)) $success = false;
 					}
 					if($success == true) $link->query("FLUSH PRIVILEGES");
-- 
GitLab


From 24e308b93281966afeaa419de82badc93c082865 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 8 Oct 2020 11:20:35 -0600
Subject: [PATCH 027/441] copy configure_postfix settings from installer_base

---
 install/dist/lib/fedora.lib.php   | 14 ++++++++++++++
 install/dist/lib/gentoo.lib.php   | 14 ++++++++++++++
 install/dist/lib/opensuse.lib.php | 14 ++++++++++++++
 3 files changed, 42 insertions(+)

diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index 2d31b89bbd..683591d58f 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -163,8 +163,19 @@ class installer_dist extends installer_base {
 		$stress_adaptive_placeholder = '#{stress_adaptive} ';
 		$stress_adaptive = (isset($server_ini_array['mail']['stress_adaptive']) && ($server_ini_array['mail']['stress_adaptive'] == 'y')) ? '' : $stress_adaptive_placeholder;
 
+		$reject_unknown_client_hostname='';
+		if (isset($server_ini_array['mail']['reject_unknown']) && ($server_ini_array['mail']['reject_unknown'] == 'client' || $server_ini_array['mail']['reject_unknown'] == 'client_helo')) {
+			$reject_unknown_client_hostname=',reject_unknown_client_hostname';
+		}
+		$reject_unknown_helo_hostname='';
+		if ((!isset($server_ini_array['mail']['reject_unknown'])) || $server_ini_array['mail']['reject_unknown'] == 'helo' || $server_ini_array['mail']['reject_unknown'] == 'client_helo') {
+			$reject_unknown_helo_hostname=',reject_unknown_helo_hostname';
+		}
+
 		unset($server_ini_array);
 
+		$myhostname = str_replace('.','\.',$conf['hostname']);
+
 		$postconf_placeholders = array('{config_dir}' => $config_dir,
 			'{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
 			'{vmail_userid}' => $cf['vmail_userid'],
@@ -173,7 +184,10 @@ class installer_dist extends installer_base {
 			'{greylisting}' => $greylisting,
 			'{reject_slm}' => $reject_sender_login_mismatch,
 			'{reject_aslm}' => $reject_authenticated_sender_login_mismatch,
+			'{myhostname}' => $myhostname,
 			$stress_adaptive_placeholder => $stress_adaptive,
+			'{reject_unknown_client_hostname}' => $reject_unknown_client_hostname,
+			'{reject_unknown_helo_hostname}' => $reject_unknown_helo_hostname,
 		);
 
 		$postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_postfix.conf.master', 'tpl/fedora_postfix.conf.master');
diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index 342a583fac..acd4dbcf61 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -112,8 +112,19 @@ class installer extends installer_base
 		$stress_adaptive_placeholder = '#{stress_adaptive} ';
 		$stress_adaptive = (isset($server_ini_array['mail']['stress_adaptive']) && ($server_ini_array['mail']['stress_adaptive'] == 'y')) ? '' : $stress_adaptive_placeholder;
 
+		$reject_unknown_client_hostname='';
+		if (isset($server_ini_array['mail']['reject_unknown']) && ($server_ini_array['mail']['reject_unknown'] == 'client' || $server_ini_array['mail']['reject_unknown'] == 'client_helo')) {
+			$reject_unknown_client_hostname=',reject_unknown_client_hostname';
+		}
+		$reject_unknown_helo_hostname='';
+		if ((!isset($server_ini_array['mail']['reject_unknown'])) || $server_ini_array['mail']['reject_unknown'] == 'helo' || $server_ini_array['mail']['reject_unknown'] == 'client_helo') {
+			$reject_unknown_helo_hostname=',reject_unknown_helo_hostname';
+		}
+
 		unset($server_ini_array);
 
+		$myhostname = str_replace('.','\.',$conf['hostname']);
+
 		$postconf_placeholders = array('{config_dir}' => $config_dir,
 			'{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
 			'{vmail_userid}' => $cf['vmail_userid'],
@@ -122,7 +133,10 @@ class installer extends installer_base
 			'{greylisting}' => $greylisting,
 			'{reject_slm}' => $reject_sender_login_mismatch,
 			'{reject_aslm}' => $reject_authenticated_sender_login_mismatch,
+			'{myhostname}' => $myhostname,
 			$stress_adaptive_placeholder => $stress_adaptive,
+			'{reject_unknown_client_hostname}' => $reject_unknown_client_hostname,
+			'{reject_unknown_helo_hostname}' => $reject_unknown_helo_hostname,
 		);
 
 		$postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/gentoo_postfix.conf.master', 'tpl/gentoo_postfix.conf.master');
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 07dd5cc690..cb145ea7df 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -174,8 +174,19 @@ class installer_dist extends installer_base {
 		$stress_adaptive_placeholder = '#{stress_adaptive} ';
 		$stress_adaptive = (isset($server_ini_array['mail']['stress_adaptive']) && ($server_ini_array['mail']['stress_adaptive'] == 'y')) ? '' : $stress_adaptive_placeholder;
 
+		$reject_unknown_client_hostname='';
+		if (isset($server_ini_array['mail']['reject_unknown']) && ($server_ini_array['mail']['reject_unknown'] == 'client' || $server_ini_array['mail']['reject_unknown'] == 'client_helo')) {
+			$reject_unknown_client_hostname=',reject_unknown_client_hostname';
+		}
+		$reject_unknown_helo_hostname='';
+		if ((!isset($server_ini_array['mail']['reject_unknown'])) || $server_ini_array['mail']['reject_unknown'] == 'helo' || $server_ini_array['mail']['reject_unknown'] == 'client_helo') {
+			$reject_unknown_helo_hostname=',reject_unknown_helo_hostname';
+		}
+
 		unset($server_ini_array);
 
+		$myhostname = str_replace('.','\.',$conf['hostname']);
+
 		$postconf_placeholders = array('{config_dir}' => $config_dir,
 			'{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
 			'{vmail_userid}' => $cf['vmail_userid'],
@@ -184,7 +195,10 @@ class installer_dist extends installer_base {
 			'{greylisting}' => $greylisting,
 			'{reject_slm}' => $reject_sender_login_mismatch,
 			'{reject_aslm}' => $reject_authenticated_sender_login_mismatch,
+			'{myhostname}' => $myhostname,
 			$stress_adaptive_placeholder => $stress_adaptive,
+			'{reject_unknown_client_hostname}' => $reject_unknown_client_hostname,
+			'{reject_unknown_helo_hostname}' => $reject_unknown_helo_hostname,
 		);
 
 		$postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_postfix.conf.master', 'tpl/opensuse_postfix.conf.master');
-- 
GitLab


From 14c03796cf30307c93df923ddf59a71e5e3b8f1e Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Thu, 8 Oct 2020 22:12:11 +0200
Subject: [PATCH 028/441] Add missing document_root field to query, fixes #5625

---
 server/lib/classes/backup.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php
index 5b01b23760..23d6171f4f 100644
--- a/server/lib/classes/backup.inc.php
+++ b/server/lib/classes/backup.inc.php
@@ -739,7 +739,7 @@ class backup
         $server_config = $app->getconf->get_server_config($server_id, 'server');
         $backup_dir = trim($server_config['backup_dir']);
         $sql = "SELECT * FROM web_backup WHERE server_id = ?";
-        $sql_domains = "SELECT domain_id,system_user,system_group,backup_interval FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')";
+        $sql_domains = "SELECT domain_id,document_root,system_user,system_group,backup_interval FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')";
         array_push($args, $server_id);
         array_push($args_domains, $server_id);
         if (!empty($backup_type)) {
-- 
GitLab


From 4fd6d02c1dd3a33bf7748cbd7cfe21f3d7bf250c Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 8 Oct 2020 17:34:46 -0600
Subject: [PATCH 029/441] fix stray mail_plugins line in dovecot.conf

---
 install/tpl/debian6_dovecot2.conf.master  | 2 +-
 install/tpl/debian_dovecot2.conf.master   | 4 ++--
 install/tpl/fedora_dovecot2.conf.master   | 4 +---
 install/tpl/opensuse_dovecot2.conf.master | 4 +---
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/install/tpl/debian6_dovecot2.conf.master b/install/tpl/debian6_dovecot2.conf.master
index a27728ef69..f933463b0b 100644
--- a/install/tpl/debian6_dovecot2.conf.master
+++ b/install/tpl/debian6_dovecot2.conf.master
@@ -88,7 +88,7 @@ protocol lmtp {
 #2.3+         group = vmail
 #2.3+         mode = 0660
 #2.3+     }
-#2.3+
+#2.3+ 
 #2.3+     unix_listener stats-writer {
 #2.3+         user = vmail
 #2.3+         group = vmail
diff --git a/install/tpl/debian_dovecot2.conf.master b/install/tpl/debian_dovecot2.conf.master
index 524291c5d8..4a44bfbfc6 100644
--- a/install/tpl/debian_dovecot2.conf.master
+++ b/install/tpl/debian_dovecot2.conf.master
@@ -12,7 +12,7 @@ ssl_min_protocol = TLSv1.2
 ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
 ssl_prefer_server_ciphers = no
 mail_max_userip_connections = 100
-mail_plugins = $mail_plugins quota
+mail_plugins = quota
 passdb {
   args = /etc/dovecot/dovecot-sql.conf
   driver = sql
@@ -86,7 +86,7 @@ protocol lmtp {
 #2.3+         group = vmail
 #2.3+         mode = 0660
 #2.3+     }
-#2.3+
+#2.3+ 
 #2.3+     unix_listener stats-writer {
 #2.3+         user = vmail
 #2.3+         group = vmail
diff --git a/install/tpl/fedora_dovecot2.conf.master b/install/tpl/fedora_dovecot2.conf.master
index e62fd7289a..a217e28d99 100644
--- a/install/tpl/fedora_dovecot2.conf.master
+++ b/install/tpl/fedora_dovecot2.conf.master
@@ -76,15 +76,13 @@ protocol lmtp {
   mail_plugins = quota sieve
 }
 
-mail_plugins = $mail_plugins quota
-
 #2.3+ service stats {
 #2.3+     unix_listener stats-reader {
 #2.3+         user = vmail
 #2.3+         group = vmail
 #2.3+         mode = 0660
 #2.3+     }
-#2.3+
+#2.3+ 
 #2.3+     unix_listener stats-writer {
 #2.3+         user = vmail
 #2.3+         group = vmail
diff --git a/install/tpl/opensuse_dovecot2.conf.master b/install/tpl/opensuse_dovecot2.conf.master
index f7a78c34f2..7dc715ef69 100644
--- a/install/tpl/opensuse_dovecot2.conf.master
+++ b/install/tpl/opensuse_dovecot2.conf.master
@@ -75,15 +75,13 @@ protocol lmtp {
   mail_plugins = quota sieve
 }
 
-mail_plugins = $mail_plugins quota
-
 #2.3+ service stats {
 #2.3+     unix_listener stats-reader {
 #2.3+         user = vmail
 #2.3+         group = vmail
 #2.3+         mode = 0660
 #2.3+     }
-#2.3+
+#2.3+ 
 #2.3+     unix_listener stats-writer {
 #2.3+         user = vmail
 #2.3+         group = vmail
-- 
GitLab


From 037bf6fe6decb63746fc7428802b3a4291193517 Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Fri, 9 Oct 2020 14:09:34 +0200
Subject: [PATCH 030/441] Fix Nginx SSL placeholders in
 apps_vhost_plugin.inc.php

---
 server/plugins-available/apps_vhost_plugin.inc.php | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/server/plugins-available/apps_vhost_plugin.inc.php b/server/plugins-available/apps_vhost_plugin.inc.php
index a8797c62af..567e12b2a8 100644
--- a/server/plugins-available/apps_vhost_plugin.inc.php
+++ b/server/plugins-available/apps_vhost_plugin.inc.php
@@ -204,6 +204,18 @@ class apps_vhost_plugin {
 				$use_tcp = '';
 				$use_socket = '#';
 			}
+
+                        /* Check if SSL should be enabled: */
+                        if(is_file('/usr/local/ispconfig/interface/ssl/ispserver.crt') && is_file('/usr/local/ispconfig/interface/ssl/ispserver.key')) {
+				$content = str_replace('{ssl_comment}', '', $content);
+				$content = str_replace('{ssl_on}', 'ssl', $content);
+                                $content = str_replace('{vhost_port}', $web_config['apps_vhost_port'], $content);
+                        } else {
+				$content = str_replace('{ssl_comment}', '#', $content);
+				$content = preg_replace('/(\s)\{ssl_on\}/', '', $content);
+				$content = str_replace('{vhost_port}', $web_config['apps_vhost_port'], $content);
+                        }
+	 
 			$content = str_replace('{use_tcp}', $use_tcp, $content);
 			$content = str_replace('{use_socket}', $use_socket, $content);
 
-- 
GitLab


From 4efa7d7c836446b4807379e8e568285ec6e9df71 Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Fri, 9 Oct 2020 14:31:20 +0200
Subject: [PATCH 031/441] use apps.sock as fastcgi_pass if the socket exists

---
 server/plugins-available/apps_vhost_plugin.inc.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/plugins-available/apps_vhost_plugin.inc.php b/server/plugins-available/apps_vhost_plugin.inc.php
index 567e12b2a8..b64adfde6e 100644
--- a/server/plugins-available/apps_vhost_plugin.inc.php
+++ b/server/plugins-available/apps_vhost_plugin.inc.php
@@ -192,6 +192,7 @@ class apps_vhost_plugin {
 			$content = str_replace('{fpm_socket}', $fpm_socket, $content);
 			$content = str_replace('{cgi_socket}', $cgi_socket, $content);
 			if(	file_exists('/var/run/php5-fpm.sock')
+                                || file_exists('/var/lib/php5-fpm/apps.sock')
 				|| file_exists('/var/run/php/php7.0-fpm.sock')
 				|| file_exists('/var/run/php/php7.1-fpm.sock')
 				|| file_exists('/var/run/php/php7.2-fpm.sock')
-- 
GitLab


From 39fb8b09d76a9cf52a782b9692a49f69284898cf Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Fri, 9 Oct 2020 14:38:05 +0200
Subject: [PATCH 032/441] Optional configure CHECKBOXARRAY to be inline or one
 per line, default inline

---
 interface/lib/classes/tform_base.inc.php       | 16 ++++++++++++++--
 interface/web/admin/form/remote_user.tform.php |  1 +
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php
index a26722a804..0a35a67b22 100644
--- a/interface/lib/classes/tform_base.inc.php
+++ b/interface/lib/classes/tform_base.inc.php
@@ -560,7 +560,13 @@ class tform_base {
 									if(trim($tvl) == trim($k)) $checked = ' CHECKED';
 								}
 								// $out .= "<label for=\"".$key."[]\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"checkbox\" $checked /> $v</label>\r\n";
-								$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"checkbox\" $checked /> $v</label><br/>\r\n";
+								$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"checkbox\" $checked /> $v</label>";
+								if (isset($field['render_inline']) && $field['render_inline'] == 'n') {
+									$out .= "<br/>\r\n";
+								}
+								else {
+									$out .= "&nbsp;\r\n";
+								}
 								$elementNo++;
 							}
 						}
@@ -697,7 +703,13 @@ class tform_base {
 								if(trim($tvl) == trim($k)) $checked = ' CHECKED';
 							}
 							// $out .= "<label for=\"".$key."[]\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"checkbox\" $checked /> $v</label>\r\n";
-							$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"checkbox\" $checked /> $v</label><br/>\r\n";
+							$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"checkbox\" $checked /> $v</label>";
+							if (isset($field['render_inline']) && $field['render_inline'] == 'n') {
+								$out .= "<br/>\r\n";
+							}
+							else {
+								$out .= "&nbsp;\r\n";
+							}
 							$elementNo++;
 						}
 					}
diff --git a/interface/web/admin/form/remote_user.tform.php b/interface/web/admin/form/remote_user.tform.php
index 9263266a27..6e351730c2 100644
--- a/interface/web/admin/form/remote_user.tform.php
+++ b/interface/web/admin/form/remote_user.tform.php
@@ -146,6 +146,7 @@ $form["tabs"]['remote_user'] = array (
 			'separator' => ';',
 			'width'  => '',
 			'maxlength' => '',
+			'render_inline' => 'n',
 			'rows'  => '5',
 			'cols'  => '30'
 		)
-- 
GitLab


From bb4fc7f7589ed13f91f3a599aa462b87fc5456bc Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 8 Oct 2020 17:54:52 -0600
Subject: [PATCH 033/441] check for centos8 dovecot file paths

---
 install/dist/lib/debian60.lib.php                      | 4 ++--
 install/dist/lib/fedora.lib.php                        | 5 +++++
 install/lib/installer_base.lib.php                     | 4 ++--
 server/plugins-available/postfix_server_plugin.inc.php | 4 ++--
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php
index a8e90f189b..154c6b99c4 100644
--- a/install/dist/lib/debian60.lib.php
+++ b/install/dist/lib/debian60.lib.php
@@ -39,7 +39,7 @@ class installer extends installer_base {
 		$configure_lmtp = false;
 
 		// use lmtp if installed
-		if($configure_lmtp = is_file('/usr/lib/dovecot/lmtp')) {
+		if($configure_lmtp = (is_file('/usr/lib/dovecot/lmtp') || is_file('/usr/libexec/dovecot/lmtp'))) {
 			$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
 		}
 
@@ -168,7 +168,7 @@ class installer extends installer_base {
 		}
 
 		//* dovecot-managesieved
-		if(is_file('/usr/lib/dovecot/managesieve')) {
+		if(is_file('/usr/lib/dovecot/managesieve') || is_file('/usr/libexec/dovecot/managesieve')) {
 			$dovecot_protocols .= ' sieve';
 		}
 
diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index 2d31b89bbd..095e99eeae 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -381,6 +381,11 @@ class installer_dist extends installer_base {
 
 		$configure_lmtp = false;
 
+		// use lmtp if installed
+		if($configure_lmtp = (is_file('/usr/lib/dovecot/lmtp') || is_file('/usr/libexec/dovecot/lmtp'))) {
+			$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
+		}
+
 		// check if virtual_transport must be changed
 		if ($this->is_update) {
 			$tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']);
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index c82fd16537..f36997c877 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1418,7 +1418,7 @@ class installer_base {
 		$configure_lmtp = false;
 
 		// use lmtp if installed
-		if($configure_lmtp = is_file('/usr/lib/dovecot/lmtp')) {
+		if($configure_lmtp = (is_file('/usr/lib/dovecot/lmtp') || is_file('/usr/libexec/dovecot/lmtp'))) {
 			$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
 		}
 
@@ -1577,7 +1577,7 @@ class installer_base {
 		}
 
 		//* dovecot-managesieved
-		if(is_file('/usr/lib/dovecot/managesieve')) {
+		if(is_file('/usr/lib/dovecot/managesieve') || is_file('/usr/libexec/dovecot/managesieve')) {
 			$dovecot_protocols .= ' sieve';
 		}
 
diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php
index cf73cf93e7..21a6a404ea 100644
--- a/server/plugins-available/postfix_server_plugin.inc.php
+++ b/server/plugins-available/postfix_server_plugin.inc.php
@@ -288,7 +288,7 @@ class postfix_server_plugin {
 			$dovecot_protocols = 'imap pop3';
 
 			//* dovecot-lmtpd
-			if( ($configure_lmtp = is_file('/usr/lib/dovecot/lmtp')) ||
+			if( ($configure_lmtp = (is_file('/usr/lib/dovecot/lmtp') || is_file('/usr/libexec/dovecot/lmtp'))) ||
 			    ($mail_config["mailbox_virtual_uidgid_maps"] == 'y') )
 			{
 				$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
@@ -296,7 +296,7 @@ class postfix_server_plugin {
 			}
 
 			//* dovecot-managesieved
-			if(is_file('/usr/lib/dovecot/managesieve')) {
+			if(is_file('/usr/lib/dovecot/managesieve') || is_file('/usr/libexec/dovecot/managesieve')) {
 				$dovecot_protocols .= ' sieve';
 			}
 
-- 
GitLab


From 9ab1b1ef9768d5b32fa38b451f67dff530b72746 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 9 Oct 2020 14:35:43 -0600
Subject: [PATCH 034/441] postfix: catchall addrs work with address extensions

---
 install/lib/installer_base.lib.php              | 10 ++++++++++
 install/tpl/mysql-virtual_forwardings.cf.master |  6 +++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index c82fd16537..1d4a32d614 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -774,6 +774,15 @@ class installer_base {
 			chmod($config_dir.$configfile.'~',0600);
 		}
 
+		exec('postconf -h recipient_delimiter 2>/dev/null', $out);
+		if (strlen($out[0]) > 0) {
+			$recipient_delimiter = $this->db->escape( str_replace('%', '%%', $out[0]) );
+			$addr_no_extension = "CONCAT(SUBSTRING_INDEX('%u', '${recipient_delimiter}', 1), '@%d')";
+		} else {
+			$addr_no_extension = "'%s'";
+		}
+		unset($out);
+
 		//* Replace variables in config file template
 		$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
 		$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
@@ -781,6 +790,7 @@ class installer_base {
 		$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
 		$content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
 		$content = str_replace('{server_id}', $conf['server_id'], $content);
+		$content = str_replace('{address_without_extension}', $addr_no_extension, $content);
 		wf($full_file_name, $content);
 
 		//* Changing mode and group of the new created config file
diff --git a/install/tpl/mysql-virtual_forwardings.cf.master b/install/tpl/mysql-virtual_forwardings.cf.master
index 9ab6f3e860..468691b16d 100644
--- a/install/tpl/mysql-virtual_forwardings.cf.master
+++ b/install/tpl/mysql-virtual_forwardings.cf.master
@@ -3,9 +3,9 @@ password = {mysql_server_ispconfig_password}
 dbname = {mysql_server_database}
 hosts = {mysql_server_ip}
 query = SELECT s.destination AS target FROM mail_forwarding AS s
-            WHERE s.source = '%s' AND s.type IN ('alias', 'forward') AND s.active = 'y' AND s.server_id = {server_id}
+            WHERE (s.source = '%s' OR s.source = {address_without_extension}) AND s.type IN ('alias', 'forward') AND s.active = 'y' AND s.server_id = {server_id}
         UNION
         SELECT s.destination AS target FROM mail_forwarding AS s
             WHERE s.source = '@%d' AND s.type = 'catchall' AND s.active = 'y' AND s.server_id = {server_id}
-            AND NOT EXISTS (SELECT email FROM mail_user WHERE email = '%s' AND server_id = {server_id})
-            AND NOT EXISTS (SELECT source FROM mail_forwarding WHERE source = '%s' AND active = 'y' AND server_id = {server_id})
+            AND NOT EXISTS (SELECT email FROM mail_user WHERE (email = '%s' OR email = {address_without_extension}) AND server_id = {server_id})
+            AND NOT EXISTS (SELECT source FROM mail_forwarding WHERE (source = '%s' OR source = {address_without_extension}) AND active = 'y' AND server_id = {server_id})
-- 
GitLab


From 5dcb3afd23ea3aea1e66b5cd68d4c7c1b4ff6732 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 9 Oct 2020 15:46:50 -0600
Subject: [PATCH 035/441] recipient_delimiter can be a list of characters

---
 install/lib/installer_base.lib.php | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 1d4a32d614..379bf5f749 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -776,10 +776,15 @@ class installer_base {
 
 		exec('postconf -h recipient_delimiter 2>/dev/null', $out);
 		if (strlen($out[0]) > 0) {
-			$recipient_delimiter = $this->db->escape( str_replace('%', '%%', $out[0]) );
-			$addr_no_extension = "CONCAT(SUBSTRING_INDEX('%u', '${recipient_delimiter}', 1), '@%d')";
+			// build string like:  CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX('%u', '%%', 1), '+', 1), '@%d')
+			$addr_cleanup = "'%u'";
+			foreach (str_split($out[0]) as $delim) {
+				$recipient_delimiter = $this->db->escape( str_replace('%', '%%', $delim) );
+				$addr_cleanup = "SUBSTRING_INDEX(${addr_cleanup}, '${recipient_delimiter}', 1)";
+			}
+			$no_addr_extension = "CONCAT(${addr_cleanup}, '@%d')";
 		} else {
-			$addr_no_extension = "'%s'";
+			$no_addr_extension = "''";
 		}
 		unset($out);
 
@@ -790,7 +795,7 @@ class installer_base {
 		$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
 		$content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
 		$content = str_replace('{server_id}', $conf['server_id'], $content);
-		$content = str_replace('{address_without_extension}', $addr_no_extension, $content);
+		$content = str_replace('{address_without_extension}', $no_addr_extension, $content);
 		wf($full_file_name, $content);
 
 		//* Changing mode and group of the new created config file
-- 
GitLab


From 5ccd7f22da3caf105909ee8ce729e313be1a2b6b Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pdreissen@notes-it.nl>
Date: Tue, 13 Oct 2020 10:08:30 +0200
Subject: [PATCH 036/441] Backport !744 Dashboard enhancements / quota view
 enhancements using bootstrap progressbars

---
 interface/web/dashboard/dashboard.php         |  12 +-
 interface/web/dashboard/dashlets/limits.php   | 432 +++++++++---------
 interface/web/dashboard/dashlets/quota.php    |   1 +
 .../dashlets/templates/databasequota.htm      |  52 +--
 .../dashboard/dashlets/templates/limits.htm   |  50 +-
 .../dashlets/templates/mailquota.htm          |  56 +--
 .../dashboard/dashlets/templates/quota.htm    |  54 ++-
 .../dashboard/lib/lang/en_dashlet_limits.lng  |   1 +
 .../dashboard/lib/lang/nl_dashlet_limits.lng  |   1 +
 .../web/mail/list/user_quota_stats.list.php   |   2 +-
 .../mail/templates/user_quota_stats_list.htm  | 129 ++++--
 .../web/sites/aps_meta_packages/empty.dir     |   1 -
 interface/web/sites/database_quota_stats.php  |   1 +
 .../lib/lang/en_user_quota_stats_list.lng     |   1 +
 .../lib/lang/en_web_sites_stats_list.lng      |   3 +-
 .../lib/lang/nl_user_quota_stats_list.lng     |   1 +
 .../lib/lang/nl_web_sites_stats_list.lng      |   2 +
 .../web/sites/list/user_quota_stats.list.php  |   2 +-
 .../web/sites/list/web_sites_stats.list.php   |   2 +-
 .../templates/database_quota_stats_list.htm   |   7 +-
 .../sites/templates/user_quota_stats_list.htm |  13 +-
 interface/web/sites/user_quota_stats.php      |  13 +
 interface/web/sites/web_sites_stats.php       |   5 +
 .../default/assets/stylesheets/ispconfig.css  |  20 +-
 24 files changed, 482 insertions(+), 379 deletions(-)
 delete mode 100644 interface/web/sites/aps_meta_packages/empty.dir

diff --git a/interface/web/dashboard/dashboard.php b/interface/web/dashboard/dashboard.php
index 005c364aa5..d8adccd15e 100644
--- a/interface/web/dashboard/dashboard.php
+++ b/interface/web/dashboard/dashboard.php
@@ -160,10 +160,14 @@ $dashlet_list = array();
 $handle = @opendir(ISPC_WEB_PATH.'/dashboard/dashlets');
 while ($file = @readdir($handle)) {
 	if ($file != '.' && $file != '..' && !is_dir(ISPC_WEB_PATH.'/dashboard/dashlets/'.$file)) {
-		$dashlet_name = substr($file, 0, -4);
-		$dashlet_class = 'dashlet_'.$dashlet_name;
-		include_once ISPC_WEB_PATH.'/dashboard/dashlets/'.$file;
-		$dashlet_list[$dashlet_name] = new $dashlet_class;
+		$splitfilename = explode('.', $file);
+		$file_extension = pathinfo($file)['extension'];
+		if ($file_extension === 'php') { // only allow .php files 
+			$dashlet_name = substr($file, 0, -4);
+			$dashlet_class = 'dashlet_'.$dashlet_name;
+			include_once ISPC_WEB_PATH.'/dashboard/dashlets/'.$file;
+			$dashlet_list[$dashlet_name] = new $dashlet_class;
+		}
 	}
 }
 
diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php
index 62cd2db358..a299bbcaf3 100644
--- a/interface/web/dashboard/dashlets/limits.php
+++ b/interface/web/dashboard/dashlets/limits.php
@@ -1,217 +1,221 @@
 <?php
 
-class dashlet_limits {
-
-	function show() {
-		global $app, $conf;
-
-		$limits = array();
-
-		/* Limits to be shown*/
-		
-		$limits[] = array('field' => 'limit_mailquota',
-			'db_table' => 'mail_user',
-			'db_where' => 'quota > 0',  /* Count only posive value of quota, negative value -1 is unlimited */
-			'q_type' => 'quota');
-
-		$limits[] = array('field' => 'limit_maildomain',
-			'db_table' => 'mail_domain',
-			'db_where' => '');
-
-		$limits[] = array('field' => 'limit_mailmailinglist',
-			'db_table' => 'mail_mailinglist',
-			'db_where' => '');
-
-		$limits[] = array('field' => 'limit_mailbox',
-			'db_table' => 'mail_user',
-			'db_where' => '');
-
-		$limits[] = array('field' => 'limit_mailalias',
-			'db_table' => 'mail_forwarding',
-			'db_where' => "type = 'alias'");
-
-		$limits[] = array('field' => 'limit_mailaliasdomain',
-			'db_table' => 'mail_forwarding',
-			'db_where' => "type = 'aliasdomain'");
-
-		$limits[] = array('field' => 'limit_mailforward',
-			'db_table' => 'mail_forwarding',
-			'db_where' => "type = 'forward'");
-
-		$limits[] = array('field' => 'limit_mailcatchall',
-			'db_table' => 'mail_forwarding',
-			'db_where' => "type = 'catchall'");
-
-		$limits[] = array('field' => 'limit_mailrouting',
-			'db_table' => 'mail_transport',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_mailfilter',
-			'db_table' => 'mail_user_filter',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_fetchmail',
-			'db_table' => 'mail_get',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_spamfilter_wblist',
-			'db_table' => 'spamfilter_wblist',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_spamfilter_user',
-			'db_table' => 'spamfilter_users',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_spamfilter_policy',
-			'db_table' => 'spamfilter_policy',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_web_quota',
-			'db_table' => 'web_domain',
-			'db_where' => 'hd_quota > 0', /* Count only posive value of quota, negative value -1 is unlimited */
-			'q_type' => 'hd_quota');
-			
-		$limits[] = array('field' => 'limit_web_domain',
-			'db_table' => 'web_domain',
-			'db_where' => "type = 'vhost'");
-
-		$limits[] = array('field' => 'limit_web_subdomain',
-			'db_table' => 'web_domain',
-			'db_where' => "(type = 'subdomain' OR type = 'vhostsubdomain')");
-
-		$limits[] = array('field' => 'limit_web_aliasdomain',
-			'db_table' => 'web_domain',
-						  'db_where' => "(type = 'alias' OR type = 'vhostalias')");
-
-		$limits[] = array('field' => 'limit_ftp_user',
-			'db_table' => 'ftp_user',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_shell_user',
-			'db_table' => 'shell_user',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_dns_zone',
-			'db_table' => 'dns_soa',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_dns_slave_zone',
-			'db_table' => 'dns_slave',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_dns_record',
-			'db_table' => 'dns_rr',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_database_quota',
-			'db_table' => 'web_database',
-			'db_where' => 'database_quota > 0', /* Count only posive value of quota, negative value -1 is unlimited */
-			'q_type' => 'database_quota');
-			
-		$limits[] = array('field' => 'limit_database',
-			'db_table' => 'web_database',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_cron',
-			'db_table' => 'cron',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_client',
-			'db_table' => 'client',
-			'db_where' => "");
-
-		$limits[] = array('field' => 'limit_domain',
-			'db_table' => 'domain',
-			'db_where' => "");
-
-
-		//* Loading Template
-		$app->uses('tpl,tform');
-
-		$tpl = new tpl;
-		$tpl->newTemplate("dashlets/templates/limits.htm");
-
-		$wb = array();
-		$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_limits.lng';
-		if(is_file($lng_file)) include $lng_file;
-		$tpl->setVar($wb);
-
-		if($app->auth->is_admin()) {
-			$user_is_admin = true;
-		} else {
-			$user_is_admin = false;
-		}
-		$tpl->setVar('is_admin', $user_is_admin);
-
-		if($user_is_admin == false) {
-			$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
-			$client = $app->db->queryOneRecord("SELECT * FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
-		}
-
-		$rows = array();
-		foreach($limits as $limit) {
-			$field = $limit['field'];
-			if($user_is_admin) {
-				$value = $wb['unlimited_txt'];
-			} else {
-				$value = $client[$field];
-			}
-			if($value != 0 || $value == $wb['unlimited_txt']) {
-				$value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value;
-				if($limit['q_type']!=''){
-					$usage = $this->_get_assigned_quota($limit) . " MB";
-					$value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value . " MB";
-				}
-				else $usage = $this->_get_limit_usage($limit);
-				$percentage = ($value == '-1' || $value == 0 ? 0 : round(100 * $usage / $value));
-				$rows[] = array('field' => $field,
-					'field_txt' => $wb[$field.'_txt'],
-					'value' => $value_formatted,
-					'value_raw' => $value,
-					'usage' => $usage,
-					'usage_raw' => $usage,
-					'percentage' => $percentage);
-			}
-		}
-		$rows = $app->functions->htmlentities($rows);
-		$tpl->setLoop('rows', $rows);
-
-
-		return $tpl->grab();
-
-	}
-
-	function _get_limit_usage($limit) {
-		global $app;
-
-		$sql = "SELECT count(sys_userid) as number FROM ?? WHERE ";
-		if($limit['db_where'] != '') $sql .= $limit['db_where']." AND ";
-		$sql .= $app->tform->getAuthSQL('r');
-		$rec = $app->db->queryOneRecord($sql, $limit['db_table']);
-		return $rec['number'];
-
-	}
-	
-	function _get_assigned_quota($limit) {
-		global $app;
-
-		$sql = "SELECT sum(??) as number FROM ?? WHERE ";
-		if($limit['db_where'] != '') $sql .= $limit['db_where']." AND ";
-		$sql .= $app->tform->getAuthSQL('r');
-		$rec = $app->db->queryOneRecord($sql, $limit['q_type'], $limit['db_table']);
-		if($limit['db_table']=='mail_user') $quotaMB = $rec['number'] / 1048576; // Mail quota is in bytes, must be converted to MB
-		else $quotaMB = $rec['number'];
-		return $quotaMB;
-
-	}
-
+class dashlet_limits
+{
+    public function show()
+    {
+        global $app, $conf;
+
+        $limits = array();
+
+        /* Limits to be shown*/
+        
+        $limits[] = array('field' => 'limit_mailquota',
+            'db_table' => 'mail_user',
+            'db_where' => 'quota > 0',  /* Count only posive value of quota, negative value -1 is unlimited */
+            'q_type' => 'quota');
+
+        $limits[] = array('field' => 'limit_maildomain',
+            'db_table' => 'mail_domain',
+            'db_where' => '');
+
+        $limits[] = array('field' => 'limit_mailmailinglist',
+            'db_table' => 'mail_mailinglist',
+            'db_where' => '');
+
+        $limits[] = array('field' => 'limit_mailbox',
+            'db_table' => 'mail_user',
+            'db_where' => '');
+
+        $limits[] = array('field' => 'limit_mailalias',
+            'db_table' => 'mail_forwarding',
+            'db_where' => "type = 'alias'");
+
+        $limits[] = array('field' => 'limit_mailaliasdomain',
+            'db_table' => 'mail_forwarding',
+            'db_where' => "type = 'aliasdomain'");
+
+        $limits[] = array('field' => 'limit_mailforward',
+            'db_table' => 'mail_forwarding',
+            'db_where' => "type = 'forward'");
+
+        $limits[] = array('field' => 'limit_mailcatchall',
+            'db_table' => 'mail_forwarding',
+            'db_where' => "type = 'catchall'");
+
+        $limits[] = array('field' => 'limit_mailrouting',
+            'db_table' => 'mail_transport',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_mailfilter',
+            'db_table' => 'mail_user_filter',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_fetchmail',
+            'db_table' => 'mail_get',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_spamfilter_wblist',
+            'db_table' => 'spamfilter_wblist',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_spamfilter_user',
+            'db_table' => 'spamfilter_users',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_spamfilter_policy',
+            'db_table' => 'spamfilter_policy',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_web_quota',
+            'db_table' => 'web_domain',
+            'db_where' => 'hd_quota > 0', /* Count only posive value of quota, negative value -1 is unlimited */
+            'q_type' => 'hd_quota');
+            
+        $limits[] = array('field' => 'limit_web_domain',
+            'db_table' => 'web_domain',
+            'db_where' => "type = 'vhost'");
+
+        $limits[] = array('field' => 'limit_web_subdomain',
+            'db_table' => 'web_domain',
+            'db_where' => "(type = 'subdomain' OR type = 'vhostsubdomain')");
+
+        $limits[] = array('field' => 'limit_web_aliasdomain',
+            'db_table' => 'web_domain',
+                          'db_where' => "(type = 'alias' OR type = 'vhostalias')");
+
+        $limits[] = array('field' => 'limit_ftp_user',
+            'db_table' => 'ftp_user',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_shell_user',
+            'db_table' => 'shell_user',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_dns_zone',
+            'db_table' => 'dns_soa',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_dns_slave_zone',
+            'db_table' => 'dns_slave',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_dns_record',
+            'db_table' => 'dns_rr',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_database_quota',
+            'db_table' => 'web_database',
+            'db_where' => 'database_quota > 0', /* Count only posive value of quota, negative value -1 is unlimited */
+            'q_type' => 'database_quota');
+            
+        $limits[] = array('field' => 'limit_database',
+            'db_table' => 'web_database',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_cron',
+            'db_table' => 'cron',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_client',
+            'db_table' => 'client',
+            'db_where' => "");
+
+        $limits[] = array('field' => 'limit_domain',
+            'db_table' => 'domain',
+            'db_where' => "");
+
+
+        //* Loading Template
+        $app->uses('tpl,tform');
+
+        $tpl = new tpl;
+        $tpl->newTemplate("dashlets/templates/limits.htm");
+
+        $wb = array();
+        $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_limits.lng';
+        if (is_file($lng_file)) {
+            include $lng_file;
+        }
+        $tpl->setVar($wb);
+
+        if ($app->auth->is_admin()) {
+            $user_is_admin = true;
+        } else {
+            $user_is_admin = false;
+        }
+        $tpl->setVar('is_admin', $user_is_admin);
+
+        if ($user_is_admin == false) {
+            $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
+            $client = $app->db->queryOneRecord("SELECT * FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+        }
+
+        $rows = array();
+        foreach ($limits as $limit) {
+            $field = $limit['field'];
+            if ($user_is_admin) {
+                $value = $wb['unlimited_txt'];
+            } else {
+                $value = $client[$field];
+            }
+            if ($value != 0 || $value == $wb['unlimited_txt']) {
+                $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value;
+                if ($limit['q_type']!='') {
+                    $usage = $this->_get_assigned_quota($limit) . " MB";
+                    $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value . " MB";
+                } else {
+                    $usage = $this->_get_limit_usage($limit);
+                }
+                $percentage = ($value == '-1' || $value == 0 ? -1 : round(100 * $usage / $value));
+                $progressbar = $percentage > 100 ? 100 : $percentage;
+                $rows[] = array('field' => $field,
+                    'field_txt' => $wb[$field.'_txt'],
+                    'value' => $value_formatted,
+                    'value_raw' => $value,
+                    'usage' => $usage,
+                    'usage_raw' => $usage,
+                    'percentage' => $percentage,
+                    'progressbar' => $progressbar
+                );
+            }
+        }
+        $rows = $app->functions->htmlentities($rows);
+        $tpl->setLoop('rows', $rows);
+
+
+        return $tpl->grab();
+    }
+
+    public function _get_limit_usage($limit)
+    {
+        global $app;
+
+        $sql = "SELECT count(sys_userid) as number FROM ?? WHERE ";
+        if ($limit['db_where'] != '') {
+            $sql .= $limit['db_where']." AND ";
+        }
+        $sql .= $app->tform->getAuthSQL('r');
+        $rec = $app->db->queryOneRecord($sql, $limit['db_table']);
+        return $rec['number'];
+    }
+    
+    public function _get_assigned_quota($limit)
+    {
+        global $app;
+
+        $sql = "SELECT sum(??) as number FROM ?? WHERE ";
+        if ($limit['db_where'] != '') {
+            $sql .= $limit['db_where']." AND ";
+        }
+        $sql .= $app->tform->getAuthSQL('r');
+        $rec = $app->db->queryOneRecord($sql, $limit['q_type'], $limit['db_table']);
+        if ($limit['db_table']=='mail_user') {
+            $quotaMB = $rec['number'] / 1048576;
+        } // Mail quota is in bytes, must be converted to MB
+        else {
+            $quotaMB = $rec['number'];
+        }
+        return $quotaMB;
+    }
 }
-
-
-
-
-
-
-
-
-?>
diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php
index f1c46051d1..d0b1be998f 100644
--- a/interface/web/dashboard/dashlets/quota.php
+++ b/interface/web/dashboard/dashlets/quota.php
@@ -31,6 +31,7 @@ class dashlet_quota {
 		if(is_array($sites) && !empty($sites)){
 			foreach($sites as &$site) {
 				$site['domain'] = $app->functions->idn_decode($site['domain']);
+				$site['progressbar'] = $site['hd_quota'];
 			}
 			unset($site);
 
diff --git a/interface/web/dashboard/dashlets/templates/databasequota.htm b/interface/web/dashboard/dashlets/templates/databasequota.htm
index 46db3cc6b8..7cfd10b095 100644
--- a/interface/web/dashboard/dashlets/templates/databasequota.htm
+++ b/interface/web/dashboard/dashlets/templates/databasequota.htm
@@ -1,28 +1,28 @@
-	<div class='table-wrapper'>
-	  <table class='table'>
-		<caption>{tmpl_var name='databasequota_txt'}</caption>
-		<thead class="dark form-group-sm">
+<div class='table-wrapper'>
+	<table class='table'>
+	  <caption>{tmpl_var name='databasequota_txt'}</caption>
+	  <thead class="dark form-group-sm">
+		<tr>
+		  <th class="col-md-2">{tmpl_var name='database_txt'}</th>
+		  <th class="col-md-2">{tmpl_var name='used_txt'}</th>
+		  <th class="col-md-3" colspan="2">{tmpl_var name='quota_txt'}</th>
+		</tr>
+	  </thead>
+	  <tbody>
+	  <tmpl_loop name='databasequota'>
 		  <tr>
-			<th>{tmpl_var name='database_txt'}</th>
-			<th>{tmpl_var name='used_txt'}</th>
-			<th colspan="2">{tmpl_var name='quota_txt'}</th>
+			  <td>{tmpl_var name='database_name'}</td>
+			  <td>{tmpl_var name='used'}</td>
+			  <td>{tmpl_var name='database_quota'}</td>
+			  {tmpl_if name="database_quota" op="!=" value="unlimited"}<td>
+			  <div class='progress'>
+				  <div class='progress-bar-striped progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width: {tmpl_var name="used_percentage"}%'>{tmpl_var name="used_percentage"}%
+				  <span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='database_quota'}</span>
+				  </div>
+			  </div>
+			  </td><tmpl_else><td></td>{/tmpl_if}
 		  </tr>
-		</thead>
-		<tbody>
-		<tmpl_loop name='databasequota'>
-			<tr>
-				<td>{tmpl_var name='database_name'}</td>
-				<td>{tmpl_var name='used'}</td>
-				<td>{tmpl_var name='database_quota'}</td>
-				<td>
-				<div class='progress'>
-					<div class='progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width:{tmpl_var name="used_percentage"}%' data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='used_percentage'}%">
-					<span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='database_quota'}</span>
-					</div>
-				</div>
-				</td>
-			</tr>
-		</tmpl_loop>
-		</tbody>
-	  </table>
-	</div>
\ No newline at end of file
+	  </tmpl_loop>
+	  </tbody>
+	</table>
+  </div>
diff --git a/interface/web/dashboard/dashlets/templates/limits.htm b/interface/web/dashboard/dashlets/templates/limits.htm
index cc98f78e8c..d4144ee562 100644
--- a/interface/web/dashboard/dashlets/templates/limits.htm
+++ b/interface/web/dashboard/dashlets/templates/limits.htm
@@ -1,26 +1,34 @@
-	<div class='table-wrapper'>
-	  <table class='table'>
+<div class='table-wrapper'>
+	<table class='table'>
 		<caption>{tmpl_var name='limits_txt'}</caption>
 		<thead class="dark form-group-sm">
-		  <tr>
-			<th>&nbsp;</th>
-			<th colspan='2'>&nbsp;</th>
-		  </tr>
-		</thead>
-		<tbody>
-		<tmpl_loop name='rows'>
 			<tr>
-				<td>{tmpl_var name='field_txt'}</td>
-				<td>{tmpl_var name='usage'} {tmpl_var name='of_txt'} {tmpl_var name='value'}</td>
-				<td>
-				<div class='progress'>
-					<div class='progress-bar progress-bar-{tmpl_if name="percentage" op="<" value="50"}success{tmpl_elseif name="percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="percentage"}' style='width:{tmpl_var name="percentage"}%' data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='percentage'}%">
-					<span class='sr-only'>{tmpl_var name='usage'} {tmpl_var name='of_txt'} {tmpl_var name='value'}</span>
-					</div>
-				</div>
-				</td>
+				<th class="col-md-4">&nbsp;</th>
+				<th class="col-md-3">&nbsp;</th>
+				<th class="col-md-2">&nbsp;</th>
 			</tr>
-		</tmpl_loop>
+		</thead>
+		<tbody>
+			<tmpl_loop name='rows'>
+				<tr>
+					<td>{tmpl_var name='field_txt'}</td>
+					<td>{tmpl_var name='usage'} {tmpl_var name='of_txt'} {tmpl_var name='value'}</td>
+					{tmpl_if name="progressbar" op="!=" value="-1"}<td>
+						<div class='progress'>
+							<div class='progress-bar-striped progress-bar-{tmpl_if name="progressbar" op="<" value="50"}success{tmpl_elseif name="progressbar" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}'
+								role='progressbar' aria-valuemin='0' aria-valuemax='100'
+								aria-valuenow='{tmpl_var name="progressbar"}' style='width:{tmpl_var name="progressbar"}%'
+								data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='percentage'}%">
+								{tmpl_var name="percentage"}%
+								<span class='sr-only'>{tmpl_var name='usage'} {tmpl_var name='of_txt'} {tmpl_var
+									name='value'}</span>
+							</div>
+						</div>
+					</td>
+					<tmpl_else>
+						<td></td>{/tmpl_if}
+				</tr>
+			</tmpl_loop>
 		</tbody>
-	  </table>
-	</div>
+	</table>
+</div>
\ No newline at end of file
diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm
index 3573ef1ab9..91349d2af4 100644
--- a/interface/web/dashboard/dashlets/templates/mailquota.htm
+++ b/interface/web/dashboard/dashlets/templates/mailquota.htm
@@ -1,30 +1,30 @@
-	<div class='table-wrapper'>
-	  <table class='table'>
-		<caption>{tmpl_var name='mailquota_txt'}</caption>
-		<thead class="dark form-group-sm">
+<div class='table-wrapper'>
+	<table class='table'>
+	  <caption>{tmpl_var name='mailquota_txt'}</caption>
+	  <thead class="dark form-group-sm">
+		<tr>
+		  <th>{tmpl_var name='email_txt'}</th>
+		  <th>{tmpl_var name='name_txt'}</th>
+		  <th>{tmpl_var name='used_txt'}</th>
+		  <th colspan="2">{tmpl_var name='quota_txt'}</th>
+		</tr>
+	  </thead>
+	  <tbody>
+	  <tmpl_loop name='mailquota'>
 		  <tr>
-			<th>{tmpl_var name='email_txt'}</th>
-			<th>{tmpl_var name='name_txt'}</th>
-			<th>{tmpl_var name='used_txt'}</th>
-			<th colspan="2">{tmpl_var name='quota_txt'}</th>
+			  <td><a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='mailuser_id'}" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{tmpl_var name='email'}">{tmpl_var name='email'}</a></td>
+			  <td>{tmpl_var name='name'}</td>
+			  <td>{tmpl_var name='used'}</td>
+			  <td>{tmpl_var name='quota'}</td>
+			  {tmpl_if name="quota" op="!=" value="unlimited"}<td>
+			  <div class='progress'>
+				  <div class='progress-bar-striped progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width:{tmpl_var name="used_percentage"}%'>{tmpl_var name="used_percentage"}%
+				  <span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'}</span>
+				  </div>
+			  </div>
+		  </td>{tmpl_else}<td></td>{/tmpl_if}
 		  </tr>
-		</thead>
-		<tbody>
-		<tmpl_loop name='mailquota'>
-			<tr>
-				<td><a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='mailuser_id'}" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{tmpl_var name='email'}">{tmpl_var name='email'}</a></td>
-				<td>{tmpl_var name='name'}</td>
-				<td>{tmpl_var name='used'}</td>
-				<td>{tmpl_var name='quota'}</td>
-				<td>
-				<div class='progress'>
-					<div class='progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width:{tmpl_var name="used_percentage"}%' data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='used_percentage'}%">
-					<span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'}</span>
-					</div>
-				</div>
-				</td>
-			</tr>
-		</tmpl_loop>
-		</tbody>
-	  </table>
-	</div>
\ No newline at end of file
+	  </tmpl_loop>
+	  </tbody>
+	</table>
+  </div>
\ No newline at end of file
diff --git a/interface/web/dashboard/dashlets/templates/quota.htm b/interface/web/dashboard/dashlets/templates/quota.htm
index 4152ee074d..48435149b4 100644
--- a/interface/web/dashboard/dashlets/templates/quota.htm
+++ b/interface/web/dashboard/dashlets/templates/quota.htm
@@ -1,30 +1,34 @@
-	<div class='table-wrapper'>
-	  <table class='table'>
+<div class='table-wrapper'>
+	<table class='table'>
 		<caption>{tmpl_var name='quota_txt'}</caption>
 		<thead class="dark form-group-sm">
-		  <tr>
-			<th>{tmpl_var name='domain_txt'}</th>
-			<th>{tmpl_var name='used_txt'}</th>
-			<th>{tmpl_var name='soft_txt'}</th>
-			<th colspan="2">{tmpl_var name='hard_txt'}</th>
-		  </tr>
-		</thead>
-		<tbody>
-		<tmpl_loop name='quota'>
 			<tr>
-				<td>{tmpl_var name='domain'}</td>
-				<td>{tmpl_var name='used'}</td>
-				<td>{tmpl_var name='soft'}</td>
-				<td>{tmpl_var name='hard'}</td>
-				<td>
-				<div class='progress'>
-					<div class='progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width:{tmpl_var name="used_percentage"}%' data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='used_percentage'}%">
-					<span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='soft'}</span>
-					</div>
-				</div>
-				</td>
+				<th>{tmpl_var name='domain_txt'}</th>
+				<th>{tmpl_var name='used_txt'}</th>
+				<th>{tmpl_var name='soft_txt'}</th>
+				<th colspan="2">{tmpl_var name='hard_txt'}</th>
 			</tr>
-		</tmpl_loop>
+		</thead>
+		<tbody>
+			<tmpl_loop name='quota'>
+				<tr>
+					<td>{tmpl_var name='domain'}</td>
+					<td>{tmpl_var name='used'}</td>
+					<td>{tmpl_var name='soft'}</td>
+					<td>{tmpl_var name='hard'}</td>
+					{tmpl_if name="progressbar" op="!=" value="-1"}<td>
+						<div class='progress'>
+							<div class='progress-bar-striped progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}'
+								role='progressbar' aria-valuemin='0' aria-valuemax='100'
+								aria-valuenow='{tmpl_var name="used_percentage"}'
+								style='width:{tmpl_var name="used_percentage"}%'>{tmpl_var name="used_percentage"}%
+								<span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var
+									name='soft'}</span>
+							</div>
+						</div>
+					</td>{tmpl_else}<td></td>{/tmpl_if}
+				</tr>
+			</tmpl_loop>
 		</tbody>
-	  </table>
-	</div>
+	</table>
+</div>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/en_dashlet_limits.lng b/interface/web/dashboard/lib/lang/en_dashlet_limits.lng
index 337228a497..2e3bb8c086 100644
--- a/interface/web/dashboard/lib/lang/en_dashlet_limits.lng
+++ b/interface/web/dashboard/lib/lang/en_dashlet_limits.lng
@@ -30,4 +30,5 @@ $wb['limit_domain_txt'] = 'Number of Domains';
 $wb['limit_mailquota_txt'] = 'Assigned mailbox quota';
 $wb['limit_web_quota_txt'] = 'Assigned web quota';
 $wb['limit_database_quota_txt'] = 'Assigned database quota';
+$wb['unlimited_txt'] = 'Unlimited';
 ?>
diff --git a/interface/web/dashboard/lib/lang/nl_dashlet_limits.lng b/interface/web/dashboard/lib/lang/nl_dashlet_limits.lng
index 35a2b9e0be..10bb89a3ea 100644
--- a/interface/web/dashboard/lib/lang/nl_dashlet_limits.lng
+++ b/interface/web/dashboard/lib/lang/nl_dashlet_limits.lng
@@ -30,4 +30,5 @@ $wb['limit_domain_txt'] = 'Aantal domeinen';
 $wb['limit_mailquota_txt'] = 'Assigned mailbox quota';
 $wb['limit_web_quota_txt'] = 'Assigned web quota';
 $wb['limit_database_quota_txt'] = 'Assigned database quota';
+$wb['unlimited_txt'] = 'Ongelimiteerd';
 ?>
diff --git a/interface/web/mail/list/user_quota_stats.list.php b/interface/web/mail/list/user_quota_stats.list.php
index 1ba9fc6702..b6a380ede2 100644
--- a/interface/web/mail/list/user_quota_stats.list.php
+++ b/interface/web/mail/list/user_quota_stats.list.php
@@ -41,7 +41,7 @@ $liste["paging_tpl"]  = "templates/paging.tpl.htm";
 $liste["auth"]    = "yes";
 
 // mark columns for php sorting (no real mySQL columns)
-$liste["phpsort"] = array('used', 'percentage');
+$liste["phpsort"] = array('used_sort', 'soft_sort', 'hard_sort', 'files', 'percentage_sort');
 
 /*****************************************************
 * Suchfelder
diff --git a/interface/web/mail/templates/user_quota_stats_list.htm b/interface/web/mail/templates/user_quota_stats_list.htm
index 99690d6a33..58a374eabd 100644
--- a/interface/web/mail/templates/user_quota_stats_list.htm
+++ b/interface/web/mail/templates/user_quota_stats_list.htm
@@ -1,54 +1,87 @@
 <div class='page-header'>
-	<h1><tmpl_var name="list_head_txt"></h1>
+    <h1>
+        <tmpl_var name="list_head_txt">
+    </h1>
 </div>
 
 
-        <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p>
-            <div class="table-wrapper marginTop15">
-<table class="table">
-                <thead class="dark form-group-sm">
-                    <tr>
-                        <th data-column="email"><tmpl_var name="email_txt"></th>
-                        <th data-column="name"><tmpl_var name="name_txt"></th>
-                        <th data-column="used"><tmpl_var name="used_txt"></th>
-                        <th data-column="quota"><tmpl_var name="quota_txt"></th>
-                        <th data-column="percentage"><tmpl_var name="percentage_txt"></th>
-                        <th class="small-col text-right">{tmpl_var name='search_limit'}</th>
-                    </tr>
-                    <tr>
-                        <td><input class="form-control" type="text" name="search_email" value="{tmpl_var name='search_email'}" /></td>
-                        <td><input class="form-control" type="text" name="search_name" value="{tmpl_var name='search_name'}" /></td>
-                        <td>&nbsp;</td>
-                        <td>&nbsp;</td>
-                        <td>&nbsp;</td>
-                        <td class="text-right">
-                            <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="mail/user_quota_stats.php"><span class="icon icon-filter"></span></button>
-                        </td>
-                    </tr>
-                </thead>
-                <tbody>
-                    <tmpl_loop name="records">
-                        <tr>
-                            <td><a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="email"}</a></td>
-                            <td><a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="name"}</a></td>
-                            <td><a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="used"}</a></td>
-                            <td><a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="quota"}</a></td>
-                            <td><a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="percentage"}</a></td>
-                            <td class="text-right"></td>
-                        </tr>
-                    </tmpl_loop>
-                    <tmpl_unless name="records">
-                        <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
-                            <td colspan="6">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
-                        </tr>
-                    </tmpl_unless>
-                </tbody>
-                <tfoot>
-                    <tr>
-                        <td colspan="6"><tmpl_var name="paging"></td>
-                    </tr>
-                </tfoot>
-            </table>
+<p class="fieldset-legend">
+    <tmpl_var name="list_head_txt">
+</p>
+<div class="table-wrapper marginTop15">
+    <table class="table">
+        <thead class="dark form-group-sm">
+            <tr>
+                <th data-column="email">
+                    <tmpl_var name="email_txt">
+                </th>
+                <th data-column="name">
+                    <tmpl_var name="name_txt">
+                </th>
+                <th data-column="used_sort">
+                    <tmpl_var name="used_txt">
+                </th>
+                <th data-column="quota">
+                    <tmpl_var name="quota_txt">
+                </th>
+                <th data-column="percentage_sort">
+                    <tmpl_var name="percentage_txt">
+                </th>
+
+                <th class="small-col text-right">{tmpl_var name='search_limit'}</th>
+            </tr>
+            <tr>
+                <td><input class="form-control" type="text" name="search_email"
+                        value="{tmpl_var name='search_email'}" /></td>
+                <td><input class="form-control" type="text" name="search_name" value="{tmpl_var name='search_name'}" />
+                </td>
+                <td>&nbsp;</td>
+                <td>&nbsp;</td>
+                <td>&nbsp;</td>
+                <td class="text-right">
+                    <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter"
+                        id="Filter" value="{tmpl_var name=" filter_txt"}" data-submit-form="pageForm"
+                        data-form-action="mail/user_quota_stats.php"><span class="icon icon-filter"></span></button>
+                </td>
+            </tr>
+        </thead>
+        <tbody>
+            <tmpl_loop name="records">
+                <tr>
+                    <td><a href="#" data-toggle="tooltip" data-placement="auto" title='{tmpl_var
+                        name="email"}' data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var
+                            name="email"}</a></td>
+                    <td><a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var
+                            name="name"}</a></td>
+                    <td><a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var
+                            name="used"}</a></td>
+                    <td><a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var
+                            name="quota"}</a></td>
+                    <td colspan="2">
+                        {tmpl_if name="progressbar" op="!=" value="-1"}<div class="progress" style="height: 20px">
+                            <div class='progress-bar-striped progress-bar-{tmpl_if name="percentage_sort" op="<" value="50"}success{tmpl_elseif name="percentage_sort" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}'
+                                role="progressbar" style="width: {tmpl_var name=" progressbar"}%;"
+                                aria-valuenow="{tmpl_var name=" percentage"}" aria-valuemin="0" aria-valuemax="100">
+                                {tmpl_var name="percentage"}</div>
+                        </div>{/tmpl_if}
+                    </td>
+
+                </tr>
+            </tmpl_loop>
+            <tmpl_unless name="records">
+                <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
+                    <td colspan="6">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
+                </tr>
+            </tmpl_unless>
+        </tbody>
+        <tfoot>
+            <tr>
+                <td colspan="6">
+                    <tmpl_var name="paging">
+                </td>
+            </tr>
+        </tfoot>
+    </table>
 </div>
 
-    </div>
+</div>
\ No newline at end of file
diff --git a/interface/web/sites/aps_meta_packages/empty.dir b/interface/web/sites/aps_meta_packages/empty.dir
deleted file mode 100644
index 95ba9ef37c..0000000000
--- a/interface/web/sites/aps_meta_packages/empty.dir
+++ /dev/null
@@ -1 +0,0 @@
-This empty directory is needed by ISPConfig.
diff --git a/interface/web/sites/database_quota_stats.php b/interface/web/sites/database_quota_stats.php
index 03431a6ded..df17928e36 100644
--- a/interface/web/sites/database_quota_stats.php
+++ b/interface/web/sites/database_quota_stats.php
@@ -74,6 +74,7 @@ class list_action extends listform_actions {
 			if($rec['quota'] <= 0){
 				$rec['quota'] = $app->lng('unlimited_txt');
 				$rec['percentage'] = '';
+				$rec['progressbar'] = -1;
 			} else {
 				if ($rec['used'] > 0 ) $rec['percentage'] = round(100 * intval($rec['used']) / ( intval($rec['quota'])*1024*1024) ).'%';
 				$rec['quota'] .= ' MB';
diff --git a/interface/web/sites/lib/lang/en_user_quota_stats_list.lng b/interface/web/sites/lib/lang/en_user_quota_stats_list.lng
index f30409f600..bb0fd47b7d 100644
--- a/interface/web/sites/lib/lang/en_user_quota_stats_list.lng
+++ b/interface/web/sites/lib/lang/en_user_quota_stats_list.lng
@@ -6,4 +6,5 @@ $wb['used_txt'] = 'Used space';
 $wb['hard_txt'] = 'Hard limit';
 $wb['soft_txt'] = 'Soft limit';
 $wb['files_txt'] = 'Single files';
+$wb['percentage_txt'] = 'Used %';
 ?>
\ No newline at end of file
diff --git a/interface/web/sites/lib/lang/en_web_sites_stats_list.lng b/interface/web/sites/lib/lang/en_web_sites_stats_list.lng
index 04eaf1f752..4c66bc29ea 100644
--- a/interface/web/sites/lib/lang/en_web_sites_stats_list.lng
+++ b/interface/web/sites/lib/lang/en_web_sites_stats_list.lng
@@ -6,4 +6,5 @@ $wb['last_month_txt'] = 'Last month';
 $wb['this_year_txt'] = 'This year';
 $wb['last_year_txt'] = 'Last year';
 $wb['sum_txt'] = 'Sum';
-?>
\ No newline at end of file
+$wb['percentage_txt'] = 'In use %';
+$wb['quota_txt'] = 'Quota';
diff --git a/interface/web/sites/lib/lang/nl_user_quota_stats_list.lng b/interface/web/sites/lib/lang/nl_user_quota_stats_list.lng
index 64a5a0753e..03045ce872 100644
--- a/interface/web/sites/lib/lang/nl_user_quota_stats_list.lng
+++ b/interface/web/sites/lib/lang/nl_user_quota_stats_list.lng
@@ -6,4 +6,5 @@ $wb['used_txt'] = 'Gebruikte ruimte';
 $wb['hard_txt'] = 'Harde limiet';
 $wb['soft_txt'] = 'Zachte limiet';
 $wb['files_txt'] = 'Aantal bestanden';
+$wb['percentage_txt'] = 'Percentage';
 ?>
diff --git a/interface/web/sites/lib/lang/nl_web_sites_stats_list.lng b/interface/web/sites/lib/lang/nl_web_sites_stats_list.lng
index c25d743da6..fa5568418c 100644
--- a/interface/web/sites/lib/lang/nl_web_sites_stats_list.lng
+++ b/interface/web/sites/lib/lang/nl_web_sites_stats_list.lng
@@ -6,4 +6,6 @@ $wb['last_month_txt'] = 'Vorige maand';
 $wb['this_year_txt'] = 'Dit jaar';
 $wb['last_year_txt'] = 'Vorig jaar';
 $wb['sum_txt'] = 'Som';
+$wb['percentage_txt'] = 'In gebruik %';
+$wb['quota_txt'] = 'Quota';
 ?>
diff --git a/interface/web/sites/list/user_quota_stats.list.php b/interface/web/sites/list/user_quota_stats.list.php
index 52f54cf953..8d7f356fac 100644
--- a/interface/web/sites/list/user_quota_stats.list.php
+++ b/interface/web/sites/list/user_quota_stats.list.php
@@ -43,7 +43,7 @@ $liste["paging_tpl"]  = "templates/paging.tpl.htm";
 $liste["auth"]    = "yes";
 
 // mark columns for php sorting (no real mySQL columns)
-$liste["phpsort"] = array('used', 'soft', 'hard', 'files');
+$liste["phpsort"] = array('system_user_sort', 'used', 'soft', 'hard', 'files', 'percentage');
 
 
 /*****************************************************
diff --git a/interface/web/sites/list/web_sites_stats.list.php b/interface/web/sites/list/web_sites_stats.list.php
index af7ce9effb..37cb4e59a3 100644
--- a/interface/web/sites/list/web_sites_stats.list.php
+++ b/interface/web/sites/list/web_sites_stats.list.php
@@ -43,7 +43,7 @@ $liste["paging_tpl"]  = "templates/paging.tpl.htm";
 $liste["auth"]    = "yes";
 
 // mark columns for php sorting (no real mySQL columns)
-$liste["phpsort"] = array('this_month', 'last_month', 'this_year', 'last_year');
+$liste["phpsort"] = array('this_month', 'last_month', 'this_year', 'last_year', 'percentage', 'quota_sort');
 
 /*****************************************************
 * Suchfelder
diff --git a/interface/web/sites/templates/database_quota_stats_list.htm b/interface/web/sites/templates/database_quota_stats_list.htm
index 81a76762be..9982e6e601 100644
--- a/interface/web/sites/templates/database_quota_stats_list.htm
+++ b/interface/web/sites/templates/database_quota_stats_list.htm
@@ -36,8 +36,11 @@
 							<td><a href="#" data-load-content="sites/database_edit.php?id={tmpl_var name='id'}">{tmpl_var name="client"}</a></td>
 							<td><a href="#" data-load-content="sites/database_edit.php?id={tmpl_var name='id'}">{tmpl_var name="used"}</a></td>
 							<td><a href="#" data-load-content="sites/database_edit.php?id={tmpl_var name='id'}">{tmpl_var name="quota"}</a></td>
-							<td><a href="#" data-load-content="sites/database_edit.php?id={tmpl_var name='id'}">{tmpl_var name="percentage"}</a></td>
-							<td class="text-right"></td>
+							<td colspan="2">{tmpl_if name="progressbar" op="!=" value="-1"}<div class="progress" style="height: 20px">
+								<div class='progress-bar-striped progress-bar-{tmpl_if name="percentage" op="<" value="50"}success{tmpl_elseif name="percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role="progressbar" style="width: {tmpl_var name="progressbar"}%;" aria-valuenow="{tmpl_var name="percentage"}" aria-valuemin="0" aria-valuemax="100">{tmpl_var name="percentage"}</div>
+						</div>{/tmpl_if}
+</td>
+
 						</tr>
 					</tmpl_loop>
 					<tmpl_unless name="records">
diff --git a/interface/web/sites/templates/user_quota_stats_list.htm b/interface/web/sites/templates/user_quota_stats_list.htm
index 704edafd87..f5a6c0fd77 100644
--- a/interface/web/sites/templates/user_quota_stats_list.htm
+++ b/interface/web/sites/templates/user_quota_stats_list.htm
@@ -8,12 +8,13 @@
 <table class="table">
                 <thead class="dark form-group-sm">
                 <tr>
-                    <th data-column="domain"><tmpl_var name="domain_txt"></th>
-                    <th data-column="system_user"><tmpl_var name="system_user_txt"></th>
+                    <th class="col-md-2" data-column="domain"><tmpl_var name="domain_txt"></th>
+                    <th data-column="system_user_sort"><tmpl_var name="system_user_txt"></th>
                     <th data-column="used"><tmpl_var name="used_txt"></th>
                     <th data-column="soft"><tmpl_var name="soft_txt"></th>
                     <th data-column="hard"><tmpl_var name="hard_txt"></th>
                     <th data-column="files"><tmpl_var name="files_txt"></th>
+                    <th data-column="percentage"><tmpl_var name="percentage_txt"></th>
                     <th class="small-col text-right">{tmpl_var name='search_limit'}</th>
                 </tr>
                 <tr>
@@ -23,6 +24,7 @@
                     <td class="soft">&nbsp;</td>
                     <td class="hard">&nbsp;</td>
                     <td class="files">&nbsp;</td>
+                    <td class="percentage">&nbsp;</td>
                     <td class="text-right">
                         <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="sites/user_quota_stats.php"><span class="icon icon-filter"></span></button>
                     </td>
@@ -31,13 +33,16 @@
                 <tbody>
                     <tmpl_loop name="records">
                         <tr>
-                            <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="domain"}</a></td>
+                            <td><a href="#" data-toggle="tooltip" title='{tmpl_var name="domain"}' data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="domain"}</a></td>
                             <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="system_user"}</a></td>
                             <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="used"}</a></td>
                             <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="soft"}</a></td>
                             <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="hard"}</a></td>
                             <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="files"}</a></td>
-                            <td class="text-right"></td>
+                            <td colspan="2">{tmpl_if name="progressbar" op="!=" value="-1"}<div class="progress" style="height: 20px">
+                                <div class='progress-bar-striped progress-bar-{tmpl_if name="percentage" op="<" value="50"}success{tmpl_elseif name="percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role="progressbar" style="width: {tmpl_var name="progressbar"}%;" aria-valuenow="{tmpl_var name="percentage"}" aria-valuemin="0" aria-valuemax="100">{tmpl_var name="percentage"}%</div>
+                        </div>{/tmpl_if}</td>
+
                         </tr>
                     </tmpl_loop>
                     <tmpl_unless name="records">
diff --git a/interface/web/sites/user_quota_stats.php b/interface/web/sites/user_quota_stats.php
index 8c641eede9..d54732e62e 100644
--- a/interface/web/sites/user_quota_stats.php
+++ b/interface/web/sites/user_quota_stats.php
@@ -56,7 +56,20 @@ class list_action extends listform_actions {
 				$rec['used'] = $rec['used'][1];
 			}
 		}
+		/**
+		 * progres bar variables
+		 * soft value consists of null / array and raw value bug ?
+		 */
+		$soft = is_array($rec['soft']) || $rec['soft'] === null ? 0 : $rec['soft']; 
+		$rec['percentage'] = $soft != 0 ? round(($rec['used']/$soft)*100) : '-1';
+		$rec['progressbar'] = $rec['percentage'] > 100 ? 100 : $rec['percentage'];
 		$rec['used_sort'] = $rec['used'];
+		/**
+		 * Get digits from system_user for numeric sort
+		 */
+		preg_match('/(?P<digits>\d+)/',$rec['system_user'],$system_user_digits);
+		$rec['system_user_sort'] = $system_user_digits['digits'];
+		
 		if (!is_numeric($rec['soft'])) $rec['soft']=$rec['soft'][1];
 		if (!is_numeric($rec['hard'])) $rec['hard']=$rec['hard'][1];
 		if (!is_numeric($rec['files'])) $rec['files']=$rec['files'][1];
diff --git a/interface/web/sites/web_sites_stats.php b/interface/web/sites/web_sites_stats.php
index 488bf0363d..cabdf08bec 100644
--- a/interface/web/sites/web_sites_stats.php
+++ b/interface/web/sites/web_sites_stats.php
@@ -64,6 +64,11 @@ class list_action extends listform_actions {
 		$rec['last_year'] = $app->functions->formatBytes($tmp_rec['t']);
 		$this->sum_last_year += $tmp_rec['t'];
 
+		$rec['percentage'] = $rec['traffic_quota'] == '-1' ? -1 : round((($rec['this_month_sort']/($rec['traffic_quota']*1024*1024))*100));
+		$rec['progressbar'] = $rec['percentage'] > 100 ? 100 : $rec['percentage'];
+		$rec['quota_sort'] = $rec['traffic_quota'];
+		$rec['quota'] = $rec['traffic_quota'] == '-1' ? 'unlimited' : $app->functions->formatBytes($rec['traffic_quota']*1024*1024);
+
 		//* The variable "id" contains always the index variable
 		$rec['id'] = $rec[$this->idx_key];
 
diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css
index 2c04ee849a..d3b3506642 100644
--- a/interface/web/themes/default/assets/stylesheets/ispconfig.css
+++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css
@@ -280,8 +280,16 @@ body {
 .progress {
   display: inline-block;
   margin-bottom: 0;
-  width: 150px;
-  height: 10px; }
+  width: 100%;
+  height: 20px;
+  background-color: #ababab;
+  font-weight: bold;
+}
+
+.progress-bar-danger, .progress-bar-warning, .progress-bar-success {
+    text-align: center;
+    color: white;
+}
 
 p.fieldset-legend {
   display: none; }
@@ -793,6 +801,14 @@ span.notification_text {
     font-family: inherit;
     color: white;
 }
+span.company_name {
+  font-weight: bold;
+}
+
+span.tmp_account_name {
+  font-size: 0.9em;
+}
+
 .finediff {
 	font-family: monospace;
 }
-- 
GitLab


From 15bdfc52c4f27cc33e790028ed39de17c839ed4b Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pdreissen@notes-it.nl>
Date: Tue, 13 Oct 2020 10:13:15 +0200
Subject: [PATCH 037/441] inadvertently removed file, rollback

---
 interface/web/sites/aps_meta_packages/empty.dir | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 interface/web/sites/aps_meta_packages/empty.dir

diff --git a/interface/web/sites/aps_meta_packages/empty.dir b/interface/web/sites/aps_meta_packages/empty.dir
new file mode 100644
index 0000000000..95ba9ef37c
--- /dev/null
+++ b/interface/web/sites/aps_meta_packages/empty.dir
@@ -0,0 +1 @@
+This empty directory is needed by ISPConfig.
-- 
GitLab


From 0fa67c4154268cdf2ed16db2204989aa4968d751 Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Tue, 13 Oct 2020 14:16:15 +0200
Subject: [PATCH 038/441] updated Nginx OpenSSL version detection

---
 server/plugins-available/nginx_plugin.inc.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 5439efeb2f..d76ef1849a 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1622,15 +1622,14 @@ class nginx_plugin {
 		$vhost_data['logging'] = $web_config['logging'];
 
                 // check if OpenSSL and Nginx supports TLS 1.3
-		//$app->log("Found OpenSSL version: " . $app->system->getopensslversion($get_minor = true), LOGLEVEL_DEBUG);
 		$nginx_version = $app->system->getnginxversion(true);
 		$openssl_version = $app->system->getopensslversion(true);
 
-		$app->system->exec_safe('nginx -V 2>&1', $output, $return_var);
+		$output = $app->system->exec_safe('nginx -V 2>&1');
 
 		if(preg_match('/built with OpenSSL\s*(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
                         $nginx_openssl_ver = $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) ? '.' . $matches[5] : '');
-                } 
+		}
 
 		if(version_compare($app->system->getopensslversion(true), $nginx_openssl_ver, '>=')) {
 			if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($app->system->getopensslversion(true), '1.1.1', '>='))) {
@@ -1638,6 +1637,7 @@ class nginx_plugin {
 				$vhost_data['tls13_available'] = $app->system->getopensslversion(true);
 			}
 		}
+
 		$tpl->setVar($vhost_data);
 
 		$server_alias = array();
-- 
GitLab


From 8022637b5e0a4c16ce97dfac744cbacce6c83e8d Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Wed, 14 Oct 2020 14:26:44 +0200
Subject: [PATCH 039/441] Fix visual issue #5820

---
 interface/web/dns/dns_dmarc_edit.php          | 20 +++++++++----------
 .../web/dns/templates/dns_dmarc_edit.htm      |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php
index 6b720c0f38..88c9730796 100644
--- a/interface/web/dns/dns_dmarc_edit.php
+++ b/interface/web/dns/dns_dmarc_edit.php
@@ -94,7 +94,7 @@ class page_action extends tform_actions {
 			$this->id = 1;
 			$old_data = strtolower($rec['data']);
 			$app->tpl->setVar("data", $old_data, true);
-            if ($rec['active'] == 'Y') $app->tpl->setVar("active", "CHECKED"); else $app->tpl->setVar("active", "UNCHECKED");
+      //if ($rec['active'] == 'Y') $app->tpl->setVar("active", "CHECKED"); else $app->tpl->setVar("active", "UNCHECKED");
 			$dmarc_rua = '';
 			$dmarc_ruf = '';
 			$dmac_rf = '';
@@ -120,13 +120,13 @@ class page_action extends tform_actions {
 				if (preg_match("/^pct=/", $part)) $dmarc_pct = str_replace('pct=', '', $part);
 				if (preg_match("/^ri=/", $part)) $dmarc_ri = str_replace('ri=', '', $part);
 			}
-		} 
+		}
 
 		//set html-values
 		$app->tpl->setVar('domain', $domain_name, true);
 
 		//create dmarc-policy-list
-		$dmarc_policy_value = array( 
+		$dmarc_policy_value = array(
 			'none' => 'dmarc_policy_none_txt',
 			'quarantine' => 'dmarc_policy_quarantine_txt',
 			'reject' => 'dmarc_policy_reject_txt',
@@ -152,7 +152,7 @@ class page_action extends tform_actions {
 		unset($temp);
 
 		//create dmarc-adkim-list
-		$dmarc_adkim_value = array( 
+		$dmarc_adkim_value = array(
 			'r' => 'dmarc_adkim_r_txt',
 			's' => 'dmarc_adkim_s_txt',
 		);
@@ -164,7 +164,7 @@ class page_action extends tform_actions {
 		$app->tpl->setVar('dmarc_adkim', $dmarc_adkim_list);
 
 		//create dmarc-aspf-list
-		$dmarc_aspf_value = array( 
+		$dmarc_aspf_value = array(
 			'r' => 'dmarc_aspf_r_txt',
 			's' => 'dmarc_aspf_s_txt',
 		);
@@ -183,7 +183,7 @@ class page_action extends tform_actions {
 		$app->tpl->setVar("dmarc_ri", $dmarc_ri, true);
 
 		//create dmarc-sp-list
-		$dmarc_sp_value = array( 
+		$dmarc_sp_value = array(
 			'same' => 'dmarc_sp_same_txt',
 			'none' => 'dmarc_sp_none_txt',
 			'quarantine' => 'dmarc_sp_quarantine_txt',
@@ -251,7 +251,7 @@ class page_action extends tform_actions {
 		$this->dataRecord['dmarc_pct'] = $app->functions->intval($this->dataRecord['dmarc_pct']);
 		if ($this->dataRecord['dmarc_pct'] < 0) $this->dataRecord['dmarc_pct'] = 0;
 		if ($this->dataRecord['dmarc_pct'] > 100) $this->dataRecord['dmarc_pct'] = 100;
-		
+
 		//create dmarc-record
 		$dmarc_record[] = 'p='.$this->dataRecord['dmarc_policy'];
 
@@ -270,7 +270,7 @@ class page_action extends tform_actions {
 			unset ($dmarc_rua);
 			unset($temp);
 		}
-		
+
 		if (!empty($this->dataRecord['dmarc_ruf'])) {
 			$dmarc_ruf = explode(' ', $this->dataRecord['dmarc_ruf']);
 			$dmarc_ruf = array_filter($dmarc_ruf);
@@ -286,7 +286,7 @@ class page_action extends tform_actions {
 			unset ($dmarc_ruf);
 			unset($temp);
 		}
-		
+
 		$fo_rec = array();
 		if (isset($this->dataRecord['dmarc_fo0'])) $fo_rec[] = '0';
 		if (isset($this->dataRecord['dmarc_fo1'])) $fo_rec[] = '1';
@@ -328,7 +328,7 @@ class page_action extends tform_actions {
 
 		$this->dataRecord['name'] = '_dmarc.' . $soa['origin'];
 		if (isset($this->dataRecord['active'])) $this->dataRecord['active'] = 'Y';
-		
+
 		// Set the server ID of the rr record to the same server ID as the parent record.
 		$this->dataRecord["server_id"] = $soa["server_id"];
 
diff --git a/interface/web/dns/templates/dns_dmarc_edit.htm b/interface/web/dns/templates/dns_dmarc_edit.htm
index fc7530ca3f..e7de24cd4c 100644
--- a/interface/web/dns/templates/dns_dmarc_edit.htm
+++ b/interface/web/dns/templates/dns_dmarc_edit.htm
@@ -140,7 +140,7 @@
             <div class="form-group">
                 <label class="col-sm-2 control-label">{tmpl_var name='active_txt'}</label>
                 <div class="col-sm-3">
-                  <input type="checkbox" value="1" id="active" name="active" {tmpl_var name='active'} />
+                  {tmpl_var name='active'}
                 </div>
             </div>
 
-- 
GitLab


From 5f20b27a40ceb3a749078179262283c7db9aaeb9 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Wed, 14 Oct 2020 15:29:44 +0200
Subject: [PATCH 040/441] Open existing DMARC record instead of new one if one
 exists (#5821)

---
 interface/web/dns/dns_dmarc_edit.php | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php
index 6b720c0f38..8b6f3a97b1 100644
--- a/interface/web/dns/dns_dmarc_edit.php
+++ b/interface/web/dns/dns_dmarc_edit.php
@@ -88,13 +88,13 @@ class page_action extends tform_actions {
 		$dmarc_sp = 'same';
 
 		//* check for an existing dmarc-record
-		$sql = "SELECT data, active FROM dns_rr WHERE data LIKE 'v=DMARC1%' AND zone = ? AND name = ? AND " . $app->tform->getAuthSQL('r');
-		$rec = $app->db->queryOneRecord($sql, $zone, '_dmarc.'.$domain_name.'.');
-		if ( isset($rec) && !empty($rec) ) {
+		$sql = "SELECT data, active FROM dns_rr WHERE data LIKE 'v=DMARC1%' AND zone = ? AND name LIKE ? AND " . $app->tform->getAuthSQL('r');
+		$rec = $app->db->queryOneRecord($sql, $zone, '_dmarc%');
+		if (isset($rec) && !empty($rec) ) {
 			$this->id = 1;
 			$old_data = strtolower($rec['data']);
 			$app->tpl->setVar("data", $old_data, true);
-            if ($rec['active'] == 'Y') $app->tpl->setVar("active", "CHECKED"); else $app->tpl->setVar("active", "UNCHECKED");
+      //if ($rec['active'] == 'Y') $app->tpl->setVar("active", "CHECKED"); else $app->tpl->setVar("active", "UNCHECKED");
 			$dmarc_rua = '';
 			$dmarc_ruf = '';
 			$dmac_rf = '';
@@ -120,13 +120,13 @@ class page_action extends tform_actions {
 				if (preg_match("/^pct=/", $part)) $dmarc_pct = str_replace('pct=', '', $part);
 				if (preg_match("/^ri=/", $part)) $dmarc_ri = str_replace('ri=', '', $part);
 			}
-		} 
+		}
 
 		//set html-values
 		$app->tpl->setVar('domain', $domain_name, true);
 
 		//create dmarc-policy-list
-		$dmarc_policy_value = array( 
+		$dmarc_policy_value = array(
 			'none' => 'dmarc_policy_none_txt',
 			'quarantine' => 'dmarc_policy_quarantine_txt',
 			'reject' => 'dmarc_policy_reject_txt',
@@ -152,7 +152,7 @@ class page_action extends tform_actions {
 		unset($temp);
 
 		//create dmarc-adkim-list
-		$dmarc_adkim_value = array( 
+		$dmarc_adkim_value = array(
 			'r' => 'dmarc_adkim_r_txt',
 			's' => 'dmarc_adkim_s_txt',
 		);
@@ -164,7 +164,7 @@ class page_action extends tform_actions {
 		$app->tpl->setVar('dmarc_adkim', $dmarc_adkim_list);
 
 		//create dmarc-aspf-list
-		$dmarc_aspf_value = array( 
+		$dmarc_aspf_value = array(
 			'r' => 'dmarc_aspf_r_txt',
 			's' => 'dmarc_aspf_s_txt',
 		);
@@ -183,7 +183,7 @@ class page_action extends tform_actions {
 		$app->tpl->setVar("dmarc_ri", $dmarc_ri, true);
 
 		//create dmarc-sp-list
-		$dmarc_sp_value = array( 
+		$dmarc_sp_value = array(
 			'same' => 'dmarc_sp_same_txt',
 			'none' => 'dmarc_sp_none_txt',
 			'quarantine' => 'dmarc_sp_quarantine_txt',
@@ -251,7 +251,7 @@ class page_action extends tform_actions {
 		$this->dataRecord['dmarc_pct'] = $app->functions->intval($this->dataRecord['dmarc_pct']);
 		if ($this->dataRecord['dmarc_pct'] < 0) $this->dataRecord['dmarc_pct'] = 0;
 		if ($this->dataRecord['dmarc_pct'] > 100) $this->dataRecord['dmarc_pct'] = 100;
-		
+
 		//create dmarc-record
 		$dmarc_record[] = 'p='.$this->dataRecord['dmarc_policy'];
 
@@ -270,7 +270,7 @@ class page_action extends tform_actions {
 			unset ($dmarc_rua);
 			unset($temp);
 		}
-		
+
 		if (!empty($this->dataRecord['dmarc_ruf'])) {
 			$dmarc_ruf = explode(' ', $this->dataRecord['dmarc_ruf']);
 			$dmarc_ruf = array_filter($dmarc_ruf);
@@ -286,7 +286,7 @@ class page_action extends tform_actions {
 			unset ($dmarc_ruf);
 			unset($temp);
 		}
-		
+
 		$fo_rec = array();
 		if (isset($this->dataRecord['dmarc_fo0'])) $fo_rec[] = '0';
 		if (isset($this->dataRecord['dmarc_fo1'])) $fo_rec[] = '1';
@@ -328,7 +328,7 @@ class page_action extends tform_actions {
 
 		$this->dataRecord['name'] = '_dmarc.' . $soa['origin'];
 		if (isset($this->dataRecord['active'])) $this->dataRecord['active'] = 'Y';
-		
+
 		// Set the server ID of the rr record to the same server ID as the parent record.
 		$this->dataRecord["server_id"] = $soa["server_id"];
 
-- 
GitLab


From f6dd1dcae026187bf069d7c70c050edb959383fe Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 15 Oct 2020 09:31:36 +0200
Subject: [PATCH 041/441] Update fedora_postfix.conf.master

---
 install/tpl/fedora_postfix.conf.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master
index a87c7daed9..8caed7b0c8 100644
--- a/install/tpl/fedora_postfix.conf.master
+++ b/install/tpl/fedora_postfix.conf.master
@@ -1,5 +1,5 @@
 virtual_alias_domains = proxy:mysql:{config_dir}/mysql-virtual_alias_domains.cf
-virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_alias_maps.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf
+virtual_alias_maps = hash:/etc/mailman/virtual-mailman, proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_alias_maps.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf
 virtual_mailbox_domains = proxy:mysql:{config_dir}/mysql-virtual_domains.cf
 virtual_mailbox_maps = proxy:mysql:{config_dir}/mysql-virtual_mailboxes.cf
 virtual_mailbox_base = {vmail_mailbox_base}
-- 
GitLab


From d672ac9a918e996c71b02c4e9cf5178807342d08 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 15 Oct 2020 11:27:22 +0200
Subject: [PATCH 042/441] - allow api server_get_php_versions to return full
 datasets

---
 interface/lib/classes/remote.d/server.inc.php | 30 ++++++++++++-------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/interface/lib/classes/remote.d/server.inc.php b/interface/lib/classes/remote.d/server.inc.php
index 77649d1bb4..ba057f3775 100644
--- a/interface/lib/classes/remote.d/server.inc.php
+++ b/interface/lib/classes/remote.d/server.inc.php
@@ -105,7 +105,7 @@ class remoting_server extends remoting {
 		$affected_rows = $this->deleteQuery('../admin/form/server_ip.tform.php', $ip_id);
 		return $affected_rows;
 	}
-	
+
 	/**
 	 Gets the server configuration
 	 @param int session id
@@ -141,7 +141,7 @@ class remoting_server extends remoting {
 					return false;
 			}
 	}
-	
+
 	/**
 	 Set a value in the server configuration
 	 @param int session id
@@ -169,7 +169,7 @@ class remoting_server extends remoting {
 				return false;
 			}
 	}
-	
+
 	/**
 		Gets a list of all servers
 		@param int session_id
@@ -191,7 +191,7 @@ class remoting_server extends remoting {
 			return false;
 		}
 	}
-        
+
 	/**
 	    Gets the server_id by server_name
 	    @param int session_id
@@ -213,7 +213,7 @@ class remoting_server extends remoting {
 			return false;
 		}
 	}
-	
+
 	/**
 	    Gets the functions of a server by server_id
 	    @param int session_id
@@ -227,7 +227,7 @@ class remoting_server extends remoting {
         	throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
             return false;
 		}
-		if (!empty($session_id) && !empty($server_id)) { 
+		if (!empty($session_id) && !empty($server_id)) {
 			$sql = "SELECT mail_server, web_server, dns_server, file_server, db_server, vserver_server, proxy_server, firewall_server, mirror_server_id FROM server WHERE server_id  = ?";
 			$all = $app->db->queryOneRecord($sql, $server_id);
 			return $all;
@@ -257,7 +257,7 @@ class remoting_server extends remoting {
 		}
 	}
 
-	public function server_get_php_versions($session_id, $server_id, $php)
+	public function server_get_php_versions($session_id, $server_id, $php, $get_full_data = false)
 	{
 		global $app;
 		if(!$this->checkPerm($session_id, 'server_get')) {
@@ -272,15 +272,23 @@ class remoting_server extends remoting {
 			if ($php === 'php-fpm' || ($php === 'hhvm' && $server_type === 'nginx')) {
 				$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ? AND (client_id = 0)", $server_id);
 				foreach ($php_records as $php_record) {
-					$php_version = $php_record['name'].':'.$php_record['php_fpm_init_script'].':'.$php_record['php_fpm_ini_dir'].':'.$php_record['php_fpm_pool_dir'];
-					$php_versions[] = $php_version;
+					if($get_full_data) {
+						$php_versions[] = $php_record;
+					} else {
+						$php_version = $php_record['name'].':'.$php_record['php_fpm_init_script'].':'.$php_record['php_fpm_ini_dir'].':'.$php_record['php_fpm_pool_dir'];
+						$php_versions[] = $php_version;
+					}
 				}
 			}
 			if ($php === 'fast-cgi') {
 				$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND (client_id = 0)", $server_id);
 				foreach ($php_records as $php_record) {
-					$php_version = $php_record['name'].':'.$php_record['php_fastcgi_binary'].':'.$php_record['php_fastcgi_ini_dir'];
-					$php_versions[] = $php_version;
+					if($get_full_data) {
+						$php_versions[] = $php_record;
+					} else {
+						$php_version = $php_record['name'].':'.$php_record['php_fastcgi_binary'].':'.$php_record['php_fastcgi_ini_dir'];
+						$php_versions[] = $php_version;
+					}
 				}
 			}
 			return $php_versions;
-- 
GitLab


From 6eede43c2c63e8466873d9d441ddd7726c7ad57e Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 15 Oct 2020 11:51:20 +0200
Subject: [PATCH 043/441] Resolve "GoAccess stats blocked by Content Security
 Policy (nginx)"

---
 server/conf/nginx_vhost.conf.master             | 2 +-
 server/plugins-available/apache2_plugin.inc.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index bfa94f8fb3..51f61ffed1 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -169,7 +169,7 @@ server {
             index index.html index.php;
             auth_basic "Members Only";
             auth_basic_user_file <tmpl_var name='stats_auth_passwd_file'>;
-            add_header Content-Security-Policy "default-src * 'self' 'unsafe-inline';";
+            add_header Content-Security-Policy "default-src * 'self' 'unsafe-inline' 'unsafe-eval' data:;";
         }
 
         location ^~ /awstats-icon {
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 2ed205cd89..103cfef339 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -1957,7 +1957,7 @@ class apache2_plugin {
 
 		if($data['new']['stats_type'] != '') {
 			if(!is_dir($data['new']['document_root'].'/' . $web_folder . '/stats')) $app->system->mkdir($data['new']['document_root'].'/' . $web_folder . '/stats');
-			$ht_file = "AuthType Basic\nAuthName \"Members Only\"\nAuthUserFile ".$data['new']['document_root']."/web/stats/.htpasswd_stats\nrequire valid-user\nDirectoryIndex index.html index.php\nHeader unset Content-Security-Policy\n<Files \"goaindex.html\">\nAddDefaultCharset UTF-8\n</Files>\n";
+			$ht_file = "AuthType Basic\nAuthName \"Members Only\"\nAuthUserFile ".$data['new']['document_root']."/web/stats/.htpasswd_stats\nrequire valid-user\nDirectoryIndex index.html index.php\nHeader set Content-Security-Policy \"default-src * 'self' 'unsafe-inline' 'unsafe-eval' data:;\"\n<Files \"goaindex.html\">\nAddDefaultCharset UTF-8\n</Files>\n";
 			$app->system->file_put_contents($data['new']['document_root'].'/' . $web_folder . '/stats/.htaccess', $ht_file);
 			$app->system->chmod($data['new']['document_root'].'/' . $web_folder . '/stats/.htaccess', 0755);
 			unset($ht_file);
-- 
GitLab


From fab7432197fa5d47e6be3daae141065ca0d9e41a Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 15 Oct 2020 16:16:15 -0600
Subject: [PATCH 044/441] fix jk_update regex and more symlink cleanup

---
 server/lib/classes/system.inc.php | 68 +++++++++++++++++++++++++++++--
 1 file changed, 64 insertions(+), 4 deletions(-)

diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 32afb9943c..45eb9d213f 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -1031,6 +1031,61 @@ class system{
 		}
 	}
 
+	function remove_recursive_symlinks($path, $chroot_basedir='', $recursive=false) {
+		global $app;
+
+		if ($path != '/') {
+			$path = rtrim($path, '/');
+		}
+		if (strlen($chroot_basedir) > 0) {
+			if (!is_dir($chroot_basedir)) {
+				$app->log("remove_recursive_symlink: invalid chroot basedir: $chroot_basedir", LOGLEVEL_DEBUG);
+				return false;
+			}
+			if (!(substr($path, 0, strlen($chroot_basedir)) === $chroot_basedir)) {
+				$app->log("remove_recursive_symlink: path $path is not below chroot basedir $chroot_basedir", LOGLEVEL_DEBUG);
+				return false;
+			}
+			if ($chroot_basedir != '/') {
+				$chroot_basedir = rtrim($chroot_basedir, '/');
+			}
+		}
+		if (is_dir($path)) {
+			$objects = array_diff(scandir($path), array('.', '..'));
+			foreach ($objects as $object) {
+				if (is_dir("$path/$object") && $recursive) {
+					$this->remove_recursive_symlinks("$path/$object", $chroot_basedir, $recursive);
+				} elseif (is_link("$path/$object")) {
+					$realpath = realpath("$path/$object");
+					if (strlen($chroot_basedir) > 0 ) {
+						$root_path = substr("$path/$object", strlen($chroot_basedir));
+						if ($root_path && $realpath == $root_path) {
+							$app->log("removing recursive symlink $path/$object", LOGLEVEL_DEBUG);
+							unlink ("$path/$object");
+						}
+					}
+					if ($realpath = "" || $realpath == "$path/$object") {
+						$app->log("removing recursive symlink $path/$object", LOGLEVEL_DEBUG);
+						unlink ("$path/$object");
+					}
+				}
+			}
+		} elseif (is_link("$path")) {
+			$realpath = realpath($path);
+			if (strlen($chroot_basedir) > 0 ) {
+				$root_path = substr($path, strlen($chroot_basedir));
+				if ($root_path && $realpath == $root_path) {
+					$app->log("removing recursive symlink $path", LOGLEVEL_DEBUG);
+					unlink ($path);
+				}
+			}
+			if ($realpath = "" || $realpath == $path) {
+				$app->log("removing recursive symlink $path", LOGLEVEL_DEBUG);
+				unlink ($path);
+			}
+		}
+	}
+
 	function checkpath($path) {
 		$path = trim($path);
 		//* We allow only absolute paths
@@ -2485,6 +2540,7 @@ $app->log("update_jailkit_chroot called for $home_dir with options ".print_r($op
 			}
 
 			$this->remove_broken_symlinks($jail_dir, true);
+			$this->remove_recursive_symlinks($jail_dir, $home_dir, true);
 
 			// save list of hardlinked files
 			if (!(in_array('hardlink', $opts) || in_array('allow_hardlink', $options))) {
@@ -2531,18 +2587,22 @@ $app->log('jk_update returned: '.print_r($this->_last_exec_out, true), LOGLEVEL_
 		foreach ($this->_last_exec_out as $line) {
 			# jk_update sample output:
 			# skip /var/www/clients/client1/web1/opt/
-			if (substr( $line, 0, 4 ) === "skip") {
+			# removing outdated file /var/www/clients/client15/web19/usr/bin/host
+			# removing deprecated directory /var/www/clients/client15/web19/usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.3
+			# Creating symlink /var/www/clients/client15/web19/lib/x86_64-linux-gnu/libicudata.so.65 to libicudata.so.65.1
+			# Copying /usr/bin/mysql to /var/www/clients/client15/web19/usr/bin/mysql
+			if (preg_match('@^(skip|removing (outdated|deprecated)|Creating|Copying)@', $line)) {
 				continue;
 			}
 
 			# jk_update sample output:
 			# ERROR: failed to remove deprecated directory /var/www/clients/client1/web10/usr/lib/x86_64-linux-gnu/libGeoIP.so.1.6.9
-			if (preg_match('@^(?:[^ ]+){6}(?:.+)('.preg_quote($home_dir, '@').'.+)@', $line, $matches)) {
+			if (preg_match('@^(?:[^ ]+ ){6}(?:.+)('.preg_quote($home_dir, '@').'.+)@', $line, $matches)) {
 				# remove deprecated files that jk_update failed to remove
-				if (is_file($matches[1])) {
+				if (is_file($matches[1]) || is_link($matches[1])) {
 $app->log("update_jailkit_chroot: removing deprecated file which jk_update failed to remove:  ".$matches[1], LOGLEVEL_DEBUG);
 					unlink($matches[1]);
-				} elseif (is_dir($matches[1])) {
+				} elseif (is_dir($matches[1]) && !is_link($matches[1])) {
 $app->log("update_jailkit_chroot: removing deprecated directory which jk_update failed to remove:  ".$matches[1], LOGLEVEL_DEBUG);
 					$this->rmdir($matches[1], true);
 				} else {
-- 
GitLab


From f051762b78b6a9ab82980f93fdde063316ff1d87 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 16 Oct 2020 10:56:24 +0200
Subject: [PATCH 045/441] Update auth.inc.php

---
 interface/lib/classes/auth.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/lib/classes/auth.inc.php b/interface/lib/classes/auth.inc.php
index d5dcfd1fe4..a69d43da2e 100644
--- a/interface/lib/classes/auth.inc.php
+++ b/interface/lib/classes/auth.inc.php
@@ -58,7 +58,7 @@ class auth {
 
 		$userid = $app->functions->intval($userid);
 		$client = $app->db->queryOneRecord("SELECT client.limit_client FROM sys_user, client WHERE sys_user.userid = ? AND sys_user.client_id = client.client_id", $userid);
-		if($client['limit_client'] != 0) {
+		if(is_array($client) && $client['limit_client'] != 0) {
 			return true;
 		} else {
 			return false;
-- 
GitLab


From 323d670b35da08115d6ab9558cf3aa79f0064bbf Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Fri, 16 Oct 2020 10:57:31 +0200
Subject: [PATCH 046/441] Fix column amount (#5827)

---
 .../web/client/templates/clients_list.htm      | 12 ++++++------
 .../sites/templates/database_admin_list.htm    | 10 +++++-----
 .../templates/database_user_admin_list.htm     | 18 ++++++++----------
 3 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/interface/web/client/templates/clients_list.htm b/interface/web/client/templates/clients_list.htm
index 2ffd7dfa78..21ad0c7bc9 100644
--- a/interface/web/client/templates/clients_list.htm
+++ b/interface/web/client/templates/clients_list.htm
@@ -5,12 +5,12 @@
 
 
         <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p>
-            
+
                 <button class="btn btn-default formbutton-success" type="button" data-load-content="client/client_edit.php">{tmpl_var name="add_new_record_txt"}</button>
-            
-        
 
-    
+
+
+
         <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p>
             <div class="table-wrapper marginTop15">
 			<table class="table">
@@ -74,13 +74,13 @@
                     </tmpl_loop>
                     <tmpl_unless name="records">
                         <tr class="tbl_row_noresults tbl_row_{tmpl_if name='__EVEN__'}even{tmpl_else}uneven{/tmpl_if}">
-                            <td colspan="{tmpl_if name="has_robot"}9{tmpl_else}8{/tmpl_if}">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
+                            <td colspan="{tmpl_if name="has_robot"}10{tmpl_else}9{/tmpl_if}">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
                         </tr>
                     </tmpl_unless>
                 </tbody>
                 <tfoot>
                     <tr>
-                        <td colspan="{tmpl_if name="has_robot"}9{tmpl_else}8{/tmpl_if}"><tmpl_var name="paging"></td>
+                        <td colspan="{tmpl_if name="has_robot"}10{tmpl_else}9{/tmpl_if}"><tmpl_var name="paging"></td>
                     </tr>
                 </tfoot>
             </table>
diff --git a/interface/web/sites/templates/database_admin_list.htm b/interface/web/sites/templates/database_admin_list.htm
index 724027ca91..08c4447fab 100644
--- a/interface/web/sites/templates/database_admin_list.htm
+++ b/interface/web/sites/templates/database_admin_list.htm
@@ -4,12 +4,12 @@
 
 
         <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p>
-            
+
                 <button class="btn btn-default formbutton-success" type="button" data-load-content="sites/database_edit.php">{tmpl_var name="add_new_record_txt"}</button>
-            
-        
 
-    
+
+
+
         <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p>
             <div class="table-wrapper marginTop15">
 <table class="table">
@@ -67,7 +67,7 @@
                     </tmpl_loop>
                     <tmpl_unless name="records">
                         <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
-                            <td colspan="9">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
+                            <td colspan="8">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
                         </tr>
                     </tmpl_unless>
                 </tbody>
diff --git a/interface/web/sites/templates/database_user_admin_list.htm b/interface/web/sites/templates/database_user_admin_list.htm
index 0b7eb1be09..821dc13abe 100644
--- a/interface/web/sites/templates/database_user_admin_list.htm
+++ b/interface/web/sites/templates/database_user_admin_list.htm
@@ -5,12 +5,12 @@
 
 
         <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p>
-            
+
                 <button class="btn btn-default formbutton-success" type="button" data-load-content="sites/database_user_edit.php">{tmpl_var name="add_new_record_txt"}</button>
-            
-        
 
-    
+
+
+
         <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p>
             <div class="table-wrapper marginTop15">
 <table class="table">
@@ -22,7 +22,7 @@
                     </tr>
                     <tr>
                         <td><input class="form-control" type="text" name="search_database_user" value="{tmpl_var name='search_database_user'}"/></td>
-                        <td><select class="form-control" name="search_sys_groupid">{tmpl_var name='search_sys_groupid'}</select></td>                        
+                        <td><select class="form-control" name="search_sys_groupid">{tmpl_var name='search_sys_groupid'}</select></td>
                         <td class="text-right"><button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="sites/database_user_list.php"><span class="icon icon-filter"></span></button></td>
                     </tr>
                 </thead>
@@ -30,7 +30,7 @@
                     <tmpl_loop name="records">
                         <tr>
                             <td><a href="#" data-load-content="sites/database_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="database_user"}</a></td>
-                            <td><a href="#" data-load-content="sites/database_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="sys_groupid"}</a></td>                            
+                            <td><a href="#" data-load-content="sites/database_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="sys_groupid"}</a></td>
                             <td class="text-right">
                                 <a class="btn btn-default formbutton-default formbutton-narrow" data-load-content="sites/database_user_edit.php?id={tmpl_var name='id'}"><span class="icon icon-edit"></span></a>
                                 <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('sites/database_user_del.php?id={tmpl_var name='id'}&_csrf_id={tmpl_var name='csrf_id'}&_csrf_key={tmpl_var name='csrf_key'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a>
@@ -39,16 +39,14 @@
                     </tmpl_loop>
                     <tmpl_unless name="records">
                         <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
-                            <td colspan="2">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
+                            <td colspan="3">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
                         </tr>
                     </tmpl_unless>
                 </tbody>
                 <tfoot>
                     <tr>
-                        <td colspan="2"><tmpl_var name="paging"></td>
+                        <td colspan="3"><tmpl_var name="paging"></td>
                     </tr>
                 </tfoot>
             </table>
 </div>
-        
-    
\ No newline at end of file
-- 
GitLab


From 98381e6158dd7c39a3c9b38a0d586c569542053b Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Fri, 16 Oct 2020 11:09:10 +0200
Subject: [PATCH 047/441] Add missing translation for datalog status server ip
 (#5716)

---
 interface/lib/lang/ar.lng | 3 +++
 interface/lib/lang/bg.lng | 3 +++
 interface/lib/lang/br.lng | 3 +++
 interface/lib/lang/ca.lng | 3 +++
 interface/lib/lang/cz.lng | 3 +++
 interface/lib/lang/de.lng | 3 +++
 interface/lib/lang/dk.lng | 3 +++
 interface/lib/lang/el.lng | 3 +++
 interface/lib/lang/en.lng | 3 +++
 interface/lib/lang/es.lng | 3 +++
 interface/lib/lang/fi.lng | 3 +++
 interface/lib/lang/fr.lng | 3 +++
 interface/lib/lang/hr.lng | 3 +++
 interface/lib/lang/hu.lng | 3 +++
 interface/lib/lang/id.lng | 3 +++
 interface/lib/lang/it.lng | 3 +++
 interface/lib/lang/ja.lng | 3 +++
 interface/lib/lang/nl.lng | 3 +++
 interface/lib/lang/pl.lng | 3 +++
 interface/lib/lang/pt.lng | 3 +++
 interface/lib/lang/ro.lng | 3 +++
 interface/lib/lang/ru.lng | 3 +++
 interface/lib/lang/se.lng | 3 +++
 interface/lib/lang/sk.lng | 3 +++
 interface/lib/lang/tr.lng | 3 +++
 25 files changed, 75 insertions(+)

diff --git a/interface/lib/lang/ar.lng b/interface/lib/lang/ar.lng
index 1d577862b7..2763f8e82b 100644
--- a/interface/lib/lang/ar.lng
+++ b/interface/lib/lang/ar.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Create cron job';
 $wb['datalog_status_u_cron'] = 'Update cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Delete cron job';
 $wb['datalog_status_i_mail_get'] = 'Create mail fetcher account';
 $wb['datalog_status_u_mail_get'] = 'Update mail fetcher account';
diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng
index 36a7f7081f..94dfaa8ad1 100644
--- a/interface/lib/lang/bg.lng
+++ b/interface/lib/lang/bg.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Създай автоматична задача';
 $wb['datalog_status_u_cron'] = 'Обнови автоматична задача';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Изтрий автоматична задача';
 $wb['datalog_status_i_mail_get'] = 'Създай имейл акаунт за извличане на поща';
 $wb['datalog_status_u_mail_get'] = 'Обнови имейл акаунт за извличане на поща';
diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng
index a236cd5f81..92507a6a7c 100644
--- a/interface/lib/lang/br.lng
+++ b/interface/lib/lang/br.lng
@@ -122,6 +122,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Adicionar tarefa no cron';
 $wb['datalog_status_u_cron'] = 'Atualizar tarefa no cron';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Remover tarefa no cron';
 $wb['datalog_status_i_mail_get'] = 'Adicionar conta de busca de e-mail';
 $wb['datalog_status_u_mail_get'] = 'Atualizar conta de busca de e-mail';
diff --git a/interface/lib/lang/ca.lng b/interface/lib/lang/ca.lng
index 123748fd0d..c57185fd10 100644
--- a/interface/lib/lang/ca.lng
+++ b/interface/lib/lang/ca.lng
@@ -122,6 +122,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Créer une tâche cron';
 $wb['datalog_status_u_cron'] = 'Modifier une tâche cron';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Supprimer une tâche cron';
 $wb['datalog_status_i_mail_get'] = 'Créer un compte mail récupérateur';
 $wb['datalog_status_u_mail_get'] = 'Modifier un compte mail récupérateur';
diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng
index 28e76397b4..a3c2fe440c 100644
--- a/interface/lib/lang/cz.lng
+++ b/interface/lib/lang/cz.lng
@@ -122,6 +122,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Vytvoření shell uživatele';
 $wb['datalog_status_u_cron'] = 'Aktualizace nastavení shell uživatele';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Odstranění shell uživatele';
 $wb['datalog_status_i_mail_get'] = 'Vytvoření účtu pro získávání externí e-mailové pošty';
 $wb['datalog_status_u_mail_get'] = 'Aktualizace nastavení účtu pro získávání externí e-mailové pošty';
diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng
index 22c33380fe..11a5e21a5d 100644
--- a/interface/lib/lang/de.lng
+++ b/interface/lib/lang/de.lng
@@ -123,6 +123,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Cronjob anlegen';
 $wb['datalog_status_u_cron'] = 'Cronjob ändern';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Cronjob löschen';
 $wb['datalog_status_i_mail_get'] = 'E-Mailabruf anlegen';
 $wb['datalog_status_u_mail_get'] = 'E-Mailabruf ändern';
diff --git a/interface/lib/lang/dk.lng b/interface/lib/lang/dk.lng
index 0ffea486c2..9d09f1dc8d 100644
--- a/interface/lib/lang/dk.lng
+++ b/interface/lib/lang/dk.lng
@@ -122,6 +122,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Opret cron job';
 $wb['datalog_status_u_cron'] = 'Opdater cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Slet cron job';
 $wb['datalog_status_i_mail_get'] = 'Opret mail-hentnings konto';
 $wb['datalog_status_u_mail_get'] = 'Opdater mail-hentnings konto';
diff --git a/interface/lib/lang/el.lng b/interface/lib/lang/el.lng
index b0c6507e27..31829d5f93 100644
--- a/interface/lib/lang/el.lng
+++ b/interface/lib/lang/el.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Create cron job';
 $wb['datalog_status_u_cron'] = 'Update cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Delete cron job';
 $wb['datalog_status_i_mail_get'] = 'Create mail fetcher account';
 $wb['datalog_status_u_mail_get'] = 'Update mail fetcher account';
diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng
index 904e7e30e4..dbffc95b8c 100644
--- a/interface/lib/lang/en.lng
+++ b/interface/lib/lang/en.lng
@@ -123,6 +123,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Create cron job';
 $wb['datalog_status_u_cron'] = 'Update cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Delete cron job';
 $wb['datalog_status_i_mail_get'] = 'Create mail fetcher account';
 $wb['datalog_status_u_mail_get'] = 'Update mail fetcher account';
diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng
index 5af12b6ddd..3a421e7af5 100644
--- a/interface/lib/lang/es.lng
+++ b/interface/lib/lang/es.lng
@@ -122,6 +122,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Añadir cron job';
 $wb['datalog_status_u_cron'] = 'Actualizar cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Borrar cron job';
 $wb['datalog_status_i_mail_get'] = 'Añadir cuenta de rescatador de correo';
 $wb['datalog_status_u_mail_get'] = 'Actualizar cuenta de rescatador de correo';
diff --git a/interface/lib/lang/fi.lng b/interface/lib/lang/fi.lng
index c399b497f2..f6648e88c6 100644
--- a/interface/lib/lang/fi.lng
+++ b/interface/lib/lang/fi.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Create cron job';
 $wb['datalog_status_u_cron'] = 'Update cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Delete cron job';
 $wb['datalog_status_i_mail_get'] = 'Create mail fetcher account';
 $wb['datalog_status_u_mail_get'] = 'Update mail fetcher account';
diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng
index 8017f43742..15e8294e0c 100644
--- a/interface/lib/lang/fr.lng
+++ b/interface/lib/lang/fr.lng
@@ -122,6 +122,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Créer une tâche cron';
 $wb['datalog_status_u_cron'] = 'Modifier une tâche cron';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Supprimer une tâche cron';
 $wb['datalog_status_i_mail_get'] = 'Créer un compte mail récupérateur';
 $wb['datalog_status_u_mail_get'] = 'Modifier un compte mail récupérateur';
diff --git a/interface/lib/lang/hr.lng b/interface/lib/lang/hr.lng
index 52d78a6b94..fdb09cbff5 100644
--- a/interface/lib/lang/hr.lng
+++ b/interface/lib/lang/hr.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Kreiraj cron zadatak';
 $wb['datalog_status_u_cron'] = 'Podesi cron zadatak';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Obriši cron zadatak';
 $wb['datalog_status_i_mail_get'] = 'Kreiraj mail fetcher račun';
 $wb['datalog_status_u_mail_get'] = 'Podesi mail fetcher račun';
diff --git a/interface/lib/lang/hu.lng b/interface/lib/lang/hu.lng
index 3893db1174..8e65d4c974 100644
--- a/interface/lib/lang/hu.lng
+++ b/interface/lib/lang/hu.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Create cron job';
 $wb['datalog_status_u_cron'] = 'Update cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Delete cron job';
 $wb['datalog_status_i_mail_get'] = 'Create mail fetcher account';
 $wb['datalog_status_u_mail_get'] = 'Update mail fetcher account';
diff --git a/interface/lib/lang/id.lng b/interface/lib/lang/id.lng
index 42e95be1fc..693ca49015 100644
--- a/interface/lib/lang/id.lng
+++ b/interface/lib/lang/id.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Create cron job';
 $wb['datalog_status_u_cron'] = 'Update cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Delete cron job';
 $wb['datalog_status_i_mail_get'] = 'Create mail fetcher account';
 $wb['datalog_status_u_mail_get'] = 'Update mail fetcher account';
diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng
index 1924c2a1d3..1333cc907f 100644
--- a/interface/lib/lang/it.lng
+++ b/interface/lib/lang/it.lng
@@ -118,6 +118,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Crea  cron job';
 $wb['datalog_status_u_cron'] = 'Aggiorna   cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Elimina cron job';
 $wb['datalog_status_i_mail_mailinglist'] = 'Crea  mailing list';
 $wb['datalog_status_u_mail_mailinglist'] = 'Aggiorna   mailing list';
diff --git a/interface/lib/lang/ja.lng b/interface/lib/lang/ja.lng
index 6cd1393ba3..2d24f9a1f7 100644
--- a/interface/lib/lang/ja.lng
+++ b/interface/lib/lang/ja.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Create cron job';
 $wb['datalog_status_u_cron'] = 'Update cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Delete cron job';
 $wb['datalog_status_i_mail_get'] = 'Create mail fetcher account';
 $wb['datalog_status_u_mail_get'] = 'Update mail fetcher account';
diff --git a/interface/lib/lang/nl.lng b/interface/lib/lang/nl.lng
index 5335efa2e6..3af436ca48 100644
--- a/interface/lib/lang/nl.lng
+++ b/interface/lib/lang/nl.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Aanmaken cron job';
 $wb['datalog_status_u_cron'] = 'Bijwerken cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Verwijderen cron job';
 $wb['datalog_status_i_mail_get'] = 'Create mail fetcher account';
 $wb['datalog_status_u_mail_get'] = 'Update mail fetcher account';
diff --git a/interface/lib/lang/pl.lng b/interface/lib/lang/pl.lng
index b790794b5b..4a1cd0384e 100644
--- a/interface/lib/lang/pl.lng
+++ b/interface/lib/lang/pl.lng
@@ -122,6 +122,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Utwórz zadanie Cron';
 $wb['datalog_status_u_cron'] = 'Edytuj zadanie Cron';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Usuń zadanie Cron';
 $wb['datalog_status_i_mail_get'] = 'Utwórz konto mail fetcher';
 $wb['datalog_status_u_mail_get'] = 'Edytuj konto mail fetcher';
diff --git a/interface/lib/lang/pt.lng b/interface/lib/lang/pt.lng
index c958450329..86d4442c42 100644
--- a/interface/lib/lang/pt.lng
+++ b/interface/lib/lang/pt.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Create cron job';
 $wb['datalog_status_u_cron'] = 'Update cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Delete cron job';
 $wb['datalog_status_i_mail_get'] = 'Create mail fetcher account';
 $wb['datalog_status_u_mail_get'] = 'Update mail fetcher account';
diff --git a/interface/lib/lang/ro.lng b/interface/lib/lang/ro.lng
index 6cc88b6c4d..4f032832eb 100644
--- a/interface/lib/lang/ro.lng
+++ b/interface/lib/lang/ro.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Create cron job';
 $wb['datalog_status_u_cron'] = 'Update cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Delete cron job';
 $wb['datalog_status_i_mail_get'] = 'Create mail fetcher account';
 $wb['datalog_status_u_mail_get'] = 'Update mail fetcher account';
diff --git a/interface/lib/lang/ru.lng b/interface/lib/lang/ru.lng
index f886c4168a..2d18c9f628 100644
--- a/interface/lib/lang/ru.lng
+++ b/interface/lib/lang/ru.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Создать задание Пданировщика задач';
 $wb['datalog_status_u_cron'] = 'Обновить задание Пданировщика задач';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Удалить задание Пданировщика задач';
 $wb['datalog_status_i_mail_get'] = 'Создать аккаунт сборщика почты';
 $wb['datalog_status_u_mail_get'] = 'Обновить аккаунт сборщика почты';
diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng
index d134ce898b..5e8b3c7123 100644
--- a/interface/lib/lang/se.lng
+++ b/interface/lib/lang/se.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Skapa cron-jobb';
 $wb['datalog_status_u_cron'] = 'Uppdatera cron-jobb';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Radera cron-jobb';
 $wb['datalog_status_i_mail_get'] = 'Skapa eposthämtarkonto';
 $wb['datalog_status_u_mail_get'] = 'Uppdatera eposthämtarkonto';
diff --git a/interface/lib/lang/sk.lng b/interface/lib/lang/sk.lng
index 232a383d97..cab3ea1f8f 100644
--- a/interface/lib/lang/sk.lng
+++ b/interface/lib/lang/sk.lng
@@ -119,6 +119,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Create cron job';
 $wb['datalog_status_u_cron'] = 'Update cron job';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Delete cron job';
 $wb['datalog_status_i_mail_get'] = 'Create mail fetcher account';
 $wb['datalog_status_u_mail_get'] = 'Update mail fetcher account';
diff --git a/interface/lib/lang/tr.lng b/interface/lib/lang/tr.lng
index c87cb26af6..041c8d7103 100644
--- a/interface/lib/lang/tr.lng
+++ b/interface/lib/lang/tr.lng
@@ -123,6 +123,9 @@ $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Zamanlanmış Görev Ekle';
 $wb['datalog_status_u_cron'] = 'Zamanlanmış Görevi Güncelle';
+$wb['datalog_status_i_server_ip'] = 'Add server IP';
+$wb['datalog_status_u_server_ip'] = 'Update server IP';
+$wb['datalog_status_d_server_ip'] = 'Delete server IP';
 $wb['datalog_status_d_cron'] = 'Zamanlanmış Görevi Sil';
 $wb['datalog_status_i_mail_get'] = 'E-posta Alma Hesabı Ekle';
 $wb['datalog_status_u_mail_get'] = 'E-posta Alma Hesabını Güncelle';
-- 
GitLab


From e0d7bcfc2b98a4a5049a802658e4ce1c4f789ce0 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 16 Oct 2020 15:18:15 -0600
Subject: [PATCH 048/441] exclude web_folder of subdomain/aliasdomain in
 jailkit cleanup

---
 .../cron.d/600-jailkit_maintenance.inc.php    | 18 +++++--
 server/lib/classes/system.inc.php             | 47 +++++++++++++------
 .../plugins-available/apache2_plugin.inc.php  | 20 +++++++-
 .../cron_jailkit_plugin.inc.php               | 13 ++++-
 server/plugins-available/nginx_plugin.inc.php | 20 +++++++-
 .../shelluser_jailkit_plugin.inc.php          | 15 +++++-
 6 files changed, 106 insertions(+), 27 deletions(-)

diff --git a/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php b/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
index 3ddea13e99..9916b72e57 100644
--- a/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
+++ b/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
@@ -58,12 +58,12 @@ class cronjob_jailkit_maintenance extends cronjob {
 		$jailkit_config = $app->getconf->get_server_config($conf['server_id'], 'jailkit');
 		if (isset($this->jailkit_config) && isset($this->jailkit_config['jailkit_hardlinks'])) {
 			if ($this->jailkit_config['jailkit_hardlinks'] == 'yes') {
-				$update_options = array('hardlink');
+				$options = array('hardlink');
 			} elseif ($this->jailkit_config['jailkit_hardlinks'] == 'no') {
-				$update_options = array();
+				$options = array();
 			}
 		} else {
-			$update_options = array('allow_hardlink');
+			$options = array('allow_hardlink');
 		}
 
 		// limit the number of jails we update at one time according to time of day
@@ -86,6 +86,14 @@ class cronjob_jailkit_maintenance extends cronjob {
 			// check for any cron job using this jail
 			$cron_inuse = $app->db->queryOneRecord('SELECT id FROM `cron` WHERE `parent_domain_id` = ? AND `type` = ? AND `server_id` = ?', $rec['domain_id'], 'chrooted', $conf['server_id']);
 
+			$records2 = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $rec['domain_id'], $rec['document_root'], $conf['server_id']);
+			foreach ($records2 as $record2) {
+				if ($record2['web_folder'] == NULL || $record2['web_folder'] == '') {
+					continue;
+				}
+				$options[] = 'skip='.$record2['web_folder'];
+			}
+
 			if ($shell_user_inuse || $cron_inuse || $rec['php_fpm_chroot'] == 'y' || $rec['delete_unused_jailkit'] != 'y') {
 				$sections = $jailkit_config['jailkit_chroot_app_sections'];
 				if (isset($rec['jailkit_chroot_app_sections']) && $rec['jailkit_chroot_app_sections'] != '') {
@@ -104,7 +112,7 @@ class cronjob_jailkit_maintenance extends cronjob {
 
 				if ($update_hash != $rec['last_jailkit_hash']) {
 					$app->system->web_folder_protection($rec['document_root'], false);
-					$app->system->update_jailkit_chroot($rec['document_root'], $sections, $programs, $update_options);
+					$app->system->update_jailkit_chroot($rec['document_root'], $sections, $programs, $options);
 					$app->system->web_folder_protection($rec['document_root'], true);
 					$app->db->query("UPDATE `web_domain` SET `last_jailkit_update` = NOW(), `last_jailkit_hash` = ? WHERE `document_root` = ?", $update_hash, $rec['document_root']);
 				} else {
@@ -114,7 +122,7 @@ class cronjob_jailkit_maintenance extends cronjob {
 				//$app->log('Removing unused jail: '.$rec['document_root'], LOGLEVEL_DEBUG);
 				print 'Removing unused jail: '.$rec['document_root']."\n";
 				$app->system->web_folder_protection($rec['document_root'], false);
-				$app->system->delete_jailkit_chroot($rec['document_root']);
+				$app->system->delete_jailkit_chroot($rec['document_root'], $options);
 				$app->system->web_folder_protection($rec['document_root'], true);
 
 				$app->db->query("UPDATE `web_domain` SET `last_jailkit_update` = NOW(), `last_jailkit_hash` = NULL WHERE `document_root` = ?", $rec['document_root']);
diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 45eb9d213f..8bfcf54bec 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2485,9 +2485,23 @@ $app->log("update_jailkit_chroot called for $home_dir with options ".print_r($op
 			return false;
 		}
 
+		$jailkit_directories = array(
+			'bin',
+			'dev',
+			'etc',
+			'lib',
+			'lib32',
+			'lib64',
+			'opt',
+			'sys',
+			'usr',
+			'var',
+		);
+
 		$opts = array();
 		$jk_update_args = '';
 		$jk_cp_args = '';
+		$skips = '';
 		foreach ($options as $opt) {
 			switch ($opt) {
 			case '-k':
@@ -2501,6 +2515,12 @@ $app->log("update_jailkit_chroot called for $home_dir with options ".print_r($op
 				$opts[] = 'force';
 				$jk_cp_args .= ' -f';
 				break;
+			default:
+				if (preg_match('@^skip[ =]/?(.+)$@', $opt, $matches) ) {
+					$jailkit_directories = $app->functions->array_unset_by_value($jailkit_directories, $matches[1]);
+					$skips .= ' --skip=/'.escapeshellarg($matches[1]);
+				}
+				break;
 			}
 		}
 
@@ -2508,20 +2528,6 @@ $app->log("update_jailkit_chroot called for $home_dir with options ".print_r($op
 		$this->chown($home_dir, 'root');
 		$this->chgrp($home_dir, 'root');
 
-		$jailkit_directories = array(
-			'bin',
-			'dev',
-			'etc',
-			'lib',
-			'lib32',
-			'lib64',
-			'opt',
-			'sys',
-			'usr',
-			'var',
-		);
-
-		$skips = '';
 		$multiple_links = array();
 		foreach ($jailkit_directories as $dir) {
 			$root_dir = '/'.$dir;
@@ -2693,9 +2699,10 @@ $app->log("update_jailkit_chroot: removing deprecated directory which jk_update
 		return true;
 	}
 
-	public function delete_jailkit_chroot($home_dir) {
+	public function delete_jailkit_chroot($home_dir, $options = array()) {
 		global $app;
 
+$app->log("delete_jailkit_chroot called for $home_dir with options ".print_r($options, true), LOGLEVEL_DEBUG);
 		$app->uses('ini_parser');
 
 		// Disallow operating on root directory
@@ -2723,6 +2730,16 @@ $app->log("update_jailkit_chroot: removing deprecated directory which jk_update
 			'run',		# not used by jailkit, but added for cleanup
 		);
 
+		foreach ($options as $opt) {
+			switch ($opt) {
+			default:
+				if (preg_match('@^skip[ =]/?(.+)$@', $opt, $matches) ) {
+					$jailkit_directories = $app->functions->array_unset_by_value($jailkit_directories, $matches[1]);
+				}
+				break;
+			}
+		}
+
 		$removed = '';
 		foreach ($jailkit_directories as $dir) {
 			$jail_dir = rtrim($home_dir, '/') . '/'.$dir;
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 103cfef339..cc4bea9f60 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -831,6 +831,11 @@ class apache2_plugin {
 			$programs = $jailkit_config['jailkit_chroot_app_programs'] . ' '
 				  . $jailkit_config['jailkit_chroot_cron_programs'];
 
+			$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $data['new']['domain_id'], $data['new']['document_root'], $conf['server_id']);
+			foreach ($records as $record) {
+				$options[] = 'skip='.$record['web_folder'];
+			}
+
 			// don't update if last_jailkit_hash is the same
 			$tmp = $app->db->queryOneRecord('SELECT `last_jailkit_hash` FROM web_domain WHERE domain_id = ?', $data['new']['parent_domain_id']);
 			if ($update_hash != $tmp['last_jailkit_hash']) {
@@ -3683,7 +3688,7 @@ class apache2_plugin {
 
 	function _setup_jailkit_chroot()
 	{
-		global $app;
+		global $app, $conf;
 
 		$app->uses('system');
 
@@ -3746,6 +3751,11 @@ class apache2_plugin {
 				return;
 			}
 
+			$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $this->website['domain_id'], $this->website['document_root'], $conf['server_id']);
+			foreach ($records as $record) {
+				$options[] = 'skip='.$record['web_folder'];
+			}
+
 			$app->system->update_jailkit_chroot($this->website['document_root'], $sections, $programs, $options);
 		}
 
@@ -3824,7 +3834,13 @@ class apache2_plugin {
 			return;
 		}
 
-		$app->system->delete_jailkit_chroot($parent_domain['document_root']);
+		$options = array();
+		$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $parent_domain_id, $parent_domain['document_root'], $conf['server_id']);
+		foreach ($records as $record) {
+			$options[] = 'skip='.$record['web_folder'];
+		}
+
+		$app->system->delete_jailkit_chroot($parent_domain['document_root'], $options);
 
 		// this gets last_jailkit_update out of sync with master db, but that is ok,
 		// as it is only used as a timestamp to moderate the frequency of updating on the slaves
diff --git a/server/plugins-available/cron_jailkit_plugin.inc.php b/server/plugins-available/cron_jailkit_plugin.inc.php
index deb6211f0e..a186a12886 100644
--- a/server/plugins-available/cron_jailkit_plugin.inc.php
+++ b/server/plugins-available/cron_jailkit_plugin.inc.php
@@ -296,6 +296,11 @@ class cron_jailkit_plugin {
 				return;
 			}
 
+			$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $this->parent_domain['domain_id'], $this->parent_domain['document_root'], $conf['server_id']);
+			foreach ($records as $record) {
+				$options[] = 'skip='.$record['web_folder'];
+			}
+
 			$app->system->update_jailkit_chroot($this->parent_domain['document_root'], $sections, $programs, $options);
 		}
 
@@ -392,7 +397,13 @@ class cron_jailkit_plugin {
 			return;
 		}
 
-		$app->system->delete_jailkit_chroot($parent_domain['document_root']);
+		$options = array();
+		$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $parent_domain_id, $parent_domain['document_root'], $conf['server_id']);
+		foreach ($records as $record) {
+			$options[] = 'skip='.$record['web_folder'];
+		}
+
+		$app->system->delete_jailkit_chroot($parent_domain['document_root'], $options);
 
 		// this gets last_jailkit_update out of sync with master db, but that is ok,
 		// as it is only used as a timestamp to moderate the frequency of updating on the slaves
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index c361d3f62f..3b82c111e2 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -669,6 +669,11 @@ class nginx_plugin {
 			$programs = $jailkit_config['jailkit_chroot_app_programs'] . ' '
 				  . $jailkit_config['jailkit_chroot_cron_programs'];
 
+			$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $data['new']['domain_id'], $data['new']['document_root'], $conf['server_id']);
+			foreach ($records as $record) {
+				$options[] = 'skip='.$record['web_folder'];
+			}
+
 			// don't update if last_jailkit_hash is the same
 			$tmp = $app->db->queryOneRecord('SELECT `last_jailkit_hash` FROM web_domain WHERE domain_id = ?', $data['new']['parent_domain_id']);
 			if ($update_hash != $tmp['last_jailkit_hash']) {
@@ -3450,7 +3455,7 @@ class nginx_plugin {
 
 	function _setup_jailkit_chroot()
 	{
-		global $app;
+		global $app, $conf;
 
 		$app->uses('system');
 
@@ -3513,6 +3518,11 @@ class nginx_plugin {
 				return;
 			}
 
+			$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $this->website['domain_id'], $this->website['document_root'], $conf['server_id']);
+			foreach ($records as $record) {
+				$options[] = 'skip='.$record['web_folder'];
+			}
+
 			$app->system->update_jailkit_chroot($this->website['document_root'], $sections, $programs, $options);
 		}
 
@@ -3590,7 +3600,13 @@ class nginx_plugin {
 			return;
 		}
 
-		$app->system->delete_jailkit_chroot($parent_domain['document_root']);
+		$options = array();
+		$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $parent_domain_id, $parent_domain['document_root'], $conf['server_id']);
+		foreach ($records as $record) {
+			$options[] = 'skip='.$record['web_folder'];
+		}
+
+		$app->system->delete_jailkit_chroot($parent_domain['document_root'], $options);
 
 		// this gets last_jailkit_update out of sync with master db, but that is ok,
 		// as it is only used as a timestamp to moderate the frequency of updating on the slaves
diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php
index 7c003e4468..3f8d94d2a7 100755
--- a/server/plugins-available/shelluser_jailkit_plugin.inc.php
+++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php
@@ -286,7 +286,7 @@ class shelluser_jailkit_plugin {
 
 	function _setup_jailkit_chroot()
 	{
-		global $app;
+		global $app, $conf;
 
 		if (isset($this->jailkit_config) && isset($this->jailkit_config['jailkit_hardlinks'])) {
 			if ($this->jailkit_config['jailkit_hardlinks'] == 'yes') {
@@ -356,6 +356,11 @@ class shelluser_jailkit_plugin {
 				return;
 			}
 
+			$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $this->data['new']['parent_domain_id'], $this->data['new']['dir'], $conf['server_id']);
+			foreach ($records as $record) {
+				$options[] = 'skip='.$record['web_folder'];
+			}
+
 			$app->system->update_jailkit_chroot($this->data['new']['dir'], $sections, $programs, $options);
 		}
 
@@ -621,7 +626,13 @@ class shelluser_jailkit_plugin {
 			return;
 		}
 
-		$app->system->delete_jailkit_chroot($parent_domain['document_root']);
+		$options = array();
+		$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $parent_domain_id, $parent_domain['document_root'], $conf['server_id']);
+		foreach ($records as $record) {
+			$options[] = 'skip='.$record['web_folder'];
+		}
+
+		$app->system->delete_jailkit_chroot($parent_domain['document_root'], $options);
 
 		// this gets last_jailkit_update out of sync with master db, but that is ok,
 		// as it is only used as a timestamp to moderate the frequency of updating on the slaves
-- 
GitLab


From a648820abb95875779a02363e4671a8ffb51dfa4 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 16 Oct 2020 16:59:47 -0600
Subject: [PATCH 049/441] leading/trailing whitespace tries to add empty
 jailkit section/program

---
 server/lib/classes/system.inc.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 8bfcf54bec..697c925d18 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2369,6 +2369,9 @@ class system{
 		# /etc/jailkit/jk_init.ini is the default path, probably not needed?
 		$program_args .= ' -c /etc/jailkit/jk_init.ini -j ?';
 		foreach($app_sections as $app_section) {
+			if ($app_section == '') {
+				continue;
+			}
 			# should check that section exists with jk_init --list ?
 			$program_args .= ' ' . escapeshellarg($app_section);
 		}
@@ -2448,6 +2451,9 @@ class system{
 
 		$bad_paths = array();
 		foreach($programs as $prog) {
+			if ($prog == '') {
+				continue;
+			}
 			foreach ($blacklisted_paths_regex as $re) {
 				if (preg_match($re, $prog, $matches)) {
 					$bad_paths[] = $matches[0];
-- 
GitLab


From 4fcfc36c3e672194cf790a01cf0cd0f1fb6cd673 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Sun, 18 Oct 2020 20:45:29 +0200
Subject: [PATCH 050/441] Use version number for ISPConfig stylesheet (#5832)

---
 interface/web/themes/default/templates/main.tpl.htm       | 2 +-
 interface/web/themes/default/templates/main_login.tpl.htm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm
index 39622548aa..421fcdedec 100644
--- a/interface/web/themes/default/templates/main.tpl.htm
+++ b/interface/web/themes/default/templates/main.tpl.htm
@@ -22,7 +22,7 @@
 
   <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/bootstrap.min.css' />
   <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/fonts.min.css' />
-  <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/ispconfig.css' />
+  <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/ispconfig.css?ver=3.2' />
   <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/pushy.min.css' />
   <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/bootstrap-datetimepicker.min.css' />
   <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/responsive.min.css' />
diff --git a/interface/web/themes/default/templates/main_login.tpl.htm b/interface/web/themes/default/templates/main_login.tpl.htm
index c52e9071f2..12e67456cb 100644
--- a/interface/web/themes/default/templates/main_login.tpl.htm
+++ b/interface/web/themes/default/templates/main_login.tpl.htm
@@ -21,7 +21,7 @@
 
   <link rel='stylesheet' href='../themes/<tmpl_var name='current_theme'>/assets/stylesheets/bootstrap.min.css' />
   <link rel='stylesheet' href='../themes/<tmpl_var name='current_theme'>/assets/stylesheets/fonts.min.css' />
-  <link rel='stylesheet' href='../themes/<tmpl_var name='current_theme'>/assets/stylesheets/ispconfig.css' />
+  <link rel='stylesheet' href='../themes/<tmpl_var name='current_theme'>/assets/stylesheets/ispconfig.css?ver=3.2' />
   <link rel='stylesheet' href='../themes/<tmpl_var name='current_theme'>/assets/stylesheets/pushy.min.css' />
   <link rel='stylesheet' href='../themes/<tmpl_var name='current_theme'>/assets/stylesheets/bootstrap-datetimepicker.min.css' />
   <link rel='stylesheet' href='../themes/<tmpl_var name='current_theme'>/assets/stylesheets/responsive.min.css' />
-- 
GitLab


From bad60d94d123b973089cd54ac82dd63a457ef719 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Sun, 18 Oct 2020 20:54:03 +0200
Subject: [PATCH 051/441] Don't hide SSL options, only show info message (see
 discussion on !1240)

---
 interface/web/sites/lib/lang/ar_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/bg_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/br_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/ca_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/cz_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/de_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/dk_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/el_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/en_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/es_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/fi_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/fr_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/hr_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/hu_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/id_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/it_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/ja_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/nl_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/pl_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/pt_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/ro_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/ru_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/se_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/sk_web_vhost_domain.lng |  2 +-
 interface/web/sites/lib/lang/tr_web_vhost_domain.lng |  2 +-
 .../web/sites/templates/web_vhost_domain_ssl.htm     | 12 ++++++------
 26 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
index 9e6ecf1031..5ca536673c 100644
--- a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
index 1ec9cfc8da..4ae5a79c99 100644
--- a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/br_web_vhost_domain.lng b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
index aa51b046f7..1349a8aa8e 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
@@ -201,4 +201,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
index e53dea6f5e..2a71efa5d7 100644
--- a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
index 8f26a1f281..b110bcf0c9 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
index 96a9cd2ab4..eb33549a1e 100644
--- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
index 85eba59b87..4c60f19c5f 100644
--- a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/el_web_vhost_domain.lng b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
index 5fb605f665..a0f50eb4ca 100644
--- a/interface/web/sites/lib/lang/el_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
index 64dc34eb2f..f6946835e1 100644
--- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
@@ -201,4 +201,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/es_web_vhost_domain.lng b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
index 01657cfc76..a4acf72e9c 100644
--- a/interface/web/sites/lib/lang/es_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
index 28febb070f..977df8656e 100644
--- a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
index fbd25b6b62..c32ac2d5b4 100644
--- a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
index 82d3fe44b5..a9b171cafa 100644
--- a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
index 9026d7175f..2935fd493c 100644
--- a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/id_web_vhost_domain.lng b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
index da5a174bb1..6e691c5464 100644
--- a/interface/web/sites/lib/lang/id_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/it_web_vhost_domain.lng b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
index ff34ccbd57..f8993ab528 100644
--- a/interface/web/sites/lib/lang/it_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
index e10ad8825f..89a3112f3c 100644
--- a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
index d47674bc17..2a2f7d0995 100644
--- a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
index f43bef55b5..8e9c8377b4 100644
--- a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
index 2bd6ed1b94..71caace22a 100644
--- a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
index 76818f7078..e708c07f34 100644
--- a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
index 668813cc2b..9ef7d45b6b 100644
--- a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/se_web_vhost_domain.lng b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
index 8ce4c56516..bd574bf937 100644
--- a/interface/web/sites/lib/lang/se_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
index 93736fd80b..d0ee49489c 100644
--- a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
index 66c0c68757..4fd8c25485 100644
--- a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
@@ -198,4 +198,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_hidden_txt'] = 'The SSL certificate options are hidden because Let\'s Encrypt is enabled.';
+$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
diff --git a/interface/web/sites/templates/web_vhost_domain_ssl.htm b/interface/web/sites/templates/web_vhost_domain_ssl.htm
index 736f5ca5ca..882040abaa 100644
--- a/interface/web/sites/templates/web_vhost_domain_ssl.htm
+++ b/interface/web/sites/templates/web_vhost_domain_ssl.htm
@@ -10,7 +10,12 @@
   </div>
 </tmpl_if>
 
-<tmpl_if name="is_le_enabled" op="==" value="n">
+<tmpl_if name="is_le_enabled" op="==" value="y">
+  <div class="alert alert-info" style="text-align:center">
+    {tmpl_var name='ssl_options_not_for_le_txt'}
+  </div>
+</tmpl_if>
+
 			<tmpl_if name='show_helper_links'>
 				<div id="show_helper_links" style="display:none;">
 					<label></label>
@@ -65,11 +70,6 @@
                     {tmpl_var name='ssl_action'}
                 </select></div>
             </div>
-          <tmpl_else>
-              <div class="alert alert-info" style="text-align:center">
-                {tmpl_var name='ssl_options_hidden_txt'}
-              </div>
-            </tmpl_if>
 
 
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
-- 
GitLab


From f318b9b4155dc916cd59658c043eec4f059227e4 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Sun, 18 Oct 2020 21:07:18 +0200
Subject: [PATCH 052/441] Make help messages menu hideable (#5829)

---
 install/tpl/system.ini.master          |  3 +++
 interface/web/help/lib/module.conf.php | 23 +++++++++++++----------
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master
index c42966a01c..a08796ce5a 100644
--- a/install/tpl/system.ini.master
+++ b/install/tpl/system.ini.master
@@ -4,6 +4,9 @@
 
 [client]
 
+[help]
+show_support_messages=n
+
 [dns]
 
 [mail]
diff --git a/interface/web/help/lib/module.conf.php b/interface/web/help/lib/module.conf.php
index bee099d1ba..bc78cf6dde 100644
--- a/interface/web/help/lib/module.conf.php
+++ b/interface/web/help/lib/module.conf.php
@@ -25,27 +25,30 @@ $module['tab_width'] = '';
 
 
 //*** Menu Definition *****************************************
+// read web config
+$app->uses('getconf');
+$global_config = $app->getconf->get_global_config('help');
+if($global_config['show_support_messages'] == 'y') {
+	//* make sure that the items array is empty
+	$items = array();
 
-//* make sure that the items array is empty
-$items = array();
-
-//* Add a menu item with the label 'Send message'
-$items[] = array( 'title'   => 'Send message',
+	//* Add a menu item with the label 'Send message'
+	$items[] = array( 'title'   => 'Send message',
 	'target'  => 'content',
 	'link'    => 'help/support_message_edit.php',
 	'html_id' => 'help_message_send');
 
-//* Add a menu item with the label 'View messages'
-$items[] = array( 'title'   => 'View messages',
+	//* Add a menu item with the label 'View messages'
+	$items[] = array( 'title'   => 'View messages',
 	'target'  => 'content',
 	'link'    => 'help/support_message_list.php',
 	'html_id' => 'help_message_list');
 
-
-//* Add the menu items defined above to a menu section labeled 'Support'
-$module['nav'][] = array( 'title' => 'Support',
+	//* Add the menu items defined above to a menu section labeled 'Support'
+	$module['nav'][] = array( 'title' => 'Support',
 	'open'  => 1,
 	'items' => $items);
+}
 
 //* the FAQ menu section
 $itemsfaq = array();
-- 
GitLab


From a6d8ffd289d820cb80dc4c8e2d2e0d3e6364fa73 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Sun, 18 Oct 2020 21:55:30 +0200
Subject: [PATCH 053/441] Fix syntax error

---
 interface/web/help/lib/module.conf.php | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/interface/web/help/lib/module.conf.php b/interface/web/help/lib/module.conf.php
index bc78cf6dde..7ef63baa03 100644
--- a/interface/web/help/lib/module.conf.php
+++ b/interface/web/help/lib/module.conf.php
@@ -65,8 +65,7 @@ if($_SESSION['s']['user']['typ'] == 'admin') {
 		'open' => 1,
 		'items' => $itemsfaq);
 }
-else
-	{ //* the user
+else { //* the user
 	$sql = "SELECT * FROM help_faq_sections";
 	$res = $app->db->queryAllRecords($sql);
 	//* all the content sections
@@ -80,7 +79,7 @@ else
 		$module['nav'][] = array(  'title' => 'FAQ',
 			'open' => 1,
 			'items' => $itemsfaq);
-	}
+		}
 }
 //* -- end of the FAQ menu section
 
@@ -101,9 +100,5 @@ if($_SESSION['s']['user']['typ'] == 'admin') {
 	$module['nav'][] = array( 'title' => 'About ISPConfig',
 		'open'  => 1,
 		'items' => $items);
-
 }
-
-
-
 ?>
-- 
GitLab


From b064dd93d04b95f338578991a0edd7b41e4ac3ac Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Mon, 19 Oct 2020 10:17:38 +0200
Subject: [PATCH 054/441] Put more info into LE message (#5692)

---
 interface/web/sites/lib/lang/ar_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/bg_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/br_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/ca_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/cz_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/de_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/dk_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/el_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/en_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/es_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/fi_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/fr_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/hr_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/hu_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/id_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/it_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/ja_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/nl_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/pl_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/pt_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/ro_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/ru_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/se_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/sk_web_vhost_domain.lng | 2 +-
 interface/web/sites/lib/lang/tr_web_vhost_domain.lng | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
index 5ca536673c..d4ace1e034 100644
--- a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
index 4ae5a79c99..e6aeba5add 100644
--- a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/br_web_vhost_domain.lng b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
index 1349a8aa8e..924f64bd2a 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
@@ -201,4 +201,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
index 2a71efa5d7..d779fb8245 100644
--- a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
index b110bcf0c9..2ef9fab117 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
index eb33549a1e..8f801b972e 100644
--- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
index 4c60f19c5f..09a7f9171d 100644
--- a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/el_web_vhost_domain.lng b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
index a0f50eb4ca..60ad0ec439 100644
--- a/interface/web/sites/lib/lang/el_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
index f6946835e1..5ef0174d67 100644
--- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
@@ -201,4 +201,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/es_web_vhost_domain.lng b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
index a4acf72e9c..496cdb585f 100644
--- a/interface/web/sites/lib/lang/es_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
index 977df8656e..8b11a51a2d 100644
--- a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
index c32ac2d5b4..82445b491d 100644
--- a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
index a9b171cafa..bec894db0d 100644
--- a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
index 2935fd493c..4346edfdb7 100644
--- a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/id_web_vhost_domain.lng b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
index 6e691c5464..e4dc666b77 100644
--- a/interface/web/sites/lib/lang/id_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/it_web_vhost_domain.lng b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
index f8993ab528..f563badf20 100644
--- a/interface/web/sites/lib/lang/it_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
index 89a3112f3c..33d7c40d03 100644
--- a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
index 2a2f7d0995..3458deaf83 100644
--- a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
index 8e9c8377b4..1f3b969a41 100644
--- a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
index 71caace22a..72168a5ffc 100644
--- a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
index e708c07f34..032294872c 100644
--- a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
index 9ef7d45b6b..ee9983e5cb 100644
--- a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/se_web_vhost_domain.lng b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
index bd574bf937..6044897e67 100644
--- a/interface/web/sites/lib/lang/se_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
index d0ee49489c..22c31430dc 100644
--- a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
@@ -196,4 +196,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
index 4fd8c25485..5cf90358c3 100644
--- a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
@@ -198,4 +198,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'Let\'s Encrypt is enabled. These options are for non-Let\s Encrypt certificates.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
-- 
GitLab


From b7d4d29159d20e1e51aa9f6d2532f18f055ffd0f Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Mon, 19 Oct 2020 12:57:01 +0200
Subject: [PATCH 055/441] Show hostname in log warning emails (#4156)

---
 server/lib/app.inc.php | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php
index ec8b1668d1..e0e8c85db2 100644
--- a/server/lib/app.inc.php
+++ b/server/lib/app.inc.php
@@ -88,18 +88,18 @@ class app {
 			trigger_error('Undefined property ' . $name . ' of class app', E_USER_WARNING);
 		}
 	}
-	
+
 	function setCaller($caller) {
 		$this->_calling_script = $caller;
 	}
-	
+
 	function getCaller() {
 		return $this->_calling_script;
 	}
-	
+
 	function forceErrorExit($errmsg = 'undefined') {
 		global $conf;
-		
+
 		if($this->_calling_script == 'server') {
 			@unlink($conf['temppath'] . $conf['fs_div'] . '.ispconfig_lock');
 		}
@@ -202,9 +202,14 @@ class app {
 		} // if
 
 		if(isset($conf['admin_notify_priority']) && $priority >= $conf['admin_notify_priority'] && $conf['admin_mail'] != '') {
+			if($conf['hostname'] != 'localhost' && $conf['hostname'] != '') {
+				$hostname = $conf['hostname'];
+			} else {
+				$hostname = exec('hostname -f');
+			}
 			// send notification to admin
-			$mailBody = $log_msg;
-			$mailSubject = substr($log_msg, 0, 50).'...';
+			$mailBody         = $hostname . " - " . $log_msg;
+			$mailSubject      = substr("[" . $hostname . "]" . " " . $log_msg, 0, 70).'...';
 			$mailHeaders      = "MIME-Version: 1.0" . "\n";
 			$mailHeaders     .= "Content-type: text/plain; charset=utf-8" . "\n";
 			$mailHeaders     .= "Content-Transfer-Encoding: 8bit" . "\n";
-- 
GitLab


From 5ab1840750b0dc858930c2e7da7d39ac7dd27965 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 19 Oct 2020 09:09:46 -0600
Subject: [PATCH 056/441] log if web folder is skipped for update/delete

---
 server/lib/classes/system.inc.php | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 697c925d18..20bdd08bc7 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2523,6 +2523,10 @@ $app->log("update_jailkit_chroot called for $home_dir with options ".print_r($op
 				break;
 			default:
 				if (preg_match('@^skip[ =]/?(.+)$@', $opt, $matches) ) {
+					if (in_array($matches[1], $jailkit_directories)) {
+						$app->log("update_jailkit_chroot: skipping update of jailkit directory $home_dir/".$matches[1]
+							. "; if this is in use as a web folder, it is insecure and should be fixed.", LOGLEVEL_WARN);
+					}
 					$jailkit_directories = $app->functions->array_unset_by_value($jailkit_directories, $matches[1]);
 					$skips .= ' --skip=/'.escapeshellarg($matches[1]);
 				}
@@ -2740,6 +2744,10 @@ $app->log("delete_jailkit_chroot called for $home_dir with options ".print_r($op
 			switch ($opt) {
 			default:
 				if (preg_match('@^skip[ =]/?(.+)$@', $opt, $matches) ) {
+					if (in_array($matches[1], $jailkit_directories)) {
+						$app->log("delete_jailkit_chroot: skipping removal of jailkit directory .$home_dir/".$matches[1]
+							. "; if this is in use as a web folder, it is insecure and should be fixed.", LOGLEVEL_WARN);
+					}
 					$jailkit_directories = $app->functions->array_unset_by_value($jailkit_directories, $matches[1]);
 				}
 				break;
-- 
GitLab


From 8562f69bef26f84e7238a324c65c11e2ac53b2b9 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Mon, 19 Oct 2020 22:28:08 +0200
Subject: [PATCH 057/441] Automatically check SSL checkbox when LE is selected
 (#5837)

---
 interface/web/client/templates/client_edit_limits.htm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm
index db0b370804..bdaf10dedb 100644
--- a/interface/web/client/templates/client_edit_limits.htm
+++ b/interface/web/client/templates/client_edit_limits.htm
@@ -131,7 +131,7 @@
                 </div>
                 <div class="form-group">
                     <label class="col-sm-3 control-label">{tmpl_var name='limit_ssl_letsencrypt_txt'}</label>
-                    <div class="col-sm-9">
+                    <div class="col-sm-9" data-check-fields="limit_ssl">
                         {tmpl_var name='limit_ssl_letsencrypt'}
                     </div>
                 </div>
-- 
GitLab


From adc3f6e3811f2c8800a120f749738b6ca1dde7a2 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 20 Oct 2020 13:27:59 +0200
Subject: [PATCH 058/441] - added ciphers for tlsv1/1.1, fixes #5839

---
 install/tpl/debian_postfix.conf.master   | 4 ++--
 install/tpl/fedora_postfix.conf.master   | 4 ++--
 install/tpl/gentoo_postfix.conf.master   | 4 ++--
 install/tpl/opensuse_postfix.conf.master | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master
index 87ce6fc662..b75232e6e4 100644
--- a/install/tpl/debian_postfix.conf.master
+++ b/install/tpl/debian_postfix.conf.master
@@ -47,8 +47,8 @@ smtp_tls_protocols = !SSLv2,!SSLv3
 smtpd_tls_exclude_ciphers = RC4, aNULL
 smtp_tls_exclude_ciphers = RC4, aNULL
 smtpd_tls_mandatory_ciphers = medium
-tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
-tls_preempt_cipherlist = no
+tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA
+tls_preempt_cipherlist = yes
 address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master
index 8caed7b0c8..70f07182ac 100644
--- a/install/tpl/fedora_postfix.conf.master
+++ b/install/tpl/fedora_postfix.conf.master
@@ -43,8 +43,8 @@ smtp_tls_protocols = !SSLv2,!SSLv3
 smtpd_tls_exclude_ciphers = RC4, aNULL
 smtp_tls_exclude_ciphers = RC4, aNULL
 smtpd_tls_mandatory_ciphers = medium
-tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
-tls_preempt_cipherlist = no
+tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA
+tls_preempt_cipherlist = yes
 address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master
index 605344bd74..c7e1a06db2 100644
--- a/install/tpl/gentoo_postfix.conf.master
+++ b/install/tpl/gentoo_postfix.conf.master
@@ -42,8 +42,8 @@ smtp_tls_protocols = !SSLv2,!SSLv3
 smtpd_tls_exclude_ciphers = RC4, aNULL
 smtp_tls_exclude_ciphers = RC4, aNULL
 smtpd_tls_mandatory_ciphers = medium
-tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
-tls_preempt_cipherlist = no
+tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA
+tls_preempt_cipherlist = yes
 address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master
index 4cb46786a3..44c643a2bf 100644
--- a/install/tpl/opensuse_postfix.conf.master
+++ b/install/tpl/opensuse_postfix.conf.master
@@ -45,8 +45,8 @@ smtp_tls_protocols = !SSLv2,!SSLv3
 smtpd_tls_exclude_ciphers = RC4, aNULL
 smtp_tls_exclude_ciphers = RC4, aNULL
 smtpd_tls_mandatory_ciphers = medium
-tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
-tls_preempt_cipherlist = no
+tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA
+tls_preempt_cipherlist = yes
 address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
-- 
GitLab


From ff895d959a0d80bf2ce504760f785ac00ae7a6b2 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Tue, 20 Oct 2020 14:40:09 +0200
Subject: [PATCH 059/441] Automatically check SSL checkbox when LE is selected
 (#5837)

---
 interface/web/client/templates/client_edit_limits.htm       | 2 +-
 .../web/client/templates/client_template_edit_limits.htm    | 6 +++---
 interface/web/client/templates/reseller_edit_limits.htm     | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm
index bdaf10dedb..1f0a855eef 100644
--- a/interface/web/client/templates/client_edit_limits.htm
+++ b/interface/web/client/templates/client_edit_limits.htm
@@ -125,7 +125,7 @@
                 </div>
                 <div class="form-group">
                     <label class="col-sm-3 control-label">{tmpl_var name='limit_ssl_txt'}</label>
-                    <div class="col-sm-9">
+                    <div class="col-sm-9" data-uncheck-fields="limit_ssl_letsencrypt">
                         {tmpl_var name='limit_ssl'}
                     </div>
                 </div>
diff --git a/interface/web/client/templates/client_template_edit_limits.htm b/interface/web/client/templates/client_template_edit_limits.htm
index a3e4b63e9a..005db0724a 100644
--- a/interface/web/client/templates/client_template_edit_limits.htm
+++ b/interface/web/client/templates/client_template_edit_limits.htm
@@ -82,13 +82,13 @@
                 </div>
                 <div class="form-group">
                     <label class="col-sm-3 control-label">{tmpl_var name='limit_ssl_txt'}</label>
-                    <div class="col-sm-9">
+                    <div class="col-sm-9" data-uncheck-fields="limit_ssl_letsencrypt">
                         {tmpl_var name='limit_ssl'}
                     </div>
                 </div>
                 <div class="form-group">
                     <label class="col-sm-3 control-label">{tmpl_var name='limit_ssl_letsencrypt_txt'}</label>
-                    <div class="col-sm-9">
+                    <div class="col-sm-9" data-check-fields="limit_ssl">
                         {tmpl_var name='limit_ssl_letsencrypt'}
                     </div>
                 </div>
@@ -318,7 +318,7 @@
                     <label for="limit_cron_frequency" class="col-sm-3 control-label">{tmpl_var name='limit_cron_frequency_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_cron_frequency" id="limit_cron_frequency" value="{tmpl_var name='limit_cron_frequency'}" class="form-control" /></div>
 				</div>
-            
+
       </div>
     </div>
   </div>
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm
index c0a25939df..e1e69d4a14 100644
--- a/interface/web/client/templates/reseller_edit_limits.htm
+++ b/interface/web/client/templates/reseller_edit_limits.htm
@@ -127,13 +127,13 @@
                 </div>
                 <div class="form-group">
                     <label class="col-sm-3 control-label">{tmpl_var name='limit_ssl_txt'}</label>
-                    <div class="col-sm-9">
+                    <div class="col-sm-9" data-uncheck-fields="limit_ssl_letsencrypt">
                         {tmpl_var name='limit_ssl'}
                     </div>
                 </div>
                 <div class="form-group">
                     <label class="col-sm-3 control-label">{tmpl_var name='limit_ssl_letsencrypt_txt'}</label>
-                    <div class="col-sm-9">
+                    <div class="col-sm-9" data-check-fields="limit_ssl">
                         {tmpl_var name='limit_ssl_letsencrypt'}
                     </div>
                 </div>
@@ -362,7 +362,7 @@
                     <label for="limit_cron_frequency" class="col-sm-3 control-label">{tmpl_var name='limit_cron_frequency_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_cron_frequency" id="limit_cron_frequency" value="{tmpl_var name='limit_cron_frequency'}" class="form-control" /></div>
 				</div>
-            
+
       </div>
     </div>
   </div>
-- 
GitLab


From 14297267b4f6f57ab38240c7645ed49828ebb6db Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Tue, 20 Oct 2020 17:12:21 +0200
Subject: [PATCH 060/441] trimmed the code since it seems to be enough to
 provide TLS 1.3 when Nginx was linked against OpenSSL 1.1.1 at build time

---
 server/plugins-available/nginx_plugin.inc.php | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index d76ef1849a..6182c676a6 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1622,20 +1622,15 @@ class nginx_plugin {
 		$vhost_data['logging'] = $web_config['logging'];
 
                 // check if OpenSSL and Nginx supports TLS 1.3
-		$nginx_version = $app->system->getnginxversion(true);
-		$openssl_version = $app->system->getopensslversion(true);
-
 		$output = $app->system->exec_safe('nginx -V 2>&1');
 
 		if(preg_match('/built with OpenSSL\s*(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
                         $nginx_openssl_ver = $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) ? '.' . $matches[5] : '');
 		}
 
-		if(version_compare($app->system->getopensslversion(true), $nginx_openssl_ver, '>=')) {
-			if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($app->system->getopensslversion(true), '1.1.1', '>='))) {
-				$app->log('Enable TLS 1.3 for: '.$domain, LOGLEVEL_DEBUG);
-				$vhost_data['tls13_available'] = $app->system->getopensslversion(true);
-			}
+		if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($nginx_openssl_ver, '1.1.1', '>='))) {
+			$app->log('Enable TLS 1.3 for: '.$domain, LOGLEVEL_DEBUG);
+			$vhost_data['tls13_available'] = $nginx_openssl_ver;
 		}
 
 		$tpl->setVar($vhost_data);
-- 
GitLab


From d07b2ad07e622059e399a29f03da9dae8c8a030c Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Tue, 20 Oct 2020 17:21:04 +0200
Subject: [PATCH 061/441] modified comment

---
 server/plugins-available/nginx_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 6182c676a6..8ecee93321 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1621,7 +1621,7 @@ class nginx_plugin {
 		// set logging variable
 		$vhost_data['logging'] = $web_config['logging'];
 
-                // check if OpenSSL and Nginx supports TLS 1.3
+                // Provide TLS 1.3 support if Nginx is >= 1.13.0 and when it was linked against OpenSSL(>=1.1.1) at build time.
 		$output = $app->system->exec_safe('nginx -V 2>&1');
 
 		if(preg_match('/built with OpenSSL\s*(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
-- 
GitLab


From 3b3762f52cef782889c0443282bb8621d5d18ad3 Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Tue, 20 Oct 2020 17:50:56 +0200
Subject: [PATCH 062/441] adjusted Nginx TLS 1.3 naming and switched to true if
 TLS 1.3 is supported

---
 server/conf/nginx_vhost.conf.master           | 2 +-
 server/plugins-available/nginx_plugin.inc.php | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index 3bf65bd341..57dffe1369 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -19,7 +19,7 @@ server {
 </tmpl_if>
 </tmpl_if>
 
-<tmpl_if name='tls13_available' op='>=' value='1.1.1' format='version'>
+<tmpl_if name='tls1.3_supported' op='==' value='y'>
 <tmpl_var name="ssl_protocols">
 	ssl_protocols TLSv1.3 TLSv1.2;
 <tmpl_else>
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 8ecee93321..fc2088fefb 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1621,7 +1621,7 @@ class nginx_plugin {
 		// set logging variable
 		$vhost_data['logging'] = $web_config['logging'];
 
-                // Provide TLS 1.3 support if Nginx is >= 1.13.0 and when it was linked against OpenSSL(>=1.1.1) at build time.
+                // Provide TLS 1.3 support if Nginx version is >= 1.13.0 and when it was linked against OpenSSL(>=1.1.1) at build time.
 		$output = $app->system->exec_safe('nginx -V 2>&1');
 
 		if(preg_match('/built with OpenSSL\s*(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
@@ -1630,7 +1630,7 @@ class nginx_plugin {
 
 		if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($nginx_openssl_ver, '1.1.1', '>='))) {
 			$app->log('Enable TLS 1.3 for: '.$domain, LOGLEVEL_DEBUG);
-			$vhost_data['tls13_available'] = $nginx_openssl_ver;
+			$vhost_data['tls1.3_supported'] = 'y';
 		}
 
 		$tpl->setVar($vhost_data);
-- 
GitLab


From 07eb3ef8cc1d764109b09bbb426a0a4964aacbf3 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 20 Oct 2020 21:10:25 +0200
Subject: [PATCH 063/441] - pass all arguments to updater in
 ispconfig_update.sh, fixes #5828

---
 server/scripts/ispconfig_update.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/scripts/ispconfig_update.sh b/server/scripts/ispconfig_update.sh
index fc34506634..bc7e0ef754 100644
--- a/server/scripts/ispconfig_update.sh
+++ b/server/scripts/ispconfig_update.sh
@@ -20,7 +20,7 @@ then
     then
         cp -p ${n} ${n}.exec
         chmod +x ${n}.exec
-        exec ${n}.exec
+        exec ${n}.exec "$@"
     else
         # clean up tmp .exec file
         if [ "$(basename ${0})" == "ispconfig_update.sh.exec" ]; then
@@ -31,7 +31,7 @@ then
             -d disable_classes= \
             -d disable_functions= \
             -d open_basedir= \
-            /usr/local/ispconfig/server/scripts/ispconfig_update.php
+            /usr/local/ispconfig/server/scripts/ispconfig_update.php "$@"
 
     fi
 fi
-- 
GitLab


From d528b3e08db1518a04895478f4b2cd5e710116c3 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 21 Oct 2020 12:12:25 +0200
Subject: [PATCH 064/441] Revert "Merge branch '1804-welcome-email' into
 'stable-3.1'"

This reverts merge request !1076
---
 install/tpl/system.ini.master                 |   1 -
 server/plugins-available/mail_plugin.inc.php  | 144 +++++++++---------
 .../plugins-available/mailman_plugin.inc.php  |  15 +-
 3 files changed, 77 insertions(+), 83 deletions(-)

diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master
index c42966a01c..928068a6e1 100644
--- a/install/tpl/system.ini.master
+++ b/install/tpl/system.ini.master
@@ -16,7 +16,6 @@ webmail_url=/webmail
 dkim_path=/var/lib/amavis/dkim
 smtp_enabled=y
 smtp_host=localhost
-enable_welcome_mail=y
 
 [monitor]
 
diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php
index c584b68215..4d5ac826d3 100644
--- a/server/plugins-available/mail_plugin.inc.php
+++ b/server/plugins-available/mail_plugin.inc.php
@@ -135,7 +135,7 @@ class mail_plugin {
 			$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Trash'", $data["new"]["email"]);
 			$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Junk'", $data["new"]["email"]);
 			$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Drafts'", $data["new"]["email"]);
-
+			
 			$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? INBOX'", $data["new"]["email"]);
 			$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? Sent'", $data["new"]["email"]);
 			$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? Trash'", $data["new"]["email"]);
@@ -149,26 +149,26 @@ class mail_plugin {
 				$app->log('Created Directory: '.$maildomain_path, LOGLEVEL_DEBUG);
 				$maildomain_path .= '/Maildir';
 			}
-
+					
 			//* When the mail user dir exists but it is not a valid maildir, move it to corrupted maildir folder
 			if(!empty($maildomain_path) && is_dir($maildomain_path) && !is_dir($maildomain_path.'/new') && !is_dir($maildomain_path.'/cur')) {
 				if(!is_dir($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'])) $app->system->mkdirpath($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'], 0700, $mail_config['mailuser_name'], $mail_config['mailuser_group']);
 				$app->system->exec_safe("su -c ? vmail", "mv -f " . $data['new']['maildir']." ".$mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id']);
 				$app->log('Moved invalid maildir to corrupted Maildirs folder: '.$data['new']['maildir'], LOGLEVEL_WARN);
 			}
-
+	
 			//* Create the maildir, if it doesn not exist, set permissions, set quota.
 			if(!empty($maildomain_path) && !is_dir($maildomain_path)) {
-
+	
 				$app->system->maildirmake($maildomain_path, $user, '', $group);
-
+	
 				//* This is to fix the maildrop quota not being rebuilt after the quota is changed.
 				if($mail_config['pop3_imap_daemon'] != 'dovecot') {
 					if(is_dir($maildomain_path)) $app->system->exec_safe("su -c ? ?", "maildirmake -q ".$data['new']['quota']."S ".$maildomain_path, $user); // Avoid maildirmake quota bug, see debian bug #214911
 					$app->log('Created Maildir: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".$maildomain_path."' ".$user, LOGLEVEL_DEBUG);
 				}
 			}
-
+	
 			if(!is_dir($data['new']['maildir'].'/.Sent')) {
 				$app->system->maildirmake($maildomain_path, $user, 'Sent', $group);
 			}
@@ -181,11 +181,11 @@ class mail_plugin {
 			if(!is_dir($data['new']['maildir'].'/.Junk')) {
 				$app->system->maildirmake($maildomain_path, $user, 'Junk', $group);
 			}
-
+	
 			// Set permissions now recursive
 			$app->system->exec_safe('chown -R ?:? ?', $user, $group, $data['new']['maildir']);
 			$app->log('Set ownership on '.$data['new']['maildir'], LOGLEVEL_DEBUG);
-
+	
 			//* Set the maildir quota
 			if(is_dir($data['new']['maildir'].'/new') && $mail_config['pop3_imap_daemon'] != 'dovecot') {
 				if($data['new']['quota'] > 0) {
@@ -195,63 +195,61 @@ class mail_plugin {
 			}
 		}
 
-		$global_config = $app->getconf->get_global_config('mail');
-		if($global_config['enable_welcome_mail'] == 'y') {
-			//* Send the welcome email message
-			$tmp = explode('@', $data["new"]["email"]);
-			$domain = $tmp[1];
-			unset($tmp);
-			$html = false;
-			if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html')) {
-				$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html');
-				$html = true;
-			} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html')) {
-				$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html');
-				$html = true;
-			} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) {
-				$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt');
-			} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt')) {
-				$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt');
-			} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_en.txt')) {
-				$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_en.txt');
-			} elseif(file_exists($conf['rootpath'].'/conf/mail/welcome_email_'.$conf['language'].'.txt')) {
-				$lines = file($conf['rootpath'].'/conf/mail/welcome_email_'.$conf['language'].'.txt');
-			} else {
-				$lines = file($conf['rootpath'].'/conf/mail/welcome_email_en.txt');
-			}
-
-			//* Get from address
-			$parts = explode(':', trim($lines[0]));
-			unset($parts[0]);
-			$welcome_mail_from  = implode(':', $parts);
-			unset($lines[0]);
-
-			//* Get subject
-			$parts = explode(':', trim($lines[1]));
-			unset($parts[0]);
-			$welcome_mail_subject  = implode(':', $parts);
-			unset($lines[1]);
-
-			//* Get message
-			$welcome_mail_message = trim(implode($lines));
-			unset($tmp);
-
-			$mailHeaders      = "MIME-Version: 1.0" . "\n";
-			if($html) {
-				$mailHeaders     .= "Content-Type: text/html; charset=utf-8" . "\n";
-				$mailHeaders     .= "Content-Transfer-Encoding: quoted-printable" . "\n";
-			} else {
-				$mailHeaders     .= "Content-Type: text/plain; charset=utf-8" . "\n";
-				$mailHeaders     .= "Content-Transfer-Encoding: 8bit" . "\n";
-			}
-			$mailHeaders     .= "From: $welcome_mail_from" . "\n";
-			$mailHeaders     .= "Reply-To: $welcome_mail_from" . "\n";
-			$mailTarget       = $data["new"]["email"];
-			$mailSubject      = "=?utf-8?B?".base64_encode($welcome_mail_subject)."?=";
+		//* Send the welcome email message
+		$tmp = explode('@', $data["new"]["email"]);
+		$domain = $tmp[1];
+		unset($tmp);
+		$html = false;
+		if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html')) {
+			$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html');
+			$html = true;
+		} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html')) {
+			$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html');
+			$html = true;
+		} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) {
+			$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt');
+		} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt')) {
+			$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt');
+		} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_en.txt')) {
+			$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_en.txt');
+		} elseif(file_exists($conf['rootpath'].'/conf/mail/welcome_email_'.$conf['language'].'.txt')) {
+			$lines = file($conf['rootpath'].'/conf/mail/welcome_email_'.$conf['language'].'.txt');
+		} else {
+			$lines = file($conf['rootpath'].'/conf/mail/welcome_email_en.txt');
+		}
 
-			//* Send the welcome email only on the "master" mail server to avoid duplicate emails
-			if($conf['mirror_server_id'] == 0) mail($mailTarget, $mailSubject, $welcome_mail_message, $mailHeaders);
+		//* Get from address
+		$parts = explode(':', trim($lines[0]));
+		unset($parts[0]);
+		$welcome_mail_from  = implode(':', $parts);
+		unset($lines[0]);
+
+		//* Get subject
+		$parts = explode(':', trim($lines[1]));
+		unset($parts[0]);
+		$welcome_mail_subject  = implode(':', $parts);
+		unset($lines[1]);
+
+		//* Get message
+		$welcome_mail_message = trim(implode($lines));
+		unset($tmp);
+
+		$mailHeaders      = "MIME-Version: 1.0" . "\n";
+		if($html) {
+			$mailHeaders     .= "Content-Type: text/html; charset=utf-8" . "\n";
+			$mailHeaders     .= "Content-Transfer-Encoding: quoted-printable" . "\n";
+		} else {
+			$mailHeaders     .= "Content-Type: text/plain; charset=utf-8" . "\n";
+			$mailHeaders     .= "Content-Transfer-Encoding: 8bit" . "\n";
 		}
+		$mailHeaders     .= "From: $welcome_mail_from" . "\n";
+		$mailHeaders     .= "Reply-To: $welcome_mail_from" . "\n";
+		$mailTarget       = $data["new"]["email"];
+		$mailSubject      = "=?utf-8?B?".base64_encode($welcome_mail_subject)."?=";
+
+		//* Send the welcome email only on the "master" mail server to avoid duplicate emails
+		if($conf['mirror_server_id'] == 0) mail($mailTarget, $mailSubject, $welcome_mail_message, $mailHeaders);
+
 	}
 
 	function user_update($event_name, $data) {
@@ -263,7 +261,7 @@ class mail_plugin {
 
 		// Maildir-Format must not be changed on this way !!
 		$data['new']['maildir_format'] = $data['old']['maildir_format'];
-
+		
 		$maildomain_path = $data['new']['maildir'];
 		$tmp_basepath = $data['new']['maildir'];
 		$tmp_basepath_parts = explode('/', $tmp_basepath);
@@ -317,7 +315,7 @@ class mail_plugin {
 				$app->system->exec_safe('mv -f ? ?'. $data['old']['maildir'], $data['new']['maildir']);
 				$app->log('Moved Maildir from: '.$data['old']['maildir'].' to '.$data['new']['maildir'], LOGLEVEL_DEBUG);
 			}
-
+				
 			//* Create the maildir, if it doesn not exist, set permissions, set quota.
 			if(!is_dir($data['new']['maildir'].'/mdbox')) {
 				$app->system->exec_safe("su -c 'doveadm mailbox create -u ? INBOX'", $data["new"]["email"]);
@@ -325,7 +323,7 @@ class mail_plugin {
 				$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Trash'", $data["new"]["email"]);
 				$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Junk'", $data["new"]["email"]);
 				$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Drafts'", $data["new"]["email"]);
-
+					
 				$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? INBOX'", $data["new"]["email"]);
 				$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? Sent'", $data["new"]["email"]);
 				$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? Trash'", $data["new"]["email"]);
@@ -340,18 +338,18 @@ class mail_plugin {
 				$app->log('Created Directory: '.$base_path, LOGLEVEL_DEBUG);
 				$maildomain_path .= '/Maildir';
 			}
-
+	
 			//* When the mail user dir exists but it is not a valid maildir, move it to corrupted maildir folder
 			if(!empty($maildomain_path) && is_dir($maildomain_path) && !is_dir($maildomain_path.'/new') && !is_dir($maildomain_path.'/cur')) {
 				if(!is_dir($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'])) $app->system->mkdirpath($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'], 0700, $mail_config['mailuser_name'], $mail_config['mailuser_group']);
 				$app->system->exec_safe("su -c ? ?", "mv -f ".$data['new']['maildir']." ".$mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'], 'vmail');
 				$app->log('Moved invalid maildir to corrupted Maildirs folder: '.$data['new']['maildir'], LOGLEVEL_WARN);
 			}
-
+	
 			//* Create the maildir, if it doesn not exist, set permissions, set quota.
 			if(!empty($maildomain_path) && !is_dir($maildomain_path.'/new')) {
 				$app->system->maildirmake($maildomain_path, $user, '', $group);
-
+	
 				//* This is to fix the maildrop quota not being rebuilt after the quota is changed.
 				if($mail_config['pop3_imap_daemon'] != 'dovecot') {
 					if($data['new']['quota'] > 0) {
@@ -363,7 +361,7 @@ class mail_plugin {
 					}
 				}
 			}
-
+	
 			if(!is_dir($data['new']['maildir'].'/.Sent')) {
 				$app->system->maildirmake($maildomain_path, $user, 'Sent', $group);
 			}
@@ -376,11 +374,11 @@ class mail_plugin {
 			if(!is_dir($data['new']['maildir'].'/.Junk')) {
 				$app->system->maildirmake($maildomain_path, $user, 'Junk', $group);
 			}
-
+	
 			// Set permissions now recursive
 			$app->system->exec_safe('chown -R ?:? ?', $user, $group, $data['new']['maildir']);
 			$app->log('Set ownership on '.$data['new']['maildir'], LOGLEVEL_DEBUG);
-
+	
 			// Move mailbox, if domain has changed and delete old mailbox
 			if($data['new']['maildir'] != $data['old']['maildir'] && is_dir($data['old']['maildir'])) {
 				if(is_dir($data['new']['maildir'])) {
@@ -472,7 +470,7 @@ class mail_plugin {
 		} else {
 			$app->log('Possible security violation when deleting the mail domain mailfilter directory: '.$old_maildomain_path, LOGLEVEL_ERROR);
 		}
-
+		
 		//* Delete the mail-backups
 		$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
 		$backup_dir = $server_config['backup_dir'];
diff --git a/server/plugins-available/mailman_plugin.inc.php b/server/plugins-available/mailman_plugin.inc.php
index da033b80cc..e6251aedf1 100644
--- a/server/plugins-available/mailman_plugin.inc.php
+++ b/server/plugins-available/mailman_plugin.inc.php
@@ -71,12 +71,9 @@ class mailman_plugin {
 	function insert($event_name, $data) {
 		global $app, $conf;
 
-		$global_config = $app->getconf->get_global_config('mail');
-		$opt_quiet = ($global_config['enable_welcome_mail'] == 'n') ?  "-q" : "";
-
 		$this->update_config();
 
-		$pid = $app->system->exec_safe("nohup /usr/lib/mailman/bin/newlist ? -u ? -e ? ? ? ? >/dev/null 2>&1 & echo $!;", $opt_quiet, $data["new"]["domain"], $data["new"]["domain"], $data["new"]["listname"], $data["new"]["email"], $data["new"]["password"]);
+		$pid = $app->system->exec_safe("nohup /usr/lib/mailman/bin/newlist -u ? -e ? ? ? ? >/dev/null 2>&1 & echo $!;", $data["new"]["domain"], $data["new"]["domain"], $data["new"]["listname"], $data["new"]["email"], $data["new"]["password"]);
 		// wait for /usr/lib/mailman/bin/newlist-call
 		$running = true;
 		do {
@@ -90,9 +87,9 @@ class mailman_plugin {
 		}
 		if(is_file('/var/lib/mailman/data/virtual-mailman')) exec('postmap /var/lib/mailman/data/virtual-mailman');
 		if(is_file('/var/lib/mailman/data/transport-mailman')) exec('postmap /var/lib/mailman/data/transport-mailman');
-
+		
 		exec('nohup '.$conf['init_scripts'] . '/' . 'mailman reload >/dev/null 2>&1 &');
-
+		
 		// Fix list URL
 		$app->system->exec_safe('/usr/sbin/withlist -l -r fix_url ?', $data["new"]["listname"]);
 
@@ -103,7 +100,7 @@ class mailman_plugin {
 	// The purpose of this plugin is to rewrite the main.cf file
 	function update($event_name, $data) {
 		global $app, $conf;
-
+		
 		$this->update_config();
 
 		if($data["new"]["password"] != $data["old"]["password"] && $data["new"]["password"] != '') {
@@ -111,7 +108,7 @@ class mailman_plugin {
 			exec('nohup '.$conf['init_scripts'] . '/' . 'mailman reload >/dev/null 2>&1 &');
 			$app->db->query("UPDATE mail_mailinglist SET password = '' WHERE mailinglist_id = ?", $data["new"]['mailinglist_id']);
 		}
-
+		
 		if(is_file('/var/lib/mailman/data/virtual-mailman')) exec('postmap /var/lib/mailman/data/virtual-mailman');
 		if(is_file('/var/lib/mailman/data/transport-mailman')) exec('postmap /var/lib/mailman/data/transport-mailman');
 	}
@@ -124,7 +121,7 @@ class mailman_plugin {
 		$app->system->exec_safe("nohup /usr/lib/mailman/bin/rmlist -a ? >/dev/null 2>&1 &", $data["old"]["listname"]);
 
 		exec('nohup '.$conf['init_scripts'] . '/' . 'mailman reload >/dev/null 2>&1 &');
-
+		
 		if(is_file('/var/lib/mailman/data/virtual-mailman')) exec('postmap /var/lib/mailman/data/virtual-mailman');
 		if(is_file('/var/lib/mailman/data/transport-mailman')) exec('postmap /var/lib/mailman/data/transport-mailman');
 
-- 
GitLab


From 5f9d045630c8b52dd294970c22b2e30e529bf504 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 21 Oct 2020 12:35:54 -0600
Subject: [PATCH 065/441] fix stray semicolons

---
 server/scripts/letsencrypt_post_hook.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/scripts/letsencrypt_post_hook.sh b/server/scripts/letsencrypt_post_hook.sh
index 27d593196c..5b97fd80da 100644
--- a/server/scripts/letsencrypt_post_hook.sh
+++ b/server/scripts/letsencrypt_post_hook.sh
@@ -28,7 +28,7 @@ if which yum &> /dev/null 2>&1 ; then
         firewall-cmd --zone=public --permanent --remove-service=http
         firewall-cmd --reload
     # If using UFW
-    else; if [ rpm -q ufw ]; then ufw --force enable && ufw deny http; fi
+    elif [ rpm -q ufw ]; then ufw --force enable && ufw deny http
     fi
 # For Debian, Ubuntu or derivatives
 elif apt-get -v >/dev/null 2>&1 ; then
@@ -36,10 +36,10 @@ elif apt-get -v >/dev/null 2>&1 ; then
     if [ $(dpkg-query -W -f='${Status}' nginx 2>/dev/null | grep -c "ok installed") -eq 1 ]; then service nginx start
     elif [ $(dpkg-query -W -f='${Status}' apache2 2>/dev/null | grep -c "ok installed") -eq 1 ]; then service apache2 start
     # If using UFW
-    else; if [ $(dpkg-query -W -f='${Status}' ufw 2>/dev/null | grep -c "ok installed") -eq 1 ]; then ufw --force enable && ufw deny http; fi
+    elif [ $(dpkg-query -W -f='${Status}' ufw 2>/dev/null | grep -c "ok installed") -eq 1 ]; then ufw --force enable && ufw deny http
     fi
 # Try iptables as a final attempt
 else
     iptables -D INPUT  -p tcp  --dport 80    -j ACCEPT
     service iptables save
-fi
\ No newline at end of file
+fi
-- 
GitLab


From fdc23556529351b55b5c9a040e5113bf204cf999 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 21 Oct 2020 14:28:05 -0600
Subject: [PATCH 066/441] letsencrypt hooks use iptables, not firewall scripts

---
 server/scripts/letsencrypt_post_hook.sh | 43 +++++++++++++++--------
 server/scripts/letsencrypt_pre_hook.sh  | 45 ++++++++++++++++---------
 2 files changed, 59 insertions(+), 29 deletions(-)

diff --git a/server/scripts/letsencrypt_post_hook.sh b/server/scripts/letsencrypt_post_hook.sh
index 5b97fd80da..caef1e2d21 100644
--- a/server/scripts/letsencrypt_post_hook.sh
+++ b/server/scripts/letsencrypt_post_hook.sh
@@ -12,34 +12,49 @@
 
 ## If you need a custom hook file, create a file with the same name in
 ## /usr/local/ispconfig/server/conf-custom/scripts/
+##
+## End the file with 'return 124' to signal that this script should not terminate.
+##
+## Eg. you can override the ispc_letsencrypt_firewall_disable() function then 'return 124'
+## to customize the firewall setup.
 if [ -e "/usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_post_hook.sh" ] ; then
-	. /usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_post_hook.sh && exit 0 || exit 1;
+        . /usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_post_hook.sh
+        ret=$?
+        if [ $ret != 124 ]; then exit $ret; fi
 fi
 
-# You can add support to other firewall
+declare -F ispc_letsencrypt_firewall_disable &>/dev/null || ispc_letsencrypt_firewall_disable() {
+        # delete 'ispc-letsencrypt' chain
+        iptables -D INPUT -p tcp --dport 80 -j ispc-letsencrypt
+        iptables -F ispc-letsencrypt
+        iptables -X ispc-letsencrypt
+}
+
+ispc_letsencrypt_firewall_disable
+
 
 # For RHEL, Centos or derivatives
 if which yum &> /dev/null 2>&1 ; then
     # Check if web server software is installed, start it if any
     if [ rpm -q nginx ]; then service nginx start
     elif [ rpm -q httpd ]; then service httpd start
-    # If using firewalld
-    elif [ rpm -q firewalld ] && [ `firewall-cmd --state` = running ]; then
-        firewall-cmd --zone=public --permanent --remove-service=http
-        firewall-cmd --reload
-    # If using UFW
-    elif [ rpm -q ufw ]; then ufw --force enable && ufw deny http
+#    # If using firewalld
+#    elif [ rpm -q firewalld ] && [ `firewall-cmd --state` = running ]; then
+#        firewall-cmd --zone=public --permanent --remove-service=http
+#        firewall-cmd --reload
+#    # If using UFW
+#    elif [ rpm -q ufw ]; then ufw --force enable && ufw deny http
     fi
 # For Debian, Ubuntu or derivatives
 elif apt-get -v >/dev/null 2>&1 ; then
     # Check if web server software is installed, stop it if any
     if [ $(dpkg-query -W -f='${Status}' nginx 2>/dev/null | grep -c "ok installed") -eq 1 ]; then service nginx start
     elif [ $(dpkg-query -W -f='${Status}' apache2 2>/dev/null | grep -c "ok installed") -eq 1 ]; then service apache2 start
-    # If using UFW
-    elif [ $(dpkg-query -W -f='${Status}' ufw 2>/dev/null | grep -c "ok installed") -eq 1 ]; then ufw --force enable && ufw deny http
+#    # If using UFW
+#    elif [ $(dpkg-query -W -f='${Status}' ufw 2>/dev/null | grep -c "ok installed") -eq 1 ]; then ufw --force enable && ufw deny http
     fi
-# Try iptables as a final attempt
-else
-    iptables -D INPUT  -p tcp  --dport 80    -j ACCEPT
-    service iptables save
+## Try iptables as a final attempt
+#else
+#    iptables -D INPUT  -p tcp  --dport 80    -j ACCEPT
+#    service iptables save
 fi
diff --git a/server/scripts/letsencrypt_pre_hook.sh b/server/scripts/letsencrypt_pre_hook.sh
index 60964a86d4..41aa018430 100644
--- a/server/scripts/letsencrypt_pre_hook.sh
+++ b/server/scripts/letsencrypt_pre_hook.sh
@@ -12,35 +12,50 @@
 
 ## If you need a custom hook file, create a file with the same name in
 ## /usr/local/ispconfig/server/conf-custom/scripts/
+##
+## End the file with 'return 124' to signal that this script should not terminate.
+##
+## Eg. you can override the ispc_letsencrypt_firewall_enable() function then 'return 124'
+## to customize the firewall setup.
 if [ -e "/usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_pre_hook.sh" ] ; then
-	. /usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_pre_hook.sh && exit 0 || exit 1 ;
+	. /usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_pre_hook.sh
+	ret=$?
+	if [ $ret != 124 ]; then exit $ret; fi
 fi
 
-# You can add support to other firewall
+declare -F ispc_letsencrypt_firewall_enable &>/dev/null || ispc_letsencrypt_firewall_enable() {
+	# create 'ispc-letsencrypt' chain with ACCEPT policy and send port 80 there
+	iptables -N ispc-letsencrypt
+	iptables -I ispc-letsencrypt -p tcp --dport 80 -j ACCEPT
+	iptables -A ispc-letsencrypt -j RETURN
+	iptables -I INPUT -p tcp --dport 80 -j ispc-letsencrypt
+}
+
+ispc_letsencrypt_firewall_enable
 
 # For RHEL, Centos or derivatives
 if which yum &> /dev/null 2>&1 ; then
     # Check if web server software is installed, stop it if any
     if [ rpm -q nginx ]; then service nginx stop; fi
     if [ rpm -q httpd ]; then service httpd stop; fi
-    # If using firewalld
-    if [ rpm -q firewalld ] && [ `firewall-cmd --state` = running ]; then
-        firewall-cmd --zone=public --permanent --add-service=http
-        firewall-cmd --reload
-    fi
-    # If using UFW
-    if [ rpm -q ufw ]; then ufw --force enable && ufw allow http; fi
+#    # If using firewalld
+#    if [ rpm -q firewalld ] && [ `firewall-cmd --state` = running ]; then
+#        firewall-cmd --zone=public --permanent --add-service=http
+#        firewall-cmd --reload
+#    fi
+#    # If using UFW
+#    if [ rpm -q ufw ]; then ufw --force enable && ufw allow http; fi
 
 # For Debian, Ubuntu or derivatives
 elif apt-get -v >/dev/null 2>&1 ; then
     # Check if web server software is installed, stop it if any
     if [ $(dpkg-query -W -f='${Status}' nginx 2>/dev/null | grep -c "ok installed") -eq 1 ]; then service nginx stop; fi
     if [ $(dpkg-query -W -f='${Status}' apache2 2>/dev/null | grep -c "ok installed") -eq 1 ]; then service apache2 stop; fi
-    # If using UFW
-    if [ $(dpkg-query -W -f='${Status}' ufw 2>/dev/null | grep -c "ok installed") -eq 1 ]; then ufw --force enable && ufw allow http; fi
+#    # If using UFW
+#    if [ $(dpkg-query -W -f='${Status}' ufw 2>/dev/null | grep -c "ok installed") -eq 1 ]; then ufw --force enable && ufw allow http; fi
     
-# Try iptables as a final attempt
-else
-    iptables -I INPUT  -p tcp  --dport 80    -j ACCEPT
-    service iptables save
+## Try iptables as a final attempt
+#else
+#    iptables -I INPUT  -p tcp  --dport 80    -j ACCEPT
+#    service iptables save
 fi
-- 
GitLab


From d2d3013193069e908d4180a59fff46c275d97b37 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 21 Oct 2020 14:35:03 -0600
Subject: [PATCH 067/441] add new fields to example ispc-import-csv-email.php

---
 remoting_client/examples/ispc-import-csv-email.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/remoting_client/examples/ispc-import-csv-email.php b/remoting_client/examples/ispc-import-csv-email.php
index 407ba1635c..4b22c98c2c 100644
--- a/remoting_client/examples/ispc-import-csv-email.php
+++ b/remoting_client/examples/ispc-import-csv-email.php
@@ -227,6 +227,8 @@ foreach ( $csv as $record ) {
 			'autoresponder_start_date' => date( 'Y-m-d H:i:s' ),
 			'autoresponder_end_date' => date( '2024-m-d H:i:s' ),
 			'autoresponder_text' => $record['autoresponder_text'],
+			'purge_trash_days' => 0,
+			'purge_junk_days' => 0,
 			'move_junk' => ( preg_match( '/^y/i', $record['move_junk'] ) ? 'y' : 'n' ),
 			'custom_mailfilter' => "",
 			'postfix' => 'y',
-- 
GitLab


From 25f192948d8c8634189bb4b19334d4c33f09233f Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Thu, 22 Oct 2020 10:34:43 +0200
Subject: [PATCH 068/441] Don't change /etc/hosts on mirrors (#4917)

---
 .../network_settings_plugin.inc.php           | 30 +++++++++----------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/server/plugins-available/network_settings_plugin.inc.php b/server/plugins-available/network_settings_plugin.inc.php
index 1ed12f3a1c..6a34cc20d7 100644
--- a/server/plugins-available/network_settings_plugin.inc.php
+++ b/server/plugins-available/network_settings_plugin.inc.php
@@ -249,55 +249,55 @@ class network_settings_plugin {
 				$app->log('Network configuration disabled in server settings.', LOGLEVEL_DEBUG);
 			}
 		}
-		
+
 		//* Configure hostname
-		if($event_name == 'server_update' && $data['mirrored'] == false) {
-			
+		if($event_name == 'server_update' && $conf['mirror_server_id'] == 0) {
+
 			//* get old server config
 			$tmp = $app->ini_parser->parse_ini_string(stripslashes($data['old']['config']));
 			$old_server_config = $tmp['server'];
 			unset($tmp);
-			
+
 			$new_hostname = trim($server_config['hostname']);
 			$old_hostname = trim($old_server_config['hostname']);
-			
+
 			if($new_hostname != '' && $old_hostname != $new_hostname) {
-				
+
 				if(is_file('/etc/hostname')) {
 					$app->system->file_put_contents('/etc/hostname',$new_hostname);
 					$app->log('Changed /etc/hostname to '.$new_hostname, LOGLEVEL_DEBUG);
 				}
-				
+
 				if(is_file('/etc/mailname')) {
 					$app->system->file_put_contents('/etc/mailname',$new_hostname);
 					$app->log('Changed /etc/mailname to '.$new_hostname, LOGLEVEL_DEBUG);
 				}
-				
+
 				$postconf_commands = array(
 					'myhostname = '.$new_hostname,
 					'mydestination = '.$new_hostname.', localhost, localhost.localdomain'
 				);
-				
+
 				//* Executing the postconf commands
 				foreach($postconf_commands as $cmd) {
 					$command = "postconf -e ?";
 					$app->system->exec_safe($command, $cmd);
 				}
-				
+
 				$app->log('Changed changed myhostname and mydestination in postfix main.cf to '.$new_hostname, LOGLEVEL_DEBUG);
-				
+
 				//* change /etc/hosts
 				$hosts = file_get_contents('/etc/hosts');
 				$hosts = str_replace($old_hostname,$new_hostname,$hosts);
 				$app->system->file_put_contents('/etc/hosts',$hosts);
-				
+
 				exec($app->system->getinitcommand('postfix', 'restart').' 2>&1');
 				exec($app->system->getinitcommand('networking', 'restart').' 2>&1');
-				
+
 			}
-			
+
 		}
-		
+
 
 	}
 
-- 
GitLab


From 30328bcefeb1731f061cfb44f1ee048d4948a3e9 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Thu, 22 Oct 2020 10:43:32 +0200
Subject: [PATCH 069/441] Fix typo (#5845)

---
 interface/web/robots.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/robots.txt b/interface/web/robots.txt
index 4e0bfc5496..1f53798bb4 100644
--- a/interface/web/robots.txt
+++ b/interface/web/robots.txt
@@ -1,2 +1,2 @@
-User-Agent: *
-Disallow: /
\ No newline at end of file
+User-agent: *
+Disallow: /
-- 
GitLab


From 6c47c69c55b2e5f5b6037ca9f4aebb3ce1fb147b Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Thu, 22 Oct 2020 14:44:27 +0200
Subject: [PATCH 070/441] show more lines for mail and lets encrypt log

---
 server/lib/classes/cron.d/100-monitor_letsencrypt_log.inc.php | 2 +-
 server/lib/classes/cron.d/100-monitor_mail_log.inc.php        | 2 +-
 server/lib/classes/monitor_tools.inc.php                      | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/lib/classes/cron.d/100-monitor_letsencrypt_log.inc.php b/server/lib/classes/cron.d/100-monitor_letsencrypt_log.inc.php
index 401dcd1e55..166628114c 100644
--- a/server/lib/classes/cron.d/100-monitor_letsencrypt_log.inc.php
+++ b/server/lib/classes/cron.d/100-monitor_letsencrypt_log.inc.php
@@ -65,7 +65,7 @@ class cronjob_monitor_letsencrypt_log extends cronjob {
 		$type = 'log_letsencrypt';
 
 		/* Get the data of the log */
-		$data = $this->_tools->_getLogData($type);
+		$data = $this->_tools->_getLogData($type, 500);
 
 		/*
 		 * actually this info has no state.
diff --git a/server/lib/classes/cron.d/100-monitor_mail_log.inc.php b/server/lib/classes/cron.d/100-monitor_mail_log.inc.php
index 5c41105d3c..e7562f6bf1 100644
--- a/server/lib/classes/cron.d/100-monitor_mail_log.inc.php
+++ b/server/lib/classes/cron.d/100-monitor_mail_log.inc.php
@@ -67,7 +67,7 @@ class cronjob_monitor_mail_log extends cronjob {
 		$type = 'log_mail';
 
 		/* Get the data of the log */
-		$data = $this->_tools->_getLogData($type);
+		$data = $this->_tools->_getLogData($type, 500);
 
 		/*
 		 * actually this info has no state.
diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index 31e36836d5..8f7f9652c7 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -488,7 +488,7 @@ class monitor_tools {
 		return $res;
 	}
 
-	public function _getLogData($log) {
+	public function _getLogData($log, $max_lines = 100) {
 		global $conf;
 
 		$dist = '';
@@ -645,7 +645,7 @@ class monitor_tools {
 			} else {
 				$log = '';
 				if (is_readable($logfile)) {
-					$fd = popen('tail -n 100 ' . escapeshellarg($logfile), 'r');
+					$fd = popen('tail -n '.intval($max_lines).' ' . escapeshellarg($logfile), 'r');
 					if ($fd) {
 						while (!feof($fd)) {
 							$log .= fgets($fd, 4096);
-- 
GitLab


From d164182c3dd864c8e2409ae761a6fd07ecd65a23 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 22 Oct 2020 13:37:06 -0600
Subject: [PATCH 071/441] fix rbl list updates

---
 .../postfix_server_plugin.inc.php             | 44 ++++++++++---------
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php
index 21a6a404ea..23373a1de0 100644
--- a/server/plugins-available/postfix_server_plugin.inc.php
+++ b/server/plugins-available/postfix_server_plugin.inc.php
@@ -110,36 +110,40 @@ class postfix_server_plugin {
 		}
 
 		if($mail_config['realtime_blackhole_list'] != $old_ini_data['mail']['realtime_blackhole_list']) {
-			$rbl_updated = false;
-			$rbl_hosts = trim(preg_replace('/\s+/', '', $mail_config['realtime_blackhole_list']));
-			if($rbl_hosts != ''){
-				$rbl_hosts = explode(",", $rbl_hosts);
-			}
+			# reject_rbl_client is now in smtpd_client_restrictions, remove here:
 			$options = preg_split("/,\s*/", exec("postconf -h smtpd_recipient_restrictions"));
 			$new_options = array();
 			foreach ($options as $key => $value) {
 				$value = trim($value);
 				if ($value == '') continue;
-				if (!preg_match('/reject_rbl_client/', $value)) {
-					$new_options[] = $value;
-				} else {
-					if(is_array($rbl_hosts) && !empty($rbl_hosts) && !$rbl_updated){
-						$rbl_updated = true;
-						foreach ($rbl_hosts as $key2 => $value2) {
-							$value2 = trim($value2);
-							if($value2 != '') $new_options[] = "reject_rbl_client ".$value2;
-						}
-					}
-				}
+				if (preg_match('/^reject_rbl_client/', $value)) continue;
+				$new_options[] = $value;
 			}
-			//* first time add rbl-list
-			if (!$rbl_updated && is_array($rbl_hosts) && !empty($rbl_hosts)) {
+			$app->system->exec_safe("postconf -e ?", 'smtpd_recipient_restrictions = '.implode(", ", $new_options));
+
+			$rbl_options = array();
+			$rbl_hosts = trim(preg_replace('/\s+/', '', $mail_config['realtime_blackhole_list']));
+			if($rbl_hosts != ''){
+				$rbl_hosts = explode(",", $rbl_hosts);
 				foreach ($rbl_hosts as $key => $value) {
 					$value = trim($value);
-					if($value != '') $new_options[] = "reject_rbl_client ".$value;
+					if($value != '') $rbl_options[] = "reject_rbl_client ".$value;
 				}
 			}
-			$app->system->exec_safe("postconf -e ?", 'smtpd_recipient_restrictions = '.implode(", ", $new_options));
+
+			$options = preg_split("/,\s*/", exec("postconf -h smtpd_client_restrictions"));
+			$new_options = array();
+			foreach ($options as $key => $value) {
+				$value = trim($value);
+				if ($value == '') continue;
+				if (preg_match('/^reject_rbl_client/', $value)) continue;
+				$new_options[] = $value;
+				if (preg_match('/^permit_mynetworks/', $value)) {
+					$new_options = array_merge($new_options, $rbl_options);
+					$rbl_options = array(); // so we don't ever array_merge twice
+				}
+			}
+			$app->system->exec_safe("postconf -e ?", 'smtpd_client_restrictions = '.implode(", ", $new_options));
 		}
 
 		if ($mail_config['reject_sender_login_mismatch'] != $old_ini_data['mail']['reject_sender_login_mismatch']) {
-- 
GitLab


From 45391bb94d1d9687b6d3eff54a3a93ef7548f403 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 22 Oct 2020 22:13:40 +0200
Subject: [PATCH 072/441] Update server_services_plugin.inc.php

---
 server/plugins-available/server_services_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/server_services_plugin.inc.php b/server/plugins-available/server_services_plugin.inc.php
index 29710a7285..c3eb78f194 100644
--- a/server/plugins-available/server_services_plugin.inc.php
+++ b/server/plugins-available/server_services_plugin.inc.php
@@ -42,7 +42,7 @@ class server_services_plugin {
 	var $courier_plugins = array('maildrop_plugin');
 	var $dovecot_plugins = array('maildeliver_plugin');
 
-	var $web_plugins = array('aps_plugin', 'cron_plugin', 'cron_jailkit_plugin', 'ftpuser_base_plugin', 'shelluser_base_plugin', 'shelluser_jailkit_plugin', 'webserver_plugin');
+	var $web_plugins = array('cron_plugin', 'cron_jailkit_plugin', 'ftpuser_base_plugin', 'shelluser_base_plugin', 'shelluser_jailkit_plugin', 'webserver_plugin');
 	var $apache_plugins = array('apache2_plugin');
 	var $nginx_plugins = array('nginx_plugin', 'nginx_reverseproxy_plugin');
 
-- 
GitLab


From e26fe25b89a2d0962b90196c258415942a945e4d Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Thu, 22 Oct 2020 22:20:46 +0200
Subject: [PATCH 073/441] Make help messages menu hideable (#5829)

---
 install/tpl/system.ini.master                             | 4 +---
 interface/web/admin/form/system_config.tform.php          | 6 ++++++
 interface/web/admin/lib/lang/ar_system_config.lng         | 1 +
 interface/web/admin/lib/lang/bg_system_config.lng         | 1 +
 interface/web/admin/lib/lang/br_system_config.lng         | 1 +
 interface/web/admin/lib/lang/ca_system_config.lng         | 1 +
 interface/web/admin/lib/lang/cz_system_config.lng         | 1 +
 interface/web/admin/lib/lang/de_system_config.lng         | 1 +
 interface/web/admin/lib/lang/dk_system_config.lng         | 1 +
 interface/web/admin/lib/lang/el_system_config.lng         | 1 +
 interface/web/admin/lib/lang/en_system_config.lng         | 1 +
 interface/web/admin/lib/lang/es_system_config.lng         | 1 +
 interface/web/admin/lib/lang/fi_system_config.lng         | 1 +
 interface/web/admin/lib/lang/fr_system_config.lng         | 1 +
 interface/web/admin/lib/lang/hr_system_config.lng         | 1 +
 interface/web/admin/lib/lang/hu_system_config.lng         | 1 +
 interface/web/admin/lib/lang/id_system_config.lng         | 1 +
 interface/web/admin/lib/lang/it_system_config.lng         | 1 +
 interface/web/admin/lib/lang/ja_system_config.lng         | 1 +
 interface/web/admin/lib/lang/nl_system_config.lng         | 1 +
 interface/web/admin/lib/lang/pl_system_config.lng         | 1 +
 interface/web/admin/lib/lang/pt_system_config.lng         | 1 +
 interface/web/admin/lib/lang/ro_system_config.lng         | 1 +
 interface/web/admin/lib/lang/ru_system_config.lng         | 1 +
 interface/web/admin/lib/lang/se_system_config.lng         | 1 +
 interface/web/admin/lib/lang/sk_system_config.lng         | 1 +
 interface/web/admin/lib/lang/tr_system_config.lng         | 1 +
 interface/web/admin/templates/system_config_misc_edit.htm | 6 ++++++
 interface/web/help/lib/module.conf.php                    | 2 +-
 29 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master
index a08796ce5a..69ca6bab74 100644
--- a/install/tpl/system.ini.master
+++ b/install/tpl/system.ini.master
@@ -4,9 +4,6 @@
 
 [client]
 
-[help]
-show_support_messages=n
-
 [dns]
 
 [mail]
@@ -59,6 +56,7 @@ tab_change_discard=n
 tab_change_warning=n
 use_loadindicator=y
 use_combobox=y
+show_support_messages=y
 maintenance_mode=n
 maintenance_mode_exclude_ips=
 admin_dashlets_left=
diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index 6b9b59b5e4..530a0452ce 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -619,6 +619,12 @@ $form["tabs"]['misc'] = array (
 			'default' => 'y',
 			'value'  => array(0 => 'n', 1 => 'y')
 		),
+		'show_support_messages' => array (
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value'  => array(0 => 'n', 1 => 'y')
+		),
 		'maintenance_mode' => array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
diff --git a/interface/web/admin/lib/lang/ar_system_config.lng b/interface/web/admin/lib/lang/ar_system_config.lng
index a5d245f16b..e6df413bbe 100644
--- a/interface/web/admin/lib/lang/ar_system_config.lng
+++ b/interface/web/admin/lib/lang/ar_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/bg_system_config.lng b/interface/web/admin/lib/lang/bg_system_config.lng
index fa9cdbf48d..301f5fe1b7 100644
--- a/interface/web/admin/lib/lang/bg_system_config.lng
+++ b/interface/web/admin/lib/lang/bg_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng
index fba3b5a07c..01962d3309 100644
--- a/interface/web/admin/lib/lang/br_system_config.lng
+++ b/interface/web/admin/lib/lang/br_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Salvar';
 $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['web_php_options_txt'] = 'Manipulador do php (Somente apache)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/ca_system_config.lng b/interface/web/admin/lib/lang/ca_system_config.lng
index ef64d68998..507dfb750f 100644
--- a/interface/web/admin/lib/lang/ca_system_config.lng
+++ b/interface/web/admin/lib/lang/ca_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng
index ea10785750..182bfd326b 100644
--- a/interface/web/admin/lib/lang/cz_system_config.lng
+++ b/interface/web/admin/lib/lang/cz_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Uložit';
 $wb['btn_cancel_txt'] = 'Zrušit';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng
index e80de10943..3b48e220ee 100644
--- a/interface/web/admin/lib/lang/de_system_config.lng
+++ b/interface/web/admin/lib/lang/de_system_config.lng
@@ -103,4 +103,5 @@ $wb['btn_save_txt'] = 'Speichern';
 $wb['btn_cancel_txt'] = 'Abbrechen';
 $wb['web_php_options_txt'] = 'PHP Handler (Nur Apache)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/dk_system_config.lng b/interface/web/admin/lib/lang/dk_system_config.lng
index 5327d86209..5a0696020a 100644
--- a/interface/web/admin/lib/lang/dk_system_config.lng
+++ b/interface/web/admin/lib/lang/dk_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng
index 5bb6b4a312..35c0d99344 100644
--- a/interface/web/admin/lib/lang/el_system_config.lng
+++ b/interface/web/admin/lib/lang/el_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng
index 489ddbd32c..d81128a269 100644
--- a/interface/web/admin/lib/lang/en_system_config.lng
+++ b/interface/web/admin/lib/lang/en_system_config.lng
@@ -103,4 +103,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/es_system_config.lng b/interface/web/admin/lib/lang/es_system_config.lng
index f77377c2d0..8c87391a9b 100644
--- a/interface/web/admin/lib/lang/es_system_config.lng
+++ b/interface/web/admin/lib/lang/es_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/fi_system_config.lng b/interface/web/admin/lib/lang/fi_system_config.lng
index d35125456d..a1c94dfc62 100644
--- a/interface/web/admin/lib/lang/fi_system_config.lng
+++ b/interface/web/admin/lib/lang/fi_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng
index acbe607c74..be3b771570 100644
--- a/interface/web/admin/lib/lang/fr_system_config.lng
+++ b/interface/web/admin/lib/lang/fr_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/hr_system_config.lng b/interface/web/admin/lib/lang/hr_system_config.lng
index a1a63e88dc..ef6c311473 100644
--- a/interface/web/admin/lib/lang/hr_system_config.lng
+++ b/interface/web/admin/lib/lang/hr_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/hu_system_config.lng b/interface/web/admin/lib/lang/hu_system_config.lng
index 65f673941f..32e4e4ac36 100644
--- a/interface/web/admin/lib/lang/hu_system_config.lng
+++ b/interface/web/admin/lib/lang/hu_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/id_system_config.lng b/interface/web/admin/lib/lang/id_system_config.lng
index 357ce174e6..bc618f8481 100644
--- a/interface/web/admin/lib/lang/id_system_config.lng
+++ b/interface/web/admin/lib/lang/id_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng
index 5d7cd32633..4268f5a47e 100644
--- a/interface/web/admin/lib/lang/it_system_config.lng
+++ b/interface/web/admin/lib/lang/it_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/ja_system_config.lng b/interface/web/admin/lib/lang/ja_system_config.lng
index 1887b69910..d9a7441cf1 100644
--- a/interface/web/admin/lib/lang/ja_system_config.lng
+++ b/interface/web/admin/lib/lang/ja_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng
index d5cd9e5c37..a6c7303477 100644
--- a/interface/web/admin/lib/lang/nl_system_config.lng
+++ b/interface/web/admin/lib/lang/nl_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/pl_system_config.lng b/interface/web/admin/lib/lang/pl_system_config.lng
index ace1b37973..c15c4d2756 100644
--- a/interface/web/admin/lib/lang/pl_system_config.lng
+++ b/interface/web/admin/lib/lang/pl_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/pt_system_config.lng b/interface/web/admin/lib/lang/pt_system_config.lng
index 6738dec45f..efc557257a 100644
--- a/interface/web/admin/lib/lang/pt_system_config.lng
+++ b/interface/web/admin/lib/lang/pt_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/ro_system_config.lng b/interface/web/admin/lib/lang/ro_system_config.lng
index c4a82405c9..e8ebe587ad 100644
--- a/interface/web/admin/lib/lang/ro_system_config.lng
+++ b/interface/web/admin/lib/lang/ro_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/ru_system_config.lng b/interface/web/admin/lib/lang/ru_system_config.lng
index 4dc033721c..b90d51e6f3 100644
--- a/interface/web/admin/lib/lang/ru_system_config.lng
+++ b/interface/web/admin/lib/lang/ru_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/se_system_config.lng b/interface/web/admin/lib/lang/se_system_config.lng
index b6d1768e00..fc150f53c6 100644
--- a/interface/web/admin/lib/lang/se_system_config.lng
+++ b/interface/web/admin/lib/lang/se_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/sk_system_config.lng b/interface/web/admin/lib/lang/sk_system_config.lng
index db488f2228..35ef9e370e 100644
--- a/interface/web/admin/lib/lang/sk_system_config.lng
+++ b/interface/web/admin/lib/lang/sk_system_config.lng
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/lib/lang/tr_system_config.lng b/interface/web/admin/lib/lang/tr_system_config.lng
index 64d81b2c69..f83a226a0b 100644
--- a/interface/web/admin/lib/lang/tr_system_config.lng
+++ b/interface/web/admin/lib/lang/tr_system_config.lng
@@ -102,4 +102,5 @@ $wb['btn_save_txt'] = 'Save';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
+$wb['show_support_messages_txt'] = 'Show message function in help module';
 ?>
diff --git a/interface/web/admin/templates/system_config_misc_edit.htm b/interface/web/admin/templates/system_config_misc_edit.htm
index ea8386c224..9d40dae5fc 100644
--- a/interface/web/admin/templates/system_config_misc_edit.htm
+++ b/interface/web/admin/templates/system_config_misc_edit.htm
@@ -84,6 +84,12 @@
     {tmpl_var name='use_combobox'}<br/>{tmpl_var name='f5_to_reload_js_txt'}
   </div>
 </div>
+<div class="form-group">
+  <label class="col-sm-3 control-label">{tmpl_var name='show_support_messages_txt'}</label>
+  <div class="col-sm-9">
+    {tmpl_var name='show_support_messages'}
+  </div>
+</div>
 <div class="form-group">
   <label for="customer_no_template" class="col-sm-3 control-label">{tmpl_var name='customer_no_template_txt'}</label>
   <div class="col-sm-9"><input type="text" name="customer_no_template" id="customer_no_template" value="{tmpl_var name='customer_no_template'}" class="form-control" /></div>
diff --git a/interface/web/help/lib/module.conf.php b/interface/web/help/lib/module.conf.php
index 7ef63baa03..559ac3b4ff 100644
--- a/interface/web/help/lib/module.conf.php
+++ b/interface/web/help/lib/module.conf.php
@@ -27,7 +27,7 @@ $module['tab_width'] = '';
 //*** Menu Definition *****************************************
 // read web config
 $app->uses('getconf');
-$global_config = $app->getconf->get_global_config('help');
+$global_config = $app->getconf->get_global_config('misc');
 if($global_config['show_support_messages'] == 'y') {
 	//* make sure that the items array is empty
 	$items = array();
-- 
GitLab


From d5a0f240289c78b3c066af7c5fc0086d4850004c Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 22 Oct 2020 12:03:41 -0600
Subject: [PATCH 074/441] check for conf-custom templates during update

---
 install/lib/update.lib.php | 47 ++++++++++++++++++++++++++++++++++++++
 install/update.php         | 10 ++++----
 2 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index 4dcb31cff1..a28de0b798 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -459,4 +459,51 @@ function check_service_config_state($servicename, $detected_value) {
 	} else return $current_state;
 }
 
+/**
+ * Check for existing conf-custom templates and offer to rename them.
+ */
+function checkAndRenameCustomTemplates($default_prompt='no') {
+	global $inst;
+	$ret = true;
+
+	$default_prompt = ($default_prompt == 'yes') ? 'yes' : 'no';
+
+	$template_directories = array(
+		'/usr/local/ispconfig/server/conf-custom',
+		'/usr/local/ispconfig/server/conf-custom/install',
+	);
+
+	$found_templates = array();
+	foreach ($template_directories as $dir) {
+		if (!is_dir($dir)) { continue; }
+		$output = array();
+		exec("find $dir -maxdepth 1 -name \*.master", $output);
+		foreach ($output as $f) {
+			if (is_file(trim($f))) {
+				$found_templates[] = trim($f);
+			}
+		}
+	}
+
+	if (count($found_templates) > 0) {
+		echo "The following custom templates were found:\n\n";
+		echo implode("\n", $found_templates) . "\n\n";
+
+		$answer = $inst->simple_query('Do you want to rename these conf-custom templates now so the default templates are used?', array('yes', 'no'), $default_prompt, 'rename_custom_templates');
+		if (strtolower($answer) == 'yes') {
+			$date=date('-Y-m-d_H-i');
+			foreach ($found_templates as $f) {
+				if (!rename($f, $f.$date)) {
+					echo "Error renaming template $f\n";
+					$ret = false;
+				}
+			}
+		} else {
+			$ret = null;
+		}
+	}
+
+	return $ret;
+}
+
 ?>
diff --git a/install/update.php b/install/update.php
index 685d52892f..c15678486f 100644
--- a/install/update.php
+++ b/install/update.php
@@ -370,6 +370,8 @@ $reconfigure_services_answer = $inst->simple_query('Reconfigure Services?', arra
 
 if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'selected') {
 
+	checkAndRenameCustomTemplates();
+
 	if($conf['services']['mail']) {
 
 		//** Configure postfix
@@ -483,10 +485,10 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel
 
 	}
 
-    if($conf['services']['xmpp'] && $inst->reconfigure_app('XMPP', $reconfigure_services_answer)) {
-        //** Configure Metronome XMPP
-        $inst->configure_xmpp('dont-create-certs');
-    }
+	if($conf['services']['xmpp'] && $inst->reconfigure_app('XMPP', $reconfigure_services_answer)) {
+		//** Configure Metronome XMPP
+	$inst->configure_xmpp('dont-create-certs');
+	}
 
 	if($conf['services']['firewall'] && $inst->reconfigure_app('Firewall', $reconfigure_services_answer)) {
 		if($conf['ufw']['installed'] == true) {
-- 
GitLab


From ab74ee2f66d4403bf3bb35bc9271c3e240719791 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 22 Oct 2020 14:44:55 -0600
Subject: [PATCH 075/441] filenames via glob()

---
 install/lib/update.lib.php | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index a28de0b798..6d67472fdd 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -476,11 +476,9 @@ function checkAndRenameCustomTemplates($default_prompt='no') {
 	$found_templates = array();
 	foreach ($template_directories as $dir) {
 		if (!is_dir($dir)) { continue; }
-		$output = array();
-		exec("find $dir -maxdepth 1 -name \*.master", $output);
-		foreach ($output as $f) {
-			if (is_file(trim($f))) {
-				$found_templates[] = trim($f);
+		foreach (glob("$dir/*.master") as $f) {
+			if (is_file($f)) {
+				$found_templates[] = $f;
 			}
 		}
 	}
-- 
GitLab


From a89b0e9392c843f7c5e3c1a768d043bd6fd72860 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 22 Oct 2020 13:37:06 -0600
Subject: [PATCH 076/441] fix rbl list updates

---
 .../postfix_server_plugin.inc.php             | 44 ++++++++++---------
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php
index 21a6a404ea..23373a1de0 100644
--- a/server/plugins-available/postfix_server_plugin.inc.php
+++ b/server/plugins-available/postfix_server_plugin.inc.php
@@ -110,36 +110,40 @@ class postfix_server_plugin {
 		}
 
 		if($mail_config['realtime_blackhole_list'] != $old_ini_data['mail']['realtime_blackhole_list']) {
-			$rbl_updated = false;
-			$rbl_hosts = trim(preg_replace('/\s+/', '', $mail_config['realtime_blackhole_list']));
-			if($rbl_hosts != ''){
-				$rbl_hosts = explode(",", $rbl_hosts);
-			}
+			# reject_rbl_client is now in smtpd_client_restrictions, remove here:
 			$options = preg_split("/,\s*/", exec("postconf -h smtpd_recipient_restrictions"));
 			$new_options = array();
 			foreach ($options as $key => $value) {
 				$value = trim($value);
 				if ($value == '') continue;
-				if (!preg_match('/reject_rbl_client/', $value)) {
-					$new_options[] = $value;
-				} else {
-					if(is_array($rbl_hosts) && !empty($rbl_hosts) && !$rbl_updated){
-						$rbl_updated = true;
-						foreach ($rbl_hosts as $key2 => $value2) {
-							$value2 = trim($value2);
-							if($value2 != '') $new_options[] = "reject_rbl_client ".$value2;
-						}
-					}
-				}
+				if (preg_match('/^reject_rbl_client/', $value)) continue;
+				$new_options[] = $value;
 			}
-			//* first time add rbl-list
-			if (!$rbl_updated && is_array($rbl_hosts) && !empty($rbl_hosts)) {
+			$app->system->exec_safe("postconf -e ?", 'smtpd_recipient_restrictions = '.implode(", ", $new_options));
+
+			$rbl_options = array();
+			$rbl_hosts = trim(preg_replace('/\s+/', '', $mail_config['realtime_blackhole_list']));
+			if($rbl_hosts != ''){
+				$rbl_hosts = explode(",", $rbl_hosts);
 				foreach ($rbl_hosts as $key => $value) {
 					$value = trim($value);
-					if($value != '') $new_options[] = "reject_rbl_client ".$value;
+					if($value != '') $rbl_options[] = "reject_rbl_client ".$value;
 				}
 			}
-			$app->system->exec_safe("postconf -e ?", 'smtpd_recipient_restrictions = '.implode(", ", $new_options));
+
+			$options = preg_split("/,\s*/", exec("postconf -h smtpd_client_restrictions"));
+			$new_options = array();
+			foreach ($options as $key => $value) {
+				$value = trim($value);
+				if ($value == '') continue;
+				if (preg_match('/^reject_rbl_client/', $value)) continue;
+				$new_options[] = $value;
+				if (preg_match('/^permit_mynetworks/', $value)) {
+					$new_options = array_merge($new_options, $rbl_options);
+					$rbl_options = array(); // so we don't ever array_merge twice
+				}
+			}
+			$app->system->exec_safe("postconf -e ?", 'smtpd_client_restrictions = '.implode(", ", $new_options));
 		}
 
 		if ($mail_config['reject_sender_login_mismatch'] != $old_ini_data['mail']['reject_sender_login_mismatch']) {
-- 
GitLab


From 8dc4ce14f1a90f0b88c5a27702566519f2e237f3 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 22 Oct 2020 15:15:59 -0600
Subject: [PATCH 077/441] remove stale "running" cronjobs

---
 server/lib/classes/cronjob.inc.php | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/server/lib/classes/cronjob.inc.php b/server/lib/classes/cronjob.inc.php
index 27bc7038cf..61d45749a8 100644
--- a/server/lib/classes/cronjob.inc.php
+++ b/server/lib/classes/cronjob.inc.php
@@ -99,6 +99,13 @@ class cronjob {
 		if($conf['log_priority'] <= LOGLEVEL_DEBUG) print "Called onPrepare() for class " . get_class($this) . "\n";
 		// check the run time and values for this job
 
+		// remove stale cronjobs
+		$data = $app->db->queryAllRecords("SELECT `last_run` FROM `sys_cron` WHERE `name` = ? AND (`last_run` IS NOT NULL AND `last_run` < DATE_SUB(NOW(), INTERVAL 24 HOUR)) AND `running` = 1", get_class($this));
+		foreach ($data as $rec) {
+			if($conf['log_priority'] <= LOGLEVEL_WARN) print "Removing stale sys_cron entry for ".get_class($this)." (last run ".$rec['last_run'].")\n";
+			$app->db->query("DELETE FROM `sys_cron` WHERE `name` = ? AND `last_run` = ? AND `running` = 1", $rec['name'], $rec['last_run']);
+		}
+
 		// get previous run data
 		$data = $app->db->queryOneRecord("SELECT `last_run`, `next_run`, IF(`last_run` IS NOT NULL AND `last_run` < DATE_SUB(NOW(), INTERVAL 24 HOUR), 0, `running`) as `running` FROM `sys_cron` WHERE `name` = ?", get_class($this));
 		if($data) {
-- 
GitLab


From b3e8b00928a92fdc41349328922a8cb3fa84c864 Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Fri, 23 Oct 2020 06:40:23 +0200
Subject: [PATCH 078/441] re-add server/lib/classes/letsencrypt.inc.php

---
 server/lib/classes/letsencrypt.inc.php | 545 +++++++++++++++++++++++++
 1 file changed, 545 insertions(+)
 create mode 100644 server/lib/classes/letsencrypt.inc.php

diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php
new file mode 100644
index 0000000000..3923954e10
--- /dev/null
+++ b/server/lib/classes/letsencrypt.inc.php
@@ -0,0 +1,545 @@
+<?php
+
+/*
+Copyright (c) 2017, Marius Burkard, projektfarm Gmbh
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+class letsencrypt {
+
+	/**
+	 * Construct for this class
+	 *
+	 * @return system
+	 */
+	private $base_path = '/etc/letsencrypt';
+	private $renew_config_path = '/etc/letsencrypt/renewal';
+	private $certbot_use_certcommand = false;
+
+	public function __construct(){
+
+	}
+
+	public function get_acme_script() {
+		$acme = explode("\n", shell_exec('which /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh'));
+		$acme = reset($acme);
+		if(is_executable($acme)) {
+			return $acme;
+		} else {
+			return false;
+		}
+	}
+
+	public function get_acme_command($domains, $key_file, $bundle_file, $cert_file, $server_type = 'apache') {
+		global $app, $conf;
+
+		$letsencrypt = $this->get_acme_script();
+
+		$cmd = '';
+		// generate cli format
+		foreach($domains as $domain) {
+			$cmd .= (string) " -d " . $domain;
+		}
+
+		if($cmd == '') {
+			return false;
+		}
+
+		if($server_type != 'apache' || version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) {
+			$cert_arg = '--fullchain-file ' . escapeshellarg($cert_file);
+		} else {
+			$cert_arg = '--fullchain-file ' . escapeshellarg($bundle_file) . ' --cert-file ' . escapeshellarg($cert_file);
+		}
+
+		$cmd = 'R=0 ; C=0 ; ' . $letsencrypt . ' --issue ' . $cmd . ' -w /usr/local/ispconfig/interface/acme --always-force-new-domain-key --keylength 4096; R=$? ; if [[ $R -eq 0 || $R -eq 2 ]] ; then ' . $letsencrypt . ' --install-cert ' . $cmd . ' --key-file ' . escapeshellarg($key_file) . ' ' . $cert_arg . ' --reloadcmd ' . escapeshellarg($this->get_reload_command()) . ' --log ' . escapeshellarg($conf['ispconfig_log_dir'].'/acme.log') . '; C=$? ; fi ; if [[ $C -eq 0 ]] ; then exit $R ; else exit $C  ; fi';
+
+		return $cmd;
+	}
+
+	public function get_certbot_script() {
+		$letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt /opt/eff.org/certbot/venv/bin/certbot'));
+		$letsencrypt = reset($letsencrypt);
+		if(is_executable($letsencrypt)) {
+			return $letsencrypt;
+		} else {
+			return false;
+		}
+	}
+
+	private function install_acme() {
+		$install_cmd = 'wget -O -  https://get.acme.sh | sh';
+		$ret = null;
+		$val = 0;
+		exec($install_cmd . ' 2>&1', $ret, $val);
+
+		return ($val == 0 ? true : false);
+	}
+
+	private function get_reload_command() {
+		global $app, $conf;
+
+		$web_config = $app->getconf->get_server_config($conf['server_id'], 'web');
+
+		$daemon = '';
+		switch ($web_config['server_type']) {
+			case 'nginx':
+				$daemon = $web_config['server_type'];
+				break;
+			default:
+				if(is_file($conf['init_scripts'] . '/' . 'httpd24-httpd') || is_dir('/opt/rh/httpd24/root/etc/httpd')) {
+					$daemon = 'httpd24-httpd';
+				} elseif(is_file($conf['init_scripts'] . '/' . 'httpd') || is_dir('/etc/httpd')) {
+					$daemon = 'httpd';
+				} else {
+					$daemon = 'apache2';
+				}
+		}
+
+		$cmd = $app->system->getinitcommand($daemon, 'force-reload');
+		return $cmd;
+	}
+
+	public function get_certbot_command($domains) {
+		global $app;
+
+		$letsencrypt = $this->get_certbot_script();
+
+		$cmd = '';
+		// generate cli format
+		foreach($domains as $domain) {
+			$cmd .= (string) " --domains " . $domain;
+		}
+
+		if($cmd == '') {
+			return false;
+		}
+
+		$matches = array();
+		$ret = null;
+		$val = 0;
+
+		$letsencrypt_version = exec($letsencrypt . ' --version  2>&1', $ret, $val);
+		if(preg_match('/^(\S+|\w+)\s+(\d+(\.\d+)+)$/', $letsencrypt_version, $matches)) {
+			$letsencrypt_version = $matches[2];
+		}
+		if (version_compare($letsencrypt_version, '0.22', '>=')) {
+			$acme_version = 'https://acme-v02.api.letsencrypt.org/directory';
+		} else {
+			$acme_version = 'https://acme-v01.api.letsencrypt.org/directory';
+		}
+		if (version_compare($letsencrypt_version, '0.30', '>=')) {
+			$app->log("LE version is " . $letsencrypt_version . ", so using certificates command", LOGLEVEL_DEBUG);
+			$this->certbot_use_certcommand = true;
+			$webroot_map = array();
+			for($i = 0; $i < count($domains); $i++) {
+				$webroot_map[$domains[$i]] = '/usr/local/ispconfig/interface/acme';
+			}
+			$webroot_args = "--webroot-map " . escapeshellarg(str_replace(array("\r", "\n"), '', json_encode($webroot_map)));
+		} else {
+			$webroot_args = "$cmd --webroot-path /usr/local/ispconfig/interface/acme";
+		}
+
+		$cmd = $letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server $acme_version --rsa-key-size 4096 --email postmaster@$domain $cmd --webroot-path /usr/local/ispconfig/interface/acme";
+
+		return $cmd;
+	}
+
+	public function get_letsencrypt_certificate_paths($domains = array()) {
+		global $app;
+
+		if($this->get_acme_script()) {
+			return false;
+		}
+
+		if(empty($domains)) return false;
+		if(!is_dir($this->renew_config_path)) return false;
+
+		$dir = opendir($this->renew_config_path);
+		if(!$dir) return false;
+
+		$path_scores = array();
+
+		$main_domain = reset($domains);
+		sort($domains);
+		$min_diff = false;
+
+		while($file = readdir($dir)) {
+			if($file === '.' || $file === '..' || substr($file, -5) !== '.conf')  continue;
+			$file_path = $this->renew_config_path . '/' . $file;
+			if(!is_file($file_path) || !is_readable($file_path)) continue;
+
+			$fp = fopen($file_path, 'r');
+			if(!$fp) continue;
+
+			$path_scores[$file_path] = array(
+				'domains' => array(),
+				'diff' => 0,
+				'has_main_domain' => false,
+				'cert_paths' => array(
+					'cert' => '',
+					'privkey' => '',
+					'chain' => '',
+					'fullchain' => ''
+				)
+			);
+			$in_list = false;
+			while(!feof($fp) && $line = fgets($fp)) {
+				$line = trim($line);
+				if($line === '') continue;
+				elseif(!$in_list) {
+					if($line == '[[webroot_map]]') $in_list = true;
+
+					$tmp = explode('=', $line, 2);
+					if(count($tmp) != 2) continue;
+					$key = trim($tmp[0]);
+					if($key == 'cert' || $key == 'privkey' || $key == 'chain' || $key == 'fullchain') {
+						$path_scores[$file_path]['cert_paths'][$key] = trim($tmp[1]);
+					}
+
+					continue;
+				}
+
+				$tmp = explode('=', $line, 2);
+				if(count($tmp) != 2) continue;
+
+				$domain = trim($tmp[0]);
+				if($domain == $main_domain) $path_scores[$file_path]['has_main_domain'] = true;
+				$path_scores[$file_path]['domains'][] = $domain;
+			}
+			fclose($fp);
+
+			sort($path_scores[$file_path]['domains']);
+			if(count(array_intersect($domains, $path_scores[$file_path]['domains'])) < 1) {
+				$path_scores[$file_path]['diff'] = false;
+			} else {
+				// give higher diff value to missing domains than to those that are too much in there
+				$path_scores[$file_path]['diff'] = (count(array_diff($domains, $path_scores[$file_path]['domains'])) * 1.5) + count(array_diff($path_scores[$file_path]['domains'], $domains));
+			}
+
+			if($min_diff === false || $path_scores[$file_path]['diff'] < $min_diff) $min_diff = $path_scores[$file_path]['diff'];
+		}
+		closedir($dir);
+
+		if($min_diff === false) return false;
+
+		$cert_paths = false;
+		$used_path = false;
+		foreach($path_scores as $path => $data) {
+			if($data['diff'] === $min_diff) {
+				$used_path = $path;
+				$cert_paths = $data['cert_paths'];
+				if($data['has_main_domain'] == true) break;
+			}
+		}
+
+		$app->log("Let's Encrypt Cert config path is: " . ($used_path ? $used_path : "not found") . ".", LOGLEVEL_DEBUG);
+
+		return $cert_paths;
+	}
+
+	private function get_ssl_domain($data) {
+		global $app;
+
+		$domain = $data['new']['ssl_domain'];
+		if(!$domain) {
+			$domain = $data['new']['domain'];
+		}
+
+		if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y') {
+			$domain = $data['new']['domain'];
+			if(substr($domain, 0, 2) === '*.') {
+				// wildcard domain not yet supported by letsencrypt!
+				$app->log('Wildcard domains not yet supported by letsencrypt, so changing ' . $domain . ' to ' . substr($domain, 2), LOGLEVEL_WARN);
+				$domain = substr($domain, 2);
+			}
+		}
+
+		return $domain;
+	}
+
+	public function get_website_certificate_paths($data) {
+		$ssl_dir = $data['new']['document_root'].'/ssl';
+		$domain = $this->get_ssl_domain($data);
+
+		$cert_paths = array(
+			'domain' => $domain,
+			'key' => $ssl_dir.'/'.$domain.'.key',
+			'key2' => $ssl_dir.'/'.$domain.'.key.org',
+			'csr' => $ssl_dir.'/'.$domain.'.csr',
+			'crt' => $ssl_dir.'/'.$domain.'.crt',
+			'bundle' => $ssl_dir.'/'.$domain.'.bundle'
+		);
+
+		if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y') {
+			$cert_paths = array(
+				'domain' => $domain,
+				'key' => $ssl_dir.'/'.$domain.'-le.key',
+				'key2' => $ssl_dir.'/'.$domain.'-le.key.org',
+				'crt' => $ssl_dir.'/'.$domain.'-le.crt',
+				'bundle' => $ssl_dir.'/'.$domain.'-le.bundle'
+			);
+		}
+
+		return $cert_paths;
+	}
+
+	public function request_certificates($data, $server_type = 'apache') {
+		global $app, $conf;
+
+		$app->uses('getconf');
+		$web_config = $app->getconf->get_server_config($conf['server_id'], 'web');
+		$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
+
+		$use_acme = false;
+		if($this->get_acme_script()) {
+			$use_acme = true;
+		} elseif(!$this->get_certbot_script()) {
+			// acme and le missing
+			$this->install_acme();
+		}
+
+		$tmp = $app->letsencrypt->get_website_certificate_paths($data);
+		$domain = $tmp['domain'];
+		$key_file = $tmp['key'];
+		$crt_file = $tmp['crt'];
+		$bundle_file = $tmp['bundle'];
+
+		// default values
+		$temp_domains = array($domain);
+		$cli_domain_arg = '';
+		$subdomains = null;
+		$aliasdomains = null;
+
+		//* be sure to have good domain
+		if(substr($domain,0,4) != 'www.' && ($data['new']['subdomain'] == "www" || $data['new']['subdomain'] == "*")) {
+			$temp_domains[] = "www." . $domain;
+		}
+
+		//* then, add subdomain if we have
+		$subdomains = $app->db->queryAllRecords('SELECT domain FROM web_domain WHERE parent_domain_id = '.intval($data['new']['domain_id'])." AND active = 'y' AND type = 'subdomain' AND ssl_letsencrypt_exclude != 'y'");
+		if(is_array($subdomains)) {
+			foreach($subdomains as $subdomain) {
+				$temp_domains[] = $subdomain['domain'];
+			}
+		}
+
+		//* then, add alias domain if we have
+		$aliasdomains = $app->db->queryAllRecords('SELECT domain,subdomain FROM web_domain WHERE parent_domain_id = '.intval($data['new']['domain_id'])." AND active = 'y' AND type = 'alias' AND ssl_letsencrypt_exclude != 'y'");
+		if(is_array($aliasdomains)) {
+			foreach($aliasdomains as $aliasdomain) {
+				$temp_domains[] = $aliasdomain['domain'];
+				if(isset($aliasdomain['subdomain']) && substr($aliasdomain['domain'],0,4) != 'www.' && ($aliasdomain['subdomain'] == "www" OR $aliasdomain['subdomain'] == "*")) {
+					$temp_domains[] = "www." . $aliasdomain['domain'];
+				}
+			}
+		}
+
+		// prevent duplicate
+		$temp_domains = array_unique($temp_domains);
+
+		// check if domains are reachable to avoid letsencrypt verification errors
+		$le_rnd_file = uniqid('le-') . '.txt';
+		$le_rnd_hash = md5(uniqid('le-', true));
+		if(!is_dir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/')) {
+			$app->system->mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/', false, 0755, true);
+		}
+		file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash);
+
+		$le_domains = array();
+		foreach($temp_domains as $temp_domain) {
+			if((isset($web_config['skip_le_check']) && $web_config['skip_le_check'] == 'y') || (isset($server_config['migration_mode']) && $server_config['migration_mode'] == 'y')) {
+				$le_domains[] = $temp_domain;
+			} else {
+				$le_hash_check = trim(@file_get_contents('http://' . $temp_domain . '/.well-known/acme-challenge/' . $le_rnd_file));
+				if($le_hash_check == $le_rnd_hash) {
+					$le_domains[] = $temp_domain;
+					$app->log("Verified domain " . $temp_domain . " should be reachable for letsencrypt.", LOGLEVEL_DEBUG);
+				} else {
+					$app->log("Could not verify domain " . $temp_domain . ", so excluding it from letsencrypt request.", LOGLEVEL_WARN);
+				}
+			}
+		}
+		$temp_domains = $le_domains;
+		unset($le_domains);
+		@unlink('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file);
+
+		$le_domain_count = count($temp_domains);
+		if($le_domain_count > 100) {
+			$temp_domains = array_slice($temp_domains, 0, 100);
+			$app->log("There were " . $le_domain_count . " domains in the domain list. LE only supports 100, so we strip the rest.", LOGLEVEL_WARN);
+		}
+
+		// unset useless data
+		unset($subdomains);
+		unset($aliasdomains);
+
+		$this->certbot_use_certcommand = false;
+		$letsencrypt_cmd = '';
+		$allow_return_codes = null;
+		if($use_acme) {
+			$letsencrypt_cmd = $this->get_acme_command($temp_domains, $key_file, $bundle_file, $crt_file, $server_type);
+			$allow_return_codes = array(2);
+		} else {
+			$letsencrypt_cmd = $this->get_certbot_command($temp_domains);
+		}
+
+		$success = false;
+		if($letsencrypt_cmd) {
+			if(!isset($server_config['migration_mode']) || $server_config['migration_mode'] != 'y') {
+				$app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG);
+				$app->log("Let's Encrypt SSL Cert domains: $cli_domain_arg", LOGLEVEL_DEBUG);
+
+				$success = $app->system->_exec($letsencrypt_cmd, $allow_return_codes);
+			} else {
+				$app->log("Migration mode active, skipping Let's Encrypt SSL Cert creation for: $domain", LOGLEVEL_DEBUG);
+				$success = true;
+			}
+		}
+
+		if($use_acme === true) {
+			if(!$success) {
+				$app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN);
+				$app->log($letsencrypt_cmd, LOGLEVEL_WARN);
+				return false;
+			} else {
+				return true;
+			}
+		}
+
+		$le_files = array();
+		if($this->certbot_use_certcommand === true && $letsencrypt_cmd) {
+			$cli_domain_arg = '';
+			// generate cli format
+			foreach($temp_domains as $temp_domain) {
+				$cli_domain_arg .= (string) " --domains " . $temp_domain;
+			}
+
+
+			$letsencrypt_cmd = $this->get_certbot_script() . " certificates " . $cli_domain_arg;
+			$output = explode("\n", shell_exec($letsencrypt_cmd . " 2>/dev/null | grep -v '^\$'"));
+			$le_path = '';
+			$skip_to_next = true;
+			$matches = null;
+			foreach($output as $outline) {
+				$outline = trim($outline);
+				$app->log("LE CERT OUTPUT: " . $outline, LOGLEVEL_DEBUG);
+
+				if($skip_to_next === true && !preg_match('/^\s*Certificate Name/', $outline)) {
+					continue;
+				}
+				$skip_to_next = false;
+
+				if(preg_match('/^\s*Expiry.*?VALID:\s+\D/', $outline)) {
+					$app->log("Found LE path is expired or invalid: " . $matches[1], LOGLEVEL_DEBUG);
+					$skip_to_next = true;
+					continue;
+				}
+
+				if(preg_match('/^\s*Certificate Path:\s*(\/.*?)\s*$/', $outline, $matches)) {
+					$app->log("Found LE path: " . $matches[1], LOGLEVEL_DEBUG);
+					$le_path = dirname($matches[1]);
+					if(is_dir($le_path)) {
+						break;
+					} else {
+						$le_path = false;
+					}
+				}
+			}
+
+			if($le_path) {
+				$le_files = array(
+					'privkey' => $le_path . '/privkey.pem',
+					'chain' => $le_path . '/chain.pem',
+					'cert' => $le_path . '/cert.pem',
+					'fullchain' => $le_path . '/fullchain.pem'
+				);
+			}
+		}
+		if(empty($le_files)) {
+			$le_files = $this->get_letsencrypt_certificate_paths($temp_domains);
+		}
+		unset($temp_domains);
+
+		if($server_type != 'apache' || version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) {
+			$crt_tmp_file = $le_files['fullchain'];
+		} else {
+			$crt_tmp_file = $le_files['cert'];
+		}
+
+		$key_tmp_file = $le_files['privkey'];
+		$bundle_tmp_file = $le_files['chain'];
+
+		if(!$success) {
+			// error issuing cert
+			$app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN);
+			$app->log($letsencrypt_cmd, LOGLEVEL_WARN);
+
+			// if cert already exists, dont remove it. Ex. expired/misstyped/noDnsYet alias domain, api down...
+			if(!file_exists($crt_tmp_file)) {
+				return false;
+			}
+		}
+
+		//* check is been correctly created
+		if(file_exists($crt_tmp_file)) {
+			$app->log("Let's Encrypt Cert file: $crt_tmp_file exists.", LOGLEVEL_DEBUG);
+			$date = date("YmdHis");
+
+			//* TODO: check if is a symlink, if target same keep it, either remove it
+			if(is_file($key_file)) {
+				$app->system->copy($key_file, $key_file.'.old.'.$date);
+				$app->system->chmod($key_file.'.old.'.$date, 0400);
+				$app->system->unlink($key_file);
+			}
+
+			if(@is_link($key_file)) $app->system->unlink($key_file);
+			if(@file_exists($key_tmp_file)) $app->system->exec_safe("ln -s ? ?", $key_tmp_file, $key_file);
+
+			if(is_file($crt_file)) {
+				$app->system->copy($crt_file, $crt_file.'.old.'.$date);
+				$app->system->chmod($crt_file.'.old.'.$date, 0400);
+				$app->system->unlink($crt_file);
+			}
+
+			if(@is_link($crt_file)) $app->system->unlink($crt_file);
+			if(@file_exists($crt_tmp_file))$app->system->exec_safe("ln -s ? ?", $crt_tmp_file, $crt_file);
+
+			if(is_file($bundle_file)) {
+				$app->system->copy($bundle_file, $bundle_file.'.old.'.$date);
+				$app->system->chmod($bundle_file.'.old.'.$date, 0400);
+				$app->system->unlink($bundle_file);
+			}
+
+			if(@is_link($bundle_file)) $app->system->unlink($bundle_file);
+			if(@file_exists($bundle_tmp_file)) $app->system->exec_safe("ln -s ? ?", $bundle_tmp_file, $bundle_file);
+
+			return true;
+		} else {
+			$app->log("Let's Encrypt Cert file: $crt_tmp_file does not exist.", LOGLEVEL_DEBUG);
+			return false;
+		}
+	}
+}
-- 
GitLab


From 4c72e3bc03904843bb5ae3c8b9b6024821d172c4 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 23 Oct 2020 09:35:02 +0200
Subject: [PATCH 079/441] Cipher suite should be configured globally, SSL
 Protocols are already defined in line 80.

---
 server/conf/vhost.conf.master | 2 --
 1 file changed, 2 deletions(-)

diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master
index aafb3fcb5a..023b726291 100644
--- a/server/conf/vhost.conf.master
+++ b/server/conf/vhost.conf.master
@@ -53,8 +53,6 @@
 		<IfModule mod_http2.c>
 			Protocols h2 http/1.1
 		</IfModule>
-		SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
-		SSLCipherSuite 'EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS'
 </tmpl_if>
 
 <tmpl_if name='logging' op='==' value='anon'>
-- 
GitLab


From 159f582011a437d284136928c2446fc62863b2cc Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 23 Oct 2020 09:44:45 +0200
Subject: [PATCH 080/441] Add Alias to make sure a global /mail alias does not
 interfere with ISPConfig UI

---
 install/dist/tpl/gentoo/apache_ispconfig.vhost.master | 2 ++
 install/tpl/apache_ispconfig.vhost.master             | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/install/dist/tpl/gentoo/apache_ispconfig.vhost.master b/install/dist/tpl/gentoo/apache_ispconfig.vhost.master
index 20e7b3b684..01b3b383d5 100644
--- a/install/dist/tpl/gentoo/apache_ispconfig.vhost.master
+++ b/install/dist/tpl/gentoo/apache_ispconfig.vhost.master
@@ -12,6 +12,8 @@
 <VirtualHost _default_:{vhost_port}>
   ServerAdmin webmaster@localhost
 
+  Alias /mail /var/www/ispconfig/mail
+  
   <IfModule mod_fcgid.c>
     DocumentRoot /var/www/ispconfig/
     SuexecUserGroup ispconfig ispconfig
diff --git a/install/tpl/apache_ispconfig.vhost.master b/install/tpl/apache_ispconfig.vhost.master
index cc177f5c48..0d12694f7a 100644
--- a/install/tpl/apache_ispconfig.vhost.master
+++ b/install/tpl/apache_ispconfig.vhost.master
@@ -9,6 +9,8 @@ NameVirtualHost *:<tmpl_var name="vhost_port">
 <VirtualHost _default_:<tmpl_var name="vhost_port">>
   ServerAdmin webmaster@localhost
 
+  Alias /mail /var/www/ispconfig/mail
+
   <Directory /var/www/ispconfig/>
     <FilesMatch "\.ph(p3?|tml)$">
       SetHandler None
-- 
GitLab


From 989f0d0c754730f3d65ea3ddfe537c5cede9753d Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 23 Oct 2020 11:22:48 +0200
Subject: [PATCH 081/441] Update
 server/lib/classes/cron.d/100-monitor_database_size.inc.php

---
 server/lib/classes/cron.d/100-monitor_database_size.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/classes/cron.d/100-monitor_database_size.inc.php b/server/lib/classes/cron.d/100-monitor_database_size.inc.php
index b5025ca4ca..3f0abed709 100644
--- a/server/lib/classes/cron.d/100-monitor_database_size.inc.php
+++ b/server/lib/classes/cron.d/100-monitor_database_size.inc.php
@@ -78,7 +78,7 @@ class cronjob_monitor_database_size extends cronjob {
 		$state = 'ok';
 
 		/** Fetch the data of all databases into an array */
-		$databases = $app->db->queryAllRecords("SELECT database_id, database_name, sys_groupid, database_quota, quota_exceeded FROM web_database WHERE server_id = ? GROUP BY sys_groupid, database_name ASC", $server_id);
+		$databases = $app->db->queryAllRecords("SELECT database_id, database_name, sys_groupid, database_quota, quota_exceeded FROM web_database WHERE server_id = ? ORDER BY sys_groupid, database_name ASC", $server_id);
 
 		if(is_array($databases) && !empty($databases)) {
 
-- 
GitLab


From 36a1ba92741613a4280cd08a03094d6ebaaa49b2 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 23 Oct 2020 13:48:17 +0200
Subject: [PATCH 082/441] Apply 1 suggestion(s) to 1 file(s)

---
 interface/web/dns/dns_dmarc_edit.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php
index 8b6f3a97b1..b2d07b0a9e 100644
--- a/interface/web/dns/dns_dmarc_edit.php
+++ b/interface/web/dns/dns_dmarc_edit.php
@@ -88,8 +88,8 @@ class page_action extends tform_actions {
 		$dmarc_sp = 'same';
 
 		//* check for an existing dmarc-record
-		$sql = "SELECT data, active FROM dns_rr WHERE data LIKE 'v=DMARC1%' AND zone = ? AND name LIKE ? AND " . $app->tform->getAuthSQL('r');
-		$rec = $app->db->queryOneRecord($sql, $zone, '_dmarc%');
+		$sql = "SELECT data, active FROM dns_rr WHERE data LIKE 'v=DMARC1%' AND zone = ? AND name LIKE ? AND " . $app->tform->getAuthSQL('r') . " ORDER BY (name = ?) DESC";
+		$rec = $app->db->queryOneRecord($sql, $zone, '_dmarc%', '_dmarc.'.$domain_name.'.');
 		if (isset($rec) && !empty($rec) ) {
 			$this->id = 1;
 			$old_data = strtolower($rec['data']);
-- 
GitLab


From 82762809af977be0a52fb2f6843b43ca042f0df0 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 23 Oct 2020 13:58:54 +0200
Subject: [PATCH 083/441] Apply 1 suggestion(s) to 1 file(s)

---
 server/lib/classes/system.inc.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 20bdd08bc7..b19cc1d566 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2744,6 +2744,7 @@ $app->log("delete_jailkit_chroot called for $home_dir with options ".print_r($op
 			switch ($opt) {
 			default:
 				if (preg_match('@^skip[ =]/?(.+)$@', $opt, $matches) ) {
+					$matches[1] = ltrim($matches[1], '/');
 					if (in_array($matches[1], $jailkit_directories)) {
 						$app->log("delete_jailkit_chroot: skipping removal of jailkit directory .$home_dir/".$matches[1]
 							. "; if this is in use as a web folder, it is insecure and should be fixed.", LOGLEVEL_WARN);
-- 
GitLab


From a0796838815f5a7084501b9b2cdd68c0333b11fb Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 23 Oct 2020 14:12:36 +0200
Subject: [PATCH 084/441] Add slash to allowed characters for mail filter
 target

---
 interface/web/mail/form/mail_user_filter.tform.php     | 2 +-
 interface/web/mailuser/form/mail_user_filter.tform.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/mail/form/mail_user_filter.tform.php b/interface/web/mail/form/mail_user_filter.tform.php
index 0b10799163..1e5980af2d 100644
--- a/interface/web/mail/form/mail_user_filter.tform.php
+++ b/interface/web/mail/form/mail_user_filter.tform.php
@@ -121,7 +121,7 @@ $form["tabs"]['filter'] = array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
 			'validators' => array (  0 => array ( 'type' => 'REGEX',
-					'regex' => '/^[\p{Latin}0-9\.\-\_\ \&]{0,100}$/u',
+					'regex' => '/^[\p{Latin}0-9\.\-\_\ \&\/]{0,100}$/u',
 					'errmsg'=> 'target_error_regex'),
 			),
 			'default' => '',
diff --git a/interface/web/mailuser/form/mail_user_filter.tform.php b/interface/web/mailuser/form/mail_user_filter.tform.php
index 0f454fa6f7..ec693fff36 100644
--- a/interface/web/mailuser/form/mail_user_filter.tform.php
+++ b/interface/web/mailuser/form/mail_user_filter.tform.php
@@ -122,7 +122,7 @@ $form["tabs"]['filter'] = array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
 			'validators' => array (  0 => array ( 'type' => 'REGEX',
-					'regex' => '/^[\p{Latin}0-9\.\-\_\ \&]{0,100}$/u',
+					'regex' => '/^[\p{Latin}0-9\.\-\_\ \&\/]{0,100}$/u',
 					'errmsg'=> 'target_error_regex'),
 			),
 			'default' => '',
-- 
GitLab


From 4d173628499ef30f7ab33543dc4ddae46f4ed602 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Fri, 23 Oct 2020 16:17:04 +0200
Subject: [PATCH 085/441] Allow setting dnssec_wanted in wizard template
 (#5856)

---
 interface/web/dns/dns_wizard.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php
index b2320dc6bf..4aa0644020 100644
--- a/interface/web/dns/dns_wizard.php
+++ b/interface/web/dns/dns_wizard.php
@@ -323,7 +323,9 @@ if($_POST['create'] == 1) {
 	if($_POST['ns1'] != '') $tpl_content = str_replace('{NS1}', $_POST['ns1'], $tpl_content);
 	if($_POST['ns2'] != '') $tpl_content = str_replace('{NS2}', $_POST['ns2'], $tpl_content);
 	if($_POST['email'] != '') $tpl_content = str_replace('{EMAIL}', $_POST['email'], $tpl_content);
-	$enable_dnssec = (($_POST['dnssec'] == 'Y') ? 'Y' : 'N');
+	// $enable_dnssec = (($_POST['dnssec'] == 'Y') ? 'Y' : 'N');
+	// if(isset($_POST['dnssec'])) $vars['dnssec_wanted'] = 'Y';
+	if(isset($_POST['dnssec'])) $tpl_content = str_replace('[ZONE]', '[ZONE]'."\n".'dnssec_wanted=Y', $tpl_content);
 	if(isset($_POST['dkim']) && preg_match('/^[\w\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,63}[\.]{0,1}$/', $_POST['domain'])) {
 		$sql = $app->db->queryOneRecord("SELECT dkim_public, dkim_selector FROM mail_domain WHERE domain = ? AND dkim = 'y' AND ".$app->tform->getAuthSQL('r'), $_POST['domain']);
 		$public_key = $sql['dkim_public'];
@@ -339,6 +341,7 @@ if($_POST['create'] == 1) {
 	$section = '';
 	$vars = array();
 	$vars['xfer']='';
+	$vars['dnssec_wanted']='';
 	$vars['dnssec_algo']='ECDSAP256SHA256';
 	$dns_rr = array();
 	foreach($tpl_rows as $row) {
@@ -399,6 +402,7 @@ if($_POST['create'] == 1) {
 		$xfer = $vars['xfer'];
 		$also_notify = $vars['also_notify'];
 		$update_acl = $vars['update_acl'];
+		$dnssec_wanted = $vars['dnssec_wanted'];
 		$dnssec_algo = $vars['dnssec_algo'];
 		$serial = $app->validate_dns->increase_serial(0);
 
@@ -422,7 +426,7 @@ if($_POST['create'] == 1) {
 			"xfer" => $xfer,
 			"also_notify" => $also_notify,
 			"update_acl" => $update_acl,
-			"dnssec_wanted" => $enable_dnssec,
+			"dnssec_wanted" => $dnssec_wanted,
 			"dnssec_algo" => $dnssec_algo
 		);
 		$dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id');
-- 
GitLab


From 9b6d055fada50eb5dede9854e1f976336c54a67b Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Fri, 23 Oct 2020 16:20:10 +0200
Subject: [PATCH 086/441] Save zone instead of save record for new zone save
 btn

---
 interface/web/dns/lib/lang/ar_dns_wizard.lng | 2 +-
 interface/web/dns/lib/lang/dk_dns_wizard.lng | 2 +-
 interface/web/dns/lib/lang/en_dns_wizard.lng | 2 +-
 interface/web/dns/lib/lang/se_dns_wizard.lng | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/interface/web/dns/lib/lang/ar_dns_wizard.lng b/interface/web/dns/lib/lang/ar_dns_wizard.lng
index 800477dbe9..1c416ebddd 100644
--- a/interface/web/dns/lib/lang/ar_dns_wizard.lng
+++ b/interface/web/dns/lib/lang/ar_dns_wizard.lng
@@ -2,7 +2,7 @@
 $wb['template_id_txt'] = 'Template';
 $wb['server_id_txt'] = 'Server';
 $wb['client_txt'] = 'Client';
-$wb['btn_save_txt'] = 'Create DNS Record';
+$wb['btn_save_txt'] = 'Create new DNS zone';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['domain_txt'] = 'Domain';
 $wb['email_txt'] = 'Email';
diff --git a/interface/web/dns/lib/lang/dk_dns_wizard.lng b/interface/web/dns/lib/lang/dk_dns_wizard.lng
index 0448db2d8c..7eff253537 100644
--- a/interface/web/dns/lib/lang/dk_dns_wizard.lng
+++ b/interface/web/dns/lib/lang/dk_dns_wizard.lng
@@ -5,7 +5,7 @@ $wb['dns_zone_txt'] = 'DNS Zone';
 $wb['template_id_txt'] = 'Skabelon';
 $wb['server_id_txt'] = 'Server';
 $wb['client_txt'] = 'Kunde';
-$wb['btn_save_txt'] = 'Create DNS-Record';
+$wb['btn_save_txt'] = 'Create new DNS zone';
 $wb['btn_cancel_txt'] = 'Annullere';
 $wb['domain_txt'] = 'Domæne';
 $wb['email_txt'] = 'E-mail';
diff --git a/interface/web/dns/lib/lang/en_dns_wizard.lng b/interface/web/dns/lib/lang/en_dns_wizard.lng
index 2f771fcb01..1acad286e5 100644
--- a/interface/web/dns/lib/lang/en_dns_wizard.lng
+++ b/interface/web/dns/lib/lang/en_dns_wizard.lng
@@ -5,7 +5,7 @@ $wb['dns_zone_txt'] = 'DNS Zone';
 $wb['template_id_txt'] = 'Template';
 $wb['server_id_txt'] = 'Server';
 $wb['client_txt'] = 'Client';
-$wb['btn_save_txt'] = 'Create DNS-Record';
+$wb['btn_save_txt'] = 'Create new DNS zone';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['domain_txt'] = 'Domain';
 $wb['email_txt'] = 'Email';
diff --git a/interface/web/dns/lib/lang/se_dns_wizard.lng b/interface/web/dns/lib/lang/se_dns_wizard.lng
index 800477dbe9..1c416ebddd 100644
--- a/interface/web/dns/lib/lang/se_dns_wizard.lng
+++ b/interface/web/dns/lib/lang/se_dns_wizard.lng
@@ -2,7 +2,7 @@
 $wb['template_id_txt'] = 'Template';
 $wb['server_id_txt'] = 'Server';
 $wb['client_txt'] = 'Client';
-$wb['btn_save_txt'] = 'Create DNS Record';
+$wb['btn_save_txt'] = 'Create new DNS zone';
 $wb['btn_cancel_txt'] = 'Cancel';
 $wb['domain_txt'] = 'Domain';
 $wb['email_txt'] = 'Email';
-- 
GitLab


From d81a38a77d46614da63b6ae8d903b04c35306d13 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Fri, 23 Oct 2020 16:55:03 +0200
Subject: [PATCH 087/441] Move Allowed SSH authentication from Main Config ->
 Misc to Main Config -> Sites (#5850)

---
 install/tpl/system.ini.master                        |  2 +-
 interface/web/admin/form/system_config.tform.php     | 12 ++++++------
 .../web/admin/templates/system_config_misc_edit.htm  |  7 -------
 .../web/admin/templates/system_config_sites_edit.htm |  7 +++++++
 interface/web/sites/shell_user_edit.php              |  6 +++---
 5 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master
index e2465a4a4b..c2fed82d7b 100644
--- a/install/tpl/system.ini.master
+++ b/install/tpl/system.ini.master
@@ -36,6 +36,7 @@ reseller_can_use_options=n
 web_php_options=no,fast-cgi,mod,php-fpm
 show_aps_menu=n
 client_protection=y
+ssh_authentication=ssh_authentication_password_key
 
 
 [tools]
@@ -71,4 +72,3 @@ session_timeout=0
 session_allow_endless=0
 min_password_length=8
 min_password_strength=3
-ssh_authentication=
diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index 530a0452ce..2c7ed66f73 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -235,6 +235,12 @@ $form["tabs"]['sites'] = array (
 			'separator' => ',',
 			'value'  => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM', 'hhvm' => 'HHVM')
 		),
+		'ssh_authentication' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'SELECT',
+			'default' => 'ssh_authentication_password_key',
+			'value'  => array('' => 'ssh_authentication_password_key', 'password' => 'ssh_authentication_password', 'key' => 'ssh_authentication_key')
+		)
 		//#################################
 		// END Datatable fields
 		//#################################
@@ -772,12 +778,6 @@ $form["tabs"]['misc'] = array (
 			'formtype' => 'SELECT',
 			'default' => '',
 			'value'  => array('' => 'None', '1' => 'strength_1', '2' => 'strength_2', '3' => 'strength_3', '4' => 'strength_4', '5' => 'strength_5')
-		),
-		'ssh_authentication' => array(
-			'datatype' => 'VARCHAR',
-			'formtype' => 'SELECT',
-			'default' => '',
-			'value'  => array('' => 'ssh_authentication_password_key', 'password' => 'ssh_authentication_password', 'key' => 'ssh_authentication_key')
 		)
 		//#################################
 		// END Datatable fields
diff --git a/interface/web/admin/templates/system_config_misc_edit.htm b/interface/web/admin/templates/system_config_misc_edit.htm
index 9d40dae5fc..5c57eeb9a6 100644
--- a/interface/web/admin/templates/system_config_misc_edit.htm
+++ b/interface/web/admin/templates/system_config_misc_edit.htm
@@ -123,13 +123,6 @@
     </select>
   </div>
 </div>
-<div class="form-group">
-  <label for="ssh_authentication" class="col-sm-3 control-label">{tmpl_var name='ssh_authentication_txt'}</label>
-  <div class="col-sm-9"><select name="ssh_authentication" id="ssh_authentication" class="form-control">
-    {tmpl_var name='ssh_authentication'}
-    </select>
-  </div>
-</div>
 <div class="form-group">
   <label class="col-sm-3 control-label">{tmpl_var name='maintenance_mode_txt'}</label>
   <div class="col-sm-9">
diff --git a/interface/web/admin/templates/system_config_sites_edit.htm b/interface/web/admin/templates/system_config_sites_edit.htm
index c84b50e6b8..b261cfdab1 100644
--- a/interface/web/admin/templates/system_config_sites_edit.htm
+++ b/interface/web/admin/templates/system_config_sites_edit.htm
@@ -90,6 +90,13 @@
                 <label for="default_remote_dbserver" class="col-sm-3 control-label">{tmpl_var name='default_remote_dbserver_txt'}</label>
                 <div class="col-sm-9"><input type="text" name="default_remote_dbserver" id="default_remote_dbserver" value="{tmpl_var name='default_remote_dbserver'}" class="form-control" /></div>
 	    </div>
+      <div class="form-group">
+        <label for="ssh_authentication" class="col-sm-3 control-label">{tmpl_var name='ssh_authentication_txt'}</label>
+        <div class="col-sm-9"><select name="ssh_authentication" id="ssh_authentication" class="form-control">
+          {tmpl_var name='ssh_authentication'}
+          </select>
+        </div>
+      </div>
 
 
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
diff --git a/interface/web/sites/shell_user_edit.php b/interface/web/sites/shell_user_edit.php
index 055676ad95..cb6aa3024c 100644
--- a/interface/web/sites/shell_user_edit.php
+++ b/interface/web/sites/shell_user_edit.php
@@ -97,7 +97,7 @@ class page_action extends tform_actions {
 			$app->tpl->setVar("edit_disabled", 0);
 		}
 
-		$app->tpl->setVar('ssh_authentication', $system_config['misc']['ssh_authentication']);
+		$app->tpl->setVar('ssh_authentication', $system_config['sites']['ssh_authentication']);
 
 		parent::onShowEnd();
 	}
@@ -151,7 +151,7 @@ class page_action extends tform_actions {
 			}
 		}
 		unset($blacklist);
-		
+
 		if($app->functions->is_allowed_user(trim(strtolower($this->dataRecord['username']))) == false) $app->tform->errorMessage .= $app->tform->lng('username_not_allowed_txt');
 
 		/*
@@ -181,7 +181,7 @@ class page_action extends tform_actions {
 		$dir = $web["document_root"];
 		$uid = $web["system_user"];
 		$gid = $web["system_group"];
-		
+
 		// Check system user and group
 		if($app->functions->is_allowed_user($uid) == false || $app->functions->is_allowed_group($gid) == false) {
 			$app->error($app->tform->lng('invalid_system_user_or_group_txt'));
-- 
GitLab


From acca0944d160de117966d68249f4e8f604a0bf2f Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Fri, 23 Oct 2020 16:56:30 +0200
Subject: [PATCH 088/441] Default for ssh_authentication should be empty
 (#5850)

---
 install/tpl/system.ini.master                    | 2 +-
 interface/web/admin/form/system_config.tform.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master
index c2fed82d7b..bbd78e6b3a 100644
--- a/install/tpl/system.ini.master
+++ b/install/tpl/system.ini.master
@@ -36,7 +36,7 @@ reseller_can_use_options=n
 web_php_options=no,fast-cgi,mod,php-fpm
 show_aps_menu=n
 client_protection=y
-ssh_authentication=ssh_authentication_password_key
+ssh_authentication=
 
 
 [tools]
diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index 2c7ed66f73..2e62900fd9 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -238,7 +238,7 @@ $form["tabs"]['sites'] = array (
 		'ssh_authentication' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'SELECT',
-			'default' => 'ssh_authentication_password_key',
+			'default' => '',
 			'value'  => array('' => 'ssh_authentication_password_key', 'password' => 'ssh_authentication_password', 'key' => 'ssh_authentication_key')
 		)
 		//#################################
-- 
GitLab


From 137ba9a885be5f268d74f95b5859c44ad782da3c Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Fri, 23 Oct 2020 18:07:33 +0200
Subject: [PATCH 089/441] Send overtraffic warning only when web is not
 disabled (#3937)

---
 server/conf/mail/web_traffic_notification_warn_en.txt |  8 ++++++++
 server/conf/mail/web_traffic_notification_warn_nl.txt |  8 ++++++++
 server/lib/classes/cron.d/300-quota_notify.inc.php    | 10 +++++++++-
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 server/conf/mail/web_traffic_notification_warn_en.txt
 create mode 100644 server/conf/mail/web_traffic_notification_warn_nl.txt

diff --git a/server/conf/mail/web_traffic_notification_warn_en.txt b/server/conf/mail/web_traffic_notification_warn_en.txt
new file mode 100644
index 0000000000..f69d906dab
--- /dev/null
+++ b/server/conf/mail/web_traffic_notification_warn_en.txt
@@ -0,0 +1,8 @@
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: Website traffic notification
+
+The website {domain} is over traffic.
diff --git a/server/conf/mail/web_traffic_notification_warn_nl.txt b/server/conf/mail/web_traffic_notification_warn_nl.txt
new file mode 100644
index 0000000000..02d9a03c2f
--- /dev/null
+++ b/server/conf/mail/web_traffic_notification_warn_nl.txt
@@ -0,0 +1,8 @@
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: Webverkeerslimiet bereikt
+
+De website {domain} heeft het verkeerslimiet voor deze maand bereikt.
diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php
index ad18f17c9b..bd6a410309 100644
--- a/server/lib/classes/cron.d/300-quota_notify.inc.php
+++ b/server/lib/classes/cron.d/300-quota_notify.inc.php
@@ -86,6 +86,9 @@ class cronjob_quota_notify extends cronjob {
 							$app->dbmaster->datalogUpdate('web_domain', array("traffic_quota_lock" => 'y', "active" => 'n'), 'domain_id', $rec['domain_id']);
 							$app->log('Traffic quota for '.$rec['domain'].' exceeded. Disabling website.', LOGLEVEL_DEBUG);
 						}
+						else {
+							$app->log('Traffic quota for '.$rec['domain'].' exceeded.', LOGLEVEL_DEBUG);
+						}
 						//* Send traffic notifications
 						if($rec['traffic_quota_lock'] != 'y' && ($web_config['overtraffic_notify_admin'] == 'y' || $web_config['overtraffic_notify_client'] == 'y')) {
 
@@ -111,7 +114,12 @@ class cronjob_quota_notify extends cronjob {
 								}
 							}
 
-							$this->_tools->send_notification_email('web_traffic_notification', $placeholders, $recipients);
+							if ($web_config['overtraffic_disable_web'] == 'y') {
+								$this->_tools->send_notification_email('web_traffic_notification', $placeholders, $recipients);
+							}
+							else {
+								$this->_tools->send_notification_email('web_traffic_notification_warn', $placeholders, $recipients);
+							}
 						}
 
 					} else {
-- 
GitLab


From 9d8bd6fc838c053e9015a1cf706647a709ee6788 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 23 Oct 2020 19:35:56 +0200
Subject: [PATCH 090/441] - added allowed characters to error msg

---
 interface/web/mail/lib/lang/ar_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/bg_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/ca_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/cz_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/de_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/dk_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/el_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/en_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/es_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/fi_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/fr_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/hr_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/hu_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/id_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/it_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/ja_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/nl_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/pl_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/ro_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/se_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/sk_mail_user_filter.lng     | 2 +-
 interface/web/mail/lib/lang/tr_mail_user_filter.lng     | 2 +-
 interface/web/mailuser/lib/lang/ar_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/bg_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/ca_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/cz_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/de_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/dk_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/el_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/en_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/es_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/fi_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/fr_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/hr_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/hu_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/id_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/it_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/ja_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/nl_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/pl_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/pt_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/ro_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/se_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/sk_mail_user_filter.lng | 2 +-
 interface/web/mailuser/lib/lang/tr_mail_user_filter.lng | 2 +-
 45 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/interface/web/mail/lib/lang/ar_mail_user_filter.lng b/interface/web/mail/lib/lang/ar_mail_user_filter.lng
index bed377b2f6..b813c0e82e 100644
--- a/interface/web/mail/lib/lang/ar_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/ar_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mail/lib/lang/bg_mail_user_filter.lng b/interface/web/mail/lib/lang/bg_mail_user_filter.lng
index ed7d137db0..2480794e6c 100644
--- a/interface/web/mail/lib/lang/bg_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/bg_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Активен';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'Позволените символи са: a-z, 0-9, -, ., _, и {интервал}';
+$wb['target_error_regex'] = 'Позволените символи са: a-z, 0-9, -, ., _, &, /, и {интервал}';
 $wb['limit_mailfilter_txt'] = 'Максималният брой на емайл филтрите е достигнат.';
 $wb['subject_txt'] = 'Тема';
 $wb['from_txt'] = 'От';
diff --git a/interface/web/mail/lib/lang/ca_mail_user_filter.lng b/interface/web/mail/lib/lang/ca_mail_user_filter.lng
index 3aaa7f1665..861e72bf8a 100644
--- a/interface/web/mail/lib/lang/ca_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/ca_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Actif';
 $wb['rulename_error_empty'] = 'Le nom est vide.';
 $wb['searchterm_is_empty'] = 'Le terme recherché est vide.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'La cible ne peut contenir que ces caractères : a-z, 0-9, -, ., _, et {espace}';
+$wb['target_error_regex'] = 'La cible ne peut contenir que ces caractères : a-z, 0-9, -, ., _, &, /, et {espace}';
 $wb['limit_mailfilter_txt'] = 'Le nombre max de filtres courriel est atteint.';
 $wb['subject_txt'] = 'Sujet';
 $wb['from_txt'] = 'De';
diff --git a/interface/web/mail/lib/lang/cz_mail_user_filter.lng b/interface/web/mail/lib/lang/cz_mail_user_filter.lng
index 3d56a9b839..156807f711 100644
--- a/interface/web/mail/lib/lang/cz_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/cz_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktivní';
 $wb['rulename_error_empty'] = 'Název je prázdný.';
 $wb['searchterm_is_empty'] = 'Vyhledávací řádek je prázdný.';
 $wb['source_txt'] = 'Zdroj';
-$wb['target_error_regex'] = 'Cíl může obsahovat jen tyto znaky: a-z, 0-9, -, ., _, a {mezeru}';
+$wb['target_error_regex'] = 'Cíl může obsahovat jen tyto znaky: a-z, 0-9, -, ., _, &, /, a {mezeru}';
 $wb['limit_mailfilter_txt'] = 'Byl dosažen max. počet e-mailový filtrovacích pravidel.';
 $wb['subject_txt'] = 'Předmět';
 $wb['from_txt'] = 'Odesílatel';
diff --git a/interface/web/mail/lib/lang/de_mail_user_filter.lng b/interface/web/mail/lib/lang/de_mail_user_filter.lng
index 579a867e98..ab9dafd84b 100644
--- a/interface/web/mail/lib/lang/de_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/de_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktiv';
 $wb['rulename_error_empty'] = 'Name ist leer.';
 $wb['searchterm_is_empty'] = 'Suchbegriff ist leer.';
 $wb['source_txt'] = 'Quelle';
-$wb['target_error_regex'] = 'Das Ziel beinhaltet wahrscheinlich diese Zeichen: a-z, 0-9, -, ., _, und {raum}';
+$wb['target_error_regex'] = 'Das Ziel beinhaltet wahrscheinlich diese Zeichen: a-z, 0-9, -, ., _, &, /, und {raum}';
 $wb['limit_mailfilter_txt'] = 'Die maximale Anzahl an E-Mail Filtern für Ihr Konto wurde erreicht.';
 $wb['subject_txt'] = 'Betreff';
 $wb['from_txt'] = 'Von';
diff --git a/interface/web/mail/lib/lang/dk_mail_user_filter.lng b/interface/web/mail/lib/lang/dk_mail_user_filter.lng
index 8da1a24201..2c10563877 100644
--- a/interface/web/mail/lib/lang/dk_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/dk_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktiv';
 $wb['rulename_error_empty'] = 'Navn er tomt.';
 $wb['searchterm_is_empty'] = 'Søgetermer er tomme.';
 $wb['source_txt'] = 'Kilde';
-$wb['target_error_regex'] = 'Målet må kun indeholde disse tegn: a-z, 0-9, -, ., _, og {space}';
+$wb['target_error_regex'] = 'Målet må kun indeholde disse tegn: a-z, 0-9, -, ., _, &, /, og {space}';
 $wb['limit_mailfilter_txt'] = 'Max. antal af mailfiltere er nået.';
 $wb['subject_txt'] = 'Emne';
 $wb['from_txt'] = 'Fra';
diff --git a/interface/web/mail/lib/lang/el_mail_user_filter.lng b/interface/web/mail/lib/lang/el_mail_user_filter.lng
index c3c232362e..913105e63d 100644
--- a/interface/web/mail/lib/lang/el_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/el_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Ενεργό';
 $wb['rulename_error_empty'] = 'Το όνομα δεν έχει οριστεί.';
 $wb['searchterm_is_empty'] = 'Ο όρος αναζήτησης δεν έχει οριστεί.';
 $wb['source_txt'] = 'Πηγή';
-$wb['target_error_regex'] = 'Ο προορισμός μπορεί να περιέχει μόνο αυτούς τους χαρακτήρες: a-z, 0-9, -, ., _, και {κενό}';
+$wb['target_error_regex'] = 'Ο προορισμός μπορεί να περιέχει μόνο αυτούς τους χαρακτήρες: a-z, 0-9, -, ., _, &, /, και {κενό}';
 $wb['limit_mailfilter_txt'] = 'Έχετε φτάσει το μέγιστο πλήθος των φίλτρων mail.';
 $wb['subject_txt'] = 'Θέμα';
 $wb['from_txt'] = 'Από';
diff --git a/interface/web/mail/lib/lang/en_mail_user_filter.lng b/interface/web/mail/lib/lang/en_mail_user_filter.lng
index af9c8665cd..744ce29c5b 100644
--- a/interface/web/mail/lib/lang/en_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/en_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mail/lib/lang/es_mail_user_filter.lng b/interface/web/mail/lib/lang/es_mail_user_filter.lng
index 4e50fbceff..488cd6836c 100644
--- a/interface/web/mail/lib/lang/es_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/es_mail_user_filter.lng
@@ -23,7 +23,7 @@ $wb['size_under_txt'] = 'Tamaño del correo inferior a (KB)';
 $wb['source_txt'] = 'Origen';
 $wb['stop_txt'] = 'Detener';
 $wb['subject_txt'] = 'Asunto';
-$wb['target_error_regex'] = 'El destino solo puede contener los siguientes caracteres: a-z, 0-9, -, ., _, y {espacio}';
+$wb['target_error_regex'] = 'El destino solo puede contener los siguientes caracteres: a-z, 0-9, -, ., _, &, /, y {espacio}';
 $wb['target_txt'] = 'Carpeta';
 $wb['to_txt'] = 'Para';
 $wb['list_id_txt'] = 'List ID';
diff --git a/interface/web/mail/lib/lang/fi_mail_user_filter.lng b/interface/web/mail/lib/lang/fi_mail_user_filter.lng
index 5315bc6f1e..814c92e892 100644
--- a/interface/web/mail/lib/lang/fi_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/fi_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Käytössä';
 $wb['rulename_error_empty'] = 'Säännön nimi on tyhjä.';
 $wb['searchterm_is_empty'] = 'Hakusana on tyhjä.';
 $wb['source_txt'] = 'Lähde';
-$wb['target_error_regex'] = 'Kohde voi sisältää vain merkkejä a-z, 0-9, -, ., _, ja {välilyönti}';
+$wb['target_error_regex'] = 'Kohde voi sisältää vain merkkejä a-z, 0-9, -, ., _, &, /, ja {välilyönti}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mail/lib/lang/fr_mail_user_filter.lng b/interface/web/mail/lib/lang/fr_mail_user_filter.lng
index 324d6f3c78..3f8908c64d 100644
--- a/interface/web/mail/lib/lang/fr_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/fr_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Actif';
 $wb['rulename_error_empty'] = 'Le nom est vide.';
 $wb['searchterm_is_empty'] = 'Le terme recherché est vide.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'La cible ne peut contenir que ces caractères : a-z, 0-9, -, ., _, et {espace}';
+$wb['target_error_regex'] = 'La cible ne peut contenir que ces caractères : a-z, 0-9, -, ., _, &, /, et {espace}';
 $wb['limit_mailfilter_txt'] = 'Le nombre max de filtres e-mail est atteint.';
 $wb['subject_txt'] = 'Sujet';
 $wb['from_txt'] = 'De';
diff --git a/interface/web/mail/lib/lang/hr_mail_user_filter.lng b/interface/web/mail/lib/lang/hr_mail_user_filter.lng
index 55e46fab91..2aac4da39d 100644
--- a/interface/web/mail/lib/lang/hr_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/hr_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktivno';
 $wb['rulename_error_empty'] = 'Naziv je prazan.';
 $wb['searchterm_is_empty'] = 'Traženi pojam je prazan.';
 $wb['source_txt'] = 'Izvor';
-$wb['target_error_regex'] = 'Folder može sadržavati samo ove znakove: a-z, 0-9, -, ., _, i {space}';
+$wb['target_error_regex'] = 'Folder može sadržavati samo ove znakove: a-z, 0-9, -, ., _, &, /, i {space}';
 $wb['limit_mailfilter_txt'] = 'Iskorišten je maksimalni broj mail filtera.';
 $wb['subject_txt'] = 'Naslov';
 $wb['from_txt'] = 'Pošiljatelj';
diff --git a/interface/web/mail/lib/lang/hu_mail_user_filter.lng b/interface/web/mail/lib/lang/hu_mail_user_filter.lng
index 8b39c062a6..2ef88e5270 100644
--- a/interface/web/mail/lib/lang/hu_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/hu_mail_user_filter.lng
@@ -15,7 +15,7 @@ $wb['is_txt'] = 'Is';
 $wb['begins_with_txt'] = 'Begins with';
 $wb['ends_with_txt'] = 'Ends with';
 $wb['regex_txt'] = 'Matches Regex';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['delete_txt'] = 'Delete';
 $wb['move_stop_txt'] = 'Move to';
diff --git a/interface/web/mail/lib/lang/id_mail_user_filter.lng b/interface/web/mail/lib/lang/id_mail_user_filter.lng
index 2a8ec29b45..3ac704bffc 100644
--- a/interface/web/mail/lib/lang/id_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/id_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktif';
 $wb['rulename_error_empty'] = 'Nama kosong.';
 $wb['searchterm_is_empty'] = 'Lema pencarian kosong.';
 $wb['source_txt'] = 'Sumber';
-$wb['target_error_regex'] = 'Target hanya boleh berisi karakter berikut ini: a-z, 0-9, -, ., _, dan {space}';
+$wb['target_error_regex'] = 'Target hanya boleh berisi karakter berikut ini: a-z, 0-9, -, ., _, &, /, dan {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mail/lib/lang/it_mail_user_filter.lng b/interface/web/mail/lib/lang/it_mail_user_filter.lng
index 131b7ff6b5..1287b716ff 100644
--- a/interface/web/mail/lib/lang/it_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/it_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Attivo';
 $wb['rulename_error_empty'] = 'Nome  vuoto.';
 $wb['searchterm_is_empty'] = 'Termine ricerca vuoto.';
 $wb['source_txt'] = 'Origine';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Oggetto';
 $wb['from_txt'] = 'Da';
diff --git a/interface/web/mail/lib/lang/ja_mail_user_filter.lng b/interface/web/mail/lib/lang/ja_mail_user_filter.lng
index 7354c40265..95d29f8390 100644
--- a/interface/web/mail/lib/lang/ja_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/ja_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = '有効';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mail/lib/lang/nl_mail_user_filter.lng b/interface/web/mail/lib/lang/nl_mail_user_filter.lng
index 99dd91b58c..0d92403282 100644
--- a/interface/web/mail/lib/lang/nl_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/nl_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Actief';
 $wb['rulename_error_empty'] = 'Naam is niet ingvuld.';
 $wb['searchterm_is_empty'] = 'Zoekterm is niet ingvuld.';
 $wb['source_txt'] = 'Bron';
-$wb['target_error_regex'] = 'Het doel mag alleen de volgende karakters bevatten: a-z, 0-9, -, ., _, en {spatie}';
+$wb['target_error_regex'] = 'Het doel mag alleen de volgende karakters bevatten: a-z, 0-9, -, ., _, &, /, en {spatie}';
 $wb['limit_mailfilter_txt'] = 'Het max. aantal e-mail filters voor uw account is bereikt.';
 $wb['subject_txt'] = 'Onderwerp';
 $wb['from_txt'] = 'Afzender';
diff --git a/interface/web/mail/lib/lang/pl_mail_user_filter.lng b/interface/web/mail/lib/lang/pl_mail_user_filter.lng
index 6c86f3e52a..5fbb7c5448 100644
--- a/interface/web/mail/lib/lang/pl_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/pl_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktywny';
 $wb['rulename_error_empty'] = 'Nazwa jest pusta.';
 $wb['searchterm_is_empty'] = 'Szukany termin jest pusty.';
 $wb['source_txt'] = 'Źródło';
-$wb['target_error_regex'] = 'Cel może zawierać tylko następujące znaki: a-z, 0-9, -, ., _, oraz {spacja}';
+$wb['target_error_regex'] = 'Cel może zawierać tylko następujące znaki: a-z, 0-9, -, ., _, &, /, oraz {spacja}';
 $wb['limit_mailfilter_txt'] = 'Maks. ilość filtrów email jest przekroczona.';
 $wb['subject_txt'] = 'Temat';
 $wb['from_txt'] = 'Od';
diff --git a/interface/web/mail/lib/lang/ro_mail_user_filter.lng b/interface/web/mail/lib/lang/ro_mail_user_filter.lng
index 3ca08e982a..208e705141 100644
--- a/interface/web/mail/lib/lang/ro_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/ro_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Nume e gol';
 $wb['searchterm_is_empty'] = 'Cautare termeni e gol';
 $wb['source_txt'] = 'Sursa';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mail/lib/lang/se_mail_user_filter.lng b/interface/web/mail/lib/lang/se_mail_user_filter.lng
index f8c2a61546..6b6c6fce65 100644
--- a/interface/web/mail/lib/lang/se_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/se_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktiv';
 $wb['rulename_error_empty'] = 'Namnfältet är tomt.';
 $wb['searchterm_is_empty'] = 'Söktermen är tomt.';
 $wb['source_txt'] = 'Källa';
-$wb['target_error_regex'] = 'Målet får endast innehålla dessa tecken: a-z, 0-9, -, ., _, och {mellanslag}';
+$wb['target_error_regex'] = 'Målet får endast innehålla dessa tecken: a-z, 0-9, -, ., _, &, /, och {mellanslag}';
 $wb['limit_mailfilter_txt'] = 'Det maximala antalet epostfilter är uppnått.';
 $wb['subject_txt'] = 'Ämne';
 $wb['from_txt'] = 'Från';
diff --git a/interface/web/mail/lib/lang/sk_mail_user_filter.lng b/interface/web/mail/lib/lang/sk_mail_user_filter.lng
index 966161ed3f..2cf40b5b47 100644
--- a/interface/web/mail/lib/lang/sk_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/sk_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktívny';
 $wb['rulename_error_empty'] = 'Meno je prázdne';
 $wb['searchterm_is_empty'] = 'Hľadaný výraz je prázdny.';
 $wb['source_txt'] = 'Zdroj';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mail/lib/lang/tr_mail_user_filter.lng b/interface/web/mail/lib/lang/tr_mail_user_filter.lng
index 816174445b..6c58539923 100644
--- a/interface/web/mail/lib/lang/tr_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/tr_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Etkin';
 $wb['rulename_error_empty'] = 'Ad boÅŸ olamaz.';
 $wb['searchterm_is_empty'] = 'Aranacak ifade boÅŸ olamaz.';
 $wb['source_txt'] = 'Kaynak';
-$wb['target_error_regex'] = 'Hedef için yalnız şu karakterler kullanılabilir: a-z, 0-9, -, ., _, ve {boşluk}';
+$wb['target_error_regex'] = 'Hedef için yalnız şu karakterler kullanılabilir: a-z, 0-9, -, ., _, &, /, ve {boşluk}';
 $wb['limit_mailfilter_txt'] = 'Hesabınıza ekleyebileceğiniz en fazla e-posta süzgeci sayısına ulaştınız.';
 $wb['subject_txt'] = 'Konu';
 $wb['from_txt'] = 'Kimden';
diff --git a/interface/web/mailuser/lib/lang/ar_mail_user_filter.lng b/interface/web/mailuser/lib/lang/ar_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/ar_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/ar_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/bg_mail_user_filter.lng b/interface/web/mailuser/lib/lang/bg_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/bg_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/bg_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/ca_mail_user_filter.lng b/interface/web/mailuser/lib/lang/ca_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/ca_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/ca_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/cz_mail_user_filter.lng b/interface/web/mailuser/lib/lang/cz_mail_user_filter.lng
index 010427341e..341cf3674a 100644
--- a/interface/web/mailuser/lib/lang/cz_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/cz_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktivní';
 $wb['rulename_error_empty'] = 'Název pravidla je prázdný.';
 $wb['searchterm_is_empty'] = 'Hledaný výraz je prázdný.';
 $wb['source_txt'] = 'Zdroj';
-$wb['target_error_regex'] = 'Cíl může obsahovat jen tyto znaky: a-z, 0-9, -, ., _, a {mezeru}';
+$wb['target_error_regex'] = 'Cíl může obsahovat jen tyto znaky: a-z, 0-9, -, ., _, &, /, a {mezeru}';
 $wb['limit_mailfilter_txt'] = 'Byl dosažen max. počet e-mailový filtrovacích pravidel.';
 $wb['subject_txt'] = 'Předmět';
 $wb['from_txt'] = 'Odesílatel';
diff --git a/interface/web/mailuser/lib/lang/de_mail_user_filter.lng b/interface/web/mailuser/lib/lang/de_mail_user_filter.lng
index 5c7d5c20d0..73e98770fd 100644
--- a/interface/web/mailuser/lib/lang/de_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/de_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktiv';
 $wb['rulename_error_empty'] = 'Name ist leer.';
 $wb['searchterm_is_empty'] = 'Suchbegriff ist leer.';
 $wb['source_txt'] = 'Quelle';
-$wb['target_error_regex'] = 'Das Ziel darf nur die folgenden Zeichen enthalten: a-z, 0-9, -, ., _, und {space}';
+$wb['target_error_regex'] = 'Das Ziel darf nur die folgenden Zeichen enthalten: a-z, 0-9, -, ., _, &, /, und {space}';
 $wb['limit_mailfilter_txt'] = 'Die max. Anzahl an E-Mailfiltern ist erreicht.';
 $wb['mailbox_filter_txt'] = 'E-Mailfilter';
 $wb['subject_txt'] = 'Betreff';
diff --git a/interface/web/mailuser/lib/lang/dk_mail_user_filter.lng b/interface/web/mailuser/lib/lang/dk_mail_user_filter.lng
index e2325c6902..3842fa9eb3 100644
--- a/interface/web/mailuser/lib/lang/dk_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/dk_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktiv';
 $wb['rulename_error_empty'] = 'Navn er tomt.';
 $wb['searchterm_is_empty'] = 'Søgetermer er tomt.';
 $wb['source_txt'] = 'Kilde';
-$wb['target_error_regex'] = 'Målet må kun indeholde disse tegn: a-z, 0-9, -, ., _, og {space}';
+$wb['target_error_regex'] = 'Målet må kun indeholde disse tegn: a-z, 0-9, -, ., _, &, /, og {space}';
 $wb['limit_mailfilter_txt'] = 'Max. antal af mailfiltere er nået.';
 $wb['subject_txt'] = 'Emne';
 $wb['from_txt'] = 'Fra';
diff --git a/interface/web/mailuser/lib/lang/el_mail_user_filter.lng b/interface/web/mailuser/lib/lang/el_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/el_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/el_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/en_mail_user_filter.lng b/interface/web/mailuser/lib/lang/en_mail_user_filter.lng
index d49b4635c4..5ac082d47b 100644
--- a/interface/web/mailuser/lib/lang/en_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/en_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['mailbox_filter_txt'] = 'Mailbox filter';
 $wb['subject_txt'] = 'Subject';
diff --git a/interface/web/mailuser/lib/lang/es_mail_user_filter.lng b/interface/web/mailuser/lib/lang/es_mail_user_filter.lng
index 3485ea4601..fefbd095a1 100644
--- a/interface/web/mailuser/lib/lang/es_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/es_mail_user_filter.lng
@@ -15,7 +15,7 @@ $wb['rulename_txt'] = 'Nombre';
 $wb['searchterm_is_empty'] = 'El término de búsqueda está vacío.';
 $wb['source_txt'] = 'Origen';
 $wb['subject_txt'] = 'Asunto';
-$wb['target_error_regex'] = 'La carpeta solo debe contener estos caracteres: a-z, 0-9, -, ., _, y {espacio}';
+$wb['target_error_regex'] = 'La carpeta solo debe contener estos caracteres: a-z, 0-9, -, ., _, &, /, y {espacio}';
 $wb['target_txt'] = 'Carpeta';
 $wb['to_txt'] = 'Para';
 $wb['list_id_txt'] = 'List ID';
diff --git a/interface/web/mailuser/lib/lang/fi_mail_user_filter.lng b/interface/web/mailuser/lib/lang/fi_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/fi_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/fi_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/fr_mail_user_filter.lng b/interface/web/mailuser/lib/lang/fr_mail_user_filter.lng
index d2b513b155..5ef1ed1af1 100644
--- a/interface/web/mailuser/lib/lang/fr_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/fr_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Actif';
 $wb['rulename_error_empty'] = 'Le nom est vide.';
 $wb['searchterm_is_empty'] = 'Le terme recherché est vide.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'La cible ne peut contenir que les caratères suivants : a-z, 0-9, -, ., _, et {espace}';
+$wb['target_error_regex'] = 'La cible ne peut contenir que les caratères suivants : a-z, 0-9, -, ., _, &, /, et {espace}';
 $wb['limit_mailfilter_txt'] = 'Le nombre maximum de filtre e-mail a été atteint.';
 $wb['subject_txt'] = 'Objet';
 $wb['from_txt'] = 'De';
diff --git a/interface/web/mailuser/lib/lang/hr_mail_user_filter.lng b/interface/web/mailuser/lib/lang/hr_mail_user_filter.lng
index dfb58bd3d2..a4c45b40dc 100644
--- a/interface/web/mailuser/lib/lang/hr_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/hr_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktivno';
 $wb['rulename_error_empty'] = 'Naziv je prazan.';
 $wb['searchterm_is_empty'] = 'Traženi pojam je prazan.';
 $wb['source_txt'] = 'Izvor';
-$wb['target_error_regex'] = 'Odredište može sadržavati samo ove znakove: a-z, 0-9, -, ., _, i {space}';
+$wb['target_error_regex'] = 'Odredište može sadržavati samo ove znakove: a-z, 0-9, -, ., _, &, /, i {space}';
 $wb['limit_mailfilter_txt'] = 'Iskoristili ste maksimalan broj mail filtera.';
 $wb['subject_txt'] = 'Naslov';
 $wb['from_txt'] = 'Od';
diff --git a/interface/web/mailuser/lib/lang/hu_mail_user_filter.lng b/interface/web/mailuser/lib/lang/hu_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/hu_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/hu_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/id_mail_user_filter.lng b/interface/web/mailuser/lib/lang/id_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/id_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/id_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/it_mail_user_filter.lng b/interface/web/mailuser/lib/lang/it_mail_user_filter.lng
index a0b9e360c2..77f47f1c4c 100644
--- a/interface/web/mailuser/lib/lang/it_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/it_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Attivo';
 $wb['rulename_error_empty'] = 'Nome vuoto.';
 $wb['searchterm_is_empty'] = 'Termine di ricerca vuoto.';
 $wb['source_txt'] = 'Sorgente';
-$wb['target_error_regex'] = 'Il target può contenere solo i seguenti caratteri: a-z, 0-9, -, ., _, e {space}';
+$wb['target_error_regex'] = 'Il target può contenere solo i seguenti caratteri: a-z, 0-9, -, ., _, &, /, e {space}';
 $wb['limit_mailfilter_txt'] = 'Numero filtri mail raggiunto.';
 $wb['subject_txt'] = 'Soggetto';
 $wb['from_txt'] = 'Da';
diff --git a/interface/web/mailuser/lib/lang/ja_mail_user_filter.lng b/interface/web/mailuser/lib/lang/ja_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/ja_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/ja_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/nl_mail_user_filter.lng b/interface/web/mailuser/lib/lang/nl_mail_user_filter.lng
index 35ec72f5ae..c734fd5ef6 100644
--- a/interface/web/mailuser/lib/lang/nl_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/nl_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Actief';
 $wb['rulename_error_empty'] = 'Naam is niet ingevuld.';
 $wb['searchterm_is_empty'] = 'Zoekterm is niet ingvuld.';
 $wb['source_txt'] = 'Bron';
-$wb['target_error_regex'] = 'Het doel mag alleen de volgende karakters bevatten: a-z, 0-9, -, ., _, en {spatie}';
+$wb['target_error_regex'] = 'Het doel mag alleen de volgende karakters bevatten: a-z, 0-9, -, ., _, &, /, en {spatie}';
 $wb['limit_mailfilter_txt'] = 'Het max. aantal e-mail filters voor uw account is bereikt.';
 $wb['subject_txt'] = 'Onderwerp';
 $wb['from_txt'] = 'Afzender';
diff --git a/interface/web/mailuser/lib/lang/pl_mail_user_filter.lng b/interface/web/mailuser/lib/lang/pl_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/pl_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/pl_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/pt_mail_user_filter.lng b/interface/web/mailuser/lib/lang/pt_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/pt_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/pt_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/ro_mail_user_filter.lng b/interface/web/mailuser/lib/lang/ro_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/ro_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/ro_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/se_mail_user_filter.lng b/interface/web/mailuser/lib/lang/se_mail_user_filter.lng
index 4f7e093d77..6c8b92d5bd 100644
--- a/interface/web/mailuser/lib/lang/se_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/se_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktiv';
 $wb['rulename_error_empty'] = 'Namnfältet är tomt.';
 $wb['searchterm_is_empty'] = 'Sökfältet är tomt.';
 $wb['source_txt'] = 'Källa';
-$wb['target_error_regex'] = 'Målet får endast innehålla dessa tecken: a-z, 0-9, -, ., _,och {mellanslag}';
+$wb['target_error_regex'] = 'Målet får endast innehålla dessa tecken: a-z, 0-9, -, ., _, &, /,och {mellanslag}';
 $wb['limit_mailfilter_txt'] = 'Det maximala antalet epostfilter är uppnått.';
 $wb['subject_txt'] = 'Ämne';
 $wb['from_txt'] = 'Från';
diff --git a/interface/web/mailuser/lib/lang/sk_mail_user_filter.lng b/interface/web/mailuser/lib/lang/sk_mail_user_filter.lng
index 0df6e0b75b..dd1f22c976 100644
--- a/interface/web/mailuser/lib/lang/sk_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/sk_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Active';
 $wb['rulename_error_empty'] = 'Name is empty.';
 $wb['searchterm_is_empty'] = 'Search term is empty.';
 $wb['source_txt'] = 'Source';
-$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
+$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, &, /, and {space}';
 $wb['limit_mailfilter_txt'] = 'The max. number of mailfilters is reached.';
 $wb['subject_txt'] = 'Subject';
 $wb['from_txt'] = 'From';
diff --git a/interface/web/mailuser/lib/lang/tr_mail_user_filter.lng b/interface/web/mailuser/lib/lang/tr_mail_user_filter.lng
index b59a4afbab..533deef2d8 100644
--- a/interface/web/mailuser/lib/lang/tr_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/tr_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Etkin';
 $wb['rulename_error_empty'] = 'Ad boÅŸ olamaz.';
 $wb['searchterm_is_empty'] = 'Arama ifadesi boÅŸ olamaz.';
 $wb['source_txt'] = 'Kaynak';
-$wb['target_error_regex'] = 'Hedef için yalnız şu karakterler kullanılabilir: a-z, 0-9, -, ., _, ve {boşluk}';
+$wb['target_error_regex'] = 'Hedef için yalnız şu karakterler kullanılabilir: a-z, 0-9, -, ., _, &, /, ve {boşluk}';
 $wb['limit_mailfilter_txt'] = 'Hesabınıza ekleyebileceğiniz en fazla önemsiz ileti süzgeci sayısı sınırına ulaştınız.';
 $wb['subject_txt'] = 'Konu';
 $wb['from_txt'] = 'Kimden';
-- 
GitLab


From 28cddc374cb0a73057f5c402ae30f837c97d95dd Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 23 Oct 2020 19:36:51 +0200
Subject: [PATCH 091/441] Apply 1 suggestion(s) to 1 file(s)

---
 interface/web/mail/lib/lang/de_mail_user_filter.lng | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/mail/lib/lang/de_mail_user_filter.lng b/interface/web/mail/lib/lang/de_mail_user_filter.lng
index ab9dafd84b..13be430c80 100644
--- a/interface/web/mail/lib/lang/de_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/de_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktiv';
 $wb['rulename_error_empty'] = 'Name ist leer.';
 $wb['searchterm_is_empty'] = 'Suchbegriff ist leer.';
 $wb['source_txt'] = 'Quelle';
-$wb['target_error_regex'] = 'Das Ziel beinhaltet wahrscheinlich diese Zeichen: a-z, 0-9, -, ., _, &, /, und {raum}';
+$wb['target_error_regex'] = 'Das Ziel beinhaltet wahrscheinlich diese Zeichen: a-z, 0-9, -, ., _, &, /, und {space}';
 $wb['limit_mailfilter_txt'] = 'Die maximale Anzahl an E-Mail Filtern für Ihr Konto wurde erreicht.';
 $wb['subject_txt'] = 'Betreff';
 $wb['from_txt'] = 'Von';
-- 
GitLab


From 868e4d4fc0b464fcf0e230bb5f2cc7b91b7089e1 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Fri, 23 Oct 2020 20:22:03 +0200
Subject: [PATCH 092/441] Add option to re-enable APS (#5859)

---
 interface/web/admin/form/system_config.tform.php           | 6 ++++++
 interface/web/admin/lib/lang/ar_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/bg_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/br_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/ca_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/cz_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/de_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/dk_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/el_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/en_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/es_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/fi_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/fr_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/hr_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/hu_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/id_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/it_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/ja_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/nl_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/pl_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/pt_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/ro_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/ru_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/se_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/sk_system_config.lng          | 3 +++
 interface/web/admin/lib/lang/tr_system_config.lng          | 3 +++
 interface/web/admin/templates/system_config_sites_edit.htm | 6 ++++++
 27 files changed, 87 insertions(+)

diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index 2e62900fd9..bbfb921e9a 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -184,6 +184,12 @@ $form["tabs"]['sites'] = array (
 			'default' => 'n',
 			'value'  => array(0 => 'n', 1 => 'y')
 		),
+		'show_aps_menu' => array (
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'n',
+			'value'  => array(0 => 'n', 1 => 'y')
+		),
 		'default_webserver' => array (
 			'datatype' => 'INTEGER',
 			'formtype' => 'SELECT',
diff --git a/interface/web/admin/lib/lang/ar_system_config.lng b/interface/web/admin/lib/lang/ar_system_config.lng
index e6df413bbe..7d3df7fbf8 100644
--- a/interface/web/admin/lib/lang/ar_system_config.lng
+++ b/interface/web/admin/lib/lang/ar_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/bg_system_config.lng b/interface/web/admin/lib/lang/bg_system_config.lng
index 301f5fe1b7..f99465e1b6 100644
--- a/interface/web/admin/lib/lang/bg_system_config.lng
+++ b/interface/web/admin/lib/lang/bg_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng
index 01962d3309..b74f29df08 100644
--- a/interface/web/admin/lib/lang/br_system_config.lng
+++ b/interface/web/admin/lib/lang/br_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['web_php_options_txt'] = 'Manipulador do php (Somente apache)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/ca_system_config.lng b/interface/web/admin/lib/lang/ca_system_config.lng
index 507dfb750f..d8bc0e2d48 100644
--- a/interface/web/admin/lib/lang/ca_system_config.lng
+++ b/interface/web/admin/lib/lang/ca_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng
index 182bfd326b..e0bbb2b691 100644
--- a/interface/web/admin/lib/lang/cz_system_config.lng
+++ b/interface/web/admin/lib/lang/cz_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Zrušit';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng
index 3b48e220ee..40e29e7415 100644
--- a/interface/web/admin/lib/lang/de_system_config.lng
+++ b/interface/web/admin/lib/lang/de_system_config.lng
@@ -104,4 +104,7 @@ $wb['btn_cancel_txt'] = 'Abbrechen';
 $wb['web_php_options_txt'] = 'PHP Handler (Nur Apache)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/dk_system_config.lng b/interface/web/admin/lib/lang/dk_system_config.lng
index 5a0696020a..eb96004421 100644
--- a/interface/web/admin/lib/lang/dk_system_config.lng
+++ b/interface/web/admin/lib/lang/dk_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng
index 35c0d99344..68e10e37fc 100644
--- a/interface/web/admin/lib/lang/el_system_config.lng
+++ b/interface/web/admin/lib/lang/el_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng
index d81128a269..4493913fb0 100644
--- a/interface/web/admin/lib/lang/en_system_config.lng
+++ b/interface/web/admin/lib/lang/en_system_config.lng
@@ -104,4 +104,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/es_system_config.lng b/interface/web/admin/lib/lang/es_system_config.lng
index 8c87391a9b..a001999dd4 100644
--- a/interface/web/admin/lib/lang/es_system_config.lng
+++ b/interface/web/admin/lib/lang/es_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/fi_system_config.lng b/interface/web/admin/lib/lang/fi_system_config.lng
index a1c94dfc62..eb7863fd53 100644
--- a/interface/web/admin/lib/lang/fi_system_config.lng
+++ b/interface/web/admin/lib/lang/fi_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng
index be3b771570..cfecf8e27f 100644
--- a/interface/web/admin/lib/lang/fr_system_config.lng
+++ b/interface/web/admin/lib/lang/fr_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/hr_system_config.lng b/interface/web/admin/lib/lang/hr_system_config.lng
index ef6c311473..3f6486ae53 100644
--- a/interface/web/admin/lib/lang/hr_system_config.lng
+++ b/interface/web/admin/lib/lang/hr_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/hu_system_config.lng b/interface/web/admin/lib/lang/hu_system_config.lng
index 32e4e4ac36..6b1a29ee46 100644
--- a/interface/web/admin/lib/lang/hu_system_config.lng
+++ b/interface/web/admin/lib/lang/hu_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/id_system_config.lng b/interface/web/admin/lib/lang/id_system_config.lng
index bc618f8481..f034f9bd76 100644
--- a/interface/web/admin/lib/lang/id_system_config.lng
+++ b/interface/web/admin/lib/lang/id_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng
index 4268f5a47e..42f878a54d 100644
--- a/interface/web/admin/lib/lang/it_system_config.lng
+++ b/interface/web/admin/lib/lang/it_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/ja_system_config.lng b/interface/web/admin/lib/lang/ja_system_config.lng
index d9a7441cf1..f50ffb5114 100644
--- a/interface/web/admin/lib/lang/ja_system_config.lng
+++ b/interface/web/admin/lib/lang/ja_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng
index a6c7303477..4078be986e 100644
--- a/interface/web/admin/lib/lang/nl_system_config.lng
+++ b/interface/web/admin/lib/lang/nl_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/pl_system_config.lng b/interface/web/admin/lib/lang/pl_system_config.lng
index c15c4d2756..c94313bdcb 100644
--- a/interface/web/admin/lib/lang/pl_system_config.lng
+++ b/interface/web/admin/lib/lang/pl_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/pt_system_config.lng b/interface/web/admin/lib/lang/pt_system_config.lng
index efc557257a..39e4dc93f2 100644
--- a/interface/web/admin/lib/lang/pt_system_config.lng
+++ b/interface/web/admin/lib/lang/pt_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/ro_system_config.lng b/interface/web/admin/lib/lang/ro_system_config.lng
index e8ebe587ad..2b819a013e 100644
--- a/interface/web/admin/lib/lang/ro_system_config.lng
+++ b/interface/web/admin/lib/lang/ro_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/ru_system_config.lng b/interface/web/admin/lib/lang/ru_system_config.lng
index b90d51e6f3..3aee07ff2e 100644
--- a/interface/web/admin/lib/lang/ru_system_config.lng
+++ b/interface/web/admin/lib/lang/ru_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/se_system_config.lng b/interface/web/admin/lib/lang/se_system_config.lng
index fc150f53c6..d075f87509 100644
--- a/interface/web/admin/lib/lang/se_system_config.lng
+++ b/interface/web/admin/lib/lang/se_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/sk_system_config.lng b/interface/web/admin/lib/lang/sk_system_config.lng
index 35ef9e370e..ef4cc3fef9 100644
--- a/interface/web/admin/lib/lang/sk_system_config.lng
+++ b/interface/web/admin/lib/lang/sk_system_config.lng
@@ -100,4 +100,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/lib/lang/tr_system_config.lng b/interface/web/admin/lib/lang/tr_system_config.lng
index f83a226a0b..3bb9c82b0a 100644
--- a/interface/web/admin/lib/lang/tr_system_config.lng
+++ b/interface/web/admin/lib/lang/tr_system_config.lng
@@ -103,4 +103,7 @@ $wb['btn_cancel_txt'] = 'Cancel';
 $wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
 $wb['client_protection_txt'] = 'Client protection';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
+$wb['show_aps_menu_txt'] = 'Show APS menu';
+$wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
+$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
 ?>
diff --git a/interface/web/admin/templates/system_config_sites_edit.htm b/interface/web/admin/templates/system_config_sites_edit.htm
index b261cfdab1..c0db318d01 100644
--- a/interface/web/admin/templates/system_config_sites_edit.htm
+++ b/interface/web/admin/templates/system_config_sites_edit.htm
@@ -61,6 +61,12 @@
                 <div class="col-sm-9">
                     {tmpl_var name='reseller_can_use_options'}
                 </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">{tmpl_var name='show_aps_menu_txt'}</label>
+                <div class="col-sm-9">
+                    {tmpl_var name='show_aps_menu'}&nbsp;{tmpl_var name='show_aps_menu_note_txt'}&nbsp;<a href="https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/5676" target="_blank">{tmpl_var name='show_aps_menu_note_url_txt'}</a>
+                </div>
             </div>
 			<div class="form-group">
                     <label class="col-sm-3 control-label">{tmpl_var name='web_php_options_txt'}</label>
-- 
GitLab


From 3d5186ffe68a588b59bc84d0a5ecc0f4f1c3a9fe Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Sat, 24 Oct 2020 00:47:05 +0200
Subject: [PATCH 093/441] Show DNS config errors on records tab (#5860)

---
 interface/web/dns/templates/dns_a_list.htm   | 11 +++++++++++
 interface/web/dns/templates/dns_soa_edit.htm |  7 -------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/interface/web/dns/templates/dns_a_list.htm b/interface/web/dns/templates/dns_a_list.htm
index e3e5486763..f17e1f804d 100644
--- a/interface/web/dns/templates/dns_a_list.htm
+++ b/interface/web/dns/templates/dns_a_list.htm
@@ -1,3 +1,14 @@
+<tmpl_if name="config_error_msg">
+  <div class="alert alert-danger">
+    <p>
+      <tmpl_var name="configuration_error_txt">
+        <div>
+          <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
+          <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+        </div>
+    </p>
+  </div>
+</tmpl_if>
 <div class="pnl_toolsarea">
         <tmpl_if name='datalog_changes_count' op='>' value='0'>
             <div class="systemmonitor-state state-info">
diff --git a/interface/web/dns/templates/dns_soa_edit.htm b/interface/web/dns/templates/dns_soa_edit.htm
index 2859913f86..97f3385030 100644
--- a/interface/web/dns/templates/dns_soa_edit.htm
+++ b/interface/web/dns/templates/dns_soa_edit.htm
@@ -1,11 +1,4 @@
 <tmpl_if name="config_error_msg">
-  <!--<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
-    <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
-    <div>
-      <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
-      <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
-    </div>
-  </div>-->
   <div class="alert alert-danger">
     <p>
       <tmpl_var name="configuration_error_txt">
-- 
GitLab


From c5ceae2328671647f49329354d53a5ce8dd18725 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Sat, 24 Oct 2020 21:45:53 +0200
Subject: [PATCH 094/441] Load the company name to show in the HTML title tag,
 fixes #5864

---
 interface/web/login/password_reset.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/interface/web/login/password_reset.php b/interface/web/login/password_reset.php
index f14548dd91..9a2541bba0 100644
--- a/interface/web/login/password_reset.php
+++ b/interface/web/login/password_reset.php
@@ -179,7 +179,10 @@ $app->tpl->setVar('base64_logo_height', $logo_dimensions[1].'px');
 $app->tpl->setVar('base64_logo_txt', $base64_logo_txt);
 
 // Title
-$app->tpl->setVar('company_name', $sys_config['company_name']. ' :: ');
+$sys_config = $app->getconf->get_global_config('misc');
+if (!empty($sys_config['company_name'])) {
+	$app->tpl->setVar('company_name', $sys_config['company_name']. ' :: ');
+}
 
 $app->tpl_defaults();
 $app->tpl->pparse();
-- 
GitLab


From a1be781f5dcd11e23456fd9c3a35157c37ae6478 Mon Sep 17 00:00:00 2001
From: Daniel Jagszent <daniel@jagszent.de>
Date: Tue, 27 Oct 2020 01:16:48 +0100
Subject: [PATCH 095/441] nginx vhost conf: disable authentication for error
 pages

---
 server/conf/nginx_vhost.conf.master | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index 57dffe1369..51ca7dfb69 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -102,34 +102,42 @@ server {
         location = /error/400.html {
             <tmpl_var name='web_document_root_www_proxy'>
             internal;
+            auth_basic off;
         }
         location = /error/401.html {
             <tmpl_var name='web_document_root_www_proxy'>
             internal;
+            auth_basic off;
         }
         location = /error/403.html {
             <tmpl_var name='web_document_root_www_proxy'>
             internal;
+            auth_basic off;
         }
         location = /error/404.html {
             <tmpl_var name='web_document_root_www_proxy'>
             internal;
+            auth_basic off;
         }
         location = /error/405.html {
             <tmpl_var name='web_document_root_www_proxy'>
             internal;
+            auth_basic off;
         }
         location = /error/500.html {
             <tmpl_var name='web_document_root_www_proxy'>
             internal;
+            auth_basic off;
         }
         location = /error/502.html {
             <tmpl_var name='web_document_root_www_proxy'>
             internal;
+            auth_basic off;
         }
         location = /error/503.html {
             <tmpl_var name='web_document_root_www_proxy'>
             internal;
+            auth_basic off;
         }
 </tmpl_if>
 
-- 
GitLab


From 610af7e289abb19aa66554c65351e417b9d4248c Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 27 Oct 2020 19:26:46 +0100
Subject: [PATCH 096/441] jailkit: include /usr/share/npm in [node] jail

---
 install/tpl/jk_init.ini.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/tpl/jk_init.ini.master b/install/tpl/jk_init.ini.master
index 0f62aac9ef..b84aab95b6 100644
--- a/install/tpl/jk_init.ini.master
+++ b/install/tpl/jk_init.ini.master
@@ -173,7 +173,7 @@ includesections = php, uidbasics, netbasics
 
 [node]
 comment = NodeJS
-paths = npm, node, nodejs, /usr/lib/nodejs, /usr/share/node-mime, /usr/lib/node_modules, /usr/local/lib/nodejs, /usr/local/lib/node_modules, elmi-to-json, /usr/local/bin/elmi-to-json
+paths = npm, node, nodejs, /usr/lib/nodejs, /usr/share/npm, /usr/share/node-mime, /usr/lib/node_modules, /usr/local/lib/nodejs, /usr/local/lib/node_modules, elmi-to-json, /usr/local/bin/elmi-to-json
 
 [env]
 comment = /usr/bin/env for environment variables
-- 
GitLab


From 29ff27e4d894a148bce388ef9aee6febf13bd1d4 Mon Sep 17 00:00:00 2001
From: Thom Pol <ispconfig+git@amsterdamtech.nl>
Date: Thu, 29 Oct 2020 16:00:11 +0100
Subject: [PATCH 097/441] Remove double translation (#5884)

---
 interface/web/admin/lib/lang/de_system_config.lng | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng
index e80de10943..36ed7295d2 100644
--- a/interface/web/admin/lib/lang/de_system_config.lng
+++ b/interface/web/admin/lib/lang/de_system_config.lng
@@ -74,10 +74,6 @@ $wb['session_allow_endless_txt'] = '&quot;Eingeloggt bleiben&quot; aktivieren';
 $wb['No'] = 'Nein';
 $wb['min_password_length_txt'] = 'Minimale Passwortlänge';
 $wb['min_password_strength_txt'] = 'Minimale Passwortstärke';
-$wb['ssh_authentication_txt'] = 'Allowed SSH authentication';
-$wb['ssh_authentication_password_key'] = 'Password & Key';
-$wb['ssh_authentication_password'] = 'Password';
-$wb['ssh_authentication_key'] = 'Key';
 $wb['ssh_authentication_txt'] = 'Erlaubte SSH Authentifizierung';
 $wb['ssh_authentication_password_key'] = 'Passwort & Schlüssel';
 $wb['ssh_authentication_password'] = 'Passwort';
-- 
GitLab


From 7df25000a373399d7b6cc4d0d0830cc57a906b46 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Fri, 30 Oct 2020 20:47:50 +0100
Subject: [PATCH 098/441] Disable install_ispconfig_interface when no webserver
 is present

---
 install/update.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/install/update.php b/install/update.php
index c15678486f..4043647d8e 100644
--- a/install/update.php
+++ b/install/update.php
@@ -361,9 +361,13 @@ if($conf['mysql']['master_slave_setup'] == 'y') {
 if($conf['apache']['installed'] == true){
 	if(!is_file($conf['apache']['vhost_conf_dir'].'/ispconfig.vhost')) $inst->install_ispconfig_interface = false;
 }
-if($conf['nginx']['installed'] == true){
+elseif($conf['nginx']['installed'] == true){
 	if(!is_file($conf['nginx']['vhost_conf_dir'].'/ispconfig.vhost')) $inst->install_ispconfig_interface = false;
 }
+else {
+	// If neither webserver is installed then this can't be the server that hosts the ispconfig interface.
+	$inst->install_ispconfig_interface = false;
+}
 
 //** Shall the services be reconfigured during update
 $reconfigure_services_answer = $inst->simple_query('Reconfigure Services?', array('yes', 'no', 'selected'), 'yes','reconfigure_services');
-- 
GitLab


From fa5ed54a59accce2167ecebcef7d34dcd777de9c Mon Sep 17 00:00:00 2001
From: Jon Reese <howtoforge@inetspec.com>
Date: Fri, 30 Oct 2020 22:34:00 +0100
Subject: [PATCH 099/441] test for crontab instead of cron ref:
 ispconfig/ispconfig3#5885

---
 install/lib/installer_base.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index e3821b5c14..bcef5577f4 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -192,7 +192,7 @@ class installer_base {
 		// if(is_installed('vlogger')) $conf['vlogger']['installed'] = true;
 		// ISPConfig ships with vlogger, so it is always installed.
 		$conf['vlogger']['installed'] = true;
-		if(is_installed('cron') || is_installed('anacron')) $conf['cron']['installed'] = true;
+		if(is_installed('crontab')) $conf['cron']['installed'] = true;
 
 		if (($conf['apache']['installed'] && is_file($conf['apache']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")) || ($conf['nginx']['installed'] && is_file($conf['nginx']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost"))) $this->ispconfig_interface_installed = true;
 	}
-- 
GitLab


From cfd412ee1e1aa949205d8899533f94761eabb6c2 Mon Sep 17 00:00:00 2001
From: Jon Reese <howtoforge@inetspec.com>
Date: Fri, 30 Oct 2020 22:38:34 +0100
Subject: [PATCH 100/441] detect crontab early with friendly fail ref:
 ispconfig/ispconfig3#5885

---
 install/install.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/install/install.php b/install/install.php
index 121e3a13cc..0df226ee10 100644
--- a/install/install.php
+++ b/install/install.php
@@ -172,6 +172,11 @@ if(is_dir('/usr/local/ispconfig')) {
 //** Detect the installed applications
 $inst->find_installed_apps();
 
+//* crontab required by ISPConfig
+if(!$conf['cron']['installed']) {
+	die("crontab not found; please install a compatible cron daemon before ISPConfig\n\n");
+}
+
 //** Select the language and set default timezone
 $conf['language'] = $inst->simple_query('Select language', array('en', 'de'), 'en','language');
 $conf['timezone'] = get_system_timezone();
@@ -607,10 +612,7 @@ $inst->configure_dbserver();
 
 //* Configure ISPConfig
 swriteln('Installing ISPConfig crontab');
-if($conf['cron']['installed']) {
-	swriteln('Installing ISPConfig crontab');
-	$inst->install_crontab();
-} else swriteln('[ERROR] Cron not found');
+$inst->install_crontab();
 
 swriteln('Detect IP addresses');
 $inst->detect_ips();
-- 
GitLab


From 89a49bdd5f88adb2cd48443f8c6658abb7807060 Mon Sep 17 00:00:00 2001
From: Max Well <7444-MaxWell@users.noreply.git.ispconfig.org>
Date: Sun, 1 Nov 2020 22:50:59 +0100
Subject: [PATCH 101/441] Improve jk_init.ini * Add arm64 support to uidbasics
 and netbasics * Add armhf and arm64 support to MySQL * Include all supported
 PHP versions in jail * Add /etc/localtime to PHP jail to fix a critical PHP
 error * Introduce ImageMagick support

---
 install/tpl/jk_init.ini.master | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/install/tpl/jk_init.ini.master b/install/tpl/jk_init.ini.master
index 0f62aac9ef..5f3f6f899c 100644
--- a/install/tpl/jk_init.ini.master
+++ b/install/tpl/jk_init.ini.master
@@ -6,11 +6,11 @@
 
 [uidbasics]
 comment = common files for all jails that need user/group information
-paths = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, /lib64/libnss*.so.2, /lib/i386-linux-gnu/libnsl.so.1, /lib/i386-linux-gnu/libnss*.so.2, /lib/x86_64-linux-gnu/libnsl.so.1, /lib/x86_64-linux-gnu/libnss*.so.2, /lib/arm-linux-gnueabihf/libnss*.so.2, /lib/arm-linux-gnueabihf/libnsl*.so.1, /etc/nsswitch.conf, /etc/ld.so.conf
+paths = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, /lib64/libnss*.so.2, /lib/i386-linux-gnu/libnsl.so.1, /lib/i386-linux-gnu/libnss*.so.2, /lib/x86_64-linux-gnu/libnsl.so.1, /lib/x86_64-linux-gnu/libnss*.so.2, /lib/arm-linux-gnueabihf/libnsl*.so.1, /lib/arm-linux-gnueabihf/libnss*.so.2, /lib/aarch64-linux-gnu/libnsl.so.1, /lib/aarch64-linux-gnu/libnss*.so.2, /etc/nsswitch.conf, /etc/ld.so.conf
 
 [netbasics]
 comment = common files for all jails that need any internet connectivity
-paths = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2, /lib/libnss_mdns*.so.2, /lib/i386-linux-gnu/libnss_dns.so.2, /lib/x86_64-linux-gnu/libnss_dns.so.2, /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols, /etc/services, /etc/ssl/certs/, /usr/lib/ssl/certs
+paths = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2, /lib/libnss_mdns*.so.2, /lib/i386-linux-gnu/libnss_dns.so.2, /lib/x86_64-linux-gnu/libnss_dns.so.2, /lib/arm-linux-gnueabihf/libnss_dns.so.2, /lib/aarch64-linux-gnu/libnss_dns.so.2, /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols, /etc/services, /etc/ssl/certs/, /usr/lib/ssl/certs
 
 [logbasics]
 comment = timezone information and log sockets
@@ -163,7 +163,7 @@ includesections = php, mysql-client
 
 [mysql-client]
 comment = mysql client
-paths = mysql, mysqldump, mysqlshow, /usr/lib/libmysqlclient.so, /usr/lib/i386-linux-gnu/libmariadb.so.3, /usr/lib/i386-linux-gnu/mariadb19, /usr/lib/x86_64-linux-gnu/libmariadb.so.3, /usr/lib/x86_64-linux-gnu/mariadb19
+paths = mysql, mysqldump, mysqlshow, /usr/lib/libmysqlclient.so, /usr/lib/i386-linux-gnu/libmariadb.so.3, /usr/lib/i386-linux-gnu/mariadb19, /usr/lib/x86_64-linux-gnu/libmariadb.so.3, /usr/lib/x86_64-linux-gnu/mariadb19, /usr/lib/arm-linux-gnueabihf/libmariadb.so.3, /usr/lib/arm-linux-gnueabihf/mariadb19, /usr/lib/aarch64-linux-gnu/libmariadb.so.3, /usr/lib/aarch64-linux-gnu/mariadb19
 includesections = netbasics
 
 [composer]
@@ -185,7 +185,7 @@ paths = env
 [php]
 comment = default php version and libraries
 paths = /usr/bin/php
-includesections = php_common, php7_3
+includesections = php_common, php5_6, php7_0, php7_1, php7_2, php7_3, php7_4
 
 [php_common]
 comment = common php directories and libraries
@@ -193,7 +193,7 @@ comment = common php directories and libraries
 #  do not add all of /etc/php/ or any of the fpm directories
 #  or the php config (which includes custom php snippets) from *all*
 #  sites which use fpm will be copied to *every* jailkit
-paths = /usr/bin/php, /usr/lib/php/, /usr/share/php/, /usr/share/zoneinfo/
+paths = /usr/bin/php, /usr/lib/php/, /usr/share/php/, /usr/share/zoneinfo/, /etc/localtime
 includesections = env
 
 [php5_6]
@@ -225,3 +225,7 @@ includesections = php_common
 comment = php version 7.4
 paths = /usr/bin/php7.4, /usr/lib/php/7.4/, /usr/lib/php/20190902/, /usr/share/php/7.4/, /etc/php/7.4/cli/, /etc/php/7.4/mods-available/
 includesections = php_common
+
+[imagemagick]
+comment = ImageMagick needed for php-imagemagick extension
+paths = /usr/share/ImageMagick-*, /etc/ImageMagick-*, /usr/lib/i386-linux-gnu/ImageMagick-*, /usr/lib/x86_64-linux-gnu/ImageMagick-*, /usr/lib/arm-linux-gnueabihf/ImageMagick-*, /usr/lib/aarch64-linux-gnu/ImageMagick-*
-- 
GitLab


From b0ea7a6730ea5cbd07e774ca2d71ba5d3d2d2967 Mon Sep 17 00:00:00 2001
From: Dominik <dominik@profi-webspace.com>
Date: Mon, 2 Nov 2020 10:47:33 +0100
Subject: [PATCH 102/441] Fix bug with Array-String in postfix main.cf

---
 server/plugins-available/postfix_server_plugin.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php
index 23373a1de0..b3e453be55 100644
--- a/server/plugins-available/postfix_server_plugin.inc.php
+++ b/server/plugins-available/postfix_server_plugin.inc.php
@@ -193,7 +193,7 @@ class postfix_server_plugin {
 					}
 				}
 				if ($i == count($new_options)) {
-					$new_options[] = array('reject_unknown_client_hostname');
+					$new_options[] = 'reject_unknown_client_hostname';
 				}
 
 				$app->system->exec_safe("postconf -e ?", 'smtpd_client_restrictions = '.implode(", ", $new_options));
@@ -231,7 +231,7 @@ class postfix_server_plugin {
 					}
 				}
 				if ($i == count($new_options)) {
-					$new_options[] = array('reject_unknown_helo_hostname');
+					$new_options[] = 'reject_unknown_helo_hostname';
 				}
 
 				$app->system->exec_safe("postconf -e ?", 'smtpd_helo_restrictions = '.implode(", ", $new_options));
-- 
GitLab


From 5dc80302b77bdfed8bed5a426f9c015a8dde2976 Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Tue, 3 Nov 2020 13:06:59 +0100
Subject: [PATCH 103/441] use mod_brotli if available

---
 install/patches/upd_dev.php   | 19 +++++++++++++++++++
 server/conf/vhost.conf.master |  4 ++++
 2 files changed, 23 insertions(+)
 create mode 100644 install/patches/upd_dev.php

diff --git a/install/patches/upd_dev.php b/install/patches/upd_dev.php
new file mode 100644
index 0000000000..3e6dc6f864
--- /dev/null
+++ b/install/patches/upd_dev.php
@@ -0,0 +1,19 @@
+<?php
+
+if(!defined('INSTALLER_RUN')) die('Patch update file access violation.');
+
+/*
+        Example installer patch update class. the classname must match
+        the php and the sql patch update filename. The php patches are
+        only executed when a corresponding sql patch exists.
+*/
+
+class upd_dev extends installer_patch_update {
+
+	public function onAfterSQL() {
+		global $inst, $conf;
+	}
+}
+
+?>
+
diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master
index 023b726291..f70198935a 100644
--- a/server/conf/vhost.conf.master
+++ b/server/conf/vhost.conf.master
@@ -53,6 +53,10 @@
 		<IfModule mod_http2.c>
 			Protocols h2 http/1.1
 		</IfModule>
+
+		<IfModule mod_brotli.c>
+			AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/json application/x-font-ttf application/vnd.ms-fontobject image/x-icon
+		</IfModule>
 </tmpl_if>
 
 <tmpl_if name='logging' op='==' value='anon'>
-- 
GitLab


From 90f2ba301c0698c9d185f828f894b7b7ee26b149 Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Tue, 3 Nov 2020 13:08:57 +0100
Subject: [PATCH 104/441] clean up

---
 install/patches/upd_dev.php | 19 -------------------
 1 file changed, 19 deletions(-)
 delete mode 100644 install/patches/upd_dev.php

diff --git a/install/patches/upd_dev.php b/install/patches/upd_dev.php
deleted file mode 100644
index 3e6dc6f864..0000000000
--- a/install/patches/upd_dev.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-if(!defined('INSTALLER_RUN')) die('Patch update file access violation.');
-
-/*
-        Example installer patch update class. the classname must match
-        the php and the sql patch update filename. The php patches are
-        only executed when a corresponding sql patch exists.
-*/
-
-class upd_dev extends installer_patch_update {
-
-	public function onAfterSQL() {
-		global $inst, $conf;
-	}
-}
-
-?>
-
-- 
GitLab


From 5c5211ef67a7d8a3e383f72995f26f52679d20f3 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 4 Nov 2020 11:32:20 -0700
Subject: [PATCH 105/441] rbl_list after permit_sasl_authenticated

---
 install/tpl/debian_postfix.conf.master   | 2 +-
 install/tpl/fedora_postfix.conf.master   | 2 +-
 install/tpl/gentoo_postfix.conf.master   | 2 +-
 install/tpl/opensuse_postfix.conf.master | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master
index b75232e6e4..dcd5f592d8 100644
--- a/install/tpl/debian_postfix.conf.master
+++ b/install/tpl/debian_postfix.conf.master
@@ -28,7 +28,7 @@ proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virt
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
-smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks{rbl_list}, permit_sasl_authenticated, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
+smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
 smtpd_client_message_rate_limit = 100
diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master
index 70f07182ac..45bc0c117e 100644
--- a/install/tpl/fedora_postfix.conf.master
+++ b/install/tpl/fedora_postfix.conf.master
@@ -24,7 +24,7 @@ proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virt
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
-smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks{rbl_list}, permit_sasl_authenticated, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
+smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
 smtpd_client_message_rate_limit = 100
diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master
index c7e1a06db2..b3ff8f6804 100644
--- a/install/tpl/gentoo_postfix.conf.master
+++ b/install/tpl/gentoo_postfix.conf.master
@@ -23,7 +23,7 @@ proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virt
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
-smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks{rbl_list}, permit_sasl_authenticated, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
+smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
 smtpd_client_message_rate_limit = 100
diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master
index 44c643a2bf..7386fad16e 100644
--- a/install/tpl/opensuse_postfix.conf.master
+++ b/install/tpl/opensuse_postfix.conf.master
@@ -26,7 +26,7 @@ proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virt
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
-smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks{rbl_list}, permit_sasl_authenticated, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
+smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
 smtpd_client_message_rate_limit = 100
-- 
GitLab


From 977fccd816868779046bace9a0a0f4a7fe922472 Mon Sep 17 00:00:00 2001
From: Michael Seevogel <git@michaelseevogel.de>
Date: Fri, 6 Nov 2020 13:48:03 +0100
Subject: [PATCH 106/441] added atom to Brotli outputfilter list

---
 server/conf/vhost.conf.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master
index f70198935a..5b5e1f059e 100644
--- a/server/conf/vhost.conf.master
+++ b/server/conf/vhost.conf.master
@@ -55,7 +55,7 @@
 		</IfModule>
 
 		<IfModule mod_brotli.c>
-			AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/json application/x-font-ttf application/vnd.ms-fontobject image/x-icon
+			AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/xml application/xml+rss application/atom+xml application/json application/x-font-ttf application/vnd.ms-fontobject image/x-icon
 		</IfModule>
 </tmpl_if>
 
-- 
GitLab


From b3d65d150e5429d77345b976a5497bab75f01c4a Mon Sep 17 00:00:00 2001
From: Max Well <7444-MaxWell@users.noreply.git.ispconfig.org>
Date: Sun, 8 Nov 2020 23:11:38 +0100
Subject: [PATCH 107/441] Update jk_init.ini.master

---
 install/tpl/jk_init.ini.master | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/tpl/jk_init.ini.master b/install/tpl/jk_init.ini.master
index 5f3f6f899c..9d42968151 100644
--- a/install/tpl/jk_init.ini.master
+++ b/install/tpl/jk_init.ini.master
@@ -185,7 +185,7 @@ paths = env
 [php]
 comment = default php version and libraries
 paths = /usr/bin/php
-includesections = php_common, php5_6, php7_0, php7_1, php7_2, php7_3, php7_4
+includesections = php_common
 
 [php_common]
 comment = common php directories and libraries
@@ -194,7 +194,7 @@ comment = common php directories and libraries
 #  or the php config (which includes custom php snippets) from *all*
 #  sites which use fpm will be copied to *every* jailkit
 paths = /usr/bin/php, /usr/lib/php/, /usr/share/php/, /usr/share/zoneinfo/, /etc/localtime
-includesections = env
+includesections = env, logbasics, netbasics
 
 [php5_6]
 comment = php version 5.6
-- 
GitLab


From 1f27c515366ca810104d58f9fc89c517f4de011e Mon Sep 17 00:00:00 2001
From: Max Well <7444-MaxWell@users.noreply.git.ispconfig.org>
Date: Sun, 8 Nov 2020 23:12:46 +0100
Subject: [PATCH 108/441] Update jk_init.ini.master

---
 install/tpl/jk_init.ini.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/tpl/jk_init.ini.master b/install/tpl/jk_init.ini.master
index 9d42968151..274c0388df 100644
--- a/install/tpl/jk_init.ini.master
+++ b/install/tpl/jk_init.ini.master
@@ -193,7 +193,7 @@ comment = common php directories and libraries
 #  do not add all of /etc/php/ or any of the fpm directories
 #  or the php config (which includes custom php snippets) from *all*
 #  sites which use fpm will be copied to *every* jailkit
-paths = /usr/bin/php, /usr/lib/php/, /usr/share/php/, /usr/share/zoneinfo/, /etc/localtime
+paths = /usr/bin/php, /usr/lib/php/, /usr/share/php/, /usr/share/zoneinfo/
 includesections = env, logbasics, netbasics
 
 [php5_6]
-- 
GitLab


From d983e877196efe4a299bacdfc8574a07505a13c1 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 9 Nov 2020 10:25:24 -0700
Subject: [PATCH 109/441] last_jailkit_update was not set for websites without
 a jailkit

---
 server/lib/classes/cron.d/600-jailkit_maintenance.inc.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php b/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
index 9916b72e57..771bf0e71b 100644
--- a/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
+++ b/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
@@ -74,6 +74,7 @@ class cronjob_jailkit_maintenance extends cronjob {
 
 		foreach($records as $rec) {
 			if (!is_dir($rec['document_root']) || !is_dir($rec['document_root'].'/etc/jailkit')) {
+				$app->db->query("UPDATE `web_domain` SET `last_jailkit_update` = NOW() WHERE `document_root` = ?", $rec['document_root']);
 				continue;
 			}
 
-- 
GitLab


From cec0ac150049ddb29bc5273cd3849c223e32088d Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 9 Nov 2020 10:49:39 -0700
Subject: [PATCH 110/441] fix regex in server config jailkit fields

---
 interface/web/admin/form/server_config.tform.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index b25785c283..7d1e1526f5 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -1790,7 +1790,7 @@ $form["tabs"]['jailkit'] = array(
 			'validators' => array(	0 => array('type' => 'NOTEMPTY',
 										'errmsg' => 'jailkit_chroot_home_error_empty'),
 									1 => array ( 	'type' => 'REGEX',
-										'regex' => '/^\/[a-zA-Z0-9\.\-\_\/\[\]]{1,128}$/',
+										'regex' => '/^\/[a-zA-Z0-9\.\-\_\/\[\]]{1,}$/',
 										'errmsg'=> 'jailkit_chroot_home_error_regex'),
 			),
 			'value' => '',
@@ -1804,7 +1804,7 @@ $form["tabs"]['jailkit'] = array(
 			'validators' => array(	0 => array('type' => 'NOTEMPTY',
 										'errmsg' => 'jailkit_chroot_app_sections_error_empty'),
 									1 => array ( 	'type' => 'REGEX',
-										'regex' => '/^[a-zA-Z0-9\-\_\ ]{1,128}$/',
+										'regex' => '/^[a-zA-Z0-9\.\-\_\ ]{1,}$/',
 										'errmsg'=> 'jailkit_chroot_app_sections_error_regex'),
 			),
 			'value' => '',
-- 
GitLab


From 320fa675acda8f4c7a07e3dac0446ced7b4fad2c Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 5 Nov 2020 16:11:43 -0700
Subject: [PATCH 111/441] fix quota notification mail

---
 server/lib/classes/monitor_tools.inc.php | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index 31e36836d5..e473472207 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -829,6 +829,7 @@ class monitor_tools {
 
 		//* get mail headers, subject and body
 		$mailHeaders = '';
+		$mailFrom = '';
 		$mailBody = '';
 		$mailSubject = '';
 		$inHeader = true;
@@ -844,6 +845,16 @@ class monitor_tools {
 					$mailSubject = trim($parts[1]);
 					continue;
 				}
+				if(strtolower($parts[0]) == 'From') {
+					$mailFrom = trim($parts[1]);
+					continue;
+				}
+				if(strtolower($parts[0]) == 'Cc') {
+					if (! in_array(trim($parts[1]), $recipients)) {
+						$recipients[] = trim($parts[1]);
+					}
+					continue;
+				}
 				unset($parts);
 				$mailHeaders .= trim($lines[$l]) . "\n";
 			} else {
@@ -858,7 +869,7 @@ class monitor_tools {
 		$mailBody = strtr($mailBody, $placeholders);
 
 		for($r = 0; $r < count($recipients); $r++) {
-			$app->functions->mail($recipients[$r], $mailSubject, $mailBody, $mailHeaders);
+			$app->functions->mail($recipients[$r], $mailSubject, $mailBody, $mailFrom);
 		}
 
 		unset($mailSubject);
-- 
GitLab


From 9f8bb33db5e8406dfe3441995e175d20ffe91708 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 9 Nov 2020 11:14:56 -0700
Subject: [PATCH 112/441] missing global $app declaration

---
 server/lib/classes/monitor_tools.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index e473472207..a44324528b 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -812,7 +812,7 @@ class monitor_tools {
 	}
 
 	public function send_notification_email($template, $placeholders, $recipients) {
-		global $conf;
+		global $app, $conf;
 
 		if(!is_array($recipients) || count($recipients) < 1) return false;
 		if(!is_array($placeholders)) $placeholders = array();
-- 
GitLab


From 38ffacf68728df82d58b9ec3208791fcec18f362 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 11 Nov 2020 10:32:50 -0700
Subject: [PATCH 113/441] notification emails replace placeolders in From

---
 server/lib/classes/monitor_tools.inc.php | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index a44324528b..dbe702d0dd 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -865,6 +865,7 @@ class monitor_tools {
 
 		//* Replace placeholders
 		$mailHeaders = strtr($mailHeaders, $placeholders);
+		$mailFrom = strtr($mailFrom, $placeholders);
 		$mailSubject = strtr($mailSubject, $placeholders);
 		$mailBody = strtr($mailBody, $placeholders);
 
@@ -872,11 +873,6 @@ class monitor_tools {
 			$app->functions->mail($recipients[$r], $mailSubject, $mailBody, $mailFrom);
 		}
 
-		unset($mailSubject);
-		unset($mailHeaders);
-		unset($mailBody);
-		unset($lines);
-
 		return true;
 	}
 
-- 
GitLab


From 7adc9b3fbf83843d7a24cc896b4266d6485dbdfa Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 11 Nov 2020 13:07:22 -0700
Subject: [PATCH 114/441] always set envelope sender address in ispcmail class

---
 server/lib/classes/ispcmail.inc.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/server/lib/classes/ispcmail.inc.php b/server/lib/classes/ispcmail.inc.php
index fbf5f84dca..2b3dc78cfc 100644
--- a/server/lib/classes/ispcmail.inc.php
+++ b/server/lib/classes/ispcmail.inc.php
@@ -824,8 +824,7 @@ class ispcmail {
 				else $rec_string .= $recip;
 			}
 			$to = $this->_encodeHeader($rec_string, $this->mail_charset);
-			//$result = mail($to, $subject, $this->body, implode($this->_crlf, $headers));
-			$result = mail($to, $enc_subject, $this->body, implode($this->_crlf, $headers));
+			$result = mail($to, $enc_subject, $this->body, implode($this->_crlf, $headers), "-f $this->_mail_sender");
 		}
 
 		// Reset the subject in case mail is resent
-- 
GitLab


From 747265f6943d796845af9eefa1748f73f92f15f9 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 11 Nov 2020 14:01:52 -0700
Subject: [PATCH 115/441] admin_mail placeholder in mail user welcome email

---
 server/conf/mail/welcome_email_de.txt        |  4 ++--
 server/conf/mail/welcome_email_en.txt        |  4 ++--
 server/conf/mail/welcome_email_es.txt        |  2 +-
 server/conf/mail/welcome_email_fr.txt        |  2 +-
 server/conf/mail/welcome_email_hr.txt        |  4 ++--
 server/conf/mail/welcome_email_nl.txt        |  2 +-
 server/plugins-available/mail_plugin.inc.php | 21 ++++++++++++++++++--
 7 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/server/conf/mail/welcome_email_de.txt b/server/conf/mail/welcome_email_de.txt
index 2327209ace..d28e9ac243 100644
--- a/server/conf/mail/welcome_email_de.txt
+++ b/server/conf/mail/welcome_email_de.txt
@@ -1,4 +1,4 @@
-From: ISPConfig <postmaster@localhost.localdomain>
+From: {admin_name} <{admin_mail}>
 Subject: Ihr Mailaccount ist aktiv.
 
-Ihr Mailaccount ist jetzt aktiv. Viel Vergnügen.
\ No newline at end of file
+Ihr Mailaccount ist jetzt aktiv. Viel Vergnügen.
diff --git a/server/conf/mail/welcome_email_en.txt b/server/conf/mail/welcome_email_en.txt
index 9689485606..485227c0f3 100644
--- a/server/conf/mail/welcome_email_en.txt
+++ b/server/conf/mail/welcome_email_en.txt
@@ -1,4 +1,4 @@
-From: ISPConfig <postmaster@localhost.localdomain>
+From: {admin_name} <{admin_mail}>
 Subject: Welcome to your new email account.
 
-Welcome to your new email account. Your webmaster.
\ No newline at end of file
+Welcome to your new email account. Your webmaster.
diff --git a/server/conf/mail/welcome_email_es.txt b/server/conf/mail/welcome_email_es.txt
index ede0ea5120..9ead0568f3 100644
--- a/server/conf/mail/welcome_email_es.txt
+++ b/server/conf/mail/welcome_email_es.txt
@@ -1,4 +1,4 @@
-From: ISPConfig <postmaster@localhost.localdomain>
+From: {admin_name} <{admin_mail}>
 Subject: Bienvenido a su nueva cuenta de correo
 
 Bienvenido a su nueva cuenta de correo. Su administrador.
diff --git a/server/conf/mail/welcome_email_fr.txt b/server/conf/mail/welcome_email_fr.txt
index beb2b30080..d175006869 100644
--- a/server/conf/mail/welcome_email_fr.txt
+++ b/server/conf/mail/welcome_email_fr.txt
@@ -1,4 +1,4 @@
-From: ISPConfig <postmaster@localhost.localdomain>
+From: {admin_name} <{admin_mail}>
 Subject: Bienvenue dans votre nouvelle boîte aux lettres
 
 Votre nouveau compte email est désormais activé. Votre webmaster.
diff --git a/server/conf/mail/welcome_email_hr.txt b/server/conf/mail/welcome_email_hr.txt
index 3c45f5ac0b..f288c480f0 100644
--- a/server/conf/mail/welcome_email_hr.txt
+++ b/server/conf/mail/welcome_email_hr.txt
@@ -1,4 +1,4 @@
-From: ISPConfig <postmaster@localhost.localdomain>
+From: {admin_name} <{admin_mail}>
 Subject: Dobrodošli u vaš novi email račun.
 
-Dobrodošli u vaš novi email račun. Vaš webmajstor.
\ No newline at end of file
+Dobrodošli u vaš novi email račun. Vaš webmajstor.
diff --git a/server/conf/mail/welcome_email_nl.txt b/server/conf/mail/welcome_email_nl.txt
index cd4baf4815..2fce985968 100644
--- a/server/conf/mail/welcome_email_nl.txt
+++ b/server/conf/mail/welcome_email_nl.txt
@@ -1,4 +1,4 @@
-From: ISPConfig <postmaster@localhost.localdomain>
+From: {admin_name} <{admin_mail}>
 Subject: Welkom in uw nieuwe account.
 
 Welkom in uw nieuwe email account. Uw webmaster.
diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php
index 4d5ac826d3..fb00166021 100644
--- a/server/plugins-available/mail_plugin.inc.php
+++ b/server/plugins-available/mail_plugin.inc.php
@@ -82,6 +82,7 @@ class mail_plugin {
 		//* get the config
 		$app->uses('getconf,system');
 		$mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail');
+		$global_mail_config = $app->getconf->get_global_config('mail');
 
 		// convert to lower case - it could cause problems if some directory above has upper case name
 		//  $data['new']['maildir'] = strtolower($data['new']['maildir']);
@@ -218,20 +219,30 @@ class mail_plugin {
 			$lines = file($conf['rootpath'].'/conf/mail/welcome_email_en.txt');
 		}
 
+		$placeholders = array(
+			'{domain}' => "$domain",
+			'{email}' => $data["new"]["email"],
+			'{admin_mail}' => ($global_mail_config['admin_mail'] != '' ? $global_mail_config['admin_mail'] : 'root'),
+			'{admin_name}' => ($global_mail_config['admin_name'] != '' ? $global_mail_config['admin_name'] : ''),
+		);
+
 		//* Get from address
 		$parts = explode(':', trim($lines[0]));
 		unset($parts[0]);
 		$welcome_mail_from  = implode(':', $parts);
 		unset($lines[0]);
+		$welcome_mail_from = strtr($welcome_mail_from, $placeholders);
 
 		//* Get subject
 		$parts = explode(':', trim($lines[1]));
 		unset($parts[0]);
 		$welcome_mail_subject  = implode(':', $parts);
 		unset($lines[1]);
+		$welcome_mail_subject = strtr($welcome_mail_subject, $placeholders);
 
 		//* Get message
 		$welcome_mail_message = trim(implode($lines));
+		$welcome_mail_message = strtr($welcome_mail_message, $placeholders);
 		unset($tmp);
 
 		$mailHeaders      = "MIME-Version: 1.0" . "\n";
@@ -247,8 +258,14 @@ class mail_plugin {
 		$mailTarget       = $data["new"]["email"];
 		$mailSubject      = "=?utf-8?B?".base64_encode($welcome_mail_subject)."?=";
 
-		//* Send the welcome email only on the "master" mail server to avoid duplicate emails
-		if($conf['mirror_server_id'] == 0) mail($mailTarget, $mailSubject, $welcome_mail_message, $mailHeaders);
+		$additionalParameters = '';
+		if (preg_match('/\b([A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63})\b/i', $welcome_mail_from, $matches)) {
+			$additionalParameters = '-f '.$matches[1];
+		}
+
+		// Send the welcome email only on a "master" mail server to avoid duplicate emails
+		// (bypass the normal ispcmail class when creating mail accounts)
+		if($conf['mirror_server_id'] == 0) mail($mailTarget, $mailSubject, $welcome_mail_message, $mailHeaders, $additionalParameters);
 
 	}
 
-- 
GitLab


From d376b4e5cef449a8342481ca79fe9ba373bac71c Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Sat, 14 Nov 2020 07:41:48 +0100
Subject: [PATCH 116/441] AA records wrong with issuewild and TYPE257 (Bind <
 9.9.6) (Fixes #5916)

---
 server/plugins-available/bind_plugin.inc.php | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index b152a8758d..a32a1931cd 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -286,6 +286,7 @@ class bind_plugin {
 
 			$records = $app->db->queryAllRecords("SELECT * FROM dns_rr WHERE zone = ? AND active = 'Y'", $zone['id']);
 			if(is_array($records) && !empty($records)){
+				$caa_add_rec = -1;
 				for($i=0;$i<sizeof($records);$i++){
 					if($records[$i]['ttl'] == 0) $records[$i]['ttl'] = '';
 					if($records[$i]['name'] == '') $records[$i]['name'] = '@';
@@ -301,7 +302,21 @@ class bind_plugin {
 						$records[$i]['data'] = implode(' ', $temp);
 						$data_new = str_replace(array('"', ' '), '', $records[$i]['data']);
 						$hex = unpack('H*', $data_new);
-						$hex[1] = '0005'.strtoupper($hex[1]);
+						if ($temp[1] == 'issuewild') {
+							$hex[1] = '0009'.strtoupper($hex[1]);
+							if ($caa_add_rec == -1) {
+								// add issue ";" if only issuewild recordsa
+								$caa_add_rec = array_push($records, $records[$i]);
+								$records[$caa_add_rec-1]['data'] = "\# 8 000569737375653B";
+							}
+						} else {
+							$hex[1] = '0005'.strtoupper($hex[1]);
+							if ($caa_add_rec > 0) {
+								// remove previously added issue ";" 
+								array_pop($records);
+							}
+							$caa_add_rec = -2;
+						}
 						$length = strlen($hex[1])/2;
 						$data_new = "\# $length $hex[1]";
 						$records[$i]['data'] = $data_new;
-- 
GitLab


From efca279741e56ab9ccb31d445a8491974f70ff06 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Mon, 16 Nov 2020 15:07:50 +0100
Subject: [PATCH 117/441] - added method onAfterDatalogSave - move update of
 spamfilter users to after datalog update

---
 interface/lib/classes/tform_actions.inc.php   | 11 +++++----
 interface/web/mail/spamfilter_policy_edit.php | 24 +++++++++++--------
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/interface/lib/classes/tform_actions.inc.php b/interface/lib/classes/tform_actions.inc.php
index d83ec0d3d7..0053be2663 100644
--- a/interface/lib/classes/tform_actions.inc.php
+++ b/interface/lib/classes/tform_actions.inc.php
@@ -141,6 +141,8 @@ class tform_actions {
 				$app->tform->datalogSave('UPDATE', $this->id, $this->oldDataRecord, $new_data_record);
 				unset($new_data_record);
 				unset($old_data_record);
+
+				$this->onAfterDatalogSave();
 			}
 
 			if($_REQUEST["next_tab"] == '') {
@@ -222,6 +224,7 @@ class tform_actions {
 				$new_data_record = $app->tform->getDataRecord($this->id);
 				$app->tform->datalogSave('INSERT', $this->id, array(), $new_data_record);
 				unset($new_data_record);
+				$this->onAfterDatalogSave(true);
 			}
 
 
@@ -264,21 +267,19 @@ class tform_actions {
 	}
 
 	function onBeforeUpdate() {
-		global $app, $conf;
 	}
 
 	function onBeforeInsert() {
-		global $app, $conf;
 	}
 
 	function onAfterUpdate() {
-		global $app, $conf;
 	}
 
 	function onAfterInsert() {
-		global $app, $conf;
 	}
 
+	function onAfterDatalogSave($insert = false) {
+	}
 
 	/**
 	 * Function called on data insert or update error
@@ -297,7 +298,7 @@ class tform_actions {
 	 */
 	function onDelete() {
 		global $app, $conf, $list_def_file, $tform_def_file;
-		
+
 		// Check CSRF Token
 		$app->auth->csrf_token_check('GET');
 
diff --git a/interface/web/mail/spamfilter_policy_edit.php b/interface/web/mail/spamfilter_policy_edit.php
index 572a184020..8b15f2fac6 100644
--- a/interface/web/mail/spamfilter_policy_edit.php
+++ b/interface/web/mail/spamfilter_policy_edit.php
@@ -49,7 +49,9 @@ $app->uses('tpl,tform,tform_actions');
 $app->load('tform_actions');
 
 class page_action extends tform_actions {
-	
+
+	private $record_has_changed = false;
+
 	function onShowNew() {
 		global $app;
 
@@ -87,30 +89,32 @@ class page_action extends tform_actions {
 
 		parent::onSubmit();
 	}
-	
+
 	function onAfterUpdate() {
-		global $app;
-		
-		$record_has_changed = false;
+		$this->record_has_changed = false;
 		foreach($this->dataRecord as $key => $val) {
 			if(isset($this->oldDataRecord[$key]) && @$this->oldDataRecord[$key] != $val) {
 				// Record has changed
-				$record_has_changed = true;
+				$this->record_has_changed = true;
 			}
 		}
+	}
 
-		if($record_has_changed){
+	function onAfterDatalogSave($insert = false) {
+		global $app;
+
+		if(!$insert && $this->record_has_changed){
 			$spamfilter_users = $app->db->queryAllRecords("SELECT * FROM spamfilter_users WHERE policy_id = ?", intval($this->id));
 
 			if(is_array($spamfilter_users) && !empty($spamfilter_users)){
 				foreach($spamfilter_users as $spamfilter_user){
 					$app->db->datalogUpdate('spamfilter_users', $spamfilter_user, 'id', $spamfilter_user["id"], true);
-					
+
 					// check if this is an email domain
 					if(substr($spamfilter_user['email'],0,1) == '@') {
 						$domain = substr($spamfilter_user['email'],1);
 						$forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source LIKE ? OR destination LIKE ?", "%@" . $domain, "%@" . $domain);
-						
+
 						// Force-update aliases and forwards
 						if(is_array($forwardings)) {
 							foreach($forwardings as $rec) {
@@ -118,7 +122,7 @@ class page_action extends tform_actions {
 							}
 						}
 					}
-					
+
 				}
 			}
 		}
-- 
GitLab


From 29c8d7e90ec2d49c77efb298a9d8e2964bb34d1c Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 17 Nov 2020 12:26:27 +0100
Subject: [PATCH 118/441] - fixed potential shell user vulnerability

---
 interface/lib/classes/functions.inc.php       | 78 +++++++++++++------
 interface/lib/classes/tform_base.inc.php      |  5 +-
 interface/web/sites/form/shell_user.tform.php |  6 ++
 server/lib/classes/functions.inc.php          | 32 +++++++-
 server/lib/classes/system.inc.php             | 30 +++++++
 .../shelluser_base_plugin.inc.php             | 16 ++++
 6 files changed, 139 insertions(+), 28 deletions(-)

diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index 03e331f0f1..4d4c011fb5 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -61,7 +61,7 @@ class functions {
 		if(is_string($to) && strpos($to, ',') !== false) {
 				$to = preg_split('/\s*,\s*/', $to);
 		}
-		
+
 		$app->ispcmail->send($to);
 		$app->ispcmail->finish();
 
@@ -234,7 +234,7 @@ class functions {
 				if(preg_match($regex, $result['ip'])) $ips[] = $result['ip'];
 			}
 		}
-		
+
 		$results = $app->db->queryAllRecords("SELECT remote_ips FROM web_database WHERE remote_ips != ''");
 		if(!empty($results) && is_array($results)){
 			foreach($results as $result){
@@ -290,6 +290,34 @@ class functions {
 		return round(pow(1024, $base-floor($base)), $precision).$suffixes[floor($base)];
 	}
 
+
+	/**
+	 * Normalize a path and strip duplicate slashes from it
+	 *
+	 * This will also remove all /../ from the path, reducing the preceding path elements
+	 *
+	 * @param string $path
+	 * @return string
+	 */
+	public function normalize_path($path) {
+		$path = preg_replace('~[/]{2,}~', '/', $path);
+		$parts = explode('/', $path);
+		$return_parts = array();
+
+		foreach($parts as $current_part) {
+			if($current_part === '..') {
+				if(!empty($return_parts) && end($return_parts) !== '') {
+					array_pop($return_parts);
+				}
+			} else {
+				$return_parts[] = $current_part;
+			}
+		}
+
+		return implode('/', $return_parts);
+	}
+
+
 	/** IDN converter wrapper.
 	 * all converter classes should be placed in ISPC_CLASS_PATH.'/idn/'
 	 */
@@ -370,42 +398,42 @@ class functions {
 
 	public function is_allowed_user($username, $restrict_names = false) {
 		global $app;
-		
+
 		$name_blacklist = array('root','ispconfig','vmail','getmail');
 		if(in_array($username,$name_blacklist)) return false;
-		
+
 		if(preg_match('/^[a-zA-Z0-9\.\-_]{1,32}$/', $username) == false) return false;
-		
+
 		if($restrict_names == true && preg_match('/^web\d+$/', $username) == false) return false;
-		
+
 		return true;
 	}
-	
+
 	public function is_allowed_group($groupname, $restrict_names = false) {
 		global $app;
-		
+
 		$name_blacklist = array('root','ispconfig','vmail','getmail');
 		if(in_array($groupname,$name_blacklist)) return false;
-		
+
 		if(preg_match('/^[a-zA-Z0-9\.\-_]{1,32}$/', $groupname) == false) return false;
-		
+
 		if($restrict_names == true && preg_match('/^client\d+$/', $groupname) == false) return false;
-		
+
 		return true;
 	}
-	
+
 	public function getimagesizefromstring($string){
 		if (!function_exists('getimagesizefromstring')) {
 			$uri = 'data://application/octet-stream;base64,' . base64_encode($string);
 			return getimagesize($uri);
 		} else {
 			return getimagesizefromstring($string);
-		}		
+		}
 	}
-	
+
 	public function password($minLength = 10, $special = false){
 		global $app;
-	
+
 		$iteration = 0;
 		$password = "";
 		$maxLength = $minLength + 5;
@@ -430,7 +458,7 @@ class functions {
 	public function getRandomInt($min, $max){
 		return floor((mt_rand() / mt_getrandmax()) * ($max - $min + 1)) + $min;
 	}
-	
+
 	public function generate_customer_no(){
 		global $app;
 		// generate customer no.
@@ -438,13 +466,13 @@ class functions {
 		while($app->db->queryOneRecord("SELECT client_id FROM client WHERE customer_no = ?", $customer_no)) {
 			$customer_no = mt_rand(100000, 999999);
 		}
-		
+
 		return $customer_no;
 	}
-	
+
 	public function generate_ssh_key($client_id, $username = ''){
 		global $app;
-		
+
 		// generate the SSH key pair for the client
 		$id_rsa_file = '/tmp/'.uniqid('',true);
 		$id_rsa_pub_file = $id_rsa_file.'.pub';
@@ -458,7 +486,7 @@ class functions {
 			$app->log("Failed to create SSH keypair for ".$username, LOGLEVEL_WARN);
 		}
 	}
-	
+
 	public function htmlentities($value) {
 		global $conf;
 
@@ -474,10 +502,10 @@ class functions {
 		} else {
 			$out = htmlentities($value, ENT_QUOTES, $conf["html_content_encoding"]);
 		}
-		
+
 		return $out;
 	}
-	
+
 	// Function to check paths before we use it as include. Use with absolute paths only.
 	public function check_include_path($path) {
 		if(strpos($path,'//') !== false) die('Include path seems to be an URL: '.$this->htmlentities($path));
@@ -488,7 +516,7 @@ class functions {
 		if(substr($path,0,strlen(ISPC_ROOT_PATH)) != ISPC_ROOT_PATH) die('Path '.$this->htmlentities($path).' is outside of ISPConfig installation directory.');
 		return $path;
 	}
-	
+
 	// Function to check language strings
 	public function check_language($language) {
 		global $app;
@@ -496,10 +524,10 @@ class functions {
 			 return $language;
 		} else {
 			$app->log('Wrong language string: '.$this->htmlentities($language),1);
-			return 'en';	
+			return 'en';
 		}
 	}
-	
+
 }
 
 ?>
diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php
index 91a855872c..72ddb4b6ae 100644
--- a/interface/lib/classes/tform_base.inc.php
+++ b/interface/lib/classes/tform_base.inc.php
@@ -399,7 +399,7 @@ class tform_base {
 				$tmp_key = $limit_parts[2];
 				$allowed = $allowed = explode(',',$tmp_conf[$tmp_key]);
 			}
-			
+
 			if($formtype == 'CHECKBOX') {
 				if(strstr($limit,'force_')) {
 					// Force the checkbox field to be ticked and enabled
@@ -958,6 +958,9 @@ class tform_base {
 				case 'STRIPNL':
 					$returnval = str_replace(array("\n","\r"),'', $returnval);
 					break;
+				case 'NORMALIZEPATH':
+					$returnval = $app->functions->normalize_path($returnval);
+					break;
 				default:
 					$this->errorMessage .= "Unknown Filter: ".$filter['type'];
 					break;
diff --git a/interface/web/sites/form/shell_user.tform.php b/interface/web/sites/form/shell_user.tform.php
index f4e83a1b57..523a03687a 100644
--- a/interface/web/sites/form/shell_user.tform.php
+++ b/interface/web/sites/form/shell_user.tform.php
@@ -232,6 +232,12 @@ if($_SESSION["s"]["user"]["typ"] == 'admin') {
 			'dir' => array (
 				'datatype' => 'VARCHAR',
 				'formtype' => 'TEXT',
+				'filters' => array(
+										0 => array (
+														'event' => 'SAVE',
+														'type' => 'NORMALIZEPATH'
+										)
+				),
 				'validators' => array ( 0 => array ( 	'type' => 'NOTEMPTY',
 														'errmsg'=> 'directory_error_empty'),
 										1 => array ( 	'type' => 'REGEX',
diff --git a/server/lib/classes/functions.inc.php b/server/lib/classes/functions.inc.php
index 5da1f3d713..5296c3012b 100644
--- a/server/lib/classes/functions.inc.php
+++ b/server/lib/classes/functions.inc.php
@@ -356,6 +356,34 @@ class functions {
 		}
 	}
 
+
+	/**
+	 * Normalize a path and strip duplicate slashes from it
+	 *
+	 * This will also remove all /../ from the path, reducing the preceding path elements
+	 *
+	 * @param string $path
+	 * @return string
+	 */
+	public function normalize_path($path) {
+		$path = preg_replace('~[/]{2,}~', '/', $path);
+		$parts = explode('/', $path);
+		$return_parts = array();
+
+		foreach($parts as $current_part) {
+			if($current_part === '..') {
+				if(!empty($return_parts) && end($return_parts) !== '') {
+					array_pop($return_parts);
+				}
+			} else {
+				$return_parts[] = $current_part;
+			}
+		}
+
+		return implode('/', $return_parts);
+	}
+
+
 	/** IDN converter wrapper.
 	 * all converter classes should be placed in ISPC_CLASS_PATH.'/idn/'
 	 */
@@ -435,10 +463,10 @@ class functions {
 		}
 		return implode("\n", $domains);
 	}
-	
+
 	public function generate_ssh_key($client_id, $username = ''){
 		global $app;
-		
+
 		// generate the SSH key pair for the client
 		$id_rsa_file = '/tmp/'.uniqid('',true);
 		$id_rsa_pub_file = $id_rsa_file.'.pub';
diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 131d10f244..8a8a2f4fb0 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2300,6 +2300,36 @@ class system{
 		return true;
 	}
 
+	public function is_allowed_path($path) {
+		global $app;
+
+		$path = $app->functions->normalize_path($path);
+		if(file_exists($path)) {
+			$path = realpath($path);
+		}
+
+		$blacklisted_paths_regex = array(
+			'@^/$@',
+			'@^/proc(/.*)?$@',
+			'@^/sys(/.*)?$@',
+			'@^/etc(/.*)$@',
+			'@^/dev(/.*)$@',
+			'@^/tmp(/.*)$@',
+			'@^/run(/.*)$@',
+			'@^/boot(/.*)$@',
+			'@^/root(/.*)$@',
+			'@^/var(/?|/backups?(/.*)?)?$@',
+		);
+
+		foreach($blacklisted_paths_regex as $regex) {
+			if(preg_match($regex, $path)) {
+				return false;
+			}
+		}
+
+		return true;
+	}
+
 	public function last_exec_out() {
 		return $this->_last_exec_out;
 	}
diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php
index 71653cf5c2..39ab2298ad 100755
--- a/server/plugins-available/shelluser_base_plugin.inc.php
+++ b/server/plugins-available/shelluser_base_plugin.inc.php
@@ -96,6 +96,14 @@ class shelluser_base_plugin {
 			return false;
 		}
 
+		if(is_file($data['new']['dir']) || is_link($data['new']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOVLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['new']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOVLEVEL_WARN);
+			return false;
+		}
+
 		if($data['new']['active'] != 'y' || $data['new']['chroot'] == "jailkit") $data['new']['shell'] = '/bin/false';
 
 		if($app->system->is_user($data['new']['puser'])) {
@@ -207,6 +215,14 @@ class shelluser_base_plugin {
 			return false;
 		}
 
+		if(is_file($data['new']['dir']) || is_link($data['new']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOVLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['new']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOVLEVEL_WARN);
+			return false;
+		}
+
 		if($data['new']['active'] != 'y') $data['new']['shell'] = '/bin/false';
 
 		if($app->system->is_user($data['new']['puser'])) {
-- 
GitLab


From f45e5fae5ac5672b7d51ea6bb6c096093458928b Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 17 Nov 2020 13:51:52 +0100
Subject: [PATCH 119/441] - fixed problems from implementation of vulnerability
 fix

---
 server/lib/classes/system.inc.php             | 18 ++++++++----
 .../shelluser_base_plugin.inc.php             | 16 ++++++++---
 .../shelluser_jailkit_plugin.inc.php          | 28 +++++++++++++++++++
 3 files changed, 52 insertions(+), 10 deletions(-)

diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 8a8a2f4fb0..a26707b0ae 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2312,12 +2312,12 @@ class system{
 			'@^/$@',
 			'@^/proc(/.*)?$@',
 			'@^/sys(/.*)?$@',
-			'@^/etc(/.*)$@',
-			'@^/dev(/.*)$@',
-			'@^/tmp(/.*)$@',
-			'@^/run(/.*)$@',
-			'@^/boot(/.*)$@',
-			'@^/root(/.*)$@',
+			'@^/etc(/.*)?$@',
+			'@^/dev(/.*)?$@',
+			'@^/tmp(/.*)?$@',
+			'@^/run(/.*)?$@',
+			'@^/boot(/.*)?$@',
+			'@^/root(/.*)?$@',
 			'@^/var(/?|/backups?(/.*)?)?$@',
 		);
 
@@ -2380,6 +2380,8 @@ class system{
 	}
 
 	public function create_jailkit_user($username, $home_dir, $user_home_dir, $shell = '/bin/bash', $p_user = null, $p_user_home_dir = null) {
+		global $app;
+
 		// Disallow operating on root directory
 		if(realpath($home_dir) == '/') {
 			$app->log("create_jailkit_user: invalid home_dir: $home_dir", LOGLEVEL_WARN);
@@ -2409,6 +2411,8 @@ class system{
 	}
 
 	public function create_jailkit_chroot($home_dir, $app_sections = array(), $options = array()) {
+		global $app;
+
 		// Disallow operating on root directory
 		if(realpath($home_dir) == '/') {
 			$app->log("create_jailkit_chroot: invalid home_dir: $home_dir", LOGLEVEL_WARN);
@@ -2480,6 +2484,8 @@ class system{
 	}
 
 	public function create_jailkit_programs($home_dir, $programs = array(), $options = array()) {
+		global $app;
+
 		// Disallow operating on root directory
 		if(realpath($home_dir) == '/') {
 			$app->log("create_jailkit_programs: invalid home_dir: $home_dir", LOGLEVEL_WARN);
diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php
index 39ab2298ad..f9a316d90e 100755
--- a/server/plugins-available/shelluser_base_plugin.inc.php
+++ b/server/plugins-available/shelluser_base_plugin.inc.php
@@ -97,10 +97,10 @@ class shelluser_base_plugin {
 		}
 
 		if(is_file($data['new']['dir']) || is_link($data['new']['dir'])) {
-			$app->log('Shell user dir must not be existing file or symlink.', LOVLEVEL_WARN);
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
 			return false;
 		} elseif(!$app->system->is_allowed_path($data['new']['dir'])) {
-			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOVLEVEL_WARN);
+			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOGLEVEL_WARN);
 			return false;
 		}
 
@@ -216,10 +216,10 @@ class shelluser_base_plugin {
 		}
 
 		if(is_file($data['new']['dir']) || is_link($data['new']['dir'])) {
-			$app->log('Shell user dir must not be existing file or symlink.', LOVLEVEL_WARN);
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
 			return false;
 		} elseif(!$app->system->is_allowed_path($data['new']['dir'])) {
-			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOVLEVEL_WARN);
+			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOGLEVEL_WARN);
 			return false;
 		}
 
@@ -320,6 +320,14 @@ class shelluser_base_plugin {
 			return false;
 		}
 
+		if(is_file($data['old']['dir']) || is_link($data['old']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['old']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['old']['dir'], LOGLEVEL_WARN);
+			return false;
+		}
+
 		if($app->system->is_user($data['old']['username'])) {
 			// Get the UID of the user
 			$userid = intval($app->system->getuid($data['old']['username']));
diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php
index 3f8d94d2a7..dbc3d8041b 100755
--- a/server/plugins-available/shelluser_jailkit_plugin.inc.php
+++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php
@@ -89,6 +89,15 @@ class shelluser_jailkit_plugin {
 			return false;
 		}
 
+		if(is_file($data['new']['dir']) || is_link($data['new']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['new']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOGLEVEL_WARN);
+			return false;
+		}
+
+
 		if($app->system->is_user($data['new']['puser'])) {
 			// Get the UID of the parent user
 			$uid = intval($app->system->getuid($data['new']['puser']));
@@ -170,6 +179,14 @@ class shelluser_jailkit_plugin {
 			return false;
 		}
 
+		if(is_file($data['new']['dir']) || is_link($data['new']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['new']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOGLEVEL_WARN);
+			return false;
+		}
+
 		if($app->system->is_user($data['new']['puser'])) {
 			$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']);
 
@@ -241,6 +258,14 @@ class shelluser_jailkit_plugin {
 			return false;
 		}
 
+		if(is_file($data['old']['dir']) || is_link($data['old']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['old']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['old']['dir'], LOGLEVEL_WARN);
+			return false;
+		}
+
 		if ($data['old']['chroot'] == "jailkit")
 		{
 			$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['old']['parent_domain_id']);
@@ -518,6 +543,9 @@ class shelluser_jailkit_plugin {
 		}
 		//* Get the keys
 		$existing_keys = file($sshkeys, FILE_IGNORE_NEW_LINES);
+		if(!$existing_keys) {
+			$existing_keys = array();
+		}
 		$new_keys = explode("\n", $sshrsa);
 		$old_keys = explode("\n", $this->data['old']['ssh_rsa']);
 
-- 
GitLab


From 764f10b4f308b8572348e779423f281ea196aa86 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 17 Nov 2020 14:36:21 +0100
Subject: [PATCH 120/441] - proposed fix for missing database backups

---
 server/lib/classes/backup.inc.php | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php
index 23d6171f4f..e7333356b4 100644
--- a/server/lib/classes/backup.inc.php
+++ b/server/lib/classes/backup.inc.php
@@ -1145,7 +1145,7 @@ class backup
         if (empty($backup_job))
             $backup_job = "auto";
 
-        $records = $app->db->queryAllRecords("SELECT * FROM web_database WHERE server_id = ? AND parent_domain_id = ?", $server_id, $domain_id);
+        $records = $app->dbmaster->queryAllRecords("SELECT * FROM web_database WHERE server_id = ? AND parent_domain_id = ?", $server_id, $domain_id);
         if (empty($records)){
             $app->log('Skipping database backup for domain ' . $web_domain['domain_id'] . ', because no related databases found.', LOGLEVEL_DEBUG);
             return true;
@@ -1396,17 +1396,17 @@ class backup
      */
     public static function run_backup($domain_id, $type, $backup_job, $mount = true)
     {
-        global $app;
+        global $app, $conf;
 
         $domain_id = intval($domain_id);
 
         $sql = "SELECT * FROM web_domain WHERE (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND domain_id = ?";
-        $rec = $app->db->queryOneRecord($sql, $domain_id);
+        $rec = $app->dbmaster->queryOneRecord($sql, $domain_id);
         if (empty($rec)) {
             $app->log('Failed to make backup of type ' . $type . ', because no information present about requested domain id ' . $domain_id, LOGLEVEL_ERROR);
             return false;
         }
-        $server_id = intval($rec['server_id']);
+        $server_id = intval($conf['server_id']);
 
         if ($mount && !self::mount_backup_dir($server_id)) {
             $app->log('Failed to make backup of type ' . $type . ' for domain id ' . $domain_id . ', because failed to mount backup directory', LOGLEVEL_ERROR);
@@ -1419,6 +1419,7 @@ class backup
                 $ok = self::make_web_backup($rec, $backup_job);
                 break;
             case 'mysql':
+				$rec['server_id'] = $server_id;
                 $ok = self::make_database_backup($rec, $backup_job);
                 break;
             default:
@@ -1443,7 +1444,7 @@ class backup
         $server_id = intval($server_id);
 
         $sql = "SELECT * FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y' AND backup_interval != 'none' AND backup_interval != ''";
-        $domains = $app->db->queryAllRecords($sql, $server_id);
+        $domains = $app->dbmaster->queryAllRecords($sql, $server_id);
 
         if (!self::mount_backup_dir($server_id)) {
             $app->log('Failed to run regular backups routine because failed to mount backup directory', LOGLEVEL_ERROR);
@@ -1456,7 +1457,15 @@ class backup
         foreach ($domains as $domain) {
             if (($domain['backup_interval'] == 'daily' or ($domain['backup_interval'] == 'weekly' && $date_of_week == 0) or ($domain['backup_interval'] == 'monthly' && $date_of_month == '01'))) {
                 self::run_backup($domain['domain_id'], 'web', $backup_job, false);
-                self::run_backup($domain['domain_id'], 'mysql', $backup_job, false);
+            }
+        }
+
+		$sql = "SELECT DISTINCT d.*, db.server_id as `server_id` FROM web_database as db INNER JOIN web_domain as d ON (d.domain_id = db.parent_domain_id) WHERE db.server_id = ? AND db.active = 'y' AND d.backup_interval != 'none' AND d.backup_interval != ''";
+        $databases = $app->dbmaster->queryAllRecords($sql, $server_id);
+
+        foreach ($databases as $database) {
+            if (($database['backup_interval'] == 'daily' or ($database['backup_interval'] == 'weekly' && $date_of_week == 0) or ($database['backup_interval'] == 'monthly' && $date_of_month == '01'))) {
+                self::run_backup($database['domain_id'], 'mysql', $backup_job, false);
             }
         }
         self::unmount_backup_dir($server_id);
-- 
GitLab


From 2513d9b66f6b1ad0e7101188fe18087183826a1b Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 17 Nov 2020 14:37:31 +0100
Subject: [PATCH 121/441] Revert "- proposed fix for missing database backups"

This reverts commit 764f10b4f308b8572348e779423f281ea196aa86
---
 server/lib/classes/backup.inc.php | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php
index e7333356b4..23d6171f4f 100644
--- a/server/lib/classes/backup.inc.php
+++ b/server/lib/classes/backup.inc.php
@@ -1145,7 +1145,7 @@ class backup
         if (empty($backup_job))
             $backup_job = "auto";
 
-        $records = $app->dbmaster->queryAllRecords("SELECT * FROM web_database WHERE server_id = ? AND parent_domain_id = ?", $server_id, $domain_id);
+        $records = $app->db->queryAllRecords("SELECT * FROM web_database WHERE server_id = ? AND parent_domain_id = ?", $server_id, $domain_id);
         if (empty($records)){
             $app->log('Skipping database backup for domain ' . $web_domain['domain_id'] . ', because no related databases found.', LOGLEVEL_DEBUG);
             return true;
@@ -1396,17 +1396,17 @@ class backup
      */
     public static function run_backup($domain_id, $type, $backup_job, $mount = true)
     {
-        global $app, $conf;
+        global $app;
 
         $domain_id = intval($domain_id);
 
         $sql = "SELECT * FROM web_domain WHERE (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND domain_id = ?";
-        $rec = $app->dbmaster->queryOneRecord($sql, $domain_id);
+        $rec = $app->db->queryOneRecord($sql, $domain_id);
         if (empty($rec)) {
             $app->log('Failed to make backup of type ' . $type . ', because no information present about requested domain id ' . $domain_id, LOGLEVEL_ERROR);
             return false;
         }
-        $server_id = intval($conf['server_id']);
+        $server_id = intval($rec['server_id']);
 
         if ($mount && !self::mount_backup_dir($server_id)) {
             $app->log('Failed to make backup of type ' . $type . ' for domain id ' . $domain_id . ', because failed to mount backup directory', LOGLEVEL_ERROR);
@@ -1419,7 +1419,6 @@ class backup
                 $ok = self::make_web_backup($rec, $backup_job);
                 break;
             case 'mysql':
-				$rec['server_id'] = $server_id;
                 $ok = self::make_database_backup($rec, $backup_job);
                 break;
             default:
@@ -1444,7 +1443,7 @@ class backup
         $server_id = intval($server_id);
 
         $sql = "SELECT * FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y' AND backup_interval != 'none' AND backup_interval != ''";
-        $domains = $app->dbmaster->queryAllRecords($sql, $server_id);
+        $domains = $app->db->queryAllRecords($sql, $server_id);
 
         if (!self::mount_backup_dir($server_id)) {
             $app->log('Failed to run regular backups routine because failed to mount backup directory', LOGLEVEL_ERROR);
@@ -1457,15 +1456,7 @@ class backup
         foreach ($domains as $domain) {
             if (($domain['backup_interval'] == 'daily' or ($domain['backup_interval'] == 'weekly' && $date_of_week == 0) or ($domain['backup_interval'] == 'monthly' && $date_of_month == '01'))) {
                 self::run_backup($domain['domain_id'], 'web', $backup_job, false);
-            }
-        }
-
-		$sql = "SELECT DISTINCT d.*, db.server_id as `server_id` FROM web_database as db INNER JOIN web_domain as d ON (d.domain_id = db.parent_domain_id) WHERE db.server_id = ? AND db.active = 'y' AND d.backup_interval != 'none' AND d.backup_interval != ''";
-        $databases = $app->dbmaster->queryAllRecords($sql, $server_id);
-
-        foreach ($databases as $database) {
-            if (($database['backup_interval'] == 'daily' or ($database['backup_interval'] == 'weekly' && $date_of_week == 0) or ($database['backup_interval'] == 'monthly' && $date_of_month == '01'))) {
-                self::run_backup($database['domain_id'], 'mysql', $backup_job, false);
+                self::run_backup($domain['domain_id'], 'mysql', $backup_job, false);
             }
         }
         self::unmount_backup_dir($server_id);
-- 
GitLab


From ea370950cee372d0d791866bca2d32629664e953 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 17 Nov 2020 14:40:13 +0100
Subject: [PATCH 122/441]  proposed fix for missing database backups

---
 server/lib/classes/backup.inc.php | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php
index 23d6171f4f..e7333356b4 100644
--- a/server/lib/classes/backup.inc.php
+++ b/server/lib/classes/backup.inc.php
@@ -1145,7 +1145,7 @@ class backup
         if (empty($backup_job))
             $backup_job = "auto";
 
-        $records = $app->db->queryAllRecords("SELECT * FROM web_database WHERE server_id = ? AND parent_domain_id = ?", $server_id, $domain_id);
+        $records = $app->dbmaster->queryAllRecords("SELECT * FROM web_database WHERE server_id = ? AND parent_domain_id = ?", $server_id, $domain_id);
         if (empty($records)){
             $app->log('Skipping database backup for domain ' . $web_domain['domain_id'] . ', because no related databases found.', LOGLEVEL_DEBUG);
             return true;
@@ -1396,17 +1396,17 @@ class backup
      */
     public static function run_backup($domain_id, $type, $backup_job, $mount = true)
     {
-        global $app;
+        global $app, $conf;
 
         $domain_id = intval($domain_id);
 
         $sql = "SELECT * FROM web_domain WHERE (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND domain_id = ?";
-        $rec = $app->db->queryOneRecord($sql, $domain_id);
+        $rec = $app->dbmaster->queryOneRecord($sql, $domain_id);
         if (empty($rec)) {
             $app->log('Failed to make backup of type ' . $type . ', because no information present about requested domain id ' . $domain_id, LOGLEVEL_ERROR);
             return false;
         }
-        $server_id = intval($rec['server_id']);
+        $server_id = intval($conf['server_id']);
 
         if ($mount && !self::mount_backup_dir($server_id)) {
             $app->log('Failed to make backup of type ' . $type . ' for domain id ' . $domain_id . ', because failed to mount backup directory', LOGLEVEL_ERROR);
@@ -1419,6 +1419,7 @@ class backup
                 $ok = self::make_web_backup($rec, $backup_job);
                 break;
             case 'mysql':
+				$rec['server_id'] = $server_id;
                 $ok = self::make_database_backup($rec, $backup_job);
                 break;
             default:
@@ -1443,7 +1444,7 @@ class backup
         $server_id = intval($server_id);
 
         $sql = "SELECT * FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y' AND backup_interval != 'none' AND backup_interval != ''";
-        $domains = $app->db->queryAllRecords($sql, $server_id);
+        $domains = $app->dbmaster->queryAllRecords($sql, $server_id);
 
         if (!self::mount_backup_dir($server_id)) {
             $app->log('Failed to run regular backups routine because failed to mount backup directory', LOGLEVEL_ERROR);
@@ -1456,7 +1457,15 @@ class backup
         foreach ($domains as $domain) {
             if (($domain['backup_interval'] == 'daily' or ($domain['backup_interval'] == 'weekly' && $date_of_week == 0) or ($domain['backup_interval'] == 'monthly' && $date_of_month == '01'))) {
                 self::run_backup($domain['domain_id'], 'web', $backup_job, false);
-                self::run_backup($domain['domain_id'], 'mysql', $backup_job, false);
+            }
+        }
+
+		$sql = "SELECT DISTINCT d.*, db.server_id as `server_id` FROM web_database as db INNER JOIN web_domain as d ON (d.domain_id = db.parent_domain_id) WHERE db.server_id = ? AND db.active = 'y' AND d.backup_interval != 'none' AND d.backup_interval != ''";
+        $databases = $app->dbmaster->queryAllRecords($sql, $server_id);
+
+        foreach ($databases as $database) {
+            if (($database['backup_interval'] == 'daily' or ($database['backup_interval'] == 'weekly' && $date_of_week == 0) or ($database['backup_interval'] == 'monthly' && $date_of_month == '01'))) {
+                self::run_backup($database['domain_id'], 'mysql', $backup_job, false);
             }
         }
         self::unmount_backup_dir($server_id);
-- 
GitLab


From 3ee678994658f42cbb5975a23497decdef77cea7 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 17 Nov 2020 16:38:35 +0100
Subject: [PATCH 123/441] - add support for remote backup utils check

---
 .../web/sites/form/web_vhost_domain.tform.php |  59 +++++++---
 .../classes/cron.d/100-monitor_backup.inc.php | 110 ++++++++++++++++++
 2 files changed, 152 insertions(+), 17 deletions(-)
 create mode 100644 server/lib/classes/cron.d/100-monitor_backup.inc.php

diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php
index ef365259b8..332606de6b 100644
--- a/interface/web/sites/form/web_vhost_domain.tform.php
+++ b/interface/web/sites/form/web_vhost_domain.tform.php
@@ -640,24 +640,49 @@ $form["tabs"]['stats'] = array (
 
 //* Backup
 if ($backup_available) {
+
+	$domain_server_id = null;
+	if(isset($_REQUEST["id"])) {
+		$domain_id = $app->functions->intval($_REQUEST["id"]);
+		if($domain_id) {
+			$domain_data = $app->db->queryOneRecord('SELECT `server_id` FROM `web_domain` WHERE `domain_id` = ?', $domain_id);
+			if($domain_data) {
+				$domain_server_id = $domain_data['server_id'];
+			}
+		}
+	}
+	if(!$domain_server_id) {
+		$domain_server_id = $conf['server_id'];
+	}
+
 	$missing_utils = array();
-	$compressors_list = array(
-		'gzip',
-		'gunzip',
-		'zip',
-		'unzip',
-		'pigz',
-		'tar',
-		'bzip2',
-		'bunzip2',
-		'xz',
-		'unxz',
-		'7z',
-		'rar',
-	);
-	foreach ($compressors_list as $compressor) {
-		if (!$app->system->is_installed($compressor)) {
-			array_push($missing_utils, $compressor);
+	if($domain_server_id != $conf['server_id']) {
+		$mon = $app->db->queryOneRecord('SELECT `data` FROM `monitor_data` WHERE `server_id` = ? AND `type` = ? ORDER BY `created` DESC', $domain_server_id, 'backup_utils');
+		if($mon) {
+			$missing_utils = unserialize($mon['data']);
+			if(!$missing_utils) {
+				$missing_utils = array();
+			}
+		}
+	} else {
+		$compressors_list = array(
+			'gzip',
+			'gunzip',
+			'zip',
+			'unzip',
+			'pigz',
+			'tar',
+			'bzip2',
+			'bunzip2',
+			'xz',
+			'unxz',
+			'7z',
+			'rar',
+		);
+		foreach ($compressors_list as $compressor) {
+			if (!$app->system->is_installed($compressor)) {
+				array_push($missing_utils, $compressor);
+			}
 		}
 	}
 	$app->tpl->setVar("missing_utils", implode(", ",$missing_utils), true);
diff --git a/server/lib/classes/cron.d/100-monitor_backup.inc.php b/server/lib/classes/cron.d/100-monitor_backup.inc.php
new file mode 100644
index 0000000000..40f5362082
--- /dev/null
+++ b/server/lib/classes/cron.d/100-monitor_backup.inc.php
@@ -0,0 +1,110 @@
+<?php
+
+/*
+Copyright (c) 2013, Marius Cramer, pixcept KG
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+class cronjob_monitor_backup extends cronjob {
+
+	// job schedule
+	protected $_schedule = '*/5 * * * *';
+	protected $_run_at_new = true;
+
+	private $_tools = null;
+
+	/* this function is optional if it contains no custom code */
+	public function onPrepare() {
+		parent::onPrepare();
+	}
+
+	/* this function is optional if it contains no custom code */
+	public function onBeforeRun() {
+		return parent::onBeforeRun();
+	}
+
+	public function onRunJob() {
+		global $app, $conf;
+
+		/* used for all monitor cronjobs */
+		$app->load('monitor_tools');
+		$this->_tools = new monitor_tools();
+		/* end global section for monitor cronjobs */
+
+		/* the id of the server as int */
+		$server_id = intval($conf['server_id']);
+
+		/** The type of the data */
+
+
+		$type = 'backup_utils';
+
+		$missing_utils = array();
+		$compressors_list = array(
+			'gzip',
+			'gunzip',
+			'zip',
+			'unzip',
+			'pigz',
+			'tar',
+			'bzip2',
+			'bunzip2',
+			'xz',
+			'unxz',
+			'7z',
+			'rar',
+		);
+		foreach ($compressors_list as $compressor) {
+			if (!$app->system->is_installed($compressor)) {
+				$missing_utils[] = $compressor;
+			}
+		}
+
+		$res = array();
+		$res['server_id'] = $server_id;
+		$res['type'] = $type;
+		$res['data'] = array('missing_utils' => $missing_utils);
+		$res['state'] = 'ok';
+
+		/*
+		 * Insert the data into the database
+		 */
+		$sql = 'REPLACE INTO monitor_data (server_id, type, created, data, state) ' .
+			'VALUES (?, ?, UNIX_TIMESTAMP(), ?, ?)';
+		$app->dbmaster->query($sql, $res['server_id'], $res['type'], serialize($res['data']), $res['state']);
+
+		/* The new data is written, now we can delete the old one */
+		$this->_tools->delOldRecords($res['type'], $res['server_id']);
+
+		parent::onRunJob();
+	}
+
+	/* this function is optional if it contains no custom code */
+	public function onAfterRun() {
+		parent::onAfterRun();
+	}
+
+}
-- 
GitLab


From f2b5bc696d710c1534219daf38dc110f2d95d1ed Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 17 Nov 2020 16:52:28 +0100
Subject: [PATCH 124/441] - fixed error in editing database remote ip address

---
 interface/web/sites/database_edit.php | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php
index 279ccbaf95..60b26bc767 100644
--- a/interface/web/sites/database_edit.php
+++ b/interface/web/sites/database_edit.php
@@ -211,7 +211,7 @@ class page_action extends tform_actions {
 					unset($global_config);
 					unset($dbname_prefix);
 				}
-				
+
 				//* ensure that quota value is not 0 when quota is set for client
 				if($client['limit_database_quota'] > 0 && isset($_POST["database_quota"]) && $_POST["database_quota"] == 0) {
 					$app->tform->errorMessage .= $app->tform->lng("limit_database_quota_not_0_txt")."<br>";
@@ -364,7 +364,11 @@ class page_action extends tform_actions {
 			$server_config = $app->getconf->get_server_config($tmp['server_id'], 'server');
 
 			// Add default remote_ips from Main Configuration.
-			$remote_ips = explode(",", $global_config['default_remote_dbserver']);
+			if(empty($global_config['default_remote_dbserver'])) {
+				$remote_ips = array();
+			} else {
+				$remote_ips = explode(",", $global_config['default_remote_dbserver']);
+			}
 			if (!in_array($server_config['ip_address'], $default_remote_db)) { $remote_ips[] = $server_config['ip_address']; }
 
 			if($server_config['ip_address']!='') {
@@ -449,7 +453,12 @@ class page_action extends tform_actions {
 			$server_config = $app->getconf->get_server_config($tmp['server_id'], 'server');
 
 			// Add default remote_ips from Main Configuration.
-			$remote_ips = explode(",", $global_config['default_remote_dbserver']);
+			if(empty($global_config['default_remote_dbserver'])) {
+				$remote_ips = array();
+			} else {
+				$remote_ips = explode(",", $global_config['default_remote_dbserver']);
+			}
+			
 			if (!in_array($server_config['ip_address'], $default_remote_db)) { $remote_ips[] = $server_config['ip_address']; }
 
 			if($server_config['ip_address']!='') {
-- 
GitLab


From 12d38e85ed78ecb1abc0b9315afbcc94f958892a Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 17 Nov 2020 17:12:26 +0100
Subject: [PATCH 125/441] - add fixes for db columns

---
 .../sql/incremental/upd_dev_collection.sql    | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 8b13789179..bd1aa92c30 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1 +1,22 @@
 
+-- we need those to fix some installations failing in 0089 and 0090
+ALTER TABLE web_domain ROW_FORMAT=DYNAMIC;
+ALTER IGNORE TABLE `web_domain` ADD COLUMN `proxy_protocol` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `log_retention`;
+ALTER IGNORE TABLE `web_domain` ADD  `backup_format_web` VARCHAR( 255 ) NOT NULL default 'default' AFTER `backup_copies`;
+ALTER IGNORE TABLE `web_domain` ADD  `backup_format_db` VARCHAR( 255 ) NOT NULL default 'gzip' AFTER `backup_format_web`;
+ALTER IGNORE TABLE `web_domain` ADD  `backup_encrypt` enum('n','y') NOT NULL DEFAULT 'n' AFTER `backup_format_db`;
+ALTER IGNORE TABLE `web_domain` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `backup_encrypt`;
+ALTER IGNORE TABLE `web_backup` ADD  `backup_format` VARCHAR( 64 ) NOT NULL DEFAULT '' AFTER `backup_mode`;
+ALTER IGNORE TABLE `web_backup` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `filesize`;
+ALTER IGNORE TABLE `web_domain` ALTER pm SET DEFAULT 'ondemand';
+ALTER IGNORE TABLE `web_domain` DROP COLUMN `enable_spdy`;
+ALTER IGNORE TABLE `web_domain` ADD `folder_directive_snippets` TEXT NULL AFTER `https_port`;
+ALTER IGNORE TABLE `web_domain` ADD `server_php_id` INT(11) UNSIGNED NOT NULL DEFAULT 0;
+ALTER IGNORE TABLE `web_domain` CHANGE `apache_directives` `apache_directives` mediumtext NULL DEFAULT NULL;
+ALTER IGNORE TABLE `web_domain` CHANGE `nginx_directives` `nginx_directives` mediumtext NULL DEFAULT NULL;
+UPDATE `web_domain` as w LEFT JOIN sys_group as g ON (g.groupid = w.sys_groupid) INNER JOIN `server_php` as p ON (w.fastcgi_php_version = CONCAT(p.name, ':', p.php_fastcgi_binary, ':', p.php_fastcgi_ini_dir) AND p.server_id IN (0, w.server_id) AND p.client_id IN (0, g.client_id)) SET w.server_php_id = p.server_php_id, w.fastcgi_php_version = '' WHERE w.server_php_id = 0;
+UPDATE `web_domain` as w LEFT JOIN sys_group as g ON (g.groupid = w.sys_groupid) INNER JOIN `server_php` as p ON (w.fastcgi_php_version = CONCAT(p.name, ':', p.php_fpm_init_script, ':', p.php_fpm_ini_dir, ':', p.php_fpm_pool_dir) AND p.server_id IN (0, w.server_id) AND p.client_id IN (0, g.client_id)) SET w.server_php_id = p.server_php_id, w.fastcgi_php_version = '' WHERE w.server_php_id = 0;
+-- end of fixes
+
+-- drop old php column because new installations don't have them (fails in multi-server)
+ALTER TABLE `web_domain` DROP COLUMN `fastcgi_php_version`;
-- 
GitLab


From 78d45ae9b17bbff7aa2aa40e020fa7f241eb0b31 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 17 Nov 2020 19:17:21 +0100
Subject: [PATCH 126/441] - add fixes to sql

---
 install/sql/incremental/upd_dev_collection.sql | 2 +-
 install/sql/ispconfig3.sql                     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index bd1aa92c30..8243a21f11 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1,6 +1,6 @@
 
 -- we need those to fix some installations failing in 0089 and 0090
-ALTER TABLE web_domain ROW_FORMAT=DYNAMIC;
+ALTER TABLE `web_domain` ROW_FORMAT=DYNAMIC;
 ALTER IGNORE TABLE `web_domain` ADD COLUMN `proxy_protocol` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `log_retention`;
 ALTER IGNORE TABLE `web_domain` ADD  `backup_format_web` VARCHAR( 255 ) NOT NULL default 'default' AFTER `backup_copies`;
 ALTER IGNORE TABLE `web_domain` ADD  `backup_format_db` VARCHAR( 255 ) NOT NULL default 'gzip' AFTER `backup_format_web`;
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 67f0f3bdcb..7753071f71 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -2091,7 +2091,7 @@ CREATE TABLE `web_domain` (
   `last_jailkit_hash` varchar(255) DEFAULT NULL,
   PRIMARY KEY  (`domain_id`),
   UNIQUE KEY `serverdomain` (  `server_id` , `ip_address`,  `domain` )
-) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+) ENGINE=InnoDB ROW_FORMAT=DYNAMIC DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 -- --------------------------------------------------------
 
-- 
GitLab


From 48934fbbc4db5f81002e8f41bf4375d74a49ec84 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 17 Nov 2020 19:19:35 +0100
Subject: [PATCH 127/441] - add grant for web_database

---
 install/lib/installer_base.lib.php | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index e3821b5c14..1e28fbecd2 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -666,6 +666,14 @@ class installer_base {
 					$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
 				}
 
+				$query = "GRANT SELECT ON ?? TO ?@?";
+				if ($verbose){
+					echo $query ."\n";
+				}
+				if(!$this->dbmaster->query($query, $value['db'] . '.web_database', $value['user'], $host)) {
+					$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
+				}
+
 				$query = "GRANT SELECT ON ?? TO ?@?";
 				if ($verbose){
 					echo $query ."\n";
-- 
GitLab


From 96cc8c082cc05ae476011398157af706fff3cad3 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 18 Nov 2020 09:16:40 +0100
Subject: [PATCH 128/441] - also change mail_user to row format dynamic and add
 column

---
 install/sql/incremental/upd_dev_collection.sql | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 8243a21f11..bd408870a4 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1,6 +1,7 @@
 
 -- we need those to fix some installations failing in 0089 and 0090
 ALTER TABLE `web_domain` ROW_FORMAT=DYNAMIC;
+ALTER TABLE `mail_user` ROW_FORMAT=DYNAMIC;
 ALTER IGNORE TABLE `web_domain` ADD COLUMN `proxy_protocol` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `log_retention`;
 ALTER IGNORE TABLE `web_domain` ADD  `backup_format_web` VARCHAR( 255 ) NOT NULL default 'default' AFTER `backup_copies`;
 ALTER IGNORE TABLE `web_domain` ADD  `backup_format_db` VARCHAR( 255 ) NOT NULL default 'gzip' AFTER `backup_format_web`;
@@ -16,6 +17,7 @@ ALTER IGNORE TABLE `web_domain` CHANGE `apache_directives` `apache_directives` m
 ALTER IGNORE TABLE `web_domain` CHANGE `nginx_directives` `nginx_directives` mediumtext NULL DEFAULT NULL;
 UPDATE `web_domain` as w LEFT JOIN sys_group as g ON (g.groupid = w.sys_groupid) INNER JOIN `server_php` as p ON (w.fastcgi_php_version = CONCAT(p.name, ':', p.php_fastcgi_binary, ':', p.php_fastcgi_ini_dir) AND p.server_id IN (0, w.server_id) AND p.client_id IN (0, g.client_id)) SET w.server_php_id = p.server_php_id, w.fastcgi_php_version = '' WHERE w.server_php_id = 0;
 UPDATE `web_domain` as w LEFT JOIN sys_group as g ON (g.groupid = w.sys_groupid) INNER JOIN `server_php` as p ON (w.fastcgi_php_version = CONCAT(p.name, ':', p.php_fpm_init_script, ':', p.php_fpm_ini_dir, ':', p.php_fpm_pool_dir) AND p.server_id IN (0, w.server_id) AND p.client_id IN (0, g.client_id)) SET w.server_php_id = p.server_php_id, w.fastcgi_php_version = '' WHERE w.server_php_id = 0;
+ALTER IGNORE TABLE `mail_user` ADD `forward_in_lda` enum('n','y') NOT NULL default 'n' AFTER `cc`;
 -- end of fixes
 
 -- drop old php column because new installations don't have them (fails in multi-server)
-- 
GitLab


From 00e24fedc2c380e60b4d57e451b0ed2d92596360 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 18 Nov 2020 09:22:16 +0100
Subject: [PATCH 129/441] - do not set non-existing columns on web_database

---
 .../lib/classes/aps_guicontroller.inc.php     | 36 +++++++++----------
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/interface/lib/classes/aps_guicontroller.inc.php b/interface/lib/classes/aps_guicontroller.inc.php
index b1ebf9d189..036bef7f05 100644
--- a/interface/lib/classes/aps_guicontroller.inc.php
+++ b/interface/lib/classes/aps_guicontroller.inc.php
@@ -53,7 +53,7 @@ class ApsGUIController extends ApsBase
 		if (substr($domain, 0, 4) == 'www.') $domain = substr($domain, 4);
 		return $domain;
 	}
-	
+
 
 	/**
 	 * Reads in a package metadata file and registers it's namespaces
@@ -220,7 +220,7 @@ class ApsGUIController extends ApsBase
 			$params[] = $client_id;
 		}
 		$params[] = $id;
-		
+
 		$result = $app->db->queryOneRecord('SELECT id FROM aps_instances WHERE '.$sql_ext.' id = ?', true, $params);
 		if(!$result) return false;
 
@@ -229,18 +229,18 @@ class ApsGUIController extends ApsBase
 
 	public function createDatabaseForPackageInstance(&$settings, $websrv) {
 		global $app;
-	
+
 		$app->uses('tools_sites');
-	
+
 		$global_config = $app->getconf->get_global_config('sites');
-	
+
 		$tmp = array();
 		$tmp['parent_domain_id'] = $websrv['domain_id'];
 		$tmp['sys_groupid'] = $websrv['sys_groupid'];
 		$dbname_prefix = $app->tools_sites->replacePrefix($global_config['dbname_prefix'], $tmp);
 		$dbuser_prefix = $app->tools_sites->replacePrefix($global_config['dbuser_prefix'], $tmp);
 		unset($tmp);
-	
+
 		// get information if the webserver is a db server, too
 		$web_server = $app->db->queryOneRecord("SELECT server_id,server_name,db_server FROM server WHERE server_id  = ?", $websrv['server_id']);
 		if($web_server['db_server'] == 1) {
@@ -276,14 +276,14 @@ class ApsGUIController extends ApsBase
 				* although this does not present any error message to the user.
 				*/
 				return false;
-	
+
 				/*$mysql_db_server_id = $websrv['server_id'];
 				 $settings['main_database_host'] = 'localhost';
 				$mysql_db_remote_access = 'n';
 				$mysql_db_remote_ips = '';*/
 			}
 		}
-		
+
 		if (empty($settings['main_database_name'])) {
 			//* Find a free db name for the app
 			for($n = 1; $n <= 1000; $n++) {
@@ -302,7 +302,7 @@ class ApsGUIController extends ApsBase
 			}
 			$settings['main_database_login'] = $mysql_db_user;
 		}
-		
+
 		//* Create the mysql database user if not existing
 		$tmp = $app->db->queryOneRecord("SELECT database_user_id FROM web_database_user WHERE database_user = ?", $settings['main_database_login']);
 		if(!$tmp) {
@@ -320,7 +320,7 @@ class ApsGUIController extends ApsBase
 			$mysql_db_user_id = $app->db->datalogInsert('web_database_user', $insert_data, 'database_user_id');
 		}
 		else $mysql_db_user_id = $tmp['database_user_id'];
-		
+
 		//* Create the mysql database if not existing
 		$tmp = $app->db->queryOneRecord("SELECT count(database_id) as number FROM web_database WHERE database_name = ?", $settings['main_database_name']);
 		if($tmp['number'] == 0) {
@@ -340,17 +340,15 @@ class ApsGUIController extends ApsBase
 								 "remote_access" => $mysql_db_remote_access,
 								 "remote_ips" => $mysql_db_remote_ips,
 								 "backup_copies" => $websrv['backup_copies'],
-								 "backup_format_web" => $websrv['backup_format_web'],
-								 "backup_format_db" => $websrv['backup_format_db'],
-								 "active" => 'y', 
+								 "active" => 'y',
 								 "backup_interval" => $websrv['backup_interval']
 								 );
 			$app->db->datalogInsert('web_database', $insert_data, 'database_id');
 		}
-		
+
 		return true;
 	}
-	
+
 	/**
 	 * Creates a new database record for the package instance and
 	 * an install task
@@ -398,7 +396,7 @@ class ApsGUIController extends ApsBase
 			// mysql-database-name is updated inside if not set already
 			if (!$this->createDatabaseForPackageInstance($settings, $websrv)) return false;
 		}
-		
+
 		//* Insert new package instance
 		$insert_data = array(
 			"sys_userid" => $websrv['sys_userid'],
@@ -428,7 +426,7 @@ class ApsGUIController extends ApsBase
 
 		//* Set package status to install afetr we inserted the settings
 		$app->db->datalogUpdate('aps_instances', array("instance_status" => INSTANCE_INSTALL), 'id', $InstanceID);
-		
+
 		return $InstanceID;
 	}
 
@@ -446,7 +444,7 @@ class ApsGUIController extends ApsBase
 			$sql = "SELECT web_database.database_id as database_id, web_database.database_user_id as `database_user_id` FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ? LIMIT 0,1";
 			$tmp = $app->db->queryOneRecord($sql, $instanceid);
 			if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']);
-	
+
 			$database_user = $tmp['database_user_id'];
 			$tmp = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `database_user_id` = ? OR `database_ro_user_id` = ?", $database_user, $database_user);
 			if($tmp['cnt'] < 1) $app->db->datalogDelete('web_database_user', 'database_user_id', $database_user);
@@ -685,7 +683,7 @@ class ApsGUIController extends ApsBase
 			if (isset($postinput['main_database_host'])) $input['main_database_host'] = $postinput['main_database_host'];
 			if (isset($postinput['main_database_name'])) $input['main_database_name'] = $postinput['main_database_name'];
 			if (isset($postinput['main_database_login'])) $input['main_database_login'] = $postinput['main_database_login'];
-			
+
 			if(isset($postinput['main_database_password']))
 			{
 				if($postinput['main_database_password'] == '') $error[] = $app->lng('error_no_database_pw');
-- 
GitLab


From dac7c51e0f1584453404e21c2f2ac72759d7eeb9 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Wed, 18 Nov 2020 09:52:30 +0100
Subject: [PATCH 130/441] Update installer_base.lib.php

---
 install/lib/installer_base.lib.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index e3821b5c14..dc1bf7c17c 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -493,7 +493,7 @@ class installer_base {
 						0,
 						?,
 						?,
-						"y",
+						"n",
 						"80,443"
 					)', $conf['server_id'], $ip_type, $line);
 					$server_ip_id = $this->dbmaster->insertID();
@@ -512,7 +512,7 @@ class installer_base {
 						0,
 						?,
 						?,
-						"y",
+						"n",
 						"80,443"
 					)', $server_ip_id, $conf['server_id'], $ip_type, $line);
 				} else {
@@ -530,7 +530,7 @@ class installer_base {
 						0,
 						?,
 						?,
-						"y",
+						"n",
 						"80,443"
 					)', $conf['server_id'], $ip_type, $line);
 				}
-- 
GitLab


From 3c2c55df3a37c150c5218a8e8691a3dc4259f2d0 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 18 Nov 2020 15:44:14 +0100
Subject: [PATCH 131/441] - fixed wrong data read

---
 interface/web/sites/form/web_vhost_domain.tform.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php
index 332606de6b..85387f6dab 100644
--- a/interface/web/sites/form/web_vhost_domain.tform.php
+++ b/interface/web/sites/form/web_vhost_domain.tform.php
@@ -662,6 +662,8 @@ if ($backup_available) {
 			$missing_utils = unserialize($mon['data']);
 			if(!$missing_utils) {
 				$missing_utils = array();
+			} else {
+				$missing_utils = $missing_utils['missing_utils'];
 			}
 		}
 	} else {
-- 
GitLab


From fd95b9b25df6ddee6c7ca3cf6a6679b5b5f02bbe Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 18 Nov 2020 16:11:11 +0100
Subject: [PATCH 132/441] - added fix to manual backup action

---
 .../lib/classes/plugin_backuplist.inc.php     | 22 ++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/interface/lib/classes/plugin_backuplist.inc.php b/interface/lib/classes/plugin_backuplist.inc.php
index 9e21dc6ba6..81fe1daae7 100644
--- a/interface/lib/classes/plugin_backuplist.inc.php
+++ b/interface/lib/classes/plugin_backuplist.inc.php
@@ -56,10 +56,22 @@ class plugin_backuplist extends plugin_base {
 		$sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = ? AND action_param = ?";
 		$tmp = $app->db->queryOneRecord($sql, $action_type, $domain_id);
 		if ($tmp['number'] == 0) {
-			$server_id = $this->form->dataRecord['server_id'];
+			if($action_type === 'backup_database') {
+				// get all server ids of databases for this domain
+				$sql = 'SELECT `server_id` FROM `web_database` WHERE `parent_domain_id` = ?';
+				$result = $app->db->query($sql, $domain_id);
+				while(($cur = $result->get())) {
+					$server_id = $cur['server_id'];
+					$sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) VALUES (?, UNIX_TIMESTAMP(), ?, ?, 'pending', '')";
+					$app->db->query($sql, $server_id, $action_type, $domain_id);
+				}
+				$result->free();
+			} else {
+				$server_id = $this->form->dataRecord['server_id'];
+				$sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) VALUES (?, UNIX_TIMESTAMP(), ?, ?, 'pending', '')";
+				$app->db->query($sql, $server_id, $action_type, $domain_id);
+			}
 			$message .= $wb['backup_info_txt'];
-			$sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) VALUES (?, UNIX_TIMESTAMP(), ?, ?, 'pending', '')";
-			$app->db->query($sql, $server_id, $action_type, $domain_id);
 		} else {
 			$error .= $wb['backup_pending_txt'];
 		}
@@ -193,10 +205,10 @@ class plugin_backuplist extends plugin_base {
 				$rec['backup_encrypted'] = empty($rec['backup_password']) ? $wb["no_txt"] : $wb["yes_txt"];
 				$backup_manual_prefix = 'manual-';
 				$rec['backup_job'] = (substr($rec['filename'], 0, strlen($backup_manual_prefix)) == $backup_manual_prefix) ? $wb["backup_job_manual_txt"] : $wb["backup_job_auto_txt"];
-				
+
 				$rec['download_available'] = true;
 				if($rec['server_id'] != $web['server_id']) $rec['download_available'] = false;
-				
+
 				if($rec['filesize'] > 0){
 					$rec['filesize'] = $app->functions->currency_format($rec['filesize']/(1024*1024), 'client').' MB';
 				}
-- 
GitLab


From 4cc77567cc2fe7e07c9371c37529ef8979ab4e4a Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 18 Nov 2020 10:26:24 -0700
Subject: [PATCH 133/441] postfix: reject_unlisted_sender

---
 install/tpl/debian_postfix.conf.master   | 1 +
 install/tpl/fedora_postfix.conf.master   | 1 +
 install/tpl/gentoo_postfix.conf.master   | 1 +
 install/tpl/opensuse_postfix.conf.master | 1 +
 4 files changed, 4 insertions(+)

diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master
index dcd5f592d8..a6a48e0e02 100644
--- a/install/tpl/debian_postfix.conf.master
+++ b/install/tpl/debian_postfix.conf.master
@@ -28,6 +28,7 @@ proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virt
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_reject_unlisted_sender = yes
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master
index 45bc0c117e..3cd8357a66 100644
--- a/install/tpl/fedora_postfix.conf.master
+++ b/install/tpl/fedora_postfix.conf.master
@@ -24,6 +24,7 @@ proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virt
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_reject_unlisted_sender = yes
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master
index b3ff8f6804..f4a1d4025c 100644
--- a/install/tpl/gentoo_postfix.conf.master
+++ b/install/tpl/gentoo_postfix.conf.master
@@ -23,6 +23,7 @@ proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virt
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_reject_unlisted_sender = yes
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master
index 7386fad16e..7d3669853a 100644
--- a/install/tpl/opensuse_postfix.conf.master
+++ b/install/tpl/opensuse_postfix.conf.master
@@ -26,6 +26,7 @@ proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virt
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_reject_unlisted_sender = yes
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
-- 
GitLab


From e1c013e9f2c68fd178fcc340c73c5999c790723d Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 18 Nov 2020 11:26:54 -0700
Subject: [PATCH 134/441] sender_login_maps missing check for active domain

---
 install/tpl/mysql-virtual_sender_login_maps.cf.master | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/install/tpl/mysql-virtual_sender_login_maps.cf.master b/install/tpl/mysql-virtual_sender_login_maps.cf.master
index f97229d213..165bee1231 100644
--- a/install/tpl/mysql-virtual_sender_login_maps.cf.master
+++ b/install/tpl/mysql-virtual_sender_login_maps.cf.master
@@ -4,4 +4,5 @@ dbname = {mysql_server_database}
 hosts = {mysql_server_ip}
 query = SELECT destination FROM mail_forwarding WHERE source = '%s' AND active = 'y' AND allow_send_as = 'y' AND server_id = {server_id}
         UNION
-        SELECT email FROM mail_user WHERE email = '%s' AND disablesmtp = 'n' AND server_id = {server_id};
+        SELECT email FROM mail_user WHERE email = '%s' AND disablesmtp = 'n' AND server_id = {server_id}
+           AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
-- 
GitLab


From 6242ec108c76fc7010317eb1f2e24c464315b59d Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 18 Nov 2020 11:37:58 -0700
Subject: [PATCH 135/441] other templates missing mail_domain active checks

---
 install/tpl/mysql-virtual_email2email.cf.master     | 2 ++
 install/tpl/mysql-virtual_gids.cf.master            | 3 ++-
 install/tpl/mysql-virtual_mailboxes.cf.master       | 3 ++-
 install/tpl/mysql-virtual_outgoing_bcc.cf.master    | 5 ++++-
 install/tpl/mysql-virtual_policy_greylist.cf.master | 5 +++--
 install/tpl/mysql-virtual_uids.cf.master            | 3 ++-
 6 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/install/tpl/mysql-virtual_email2email.cf.master b/install/tpl/mysql-virtual_email2email.cf.master
index 326ef2c3d9..1ae7f9addc 100644
--- a/install/tpl/mysql-virtual_email2email.cf.master
+++ b/install/tpl/mysql-virtual_email2email.cf.master
@@ -3,5 +3,7 @@ password = {mysql_server_ispconfig_password}
 dbname = {mysql_server_database}
 hosts = {mysql_server_ip}
 query = SELECT email FROM mail_user WHERE email = '%s' AND forward_in_lda = 'n' AND disabledeliver = 'n' AND postfix = 'y' AND server_id = {server_id}
+           AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
         UNION
         SELECT cc AS email FROM mail_user WHERE email = '%s' AND cc != '' AND (forward_in_lda = 'n' OR disabledeliver = 'y') AND postfix = 'y' AND server_id = {server_id}
+           AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
diff --git a/install/tpl/mysql-virtual_gids.cf.master b/install/tpl/mysql-virtual_gids.cf.master
index 5611b935dd..0bd2c8ec69 100644
--- a/install/tpl/mysql-virtual_gids.cf.master
+++ b/install/tpl/mysql-virtual_gids.cf.master
@@ -2,4 +2,5 @@ user = {mysql_server_ispconfig_user}
 password = {mysql_server_ispconfig_password}
 dbname = {mysql_server_database}
 hosts = {mysql_server_ip}
-query = select gid from mail_user where email = '%s' and postfix = 'y' and server_id = {server_id}
+query = SELECT gid FROM mail_user WHERE email = '%s' AND postfix = 'y' AND server_id = {server_id}
+           AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
diff --git a/install/tpl/mysql-virtual_mailboxes.cf.master b/install/tpl/mysql-virtual_mailboxes.cf.master
index 8b2677a196..76cc05f464 100644
--- a/install/tpl/mysql-virtual_mailboxes.cf.master
+++ b/install/tpl/mysql-virtual_mailboxes.cf.master
@@ -2,4 +2,5 @@ user = {mysql_server_ispconfig_user}
 password = {mysql_server_ispconfig_password}
 dbname = {mysql_server_database}
 hosts = {mysql_server_ip}
-query = select CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') from mail_user where email = '%s' and postfix = 'y' and disabledeliver = 'n' and server_id = {server_id}
+query = SELECT CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') FROM mail_user WHERE email = '%s' AND postfix = 'y' AND disabledeliver = 'n' AND server_id = {server_id}
+           AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
diff --git a/install/tpl/mysql-virtual_outgoing_bcc.cf.master b/install/tpl/mysql-virtual_outgoing_bcc.cf.master
index 19b235fcf5..1501154e16 100644
--- a/install/tpl/mysql-virtual_outgoing_bcc.cf.master
+++ b/install/tpl/mysql-virtual_outgoing_bcc.cf.master
@@ -4,7 +4,9 @@ dbname = {mysql_server_database}
 hosts = {mysql_server_ip}
 query = SELECT sender_cc FROM (
             SELECT SUBSTRING_INDEX(sender_cc, ',', 1) AS sender_cc
-              FROM mail_user WHERE email = '%s' AND disablesmtp = 'n' AND sender_cc != '' AND server_id = {server_id}
+              FROM mail_user
+             WHERE email = '%s' AND disablesmtp = 'n' AND sender_cc != '' AND server_id = {server_id}
+               AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
             UNION
             SELECT SUBSTRING_INDEX(u.sender_cc, ',', 1) AS sender_cc
               FROM mail_user u, mail_forwarding f
@@ -13,4 +15,5 @@ query = SELECT sender_cc FROM (
                                                 '[[:blank:]]*(,[[:blank:]]*[[:alnum:]]|,?[[:blank:]]*(\\r?\\n|$))' )
                AND u.disablesmtp = 'n' AND u.sender_cc != '' AND u.server_id = {server_id}
                AND f.source = '%s' AND f.allow_send_as = 'y' AND f.active = 'y' AND f.server_id = {server_id}
+               AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
         ) table1 WHERE sender_cc != '' LIMIT 1
diff --git a/install/tpl/mysql-virtual_policy_greylist.cf.master b/install/tpl/mysql-virtual_policy_greylist.cf.master
index 5203b1a2ea..8896b823a7 100644
--- a/install/tpl/mysql-virtual_policy_greylist.cf.master
+++ b/install/tpl/mysql-virtual_policy_greylist.cf.master
@@ -5,9 +5,10 @@ hosts = {mysql_server_ip}
 query = SELECT 'greylisting' FROM
   (
    SELECT `greylisting`, 1 as `prio` FROM `mail_user` WHERE `server_id` = {server_id} AND `email` = '%s'
+      AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
    UNION
-   SELECT `greylisting`, 2 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '%s'
+   SELECT `greylisting`, 2 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '%s' AND active = 'y'
    UNION
-   SELECT `greylisting`, 3 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '@%d' ORDER BY `prio` ASC LIMIT 1
+   SELECT `greylisting`, 3 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '@%d' AND active = 'y' ORDER BY `prio` ASC LIMIT 1
   ) AS rules
   WHERE rules.greylisting = 'y'
diff --git a/install/tpl/mysql-virtual_uids.cf.master b/install/tpl/mysql-virtual_uids.cf.master
index de35368c0a..6fa041bae5 100644
--- a/install/tpl/mysql-virtual_uids.cf.master
+++ b/install/tpl/mysql-virtual_uids.cf.master
@@ -2,4 +2,5 @@ user = {mysql_server_ispconfig_user}
 password = {mysql_server_ispconfig_password}
 dbname = {mysql_server_database}
 hosts = {mysql_server_ip}
-query = select uid from mail_user where email = '%s' and postfix = 'y' and server_id = {server_id}
+query = SELECT uid FROM mail_user WHERE email = '%s' AND postfix = 'y' AND server_id = {server_id}
+           AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
-- 
GitLab


From a26d4faef64372d536952819d893bbb4d1a251d9 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 18 Nov 2020 13:31:52 -0700
Subject: [PATCH 136/441] dovecot password_query should check
 mail_domain.active

---
 install/tpl/debian6_dovecot-sql.conf.master  | 3 ++-
 install/tpl/debian_dovecot-sql.conf.master   | 3 ++-
 install/tpl/fedora_dovecot-sql.conf.master   | 3 ++-
 install/tpl/opensuse_dovecot-sql.conf.master | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/install/tpl/debian6_dovecot-sql.conf.master b/install/tpl/debian6_dovecot-sql.conf.master
index e05330dc26..72f286eace 100644
--- a/install/tpl/debian6_dovecot-sql.conf.master
+++ b/install/tpl/debian6_dovecot-sql.conf.master
@@ -14,7 +14,8 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se
 default_pass_scheme = CRYPT
 
 # password-query with prefetch
-password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
+password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'y' AND server_id = {server_id})
+
 user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
 
 # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
diff --git a/install/tpl/debian_dovecot-sql.conf.master b/install/tpl/debian_dovecot-sql.conf.master
index 2e0858057e..4cbe22f1b9 100644
--- a/install/tpl/debian_dovecot-sql.conf.master
+++ b/install/tpl/debian_dovecot-sql.conf.master
@@ -121,7 +121,8 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se
 default_pass_scheme = CRYPT
 
 # password-query with prefetch
-password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
+password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'y' AND server_id = {server_id})
+
 user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
 
 # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
diff --git a/install/tpl/fedora_dovecot-sql.conf.master b/install/tpl/fedora_dovecot-sql.conf.master
index 5d06d51e5d..00ef4faf25 100644
--- a/install/tpl/fedora_dovecot-sql.conf.master
+++ b/install/tpl/fedora_dovecot-sql.conf.master
@@ -134,7 +134,8 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se
 default_pass_scheme = CRYPT
 
 # password-query with prefetch
-password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
+password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'y' AND server_id = {server_id})
+
 user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
 
 # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
diff --git a/install/tpl/opensuse_dovecot-sql.conf.master b/install/tpl/opensuse_dovecot-sql.conf.master
index 5d06d51e5d..00ef4faf25 100644
--- a/install/tpl/opensuse_dovecot-sql.conf.master
+++ b/install/tpl/opensuse_dovecot-sql.conf.master
@@ -134,7 +134,8 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se
 default_pass_scheme = CRYPT
 
 # password-query with prefetch
-password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
+password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'y' AND server_id = {server_id})
+
 user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
 
 # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
-- 
GitLab


From 026c8cf7279adc845d2ab5a48d04834428fe09c5 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 19 Nov 2020 09:45:50 +0100
Subject: [PATCH 137/441] - imported translations for BR and CZ

---
 interface/lib/lang/br.lng                     | 133 +++---
 interface/lib/lang/cz.lng                     |  25 +-
 interface/web/admin/lib/lang/br.lng           |   7 +-
 .../admin/lib/lang/br_directive_snippets.lng  |  10 +-
 .../lib/lang/br_directive_snippets_list.lng   |   1 -
 interface/web/admin/lib/lang/br_firewall.lng  |   7 +-
 .../web/admin/lib/lang/br_firewall_list.lng   |   1 -
 interface/web/admin/lib/lang/br_groups.lng    |   1 -
 .../web/admin/lib/lang/br_groups_list.lng     |   3 +-
 interface/web/admin/lib/lang/br_iptables.lng  |   5 +-
 .../web/admin/lib/lang/br_iptables_list.lng   |   3 +-
 .../web/admin/lib/lang/br_language_add.lng    |   1 -
 .../admin/lib/lang/br_language_complete.lng   |   1 -
 .../web/admin/lib/lang/br_language_edit.lng   |   1 -
 .../web/admin/lib/lang/br_language_export.lng |   1 -
 .../web/admin/lib/lang/br_language_import.lng |   1 -
 .../web/admin/lib/lang/br_language_list.lng   |   1 -
 .../web/admin/lib/lang/br_package_install.lng |   1 -
 .../web/admin/lib/lang/br_remote_action.lng   |   5 +-
 .../web/admin/lib/lang/br_remote_user.lng     |  96 ++--
 .../admin/lib/lang/br_remote_user_list.lng    |   1 -
 interface/web/admin/lib/lang/br_server.lng    |  19 +-
 .../web/admin/lib/lang/br_server_config.lng   | 427 +++++++++---------
 .../admin/lib/lang/br_server_config_list.lng  |   1 -
 interface/web/admin/lib/lang/br_server_ip.lng |  13 +-
 .../web/admin/lib/lang/br_server_ip_list.lng  |   5 +-
 .../web/admin/lib/lang/br_server_ip_map.lng   |  15 +-
 .../admin/lib/lang/br_server_ip_map_list.lng  |   1 -
 .../web/admin/lib/lang/br_server_list.lng     |   5 +-
 .../web/admin/lib/lang/br_server_php.lng      |  19 +-
 .../web/admin/lib/lang/br_server_php_list.lng |   7 +-
 .../admin/lib/lang/br_software_package.lng    |   3 +-
 .../lib/lang/br_software_package_install.lng  |   1 -
 .../lib/lang/br_software_package_list.lng     |   1 -
 .../web/admin/lib/lang/br_software_repo.lng   |   1 -
 .../admin/lib/lang/br_software_repo_list.lng  |   1 -
 .../lib/lang/br_software_update_list.lng      |   1 -
 .../web/admin/lib/lang/br_system_config.lng   | 104 ++---
 .../admin/lib/lang/br_tpl_default_admin.lng   |  19 +-
 interface/web/admin/lib/lang/br_users.lng     |  13 +-
 .../web/admin/lib/lang/br_users_list.lng      |   3 +-
 interface/web/admin/lib/lang/cz.lng           |  11 +-
 .../admin/lib/lang/cz_directive_snippets.lng  |   4 +-
 .../lib/lang/cz_directive_snippets_list.lng   |   1 -
 interface/web/admin/lib/lang/cz_firewall.lng  |   1 -
 .../web/admin/lib/lang/cz_firewall_list.lng   |   1 -
 interface/web/admin/lib/lang/cz_groups.lng    |   1 -
 .../web/admin/lib/lang/cz_groups_list.lng     |   1 -
 interface/web/admin/lib/lang/cz_iptables.lng  |   1 -
 .../web/admin/lib/lang/cz_iptables_list.lng   |   1 -
 .../web/admin/lib/lang/cz_language_add.lng    |   3 +-
 .../admin/lib/lang/cz_language_complete.lng   |   1 -
 .../web/admin/lib/lang/cz_language_edit.lng   |   1 -
 .../web/admin/lib/lang/cz_language_export.lng |   1 -
 .../web/admin/lib/lang/cz_language_import.lng |   1 -
 .../web/admin/lib/lang/cz_language_list.lng   |   1 -
 .../web/admin/lib/lang/cz_package_install.lng |   1 -
 .../web/admin/lib/lang/cz_remote_action.lng   |   7 +-
 .../web/admin/lib/lang/cz_remote_user.lng     |   5 +-
 .../admin/lib/lang/cz_remote_user_list.lng    |   1 -
 interface/web/admin/lib/lang/cz_server.lng    |   5 +-
 .../web/admin/lib/lang/cz_server_config.lng   |  62 +--
 .../admin/lib/lang/cz_server_config_list.lng  |   1 -
 interface/web/admin/lib/lang/cz_server_ip.lng |   1 -
 .../web/admin/lib/lang/cz_server_ip_list.lng  |   1 -
 .../web/admin/lib/lang/cz_server_ip_map.lng   |   1 -
 .../admin/lib/lang/cz_server_ip_map_list.lng  |   1 -
 .../web/admin/lib/lang/cz_server_list.lng     |   1 -
 .../web/admin/lib/lang/cz_server_php.lng      |   3 +-
 .../web/admin/lib/lang/cz_server_php_list.lng |   1 -
 .../admin/lib/lang/cz_software_package.lng    |   1 -
 .../lib/lang/cz_software_package_install.lng  |   1 -
 .../lib/lang/cz_software_package_list.lng     |   1 -
 .../web/admin/lib/lang/cz_software_repo.lng   |   1 -
 .../admin/lib/lang/cz_software_repo_list.lng  |   1 -
 .../lib/lang/cz_software_update_list.lng      |   1 -
 .../web/admin/lib/lang/cz_system_config.lng   |  14 +-
 .../admin/lib/lang/cz_tpl_default_admin.lng   |   1 -
 interface/web/admin/lib/lang/cz_users.lng     |   7 +-
 .../web/admin/lib/lang/cz_users_list.lng      |   1 -
 interface/web/client/lib/lang/br.lng          |  13 +-
 interface/web/client/lib/lang/br_client.lng   | 185 ++++----
 .../web/client/lib/lang/br_client_circle.lng  |   1 -
 .../client/lib/lang/br_client_circle_list.lng |   1 -
 .../web/client/lib/lang/br_client_del.lng     |   7 +-
 .../web/client/lib/lang/br_client_message.lng |  17 +-
 .../lib/lang/br_client_message_template.lng   |  13 +-
 .../lang/br_client_message_template_list.lng  |   3 +-
 .../client/lib/lang/br_client_template.lng    | 146 +++---
 .../lib/lang/br_client_template_list.lng      |   1 -
 .../web/client/lib/lang/br_clients_list.lng   |   1 -
 interface/web/client/lib/lang/br_domain.lng   |   3 +-
 .../web/client/lib/lang/br_domain_list.lng    |   1 -
 interface/web/client/lib/lang/br_reseller.lng | 165 ++++---
 .../web/client/lib/lang/br_resellers_list.lng |   1 -
 interface/web/client/lib/lang/cz.lng          |   9 +-
 interface/web/client/lib/lang/cz_client.lng   |   9 +-
 .../web/client/lib/lang/cz_client_circle.lng  |   1 -
 .../client/lib/lang/cz_client_circle_list.lng |   1 -
 .../web/client/lib/lang/cz_client_del.lng     |   1 -
 .../web/client/lib/lang/cz_client_message.lng |   1 -
 .../lib/lang/cz_client_message_template.lng   |   1 -
 .../lang/cz_client_message_template_list.lng  |   3 +-
 .../client/lib/lang/cz_client_template.lng    |   3 +-
 .../lib/lang/cz_client_template_list.lng      |   3 +-
 .../web/client/lib/lang/cz_clients_list.lng   |   1 -
 interface/web/client/lib/lang/cz_domain.lng   |   1 -
 .../web/client/lib/lang/cz_domain_list.lng    |   1 -
 interface/web/client/lib/lang/cz_reseller.lng |   9 +-
 .../web/client/lib/lang/cz_resellers_list.lng |   1 -
 interface/web/dashboard/lib/lang/br.lng       |   1 -
 .../lib/lang/br_dashlet_customer.lng          |   1 -
 .../lib/lang/br_dashlet_databasequota.lng     |   3 +-
 .../dashboard/lib/lang/br_dashlet_donate.lng  |   1 -
 .../br_dashlet_invoice_client_settings.lng    |   1 -
 .../lib/lang/br_dashlet_invoices.lng          |   1 -
 .../dashboard/lib/lang/br_dashlet_limits.lng  |  41 +-
 .../lib/lang/br_dashlet_mailquota.lng         |   7 +-
 .../dashboard/lib/lang/br_dashlet_modules.lng |   1 -
 .../lib/lang/br_dashlet_products.lng          |   1 -
 .../dashboard/lib/lang/br_dashlet_quota.lng   |   1 -
 .../dashboard/lib/lang/br_dashlet_shop.lng    |   1 -
 interface/web/dashboard/lib/lang/cz.lng       |   1 -
 .../lib/lang/cz_dashlet_customer.lng          |   1 -
 .../lib/lang/cz_dashlet_databasequota.lng     |   1 -
 .../dashboard/lib/lang/cz_dashlet_donate.lng  |   1 -
 .../cz_dashlet_invoice_client_settings.lng    |   1 -
 .../lib/lang/cz_dashlet_invoices.lng          |   1 -
 .../dashboard/lib/lang/cz_dashlet_limits.lng  |   1 -
 .../lib/lang/cz_dashlet_mailquota.lng         |   1 -
 .../dashboard/lib/lang/cz_dashlet_modules.lng |   1 -
 .../lib/lang/cz_dashlet_products.lng          |   1 -
 .../dashboard/lib/lang/cz_dashlet_quota.lng   |   1 -
 .../dashboard/lib/lang/cz_dashlet_shop.lng    |   1 -
 interface/web/dns/lib/lang/br.lng             |  36 +-
 interface/web/dns/lib/lang/br_dns_a.lng       |  11 +-
 interface/web/dns/lib/lang/br_dns_a_list.lng  |   1 -
 interface/web/dns/lib/lang/br_dns_aaaa.lng    |  11 +-
 interface/web/dns/lib/lang/br_dns_alias.lng   |  11 +-
 interface/web/dns/lib/lang/br_dns_caa.lng     |   7 +-
 interface/web/dns/lib/lang/br_dns_cname.lng   |  11 +-
 interface/web/dns/lib/lang/br_dns_dkim.lng    |  12 +-
 interface/web/dns/lib/lang/br_dns_dmarc.lng   |  26 +-
 interface/web/dns/lib/lang/br_dns_dname.lng   |  11 +-
 interface/web/dns/lib/lang/br_dns_ds.lng      |  11 +-
 interface/web/dns/lib/lang/br_dns_hinfo.lng   |  10 +-
 interface/web/dns/lib/lang/br_dns_import.lng  |  27 +-
 interface/web/dns/lib/lang/br_dns_loc.lng     |  10 +-
 interface/web/dns/lib/lang/br_dns_mx.lng      |  13 +-
 interface/web/dns/lib/lang/br_dns_naptr.lng   |  35 +-
 interface/web/dns/lib/lang/br_dns_ns.lng      |   9 +-
 interface/web/dns/lib/lang/br_dns_ptr.lng     |   9 +-
 interface/web/dns/lib/lang/br_dns_rp.lng      |   9 +-
 interface/web/dns/lib/lang/br_dns_slave.lng   |  10 +-
 .../dns/lib/lang/br_dns_slave_admin_list.lng  |   3 +-
 .../web/dns/lib/lang/br_dns_slave_list.lng    |   3 +-
 interface/web/dns/lib/lang/br_dns_soa.lng     |  25 +-
 .../dns/lib/lang/br_dns_soa_admin_list.lng    |   8 +-
 .../web/dns/lib/lang/br_dns_soa_list.lng      |   7 +-
 interface/web/dns/lib/lang/br_dns_spf.lng     |  36 +-
 interface/web/dns/lib/lang/br_dns_srv.lng     |  11 +-
 interface/web/dns/lib/lang/br_dns_sshfp.lng   |  10 +-
 .../web/dns/lib/lang/br_dns_template.lng      |   5 +-
 .../web/dns/lib/lang/br_dns_template_list.lng |   1 -
 interface/web/dns/lib/lang/br_dns_tlsa.lng    |  11 +-
 interface/web/dns/lib/lang/br_dns_txt.lng     |   9 +-
 interface/web/dns/lib/lang/br_dns_wizard.lng  |  41 +-
 interface/web/dns/lib/lang/cz.lng             |   1 -
 interface/web/dns/lib/lang/cz_dns_a.lng       |   3 +-
 interface/web/dns/lib/lang/cz_dns_a_list.lng  |   1 -
 interface/web/dns/lib/lang/cz_dns_aaaa.lng    |   3 +-
 interface/web/dns/lib/lang/cz_dns_alias.lng   |   1 -
 interface/web/dns/lib/lang/cz_dns_caa.lng     |   1 -
 interface/web/dns/lib/lang/cz_dns_cname.lng   |   3 +-
 interface/web/dns/lib/lang/cz_dns_dkim.lng    |   1 -
 interface/web/dns/lib/lang/cz_dns_dmarc.lng   |   7 +-
 interface/web/dns/lib/lang/cz_dns_dname.lng   |   1 -
 interface/web/dns/lib/lang/cz_dns_ds.lng      |   3 +-
 interface/web/dns/lib/lang/cz_dns_hinfo.lng   |   1 -
 interface/web/dns/lib/lang/cz_dns_import.lng  |   1 -
 interface/web/dns/lib/lang/cz_dns_loc.lng     |   3 +-
 interface/web/dns/lib/lang/cz_dns_mx.lng      |   1 -
 interface/web/dns/lib/lang/cz_dns_naptr.lng   |  19 +-
 interface/web/dns/lib/lang/cz_dns_ns.lng      |   1 -
 interface/web/dns/lib/lang/cz_dns_ptr.lng     |   1 -
 interface/web/dns/lib/lang/cz_dns_rp.lng      |   1 -
 interface/web/dns/lib/lang/cz_dns_slave.lng   |   1 -
 .../dns/lib/lang/cz_dns_slave_admin_list.lng  |   1 -
 .../web/dns/lib/lang/cz_dns_slave_list.lng    |   1 -
 interface/web/dns/lib/lang/cz_dns_soa.lng     |   7 +-
 .../dns/lib/lang/cz_dns_soa_admin_list.lng    |   3 +-
 .../web/dns/lib/lang/cz_dns_soa_list.lng      |   1 -
 interface/web/dns/lib/lang/cz_dns_spf.lng     |  11 +-
 interface/web/dns/lib/lang/cz_dns_srv.lng     |   1 -
 interface/web/dns/lib/lang/cz_dns_sshfp.lng   |   3 +-
 .../web/dns/lib/lang/cz_dns_template.lng      |   1 -
 .../web/dns/lib/lang/cz_dns_template_list.lng |   1 -
 interface/web/dns/lib/lang/cz_dns_tlsa.lng    |   3 +-
 interface/web/dns/lib/lang/cz_dns_txt.lng     |   1 -
 interface/web/dns/lib/lang/cz_dns_wizard.lng  |   1 -
 interface/web/help/lib/lang/br.lng            |   1 -
 interface/web/help/lib/lang/br_faq_form.lng   |   1 -
 .../lib/lang/br_faq_manage_questions_list.lng |   1 -
 .../help/lib/lang/br_faq_sections_form.lng    |   1 -
 .../web/help/lib/lang/br_help_faq_list.lng    |   1 -
 .../lib/lang/br_help_faq_sections_list.lng    |   1 -
 .../web/help/lib/lang/br_support_message.lng  |  13 +-
 .../help/lib/lang/br_support_message_list.lng |   1 -
 interface/web/help/lib/lang/cz.lng            |   1 -
 interface/web/help/lib/lang/cz_faq_form.lng   |   1 -
 .../lib/lang/cz_faq_manage_questions_list.lng |   1 -
 .../help/lib/lang/cz_faq_sections_form.lng    |   1 -
 .../web/help/lib/lang/cz_help_faq_list.lng    |   1 -
 .../lib/lang/cz_help_faq_sections_list.lng    |   1 -
 .../web/help/lib/lang/cz_support_message.lng  |  11 +-
 .../help/lib/lang/cz_support_message_list.lng |   1 -
 interface/web/login/lib/lang/br.lng           |  17 +-
 interface/web/login/lib/lang/br_login_as.lng  |   9 +-
 interface/web/login/lib/lang/cz_login_as.lng  |   5 +-
 interface/web/mail/lib/lang/br.lng            |  63 ++-
 .../mail/lib/lang/br_backup_stats_list.lng    |   1 -
 interface/web/mail/lib/lang/br_mail_alias.lng |  17 +-
 .../web/mail/lib/lang/br_mail_alias_list.lng  |   7 +-
 .../web/mail/lib/lang/br_mail_aliasdomain.lng |   3 +-
 .../lib/lang/br_mail_aliasdomain_list.lng     |   2 -
 .../web/mail/lib/lang/br_mail_backup_list.lng |   3 +-
 .../web/mail/lib/lang/br_mail_blacklist.lng   |   7 +-
 .../mail/lib/lang/br_mail_blacklist_list.lng  |   5 +-
 .../mail/lib/lang/br_mail_content_filter.lng  |   3 +-
 .../lib/lang/br_mail_content_filter_list.lng  |   3 +-
 .../web/mail/lib/lang/br_mail_domain.lng      |  13 +-
 .../lib/lang/br_mail_domain_admin_list.lng    |   3 +-
 .../lib/lang/br_mail_domain_catchall_list.lng |   5 +-
 .../web/mail/lib/lang/br_mail_domain_list.lng |   3 +-
 .../web/mail/lib/lang/br_mail_forward.lng     |  19 +-
 .../mail/lib/lang/br_mail_forward_list.lng    |   7 +-
 interface/web/mail/lib/lang/br_mail_get.lng   |  17 +-
 .../web/mail/lib/lang/br_mail_get_list.lng    |   3 +-
 .../web/mail/lib/lang/br_mail_mailinglist.lng |  15 +-
 .../lib/lang/br_mail_mailinglist_list.lng     |   3 +-
 .../mail/lib/lang/br_mail_relay_recipient.lng |   5 +-
 .../lib/lang/br_mail_relay_recipient_list.lng |   1 -
 .../web/mail/lib/lang/br_mail_spamfilter.lng  |  17 +-
 .../mail/lib/lang/br_mail_spamfilter_list.lng |   3 +-
 .../web/mail/lib/lang/br_mail_transport.lng   |   3 +-
 .../mail/lib/lang/br_mail_transport_list.lng  |   3 +-
 interface/web/mail/lib/lang/br_mail_user.lng  |  61 ++-
 .../web/mail/lib/lang/br_mail_user_filter.lng |  15 +-
 .../lib/lang/br_mail_user_filter_list.lng     |   1 -
 .../web/mail/lib/lang/br_mail_user_list.lng   |   9 +-
 .../mail/lib/lang/br_mail_user_stats_list.lng |   5 +-
 .../web/mail/lib/lang/br_mail_whitelist.lng   |   7 +-
 .../mail/lib/lang/br_mail_whitelist_list.lng  |   5 +-
 .../mail/lib/lang/br_spamfilter_blacklist.lng |   7 +-
 .../lib/lang/br_spamfilter_blacklist_list.lng |   5 +-
 .../mail/lib/lang/br_spamfilter_config.lng    |   3 +-
 .../lib/lang/br_spamfilter_config_list.lng    |   1 -
 .../mail/lib/lang/br_spamfilter_policy.lng    |  13 +-
 .../lib/lang/br_spamfilter_policy_list.lng    |   1 -
 .../web/mail/lib/lang/br_spamfilter_users.lng |   7 +-
 .../lib/lang/br_spamfilter_users_list.lng     |   5 +-
 .../mail/lib/lang/br_spamfilter_whitelist.lng |   7 +-
 .../lib/lang/br_spamfilter_whitelist_list.lng |   5 +-
 .../lib/lang/br_user_quota_stats_list.lng     |   5 +-
 .../web/mail/lib/lang/br_xmpp_domain.lng      |  33 +-
 .../lib/lang/br_xmpp_domain_admin_list.lng    |   1 -
 .../web/mail/lib/lang/br_xmpp_domain_list.lng |   3 +-
 interface/web/mail/lib/lang/br_xmpp_user.lng  |   7 +-
 .../web/mail/lib/lang/br_xmpp_user_list.lng   |   3 +-
 interface/web/mail/lib/lang/cz.lng            |   9 +-
 .../mail/lib/lang/cz_backup_stats_list.lng    |   1 -
 interface/web/mail/lib/lang/cz_mail_alias.lng |  15 +-
 .../web/mail/lib/lang/cz_mail_alias_list.lng  |   1 -
 .../web/mail/lib/lang/cz_mail_aliasdomain.lng |   1 -
 .../lib/lang/cz_mail_aliasdomain_list.lng     |   1 -
 .../web/mail/lib/lang/cz_mail_backup_list.lng |   1 -
 .../web/mail/lib/lang/cz_mail_blacklist.lng   |   1 -
 .../mail/lib/lang/cz_mail_blacklist_list.lng  |   1 -
 .../mail/lib/lang/cz_mail_content_filter.lng  |   1 -
 .../lib/lang/cz_mail_content_filter_list.lng  |   3 +-
 .../web/mail/lib/lang/cz_mail_domain.lng      |   1 -
 .../lib/lang/cz_mail_domain_admin_list.lng    |   1 -
 .../mail/lib/lang/cz_mail_domain_catchall.lng |   3 +-
 .../lib/lang/cz_mail_domain_catchall_list.lng |   1 -
 .../web/mail/lib/lang/cz_mail_domain_list.lng |   1 -
 .../web/mail/lib/lang/cz_mail_forward.lng     |   3 +-
 .../mail/lib/lang/cz_mail_forward_list.lng    |   1 -
 interface/web/mail/lib/lang/cz_mail_get.lng   |   3 +-
 .../web/mail/lib/lang/cz_mail_get_list.lng    |   1 -
 .../web/mail/lib/lang/cz_mail_mailinglist.lng |   3 +-
 .../lib/lang/cz_mail_mailinglist_list.lng     |   1 -
 .../mail/lib/lang/cz_mail_relay_recipient.lng |   1 -
 .../lib/lang/cz_mail_relay_recipient_list.lng |   1 -
 .../web/mail/lib/lang/cz_mail_spamfilter.lng  |   1 -
 .../mail/lib/lang/cz_mail_spamfilter_list.lng |   1 -
 .../web/mail/lib/lang/cz_mail_transport.lng   |   1 -
 .../mail/lib/lang/cz_mail_transport_list.lng  |   1 -
 interface/web/mail/lib/lang/cz_mail_user.lng  |  30 +-
 .../web/mail/lib/lang/cz_mail_user_filter.lng |   7 +-
 .../lib/lang/cz_mail_user_filter_list.lng     |   1 -
 .../web/mail/lib/lang/cz_mail_user_list.lng   |   1 -
 .../mail/lib/lang/cz_mail_user_stats_list.lng |   1 -
 .../web/mail/lib/lang/cz_mail_whitelist.lng   |   1 -
 .../mail/lib/lang/cz_mail_whitelist_list.lng  |   1 -
 .../mail/lib/lang/cz_spamfilter_blacklist.lng |   1 -
 .../lib/lang/cz_spamfilter_blacklist_list.lng |   1 -
 .../mail/lib/lang/cz_spamfilter_config.lng    |   3 +-
 .../lib/lang/cz_spamfilter_config_list.lng    |   1 -
 .../mail/lib/lang/cz_spamfilter_policy.lng    |  25 +-
 .../lib/lang/cz_spamfilter_policy_list.lng    |   3 +-
 .../web/mail/lib/lang/cz_spamfilter_users.lng |   1 -
 .../lib/lang/cz_spamfilter_users_list.lng     |   1 -
 .../mail/lib/lang/cz_spamfilter_whitelist.lng |   1 -
 .../lib/lang/cz_spamfilter_whitelist_list.lng |   1 -
 .../lib/lang/cz_user_quota_stats_list.lng     |   1 -
 .../web/mail/lib/lang/cz_xmpp_domain.lng      |   1 -
 .../lib/lang/cz_xmpp_domain_admin_list.lng    |   1 -
 .../web/mail/lib/lang/cz_xmpp_domain_list.lng |   1 -
 interface/web/mail/lib/lang/cz_xmpp_user.lng  |   1 -
 .../web/mail/lib/lang/cz_xmpp_user_list.lng   |   1 -
 interface/web/mailuser/lib/lang/br.lng        |   5 +-
 interface/web/mailuser/lib/lang/br_index.lng  |  13 +-
 .../lib/lang/br_mail_user_autoresponder.lng   |   3 +-
 .../web/mailuser/lib/lang/br_mail_user_cc.lng |  15 +-
 .../mailuser/lib/lang/br_mail_user_filter.lng |  18 +-
 .../lib/lang/br_mail_user_filter_list.lng     |   5 +-
 .../lib/lang/br_mail_user_password.lng        |   7 +-
 .../lib/lang/br_mail_user_spamfilter.lng      |   5 +-
 interface/web/mailuser/lib/lang/cz.lng        |   1 -
 interface/web/mailuser/lib/lang/cz_index.lng  |   1 -
 .../lib/lang/cz_mail_user_autoresponder.lng   |   3 +-
 .../web/mailuser/lib/lang/cz_mail_user_cc.lng |   3 +-
 .../mailuser/lib/lang/cz_mail_user_filter.lng |   8 +-
 .../lib/lang/cz_mail_user_filter_list.lng     |   1 -
 .../lib/lang/cz_mail_user_password.lng        |   1 -
 .../lib/lang/cz_mail_user_spamfilter.lng      |   3 +-
 interface/web/monitor/lib/lang/br.lng         |  86 ++--
 .../web/monitor/lib/lang/br_datalog_list.lng  |   1 -
 .../lib/lang/br_dataloghistory_list.lng       |   1 -
 .../lib/lang/br_dataloghistory_undo.lng       |   1 -
 .../lib/lang/br_dataloghistory_view.lng       |   4 +-
 .../web/monitor/lib/lang/br_syslog_list.lng   |   1 -
 interface/web/monitor/lib/lang/cz.lng         | 109 +++--
 .../web/monitor/lib/lang/cz_datalog_list.lng  |   1 -
 .../lib/lang/cz_dataloghistory_list.lng       |   1 -
 .../lib/lang/cz_dataloghistory_undo.lng       |   1 -
 .../lib/lang/cz_dataloghistory_view.lng       |   4 +-
 .../web/monitor/lib/lang/cz_syslog_list.lng   |   5 +-
 interface/web/sites/lib/lang/br.lng           |  23 +-
 interface/web/sites/lib/lang/br_aps.lng       |  15 +-
 .../sites/lib/lang/br_aps_instances_list.lng  |   1 -
 .../sites/lib/lang/br_aps_packages_list.lng   |   1 -
 .../lib/lang/br_aps_update_packagelist.lng    |   3 +-
 .../sites/lib/lang/br_backup_stats_list.lng   |   1 -
 interface/web/sites/lib/lang/br_cron.lng      |  14 +-
 interface/web/sites/lib/lang/br_cron_list.lng |   5 +-
 interface/web/sites/lib/lang/br_database.lng  |  39 +-
 .../sites/lib/lang/br_database_admin_list.lng |   5 +-
 .../web/sites/lib/lang/br_database_list.lng   |   7 +-
 .../lib/lang/br_database_quota_stats_list.lng |   3 +-
 .../web/sites/lib/lang/br_database_user.lng   |  15 +-
 .../lib/lang/br_database_user_admin_list.lng  |   3 +-
 .../sites/lib/lang/br_database_user_list.lng  |   5 +-
 .../lib/lang/br_ftp_sites_stats_list.lng      |   1 -
 interface/web/sites/lib/lang/br_ftp_user.lng  |  13 +-
 .../web/sites/lib/lang/br_ftp_user_list.lng   |   3 +-
 .../web/sites/lib/lang/br_shell_user.lng      |  20 +-
 .../web/sites/lib/lang/br_shell_user_list.lng |   3 +-
 .../lib/lang/br_user_quota_stats_list.lng     |   3 +-
 .../web/sites/lib/lang/br_web_aliasdomain.lng |  69 ++-
 .../lib/lang/br_web_aliasdomain_list.lng      |   3 +-
 .../web/sites/lib/lang/br_web_backup_list.lng |  29 +-
 .../web/sites/lib/lang/br_web_childdomain.lng |  59 ++-
 .../lib/lang/br_web_childdomain_list.lng      |   3 +-
 .../lib/lang/br_web_directive_snippets.lng    |   1 -
 .../web/sites/lib/lang/br_web_domain.lng      |  86 ++--
 .../lib/lang/br_web_domain_admin_list.lng     |   1 -
 .../web/sites/lib/lang/br_web_domain_list.lng |   1 -
 .../web/sites/lib/lang/br_web_folder.lng      |   2 +-
 .../web/sites/lib/lang/br_web_folder_list.lng |   3 +-
 .../web/sites/lib/lang/br_web_folder_user.lng |   4 +-
 .../lib/lang/br_web_folder_user_list.lng      |   5 +-
 .../lib/lang/br_web_sites_stats_list.lng      |   1 -
 .../web/sites/lib/lang/br_web_subdomain.lng   |  23 +-
 .../sites/lib/lang/br_web_subdomain_list.lng  |   1 -
 .../sites/lib/lang/br_web_vhost_domain.lng    | 147 +++---
 .../lang/br_web_vhost_domain_admin_list.lng   |   1 -
 .../lib/lang/br_web_vhost_domain_list.lng     |   1 -
 .../sites/lib/lang/br_web_vhost_subdomain.lng |  84 ++--
 .../lib/lang/br_web_vhost_subdomain_list.lng  |   1 -
 .../web/sites/lib/lang/br_webdav_user.lng     |  12 +-
 .../sites/lib/lang/br_webdav_user_list.lng    |   3 +-
 interface/web/sites/lib/lang/cz.lng           |   3 +-
 interface/web/sites/lib/lang/cz_aps.lng       |  17 +-
 .../sites/lib/lang/cz_aps_instances_list.lng  |   1 -
 .../sites/lib/lang/cz_aps_packages_list.lng   |   1 -
 .../lib/lang/cz_aps_update_packagelist.lng    |   1 -
 .../sites/lib/lang/cz_backup_stats_list.lng   |   3 +-
 interface/web/sites/lib/lang/cz_cron.lng      |   5 +-
 interface/web/sites/lib/lang/cz_cron_list.lng |   1 -
 interface/web/sites/lib/lang/cz_database.lng  |   3 +-
 .../sites/lib/lang/cz_database_admin_list.lng |   3 +-
 .../web/sites/lib/lang/cz_database_list.lng   |   1 -
 .../lib/lang/cz_database_quota_stats_list.lng |   1 -
 .../web/sites/lib/lang/cz_database_user.lng   |   1 -
 .../lib/lang/cz_database_user_admin_list.lng  |   1 -
 .../sites/lib/lang/cz_database_user_list.lng  |   1 -
 .../lib/lang/cz_ftp_sites_stats_list.lng      |   1 -
 interface/web/sites/lib/lang/cz_ftp_user.lng  |   1 -
 .../web/sites/lib/lang/cz_ftp_user_list.lng   |   1 -
 .../web/sites/lib/lang/cz_shell_user.lng      |   1 -
 .../web/sites/lib/lang/cz_shell_user_list.lng |   1 -
 .../lib/lang/cz_user_quota_stats_list.lng     |   1 -
 .../web/sites/lib/lang/cz_web_aliasdomain.lng |   5 +-
 .../lib/lang/cz_web_aliasdomain_list.lng      |   1 -
 .../web/sites/lib/lang/cz_web_backup_list.lng |  29 +-
 .../web/sites/lib/lang/cz_web_childdomain.lng |   9 +-
 .../lib/lang/cz_web_childdomain_list.lng      |   1 -
 .../lib/lang/cz_web_directive_snippets.lng    |   1 -
 .../web/sites/lib/lang/cz_web_domain.lng      |   5 +-
 .../lib/lang/cz_web_domain_admin_list.lng     |   1 -
 .../web/sites/lib/lang/cz_web_domain_list.lng |   1 -
 .../web/sites/lib/lang/cz_web_folder.lng      |   1 -
 .../web/sites/lib/lang/cz_web_folder_list.lng |   1 -
 .../web/sites/lib/lang/cz_web_folder_user.lng |   1 -
 .../lib/lang/cz_web_folder_user_list.lng      |   1 -
 .../lib/lang/cz_web_sites_stats_list.lng      |   1 -
 .../web/sites/lib/lang/cz_web_subdomain.lng   |   5 +-
 .../sites/lib/lang/cz_web_subdomain_list.lng  |   1 -
 .../sites/lib/lang/cz_web_vhost_domain.lng    |  32 +-
 .../lang/cz_web_vhost_domain_admin_list.lng   |   1 -
 .../lib/lang/cz_web_vhost_domain_list.lng     |   1 -
 .../sites/lib/lang/cz_web_vhost_subdomain.lng |   3 +-
 .../lib/lang/cz_web_vhost_subdomain_list.lng  |   1 -
 .../web/sites/lib/lang/cz_webdav_user.lng     |   1 -
 .../sites/lib/lang/cz_webdav_user_list.lng    |   1 -
 .../lib/lang/br_strengthmeter.lng             |   1 -
 .../lib/lang/cz_strengthmeter.lng             |   1 -
 interface/web/tools/lib/lang/br.lng           |   5 +-
 .../tools/lib/lang/br_import_ispconfig.lng    |  28 +-
 .../web/tools/lib/lang/br_import_vpopmail.lng |   6 +-
 interface/web/tools/lib/lang/br_index.lng     |   3 +-
 interface/web/tools/lib/lang/br_interface.lng |  10 +
 interface/web/tools/lib/lang/br_resync.lng    |  57 ++-
 .../web/tools/lib/lang/br_tpl_default.lng     |   3 +-
 .../web/tools/lib/lang/br_usersettings.lng    |   6 +-
 interface/web/tools/lib/lang/cz.lng           |   1 -
 .../tools/lib/lang/cz_import_ispconfig.lng    |   2 +-
 .../web/tools/lib/lang/cz_import_vpopmail.lng |   5 +-
 interface/web/tools/lib/lang/cz_index.lng     |   1 -
 interface/web/tools/lib/lang/cz_interface.lng |  10 +
 interface/web/tools/lib/lang/cz_resync.lng    |   1 -
 .../web/tools/lib/lang/cz_tpl_default.lng     |   1 -
 .../web/tools/lib/lang/cz_usersettings.lng    |  10 +-
 interface/web/vm/lib/lang/br.lng              |   1 -
 .../web/vm/lib/lang/br_openvz_action.lng      |   1 -
 interface/web/vm/lib/lang/br_openvz_ip.lng    |   1 -
 .../web/vm/lib/lang/br_openvz_ip_list.lng     |   1 -
 .../web/vm/lib/lang/br_openvz_ostemplate.lng  |   5 +-
 .../vm/lib/lang/br_openvz_ostemplate_list.lng |   1 -
 .../web/vm/lib/lang/br_openvz_template.lng    | 115 +++--
 .../vm/lib/lang/br_openvz_template_list.lng   |   1 -
 interface/web/vm/lib/lang/br_openvz_vm.lng    |  33 +-
 .../web/vm/lib/lang/br_openvz_vm_list.lng     |   1 -
 interface/web/vm/lib/lang/cz.lng              |   1 -
 .../web/vm/lib/lang/cz_openvz_action.lng      |   1 -
 interface/web/vm/lib/lang/cz_openvz_ip.lng    |   1 -
 .../web/vm/lib/lang/cz_openvz_ip_list.lng     |   1 -
 .../web/vm/lib/lang/cz_openvz_ostemplate.lng  |   1 -
 .../vm/lib/lang/cz_openvz_ostemplate_list.lng |   1 -
 .../web/vm/lib/lang/cz_openvz_template.lng    |   1 -
 .../vm/lib/lang/cz_openvz_template_list.lng   |   1 -
 interface/web/vm/lib/lang/cz_openvz_vm.lng    |   1 -
 .../web/vm/lib/lang/cz_openvz_vm_list.lng     |   1 -
 474 files changed, 2043 insertions(+), 2447 deletions(-)
 create mode 100644 interface/web/tools/lib/lang/br_interface.lng
 create mode 100644 interface/web/tools/lib/lang/cz_interface.lng

diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng
index 92507a6a7c..e47df8250d 100644
--- a/interface/lib/lang/br.lng
+++ b/interface/lib/lang/br.lng
@@ -11,10 +11,10 @@ $wb['number_format_dec_point'] = '.';
 $wb['number_format_thousands_sep'] = '.';
 $wb['error_301'] = 'Módulo não permitido para o usuário atual.';
 $wb['error_302'] = 'Módulo inválido.';
-$wb['error_1001'] = 'Usuário e/ou senha está em branco!';
-$wb['error_1002'] = 'Usuário e/ou senha incorretos!';
+$wb['error_1001'] = 'Usuário e/ou senha está vazio!';
+$wb['error_1002'] = 'Usuário e/ou senha incorreto!';
 $wb['error_1003'] = 'Usuário desabilitado!';
-$wb['delete_confirmation'] = 'Você tem certeza que deseja remover o registro?';
+$wb['delete_confirmation'] = 'Você tem certeza que deseja remover este registro?';
 $wb['error_no_view_permission'] = 'Você não tem permissão para visualizar este registro ou o registro não existe!';
 $wb['error_no_delete_permission'] = 'Você não tem permissão para remover este registro!';
 $wb['page_txt'] = 'Página';
@@ -29,14 +29,14 @@ $wb['btn_save_txt'] = 'Salvar';
 $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['top_menu_system'] = 'Sistema';
 $wb['top_menu_client'] = 'Clientes';
-$wb['top_menu_email'] = 'e-Mail';
+$wb['top_menu_email'] = 'eMail';
 $wb['top_menu_monitor'] = 'Monitor';
 $wb['top_menu_sites'] = 'Sites';
 $wb['top_menu_dns'] = 'DNS';
 $wb['top_menu_tools'] = 'Ferramentas';
 $wb['top_menu_help'] = 'Ajuda';
 $wb['top_menu_billing'] = 'Faturamento';
-$wb['top_menu_mailuser'] = 'Contas de e-mail';
+$wb['top_menu_mailuser'] = 'Contas de email';
 $wb['top_menu_domain'] = 'Domínios';
 $wb['top_menu_dashboard'] = 'Início';
 $wb['top_menu_vm'] = 'VPS';
@@ -78,80 +78,80 @@ $wb['globalsearch_noresults_text_txt'] = 'Sem resultados.';
 $wb['globalsearch_noresults_limit_txt'] = '0 resultados';
 $wb['globalsearch_searchfield_watermark_txt'] = 'Pesquisar';
 $wb['globalsearch_suggestions_text_txt'] = 'Sugestões';
-$wb['global_tabchange_warning_txt'] = 'Para alterar dados nesta aba clique OK. Cancelar descarta todas as alterações.';
-$wb['global_tabchange_discard_txt'] = 'Você não salvou as alterações nesta aba. Todas as alterações serão descartadas caso prossiga.';
-$wb['datalog_changes_txt'] = 'As alterações ainda não propagaram em todos os servidores:';
-$wb['datalog_changes_end_txt'] = 'Gravar alterações pode levar alguns minutos. Por favor, seja paciente.';
+$wb['global_tabchange_warning_txt'] = 'Para modificar dados nesta aba clique OK. Cancelar descarta todas as modificações.';
+$wb['global_tabchange_discard_txt'] = 'Você não salvou as modificações nesta aba. Todas as modificações serão descartadas caso prossiga.';
+$wb['datalog_changes_txt'] = 'As modificações ainda não propagaram em todos os servidores:';
+$wb['datalog_changes_end_txt'] = 'Gravar modificações pode levar alguns minutos. Por favor, seja paciente.';
 $wb['datalog_status_i_web_database'] = 'Adicionar novo banco de dados';
 $wb['datalog_status_u_web_database'] = 'Atualizar banco de dados';
 $wb['datalog_status_d_web_database'] = 'Remover banco de dados';
-$wb['datalog_status_i_web_database_user'] = 'Adicionar novo usuário de banco de dados';
-$wb['datalog_status_u_web_database_user'] = 'Atualizar usuário de banco de dados';
-$wb['datalog_status_d_web_database_user'] = 'Remover usuário de banco de dados';
+$wb['datalog_status_i_web_database_user'] = 'Adicionar novo usuário do Banco de Dados';
+$wb['datalog_status_u_web_database_user'] = 'Atualizar usuário do Banco de Dados';
+$wb['datalog_status_d_web_database_user'] = 'Remover usuário do Banco de Dados';
 $wb['datalog_status_i_web_domain'] = 'Adicionar site';
 $wb['datalog_status_u_web_domain'] = 'Atualizar site';
 $wb['datalog_status_d_web_domain'] = 'Remover site';
-$wb['datalog_status_i_ftp_user'] = 'Adicionar usuário ftp';
-$wb['datalog_status_u_ftp_user'] = 'Atualizar usuário ftp';
-$wb['datalog_status_d_ftp_user'] = 'Remover usuário ftp';
-$wb['datalog_status_i_mail_domain'] = 'Adicionar domínio de e-mail';
-$wb['datalog_status_u_mail_domain'] = 'Atualizar domínio de e-mail';
-$wb['datalog_status_d_mail_domain'] = 'Remover domínio de e-mail';
-$wb['datalog_status_i_mail_user'] = 'Adicionar conta de e-mail';
-$wb['datalog_status_u_mail_user'] = 'Atualizar conta de e-mail';
-$wb['datalog_status_d_mail_user'] = 'Remover conta de e-mail';
+$wb['datalog_status_i_ftp_user'] = 'Adicionar usuário FTP';
+$wb['datalog_status_u_ftp_user'] = 'Atualizar usuário FTP';
+$wb['datalog_status_d_ftp_user'] = 'Remover usuário FTP';
+$wb['datalog_status_i_mail_domain'] = 'Adicionar domínio de email';
+$wb['datalog_status_u_mail_domain'] = 'Atualizar domínio de email';
+$wb['datalog_status_d_mail_domain'] = 'Remover domínio de email';
+$wb['datalog_status_i_mail_user'] = 'Adicionar conta de email';
+$wb['datalog_status_u_mail_user'] = 'Atualizar conta de email';
+$wb['datalog_status_d_mail_user'] = 'Remover conta de email';
 $wb['datalog_status_i_spamfilter_users'] = 'Adicionar filtros anti-spam';
 $wb['datalog_status_u_spamfilter_users'] = 'Atualizar filtros anti-spam';
 $wb['datalog_status_d_spamfilter_users'] = 'Remover filtros anti-spam';
-$wb['datalog_status_i_mail_forwarding'] = 'Adicionar endereço de e-mail';
-$wb['datalog_status_u_mail_forwarding'] = 'Atualizar endereço de e-mail';
-$wb['datalog_status_d_mail_forwarding'] = 'Remover endereço de e-mail';
-$wb['datalog_status_i_dns_rr'] = 'Adicionar registro dns';
-$wb['datalog_status_u_dns_rr'] = 'Atualizar registro dns';
-$wb['datalog_status_d_dns_rr'] = 'Remover registro dns';
-$wb['datalog_status_i_dns_soa'] = 'Adicionar zona dns';
-$wb['datalog_status_u_dns_soa'] = 'Atualizar zona dns';
-$wb['datalog_status_d_dns_soa'] = 'Remover zona dns';
-$wb['datalog_status_i_dns_slave'] = 'Create new secondary DNS zone';
-$wb['datalog_status_u_dns_slave'] = 'Update secondary DNS zone';
-$wb['datalog_status_d_dns_slave'] = 'Delete secondary DNS zone';
-$wb['datalog_status_i_firewall'] = 'Create new firewall rule';
-$wb['datalog_status_u_firewall'] = 'Update firewall rule';
-$wb['datalog_status_d_firewall'] = 'Delete firewall rule';
-$wb['datalog_status_u_server'] = 'Update server settings';
-$wb['datalog_status_d_server'] = 'Delete server';
-$wb['datalog_status_i_cron'] = 'Adicionar tarefa no cron';
-$wb['datalog_status_u_cron'] = 'Atualizar tarefa no cron';
+$wb['datalog_status_i_mail_forwarding'] = 'Adicionar endereço de email';
+$wb['datalog_status_u_mail_forwarding'] = 'Atualizar endereço de email';
+$wb['datalog_status_d_mail_forwarding'] = 'Remover endereço de email';
+$wb['datalog_status_i_dns_rr'] = 'Adicionar registro DNS';
+$wb['datalog_status_u_dns_rr'] = 'Atualizar registro DNS';
+$wb['datalog_status_d_dns_rr'] = 'Remover registro DNS';
+$wb['datalog_status_i_dns_soa'] = 'Adicionar zona DNS';
+$wb['datalog_status_u_dns_soa'] = 'Atualizar zona DNS';
+$wb['datalog_status_d_dns_soa'] = 'Remover zona DNS';
+$wb['datalog_status_i_dns_slave'] = 'Adicionar nova zona DNS secundária';
+$wb['datalog_status_u_dns_slave'] = 'Atualizar zona DNS secundária';
+$wb['datalog_status_d_dns_slave'] = 'Remover zona DNS secundária';
+$wb['datalog_status_i_firewall'] = 'Adicionar nova regra de Firewall';
+$wb['datalog_status_u_firewall'] = 'Atualizar regra de Firewall';
+$wb['datalog_status_d_firewall'] = 'Remover regra de Firewall';
+$wb['datalog_status_u_server'] = 'Atualizar configurações do servidor';
+$wb['datalog_status_d_server'] = 'Remover servidor';
+$wb['datalog_status_i_cron'] = 'Adicionar tarefa no Cron';
+$wb['datalog_status_u_cron'] = 'Atualizar tarefa no Cron';
 $wb['datalog_status_i_server_ip'] = 'Add server IP';
 $wb['datalog_status_u_server_ip'] = 'Update server IP';
 $wb['datalog_status_d_server_ip'] = 'Delete server IP';
-$wb['datalog_status_d_cron'] = 'Remover tarefa no cron';
-$wb['datalog_status_i_mail_get'] = 'Adicionar conta de busca de e-mail';
-$wb['datalog_status_u_mail_get'] = 'Atualizar conta de busca de e-mail';
-$wb['datalog_status_d_mail_get'] = 'Remover conta de busca de e-mail';
-$wb['datalog_status_i_mail_mailinglist'] = 'Adicionar lista de e-mails';
-$wb['datalog_status_u_mail_mailinglist'] = 'Atualizar lista de e-mails';
-$wb['datalog_status_d_mail_mailinglist'] = 'Remover lista de e-mails';
-$wb['datalog_status_i_shell_user'] = 'Adicionar usuário do shell';
-$wb['datalog_status_u_shell_user'] = 'Atualizar usuário do shell';
-$wb['datalog_status_d_shell_user'] = 'Remover usuário do shell';
-$wb['datalog_status_i_web_folder'] = 'Adicionar pasta protegida';
-$wb['datalog_status_u_web_folder'] = 'Atualizar pasta protegida';
-$wb['datalog_status_d_web_folder'] = 'Remover pasta protegida';
-$wb['datalog_status_i_web_folder_user'] = 'Adicionar usuário de pasta protegida';
-$wb['datalog_status_u_web_folder_user'] = 'Atualizar usuário de pasta protegida';
-$wb['datalog_status_d_web_folder_user'] = 'Remover usuário de pasta protegida';
-$wb['datalog_status_i_xmpp_domain'] = 'Adicionar domínio xmpp';
-$wb['datalog_status_u_xmpp_domain'] = 'Atualizar domínio xmpp';
-$wb['datalog_status_d_xmpp_domain'] = 'Remover domínio xmpp';
-$wb['datalog_status_i_xmpp_user'] = 'Adicionar usuário xmpp';
-$wb['datalog_status_u_xmpp_user'] = 'Atualizar usuário xmpp';
-$wb['datalog_status_d_xmpp_user'] = 'Remover usuário xmpp';
+$wb['datalog_status_d_cron'] = 'Remover tarefa no Cron';
+$wb['datalog_status_i_mail_get'] = 'Adicionar conta de busca de emails';
+$wb['datalog_status_u_mail_get'] = 'Atualizar conta de busca de emails';
+$wb['datalog_status_d_mail_get'] = 'Remover conta de busca de emails';
+$wb['datalog_status_i_mail_mailinglist'] = 'Adicionar lista de emails';
+$wb['datalog_status_u_mail_mailinglist'] = 'Atualizar lista de emails';
+$wb['datalog_status_d_mail_mailinglist'] = 'Remover lista de emails';
+$wb['datalog_status_i_shell_user'] = 'Adicionar usuário Shell';
+$wb['datalog_status_u_shell_user'] = 'Atualizar usuário Shell';
+$wb['datalog_status_d_shell_user'] = 'Remover usuário Shell';
+$wb['datalog_status_i_web_folder'] = 'Adicionar pasta Web';
+$wb['datalog_status_u_web_folder'] = 'Atualizar pasta Web';
+$wb['datalog_status_d_web_folder'] = 'Remover pasta Web';
+$wb['datalog_status_i_web_folder_user'] = 'Adicionar usuário de pasta Web';
+$wb['datalog_status_u_web_folder_user'] = 'Atualizar usuário de pasta Web';
+$wb['datalog_status_d_web_folder_user'] = 'Remover usuário de pasta Web';
+$wb['datalog_status_i_xmpp_domain'] = 'Adicionar domínio XMPP';
+$wb['datalog_status_u_xmpp_domain'] = 'Atualizar domínio XMPP';
+$wb['datalog_status_d_xmpp_domain'] = 'Remover domínio XMPP';
+$wb['datalog_status_i_xmpp_user'] = 'Adicionar usuário XMPP';
+$wb['datalog_status_u_xmpp_user'] = 'Atualizar usuário XMPP';
+$wb['datalog_status_d_xmpp_user'] = 'Remover usuário XMPP';
 $wb['err_csrf_attempt_blocked'] = 'Tentativa de CSRF bloqueada.';
 $wb['login_as_txt'] = 'Acessar como';
 $wb['no_domain_perm'] = 'Você não tem permissão para este domínio.';
 $wb['no_destination_perm'] = 'Você não tem permissão para este destino.';
-$wb['client_you_are_locked'] = 'Você não tem permissão para alterar nenhuma configuração.';
+$wb['client_you_are_locked'] = 'Você não tem permissão para modificar qualquer configuração.';
 $wb['gender_m_txt'] = 'Sr.';
 $wb['gender_f_txt'] = 'Sra.';
 $wb['client_cannot_be_deleted_because_of_billing_module_txt'] = 'Este cliente possui registros no módulo de faturamento, portanto não pode ser removido.';
@@ -163,13 +163,12 @@ $wb['strength_2'] = 'Razoável';
 $wb['strength_3'] = 'Boa';
 $wb['strength_4'] = 'Forte';
 $wb['strength_5'] = 'Muito Forte';
-$wb['weak_password_txt'] = 'A senha configurada não obedece as diretivas de segurança. A senha deve possuir ao menos {chars} caracteres e ao menos um caractere maiúsculoe um caractere especial e dificuldade "{strength}".';
+$wb['weak_password_txt'] = 'A senha configurada não obedece as diretivas de segurança. A senha deve possuir ao menos {chars} caracteres e ao menos um caractere maiúsculo e um caractere especial e dificuldade "{strength}".';
 $wb['weak_password_length_txt'] = 'A senha configurada não obedece as diretivas de segurança. A senha deve possuir ao menos {chars} de comprimento.';
 $wb['security_check1_txt'] = 'Verifique as permissões de segurança:';
 $wb['security_check2_txt'] = 'falhou.';
 $wb['select_directive_snippet_txt'] = 'Diretiva de trechos de código';
 $wb['select_master_directive_snippet_txt'] = 'Diretiva mestre de trechos de código';
 $wb['unlimited_txt'] = 'Ilimitado';
-$wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be > 0.';
-$wb['datalog_changes_close_txt'] = 'Close';
-?>
\ No newline at end of file
+$wb['server_id_0_error_txt'] = 'Por favor, selecione um servidor válido. O ID do servidor deve ser > 0.';
+$wb['datalog_changes_close_txt'] = 'Fechar';
diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng
index a3c2fe440c..04ad86178c 100644
--- a/interface/lib/lang/cz.lng
+++ b/interface/lib/lang/cz.lng
@@ -1,9 +1,9 @@
 <?php
-$wb['conf_format_dateshort'] = 'd. m. Y';
+$wb['conf_format_dateshort'] = 'Y-d-m';
 $wb['conf_format_datelong'] = 'l dS of F Y';
 $wb['conf_format_timeshort'] = 'H:i';
 $wb['conf_format_timelong'] = 'H:i:s';
-$wb['conf_format_datetime'] = 'd. m. Y H:i';
+$wb['conf_format_datetime'] = 'Y-d-m H:i';
 $wb['number_format_decimals'] = '4';
 $wb['number_format_decimals_client'] = '2';
 $wb['number_format_dec_point'] = '.';
@@ -28,7 +28,7 @@ $wb['btn_save_txt'] = 'Uložit';
 $wb['btn_cancel_txt'] = 'Zrušit';
 $wb['top_menu_system'] = 'Systém';
 $wb['top_menu_client'] = 'Klienti';
-$wb['top_menu_email'] = 'E-mail';
+$wb['top_menu_email'] = 'Pošta';
 $wb['top_menu_monitor'] = 'Monitor';
 $wb['top_menu_sites'] = 'Stránky';
 $wb['top_menu_dns'] = 'DNS';
@@ -69,7 +69,7 @@ $wb['monthnamesshort_dec'] = 'Pro';
 $wb['datepicker_nextText'] = 'Další';
 $wb['datepicker_prevText'] = 'Předchozí';
 $wb['logout_txt'] = 'Odhlášení';
-$wb['conf_format_dateshort_human_readable'] = 'dd. mm. yyyy';
+$wb['conf_format_dateshort_human_readable'] = 'yyyy-mm-dd';
 $wb['submit_confirmation'] = 'Opravdu chcete provést tuto akci ?';
 $wb['top_menu_mailuser'] = 'E-mail. uživ.';
 $wb['globalsearch_resultslimit_of_txt'] = 'z';
@@ -112,12 +112,12 @@ $wb['datalog_status_d_dns_rr'] = 'Odstranění DNS záznamu';
 $wb['datalog_status_i_dns_soa'] = 'Vytvoření DNS zóny';
 $wb['datalog_status_u_dns_soa'] = 'Aktualizace nastavení DNS zóny';
 $wb['datalog_status_d_dns_soa'] = 'Odstranění DNS zóny';
-$wb['datalog_status_i_dns_slave'] = 'Create new secondary DNS zone';
-$wb['datalog_status_u_dns_slave'] = 'Update secondary DNS zone';
-$wb['datalog_status_d_dns_slave'] = 'Delete secondary DNS zone';
-$wb['datalog_status_i_firewall'] = 'Create new firewall rule';
-$wb['datalog_status_u_firewall'] = 'Update firewall rule';
-$wb['datalog_status_d_firewall'] = 'Delete firewall rule';
+$wb['datalog_status_i_dns_slave'] = 'Vytvořit sekundární DNS zonu';
+$wb['datalog_status_u_dns_slave'] = 'Aktualizovat sekundární DNS zonu';
+$wb['datalog_status_d_dns_slave'] = 'Smazat sekundární DNS zonu';
+$wb['datalog_status_i_firewall'] = 'Vytvořit pravidlo firewallu';
+$wb['datalog_status_u_firewall'] = 'Aktualizovat pravidlo firewallu';
+$wb['datalog_status_d_firewall'] = 'Smazat pravidlo firewallu';
 $wb['datalog_status_u_server'] = 'Update server settings';
 $wb['datalog_status_d_server'] = 'Delete server';
 $wb['datalog_status_i_cron'] = 'Vytvoření shell uživatele';
@@ -156,7 +156,7 @@ $wb['strength_2'] = 'Podprůměrná';
 $wb['strength_3'] = 'Dobrá';
 $wb['strength_4'] = 'Silná';
 $wb['strength_5'] = 'Velmi silná';
-$wb['weak_password_txt'] = 'Zvolené heslo neodpovídá požadavkům zásad pro tvorbu hesel. Heslo musí být alespoň {chars} znaků dlouhé a mající sílu \\"{strength}\\".';
+$wb['weak_password_txt'] = 'Zvolené heslo neodpovídá požadavkům zásad pro tvorbu hesel. Heslo musí být alespoň {chars} znaků dlouhé a mající sílu \"{strength}\".';
 $wb['weak_password_length_txt'] = 'Zvolené heslo neodpovídá požadavkům zásad pro tvorbu hesel. Heslo musí být alespoň {chars} znaků dlouhé.';
 $wb['security_check1_txt'] = 'Check for security permission:';
 $wb['security_check2_txt'] = 'failed.';
@@ -169,7 +169,6 @@ $wb['datalog_status_d_xmpp_domain'] = 'Smazat XMPP doménu';
 $wb['datalog_status_i_xmpp_user'] = 'Vytvořit XMPP uživatele';
 $wb['datalog_status_u_xmpp_user'] = 'Aktualizovat XMPP uživatele';
 $wb['datalog_status_d_xmpp_user'] = 'Smazat XMPP uživatele';
-$wb['unlimited_txt'] = 'neomezeno';
+$wb['unlimited_txt'] = 'Neomezený';
 $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be > 0.';
 $wb['datalog_changes_close_txt'] = 'Close';
-?>
diff --git a/interface/web/admin/lib/lang/br.lng b/interface/web/admin/lib/lang/br.lng
index b558a1510e..12db8395a4 100644
--- a/interface/web/admin/lib/lang/br.lng
+++ b/interface/web/admin/lib/lang/br.lng
@@ -1,5 +1,5 @@
 <?php
-$wb['error_1001'] = 'Usuário ou senha está em branco.';
+$wb['error_1001'] = 'Usuário ou senha está vazio.';
 $wb['error_1002'] = 'Usuário ou senha é inválido.';
 $wb['Groups'] = 'Grupos';
 $wb['groups_description'] = 'Editar grupos e usuários do sistema.';
@@ -20,7 +20,7 @@ $wb['Server Services'] = 'Serviços do servidor';
 $wb['Services'] = 'Serviços';
 $wb['Server Config'] = 'Configuração do servidor';
 $wb['Server'] = 'Servidor';
-$wb['Mail'] = 'e-Mail';
+$wb['Mail'] = 'eMail';
 $wb['Getmail'] = 'Getmail';
 $wb['Web'] = 'Web';
 $wb['FastCGI'] = 'FastCGI';
@@ -28,7 +28,7 @@ $wb['Jailkit'] = 'Jailkit';
 $wb['Rescue'] = 'Manutenção';
 $wb['Server IP addresses'] = 'Endereços IP do servidor';
 $wb['Server IPv4 mapping'] = 'Mapeamento IPv4 do servidor';
-$wb['Additional PHP Versions'] = 'Versões adicionais do php';
+$wb['Additional PHP Versions'] = 'Versões adicionais PHP';
 $wb['Directive Snippets'] = 'Diretiva de trechos de código';
 $wb['Firewall'] = 'Firewall';
 $wb['Interface'] = 'Interface';
@@ -50,4 +50,3 @@ $wb['Import'] = 'Importar';
 $wb['Remote Actions'] = 'Ações remotas';
 $wb['Do OS-Update'] = 'Atualizar sistema operacional';
 $wb['Do ISPConfig-Update'] = 'Atualizar o ISPConfig';
-?>
diff --git a/interface/web/admin/lib/lang/br_directive_snippets.lng b/interface/web/admin/lib/lang/br_directive_snippets.lng
index 3179f5fa56..d1ec8239f7 100644
--- a/interface/web/admin/lib/lang/br_directive_snippets.lng
+++ b/interface/web/admin/lib/lang/br_directive_snippets.lng
@@ -8,8 +8,8 @@ $wb['directive_snippets_name_empty'] = 'Por favor, insira um nome para a diretiv
 $wb['directive_snippets_name_error_unique'] = 'Já existe uma diretiva com este nome.';
 $wb['variables_txt'] = 'Variáveis';
 $wb['customer_viewable_txt'] = 'Visualização personalizada';
-$wb['required_php_snippets_txt'] = 'Trecho de código exige php';
-$wb['update_sites_txt'] = 'Update sites using this snippet';
-$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.';
-$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.';
-$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.';
\ No newline at end of file
+$wb['required_php_snippets_txt'] = 'Trecho de código exige PHP';
+$wb['update_sites_txt'] = 'Atualizar sites usando este trecho de código';
+$wb['error_hide_snippet_active_sites'] = 'Você não pode ocultar este trecho de código dos clientes, pois ele é usado por sites existentes.';
+$wb['error_disable_snippet_active_sites'] = 'Você não pode desativar este trecho de código, pois ele é usado por sites existentes.';
+$wb['error_delete_snippet_active_sites'] = 'Você não pode excluir este trecho de código, pois ele é usado por sites existentes.';
diff --git a/interface/web/admin/lib/lang/br_directive_snippets_list.lng b/interface/web/admin/lib/lang/br_directive_snippets_list.lng
index 70af844dd6..d74c9f47c9 100644
--- a/interface/web/admin/lib/lang/br_directive_snippets_list.lng
+++ b/interface/web/admin/lib/lang/br_directive_snippets_list.lng
@@ -5,4 +5,3 @@ $wb['name_txt'] = 'Nome da diretiva';
 $wb['type_txt'] = 'Tipo';
 $wb['add_new_record_txt'] = 'Adicionar diretiva';
 $wb['customer_viewable_txt'] = 'Visível para o cliente';
-?>
diff --git a/interface/web/admin/lib/lang/br_firewall.lng b/interface/web/admin/lib/lang/br_firewall.lng
index 3fd7f77d3e..9a3eadb4a4 100644
--- a/interface/web/admin/lib/lang/br_firewall.lng
+++ b/interface/web/admin/lib/lang/br_firewall.lng
@@ -5,7 +5,6 @@ $wb['udp_port_txt'] = 'Portas UDP abertas';
 $wb['tcp_port_help_txt'] = 'Separado por vírgula';
 $wb['udp_port_help_txt'] = 'Separado por vírgula';
 $wb['active_txt'] = 'Ativo';
-$wb['firewall_error_unique'] = 'Já existe uma regra de firewall idêntica para este servidor.';
-$wb['tcp_ports_error_regex'] = 'Caractere não permitido para configuração de porta tcp: Caracteres permitidos são números, ":" e ",".';
-$wb['udp_ports_error_regex'] = 'Caractere não permitido para configuração de porta udp: Caracteres permitidos são números, ":" e ",".';
-?>
+$wb['firewall_error_unique'] = 'Já existe uma regra de Firewall idêntica para este servidor.';
+$wb['tcp_ports_error_regex'] = 'Caractere não permitido para configuração de porta TCP: Caracteres permitidos são números, ":" e ",".';
+$wb['udp_ports_error_regex'] = 'Caractere não permitido para configuração de porta UDP: Caracteres permitidos são números, ":" e ",".';
diff --git a/interface/web/admin/lib/lang/br_firewall_list.lng b/interface/web/admin/lib/lang/br_firewall_list.lng
index d90ee33d4e..885491f344 100644
--- a/interface/web/admin/lib/lang/br_firewall_list.lng
+++ b/interface/web/admin/lib/lang/br_firewall_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['tcp_port_txt'] = 'Portas TCP abertas';
 $wb['udp_port_txt'] = 'Portas UDP abertas';
 $wb['add_new_record_txt'] = 'Adicionar nova regra';
-?>
diff --git a/interface/web/admin/lib/lang/br_groups.lng b/interface/web/admin/lib/lang/br_groups.lng
index 22a1a5c63d..4cad106991 100644
--- a/interface/web/admin/lib/lang/br_groups.lng
+++ b/interface/web/admin/lib/lang/br_groups.lng
@@ -2,4 +2,3 @@
 $wb['description_txt'] = 'Descrição';
 $wb['name_txt'] = 'Grupo';
 $wb['name_err'] = 'O grupo deve conter no mínimo 1 e no máximo 30 caracteres.';
-?>
diff --git a/interface/web/admin/lib/lang/br_groups_list.lng b/interface/web/admin/lib/lang/br_groups_list.lng
index 74a414f52d..9d256d5dff 100644
--- a/interface/web/admin/lib/lang/br_groups_list.lng
+++ b/interface/web/admin/lib/lang/br_groups_list.lng
@@ -3,5 +3,4 @@ $wb['list_head_txt'] = 'Grupos';
 $wb['description_txt'] = 'Descrição';
 $wb['name_txt'] = 'Grupo';
 $wb['add_new_record_txt'] = 'Adicionar novo grupo';
-$wb['warning_txt'] = '<b>ALERTA:</b> Não editar ou alterar qualquer configuração de usuário aqui. Use o módulo de clientes e revendas para isso. Editar ou alterar usuários ou grupos aqui pode causar perda de dados!';
-?>
+$wb['warning_txt'] = '<b>ALERTA:</b> Não editar ou modificar qualquer configuração de usuário aqui. Use o módulo de clientes e revendas para isso. Editar ou modificar usuários ou grupos aqui pode causar perda de dados!';
diff --git a/interface/web/admin/lib/lang/br_iptables.lng b/interface/web/admin/lib/lang/br_iptables.lng
index f899d53178..839c060996 100644
--- a/interface/web/admin/lib/lang/br_iptables.lng
+++ b/interface/web/admin/lib/lang/br_iptables.lng
@@ -1,6 +1,6 @@
 <?php
 $wb['server_id_txt'] = 'Servidor';
-$wb['multiport_txt'] = 'Multi-portas';
+$wb['multiport_txt'] = 'Multi portas';
 $wb['singleport_txt'] = 'Portas simples';
 $wb['protocol_txt'] = 'Protocolo';
 $wb['table_txt'] = 'Tabela';
@@ -9,5 +9,4 @@ $wb['state_txt'] = 'Estado';
 $wb['destination_ip_txt'] = 'Endereço de destino';
 $wb['source_ip_txt'] = 'Endereço de origem';
 $wb['active_txt'] = 'Ativo';
-$wb['iptables_error_unique'] = 'Já existe uma regra de firewall idêntica para este servidor.';
-?>
+$wb['iptables_error_unique'] = 'Já existe uma regra de Firewall idêntica para este servidor.';
diff --git a/interface/web/admin/lib/lang/br_iptables_list.lng b/interface/web/admin/lib/lang/br_iptables_list.lng
index 3326ac060a..68edbe3602 100644
--- a/interface/web/admin/lib/lang/br_iptables_list.lng
+++ b/interface/web/admin/lib/lang/br_iptables_list.lng
@@ -1,6 +1,6 @@
 <?php
 $wb['list_head_txt'] = 'Firewall';
-$wb['add_new_rule_txt'] = 'Adicionar regra de firewall';
+$wb['add_new_rule_txt'] = 'Adicionar regra de Firewall';
 $wb['server_id_txt'] = 'Servidor';
 $wb['multiport_txt'] = 'Multi portas';
 $wb['singleport_txt'] = 'Porta simples';
@@ -12,4 +12,3 @@ $wb['destination_ip_txt'] = 'Endereço de destino';
 $wb['source_ip_txt'] = 'Endereço de origem';
 $wb['active_txt'] = 'Ativo';
 $wb['iptables_error_unique'] = 'Já existe uma regra idêntica para este servidor.';
-?>
diff --git a/interface/web/admin/lib/lang/br_language_add.lng b/interface/web/admin/lib/lang/br_language_add.lng
index dbffcc8425..11af416170 100644
--- a/interface/web/admin/lib/lang/br_language_add.lng
+++ b/interface/web/admin/lib/lang/br_language_add.lng
@@ -5,4 +5,3 @@ $wb['language_new_txt'] = 'Novo idioma';
 $wb['language_new_hint_txt'] = '2 caracteres ISO 639-1 para o código do idioma (veja em https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)';
 $wb['btn_save_txt'] = 'Adicionar novo conjunto de idiomas';
 $wb['btn_cancel_txt'] = 'Voltar';
-?>
diff --git a/interface/web/admin/lib/lang/br_language_complete.lng b/interface/web/admin/lib/lang/br_language_complete.lng
index cb0ea2eb24..a2d203fcd1 100644
--- a/interface/web/admin/lib/lang/br_language_complete.lng
+++ b/interface/web/admin/lib/lang/br_language_complete.lng
@@ -4,4 +4,3 @@ $wb['list_desc_txt'] = 'Mesclar o arquivo de idioma selecionado com o arquivo de
 $wb['language_select_txt'] = 'Selecionar idioma';
 $wb['btn_save_txt'] = 'Mesclar arquivos agora';
 $wb['btn_cancel_txt'] = 'Voltar';
-?>
diff --git a/interface/web/admin/lib/lang/br_language_edit.lng b/interface/web/admin/lib/lang/br_language_edit.lng
index ed0e6bb84d..f99c6a2690 100644
--- a/interface/web/admin/lib/lang/br_language_edit.lng
+++ b/interface/web/admin/lib/lang/br_language_edit.lng
@@ -5,4 +5,3 @@ $wb['module_txt'] = 'Módulo';
 $wb['lang_file_txt'] = 'Arquivo de idioma';
 $wb['btn_save_txt'] = 'Salvar';
 $wb['btn_cancel_txt'] = 'Voltar';
-?>
diff --git a/interface/web/admin/lib/lang/br_language_export.lng b/interface/web/admin/lib/lang/br_language_export.lng
index 7d75f7b6dd..f7478233c3 100644
--- a/interface/web/admin/lib/lang/br_language_export.lng
+++ b/interface/web/admin/lib/lang/br_language_export.lng
@@ -3,4 +3,3 @@ $wb['list_head_txt'] = 'Exportar arquivos de idioma';
 $wb['language_select_txt'] = 'Selecionar idioma';
 $wb['btn_save_txt'] = 'Exportar arquivo de idioma selecionado';
 $wb['btn_cancel_txt'] = 'Voltar';
-?>
diff --git a/interface/web/admin/lib/lang/br_language_import.lng b/interface/web/admin/lib/lang/br_language_import.lng
index 99db339812..236ffc4f50 100644
--- a/interface/web/admin/lib/lang/br_language_import.lng
+++ b/interface/web/admin/lib/lang/br_language_import.lng
@@ -6,4 +6,3 @@ $wb['btn_save_txt'] = 'Importar arquivo de idioma selecionado';
 $wb['language_overwrite_txt'] = 'Sobrescrever arquivo, se existir.';
 $wb['btn_cancel_txt'] = 'Voltar';
 $wb['ignore_version_txt'] = 'Ignorar verificação da versão do ISPConfig';
-?>
diff --git a/interface/web/admin/lib/lang/br_language_list.lng b/interface/web/admin/lib/lang/br_language_list.lng
index 37941c4472..977dbdba8d 100644
--- a/interface/web/admin/lib/lang/br_language_list.lng
+++ b/interface/web/admin/lib/lang/br_language_list.lng
@@ -4,4 +4,3 @@ $wb['language_select_txt'] = 'Selecionar idioma';
 $wb['module_txt'] = 'Módulo';
 $wb['lang_file_txt'] = 'Arquivo de idioma';
 $wb['lang_file_date_txt'] = 'Última modificação';
-?>
diff --git a/interface/web/admin/lib/lang/br_package_install.lng b/interface/web/admin/lib/lang/br_package_install.lng
index bbe518549a..d1677d2f49 100644
--- a/interface/web/admin/lib/lang/br_package_install.lng
+++ b/interface/web/admin/lib/lang/br_package_install.lng
@@ -4,4 +4,3 @@ $wb['repo_url_txt'] = 'URL';
 $wb['repo_username_txt'] = 'Usário (opcional)';
 $wb['repo_password_txt'] = 'Senha (opcional)';
 $wb['active_txt'] = 'Ativo';
-?>
diff --git a/interface/web/admin/lib/lang/br_remote_action.lng b/interface/web/admin/lib/lang/br_remote_action.lng
index fa66af6168..d851202bca 100644
--- a/interface/web/admin/lib/lang/br_remote_action.lng
+++ b/interface/web/admin/lib/lang/br_remote_action.lng
@@ -2,11 +2,10 @@
 $wb['select_server_txt'] = 'Selecionar servidor';
 $wb['btn_do_txt'] = 'Executar ação';
 $wb['do_osupdate_caption'] = 'Atualizar sistema operacional no servidor remoto';
-$wb['do_osupdate_desc'] = 'Esta ação fará o comando \'aptitude -y upgrade\' no servidor selecionado.<br><br><strong>UTILIZE POR SUA CONTA E RISCO!</strong>';
+$wb['do_osupdate_desc'] = 'Esta ação fará o comando \\'aptitude -y upgrade\\' no servidor selecionado.<br><br><strong>UTILIZE POR SUA CONTA E RISCO!</strong>';
 $wb['do_ispcupdate_caption'] = 'Atualizar ISPConfig 3 - Atualizar o servidor remoto';
 $wb['do_ispcupdate_desc'] = 'Esta ação atualizará o ISPConfig3 no servidor selecionado.<br><br><strong>UTILIZE POR SUA CONTA E RISCO!</strong>';
 $wb['action_scheduled'] = 'A ação foi agendada.';
 $wb['select_all_server'] = 'Todos os servidores';
 $wb['ispconfig_update_title'] = 'Instruções de atualização do ISPConfig';
-$wb['ispconfig_update_text'] = 'Acesse com o usuário root no shell do servidor e execute o comando<br /><br /> <strong>ispconfig_update.sh</strong><br /><br />para iniciar a atualização do ISPConfig.<br /><br /><a href=\'https://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-update-ispconfig-3/\' target=\'_blank\'>Clique aqui para instruções detalhadas</a>';
-?>
+$wb['ispconfig_update_text'] = 'Acesse com o usuário root no shell do servidor e execute o comando<br /><br /> <strong>ispconfig_update.sh</strong><br /><br />para iniciar a atualização do ISPConfig.<br /><br /><a href=\\'https://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-update-ispconfig-3/\\' target=\\'_blank\\'>Clique aqui para instruções detalhadas</a>';
diff --git a/interface/web/admin/lib/lang/br_remote_user.lng b/interface/web/admin/lib/lang/br_remote_user.lng
index 520b95e18f..86002f5146 100644
--- a/interface/web/admin/lib/lang/br_remote_user.lng
+++ b/interface/web/admin/lib/lang/br_remote_user.lng
@@ -1,70 +1,72 @@
 <?php
-$wb['remote_user_txt'] = 'Remote User';
+$wb['remote_user_txt'] = 'Usuário Remoto';
 $wb['username_txt'] = 'Usuário';
 $wb['password_txt'] = 'Senha';
 $wb['function_txt'] = 'Funções';
 $wb['username_error_unique'] = 'Nome do usuário deve ser exclusivo.';
-$wb['username_error_empty'] = 'Nome do usuário está em branco.';
-$wb['password_error_empty'] = 'Senha do usuário está em branco.';
+$wb['username_error_empty'] = 'Nome do usuário está vazio.';
+$wb['password_error_empty'] = 'Senha do usuário está vazia.';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
 $wb['Server functions'] = 'Funções de servidor';
-$wb['Record permission changes'] = 'Permissões de alteração de registros';
-$wb['Domaintool functions'] = 'Funções ferramentas de domínios';
+$wb['Record permission changes'] = 'Permissões de modificação de registros';
+$wb['Domaintool functions'] = 'Funções de ferramentas de domínios';
 $wb['Quota functions'] = 'Funções de cotas';
-$wb['Mail domain functions'] = 'Funções de domínios de e-mail';
-$wb['Mail domain alias functions'] = 'Funções de alias de domínios de e-mail';
-$wb['Mail mailinglist functions'] = 'Funções de lista de e-mails';
-$wb['Mail user functions'] = 'Funções de contas de e-mails';
-$wb['Mail alias functions'] = 'Funções de alias de e-mails';
-$wb['Mail forward functions'] = 'Funções de encaminhamento de e-mails';
-$wb['Mail relay functions'] = 'Funções de retransmissão de e-mails';
-$wb['Mail catchall functions'] = 'Funções de contas cata-tudo';
-$wb['Mail transport functions'] = 'Funções de transporte de e-mails';
-$wb['Mail whitelist functions'] = 'Funções de lista branca';
-$wb['Mail blacklist functions'] = 'Funções de lista negra';
+$wb['Mail domain functions'] = 'Funções de domínios de email';
+$wb['Mail domain alias functions'] = 'Funções de alias de domínios de email';
+$wb['Mail mailinglist functions'] = 'Funções de lista de emails';
+$wb['Mail user functions'] = 'Funções de contas de emails';
+$wb['Mail alias functions'] = 'Funções de alias de emails';
+$wb['Mail forward functions'] = 'Funções de encaminhamento de emails';
+$wb['Mail relay functions'] = 'Funções de retransmissão de emails';
+$wb['Mail catchall functions'] = 'Funções de contas cata tudo';
+$wb['Mail transport functions'] = 'Funções de transporte de emails';
+$wb['Mail whitelist functions'] = 'Funções de lista de permissões';
+$wb['Mail blacklist functions'] = 'Funções de lista de bloqueios';
 $wb['Mail spamfilter user functions'] = 'Funções de filtros anti-spam';
 $wb['Mail spamfilter policy functions'] = 'Funções de políticas anti-spam';
-$wb['Mail fetchmail functions'] = 'Funções de contas de busca de e-mails';
-$wb['Mail spamfilter whitelist functions'] = 'Funções de lista branca de e-mails';
-$wb['Mail spamfilter blacklist functions'] = 'Funções de lista negra de e-mails';
-$wb['Mail user filter functions'] = 'Funções de filtros de e-mails para contas de e-mails';
-$wb['Mail Backup functions'] = 'Funções de backup de e-mails';
-$wb['Mail filter functions'] = 'Funções de filtros de e-mails';
+$wb['Mail fetchmail functions'] = 'Funções de contas de busca de emails';
+$wb['Mail spamfilter whitelist functions'] = 'Funções de lista de permissões de emails';
+$wb['Mail spamfilter blacklist functions'] = 'Funções de lista de bloqueios de emails';
+$wb['Mail user filter functions'] = 'Funções de filtros de emails para contas de emails';
+$wb['Mail Backup functions'] = 'Funções de backup de emails';
+$wb['Mail filter functions'] = 'Funções de filtros de emails';
 $wb['Monitor functions'] = 'Funções de monitoramento';
 $wb['Client functions'] = 'Funções de cliente';
-$wb['Sites cron functions'] = 'Funções de tarefas no cron';
-$wb['Sites database functions'] = 'Funções de banco de dados';
-$wb['Sites Protected folder functions'] = 'Funções de pastas protegidas';
-$wb['Sites FTP-User functions'] = 'Funções de usuários ftp';
-$wb['Sites Shell-User functions'] = 'Funções de usuários do shell';
+$wb['Sites cron functions'] = 'Funções de tarefas no Cron';
+$wb['Sites database functions'] = 'Funções do Banco de Dados';
+$wb['Sites Protected folder functions'] = 'Funções de Pastas Web';
+$wb['Sites FTP-User functions'] = 'Funções de usuários FTP';
+$wb['Sites Shell-User functions'] = 'Funções de usuários Shell';
 $wb['Sites Domain functions'] = 'Funções de domínios de sites';
 $wb['Sites Backup functions'] = 'Funções de backup de sites';
 $wb['Sites Aliasdomain functions'] = 'Funções de alias de domínios de sites';
 $wb['Sites Subdomain functions'] = 'Funções de subdomínios de sites';
 $wb['Sites APS functions'] = 'Funções de apps e complementos';
-$wb['Sites WebDAV-User functions'] = 'Funções de usuários webdav';
-$wb['DNS zone functions'] = 'Funções de zonas dns';
-$wb['DNS a functions'] = 'Funções de registro A dns';
-$wb['DNS aaaa functions'] = 'Funções de registro AAAA dns';
-$wb['DNS alias functions'] = 'Funções de ALIAS dns';
-$wb['DNS cname functions'] = 'Funções de CNAME dns';
-$wb['DNS hinfo functions'] = 'Funções de HINFO dns';
-$wb['DNS mx functions'] = 'Funções de MX dns';
-$wb['DNS ns functions'] = 'Funções de NS dns';
-$wb['DNS naptr functions'] = 'Funções de NAPTR dns';
-$wb['DNS ptr functions'] = 'Funções de PTR dns';
-$wb['DNS rp functions'] = 'Funções de RP dns';
-$wb['DNS srv functions'] = 'Funções de SVR dns';
-$wb['DNS txt functions'] = 'Funções de TXT dns';
-$wb['DNS ds functions'] = 'Funções de DS dns';
-$wb['DNS loc functions'] = 'Funções de LOC dns';
-$wb['DNS tlsa functions'] = 'Funções de TLSA dns';
-$wb['OpenVZ VM functions'] = 'Funções do openvz';
+$wb['Sites WebDAV-User functions'] = 'Funções de usuários Webdav';
+$wb['DNS zone functions'] = 'Funções de zonas DNS';
+$wb['DNS a functions'] = 'Funções de registro DNS A';
+$wb['DNS aaaa functions'] = 'Funções de registro DNS AAAA';
+$wb['DNS alias functions'] = 'Funções de registro DNS ALIAS';
+$wb['DNS cname functions'] = 'Funções de registro DNS CNAME';
+$wb['DNS hinfo functions'] = 'Funções de registro DNS HINFO';
+$wb['DNS mx functions'] = 'Funções de registro DNS MX';
+$wb['DNS ns functions'] = 'Funções de registro DNS NS';
+$wb['DNS naptr functions'] = 'Funções de registro DNS NAPTR';
+$wb['DNS ptr functions'] = 'Funções de registro DNS PTR';
+$wb['DNS rp functions'] = 'Funções de registro DNS RP';
+$wb['DNS srv functions'] = 'Funções de registro DNS SVR';
+$wb['DNS txt functions'] = 'Funções de registro DNS TXT';
+$wb['DNS ds functions'] = 'Funções de registro DNS DS';
+$wb['DNS loc functions'] = 'Funções de registro DNS LOC';
+$wb['DNS tlsa functions'] = 'Funções de registro DNS TLSA';
+$wb['OpenVZ VM functions'] = 'Funções do OpenVZ';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
 $wb['remote_access_txt'] = 'Acesso Remoto';
-$wb['remote_ips_txt'] = 'Endereços IPs ou nome(s) do(s) host(s) para acesso remoto (separado por vírgula e deixar em branco para <i>qualquer um</i>)';
+$wb['remote_ips_txt'] = 'Endereços IPs ou nome(s) do(s) host(s) para acesso remoto (separado por vírgula e deixar vazio para <i>qualquer um</i>)';
 $wb['remote_user_error_ips'] = 'Ao menos um endereço IP ou nome do host informado é inválido.';
-?>
+$wb['DNS caa functions'] = 'Funções de registro DNS CAA';
+$wb['DNS dname functions'] = 'Funções de registro DNS DNAME';
+$wb['DNS sshfp functions'] = 'Funções de registro DNS SSHFP';
diff --git a/interface/web/admin/lib/lang/br_remote_user_list.lng b/interface/web/admin/lib/lang/br_remote_user_list.lng
index 0f0381a6f4..9ef8c2f570 100644
--- a/interface/web/admin/lib/lang/br_remote_user_list.lng
+++ b/interface/web/admin/lib/lang/br_remote_user_list.lng
@@ -4,4 +4,3 @@ $wb['list_desc_txt'] = 'Usuário remoto';
 $wb['add_new_record_txt'] = 'Adicionar novo usuário';
 $wb['parent_remote_userid_txt'] = 'ID do usuário';
 $wb['username_txt'] = 'Nome';
-?>
diff --git a/interface/web/admin/lib/lang/br_server.lng b/interface/web/admin/lib/lang/br_server.lng
index a896d0b49a..20a2eddbb6 100644
--- a/interface/web/admin/lib/lang/br_server.lng
+++ b/interface/web/admin/lib/lang/br_server.lng
@@ -1,16 +1,15 @@
 <?php
 $wb['config_txt'] = 'Configuração';
 $wb['server_name_txt'] = 'Nome do servidor';
-$wb['mail_server_txt'] = 'Servidor de e-mails';
-$wb['web_server_txt'] = 'Servidor web';
-$wb['dns_server_txt'] = 'Servidor dns';
-$wb['file_server_txt'] = 'Servidor ftp';
-$wb['db_server_txt'] = 'Servidor de banco de dados';
-$wb['vserver_server_txt'] = 'Servidor de virtualização';
-$wb['proxy_server_txt'] = 'Servidor proxy';
-$wb['firewall_server_txt'] = 'Servidor firewall';
+$wb['mail_server_txt'] = 'Servidor de eMails';
+$wb['web_server_txt'] = 'Servidor Web';
+$wb['dns_server_txt'] = 'Servidor DNS';
+$wb['file_server_txt'] = 'Servidor FTP';
+$wb['db_server_txt'] = 'Servidor do Banco de Dados';
+$wb['vserver_server_txt'] = 'Servidor de Virtualização';
+$wb['proxy_server_txt'] = 'Servidor Proxy';
+$wb['firewall_server_txt'] = 'Servidor Firewall';
 $wb['active_txt'] = 'Ativo';
 $wb['mirror_server_id_txt'] = 'É um espelho de servidor';
 $wb['- None -'] = '-Nenhum-';
-$wb['xmpp_server_txt'] = 'Servidor xmpp';
-?>
+$wb['xmpp_server_txt'] = 'Servidor XMPP';
diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng
index 390612d166..3e507bb5c4 100644
--- a/interface/web/admin/lib/lang/br_server_config.lng
+++ b/interface/web/admin/lib/lang/br_server_config.lng
@@ -1,8 +1,8 @@
 <?php
-$wb['server_config'] = 'Server Config';
-$wb['config_for_txt'] = 'Configuration for';
-$wb['server_config_error_not_updated'] = 'Error in Server Config: not updated';
-$wb['server_config_error_section_not_updated'] = 'Error in Server Config: %s section not updated';
+$wb['server_config'] = 'Configuração do Servidor';
+$wb['config_for_txt'] = 'Configuração para';
+$wb['server_config_error_not_updated'] = 'Erro nas configurações do servidor: não atualizado';
+$wb['server_config_error_section_not_updated'] = 'Erro nas configurações do servidor: %s seção não atualizada';
 $wb['ufw_enable_txt'] = 'Habilitar';
 $wb['ufw_manage_builtins_txt'] = 'Gerenciar regras embutidas';
 $wb['ufw_ipv6_txt'] = 'Habilitar IPv6';
@@ -11,10 +11,10 @@ $wb['ufw_default_output_policy_txt'] = 'Política de saída padrão';
 $wb['ufw_default_forward_policy_txt'] = 'Política de encaminhamento padrão';
 $wb['ufw_default_application_policy_txt'] = 'Política de aplicações padrão';
 $wb['ufw_log_level_txt'] = 'Nível do log';
-$wb['jailkit_chroot_home_txt'] = 'Diretório em chroot do jailkit';
-$wb['jailkit_chroot_app_sections_txt'] = 'Seções de aplicações em chroot no jailkit';
-$wb['jailkit_chroot_app_programs_txt'] = 'Aplicações em chroot no jailkit';
-$wb['jailkit_chroot_cron_programs_txt'] = 'Tarefas de aplicações em chroot no jailkit';
+$wb['jailkit_chroot_home_txt'] = 'Diretório em chroot do Jailkit';
+$wb['jailkit_chroot_app_sections_txt'] = 'Seções de aplicações em chroot Jailkit';
+$wb['jailkit_chroot_app_programs_txt'] = 'Aplicações em chroot Jailkit';
+$wb['jailkit_chroot_cron_programs_txt'] = 'Tarefas de aplicações em chroot Jailkit';
 $wb['website_path_txt'] = 'Caminho do site';
 $wb['website_symlinks_txt'] = 'Links simbólicos de sites';
 $wb['website_symlinks_rel_txt'] = 'Adicionar links simbólicos relativos';
@@ -24,89 +24,89 @@ $wb['website_autoalias_note_txt'] = 'Área reservada:';
 $wb['vhost_conf_dir_txt'] = 'Diretório de configuração vhost';
 $wb['vhost_conf_enabled_dir_txt'] = 'Diretório de configuração vhost habilitado';
 $wb['apache_init_script_txt'] = 'Script de inicialização do Apache';
-$wb['apache_init_script_note_txt'] = 'Deixando esta vontade vazio detectar automaticamente o script de inicialização do Apache';
+$wb['apache_init_script_note_txt'] = 'Deixando vazio detectará automaticamente o script de inicialização do Apache';
 $wb['apache_init_script_error_regex'] = 'Script de inicialização do Apache inválido.';
-$wb['getmail_config_dir_txt'] = 'Diretório de configuração do getmail';
+$wb['getmail_config_dir_txt'] = 'Diretório de configuração do Getmail';
 $wb['fastcgi_starter_path_txt'] = 'Caminho de inicialização do FastCGI';
 $wb['fastcgi_starter_script_txt'] = 'Script de inicialização do FastCGI';
 $wb['fastcgi_alias_txt'] = 'Alias FastCGI';
-$wb['fastcgi_phpini_path_txt'] = 'Caminho do php.ini FastCGI';
-$wb['fastcgi_children_txt'] = 'Processos filhos do FastCGI';
-$wb['fastcgi_max_requests_txt'] = 'Limite de requisições do FastCGI';
+$wb['fastcgi_phpini_path_txt'] = 'Caminho PHP.ini FastCGI';
+$wb['fastcgi_children_txt'] = 'Processos filhos FastCGI';
+$wb['fastcgi_max_requests_txt'] = 'Limite de requisições FastCGI';
 $wb['fastcgi_bin_txt'] = 'Binário FastCGI';
 $wb['module_txt'] = 'Módulo';
-$wb['maildir_path_txt'] = 'Caminho do maildir';
-$wb['maildir_format_txt'] = 'Formato do maildir';
-$wb['homedir_path_txt'] = 'Caminho do homedir';
+$wb['maildir_path_txt'] = 'Caminho do Maildir';
+$wb['maildir_format_txt'] = 'Formato do Maildir';
+$wb['homedir_path_txt'] = 'Caminho do Homedir';
 $wb['dkim_path_txt'] = 'Caminho do DKIM';
-$wb['mailuser_uid_txt'] = 'UID do mailuser';
-$wb['mailuser_gid_txt'] = 'GID do mailuser';
-$wb['mailuser_name_txt'] = 'Nome do mailuser';
-$wb['mailuser_group_txt'] = 'Grupo do maildir';
-$wb['mailbox_virtual_uidgid_maps_txt'] = 'Usar uid linux para sites e conta de e-mail';
+$wb['mailuser_uid_txt'] = 'UID do Mailuser';
+$wb['mailuser_gid_txt'] = 'GID do Mailuser';
+$wb['mailuser_name_txt'] = 'Nome do Mailuser';
+$wb['mailuser_group_txt'] = 'Grupo do Maildir';
+$wb['mailbox_virtual_uidgid_maps_txt'] = 'Usar UID Linux para sites e conta de email';
 $wb['mailbox_virtual_uidgid_maps_info_txt'] = 'Permitido apenas para configuração de servidor único.';
-$wb['mailbox_virtual_uidgid_maps_error_nosingleserver'] = 'O uid linux não pode ser mapeado em configuração multi-servidor.';
-$wb['mailbox_virtual_uidgid_maps_error_nodovecot'] = 'O uid linux não pode ser usado com o dovecot.';
-$wb['mailbox_virtual_uidgid_maps_error_alreadyusers'] = 'O uid não pode ser alterado se já existir contas de e-mail.';
+$wb['mailbox_virtual_uidgid_maps_error_nosingleserver'] = 'O UID Linux não pode ser mapeado em configuração multiservidor.';
+$wb['mailbox_virtual_uidgid_maps_error_nodovecot'] = 'O UID Linux não pode ser usado com o Dovecot.';
+$wb['mailbox_virtual_uidgid_maps_error_alreadyusers'] = 'O UID não pode ser modificado se já existir contas de email.';
 $wb['relayhost_txt'] = 'Servidor de retransmissão';
 $wb['relayhost_user_txt'] = 'Usuário de retransmissão';
 $wb['relayhost_password_txt'] = 'Senha do usuário de retransmissão';
 $wb['reject_sender_login_mismatch_txt'] = 'Rejeitar acesso com erro de usuário e/ou senha';
-$wb['reject_unknown_txt'] = 'Reject unknown hostnames';
-$wb['tooltip_reject_unknown_txt'] = 'Requires hostnames to pass DNS checks.  Not checked for authenticated users.';
-$wb['reject_unknown_helo_txt'] = 'Reject unknown helo hostnames';
-$wb['reject_unknown_client_txt'] = 'Reject unknown client hostnames';
-$wb['reject_unknown_client_helo_txt'] = 'Reject unknown helo and client hostnames';
-$wb['mailbox_size_limit_txt'] = 'Limite do tamanho da conta de e-mail';
+$wb['reject_unknown_txt'] = 'Rejeitar hostnames desconhecidos';
+$wb['tooltip_reject_unknown_txt'] = 'Exige hostname qualificado para passar nas consultas DNS. Não verificado para usuários autenticados.';
+$wb['reject_unknown_helo_txt'] = 'Rejeitar conexão helo de hostnames desconhecidos';
+$wb['reject_unknown_client_txt'] = 'Rejeitar clientes de hostnames desconhecidos';
+$wb['reject_unknown_client_helo_txt'] = 'Rejeitar conexões helo e clientes de hostnames desconhecidos';
+$wb['mailbox_size_limit_txt'] = 'Limite do tamanho da conta de email';
 $wb['message_size_limit_txt'] = 'Limite do tamanho da mensagem';
 $wb['ip_address_txt'] = 'Endereço IP';
 $wb['netmask_txt'] = 'Máscara';
 $wb['gateway_txt'] = 'Gateway';
 $wb['hostname_txt'] = 'Nome do host';
-$wb['nameservers_txt'] = 'Servidor(es) dns';
+$wb['nameservers_txt'] = 'Servidor(es) DNS';
 $wb['auto_network_configuration_txt'] = 'Configuração de rede';
 $wb['ip_address_error_wrong'] = 'Endereço IP com formato inválido.';
 $wb['netmask_error_wrong'] = 'Máscara de rede com formato inválido.';
 $wb['gateway_error_wrong'] = 'Gateway da rede com formado inválido.';
-$wb['hostname_error_empty'] = 'O nome do host está em branco.';
+$wb['hostname_error_empty'] = 'O nome do host está vazio.';
 $wb['hostname_error_regex'] = 'O nome do host é inválido.';
-$wb['nameservers_error_empty'] = 'O servidor(es) dns está em branco.';
+$wb['nameservers_error_empty'] = 'O servidor(es) DNS está vazio.';
 $wb['config_dir_txt'] = 'Diretório de configurações';
-$wb['init_script_txt'] = 'Nome do script de inicialização do cron';
+$wb['init_script_txt'] = 'Nome do script de inicialização do Cron';
 $wb['crontab_dir_txt'] = 'Caminho para crontabs individuais.';
 $wb['wget_txt'] = 'Caminho do binário wget';
-$wb['web_user_txt'] = 'Usuário do apache';
-$wb['web_group_txt'] = 'Grupo do apache';
+$wb['web_user_txt'] = 'Usuário do Apache';
+$wb['web_group_txt'] = 'Grupo do Apache';
 $wb['security_level_txt'] = 'Nível de segurança';
 $wb['loglevel_txt'] = 'Nível do log';
 $wb['apps_vhost_port_txt'] = 'Porta dos apps-vhost';
 $wb['apps_vhost_ip_txt'] = 'IP dos apps-vhost';
 $wb['apps_vhost_servername_txt'] = 'Domínio dos apps-vhost';
-$wb['bind_user_txt'] = 'Usuário do bind';
-$wb['bind_group_txt'] = 'Grupo do bind';
+$wb['bind_user_txt'] = 'Usuário do Bind';
+$wb['bind_group_txt'] = 'Grupo do Bind';
 $wb['bind_zonefiles_dir_txt'] = 'Diretório de zonas';
 $wb['named_conf_path_txt'] = 'Caminho do named.conf';
-$wb['bind_user_error_empty'] = 'Usuário do bind está em branco.';
-$wb['bind_group_error_empty'] = 'Grupo do bind está em branco.';
-$wb['bind_zonefiles_dir_error_empty'] = 'Diretório de zonas está em branco.';
-$wb['named_conf_path_error_empty'] = 'Caminho do named.conf está em branco.';
-$wb['named_conf_local_path_error_empty'] = 'Caminho do named.conf.local está em branco.';
-$wb['mail_filter_syntax_txt'] = 'Sintaxe do filtro de e-mail';
+$wb['bind_user_error_empty'] = 'Usuário do Bind está vazio.';
+$wb['bind_group_error_empty'] = 'Grupo do Bind está vazio.';
+$wb['bind_zonefiles_dir_error_empty'] = 'Diretório de zonas está vazio.';
+$wb['named_conf_path_error_empty'] = 'Caminho do named.conf está vazio.';
+$wb['named_conf_local_path_error_empty'] = 'Caminho do named.conf.local está vazio.';
+$wb['mail_filter_syntax_txt'] = 'Sintaxe do filtro de email';
 $wb['pop3_imap_daemon_txt'] = 'Daemon POP3/IMAP';
-$wb['php_open_basedir_txt'] = 'Diretório open_basedir do php';
-$wb['php_open_basedir_error_empty'] = 'O diretório do open_basedir PHP está em branco.';
+$wb['php_open_basedir_txt'] = 'Diretório open_basedir PHP';
+$wb['php_open_basedir_error_empty'] = 'O diretório open_basedir PHP está vazio.';
 $wb['htaccess_allow_override_txt'] = 'Diretiva .htaccess AllowOverride';
-$wb['htaccess_allow_override_error_empty'] = 'Diretiva .htaccess AllowOverride está em branco.';
-$wb['awstats_conf_dir_txt'] = 'Pasta de configuração do awstats';
-$wb['awstats_data_dir_txt'] = 'Pasta de dados do awstats';
-$wb['awstats_pl_txt'] = 'Script awstats.pl';
-$wb['awstats_buildstaticpages_pl_txt'] = 'Script awstats_buildstaticpages.pl';
+$wb['htaccess_allow_override_error_empty'] = 'Diretiva .htaccess AllowOverride está vazio.';
+$wb['awstats_conf_dir_txt'] = 'Pasta de configuração do AWStats';
+$wb['awstats_data_dir_txt'] = 'Pasta de dados do AWStats';
+$wb['awstats_pl_txt'] = 'Script AWStats.pl';
+$wb['awstats_buildstaticpages_pl_txt'] = 'Script AWStats_buildstaticpages.pl';
 $wb['backup_dir_txt'] = 'Diretório de backup';
 $wb['backup_tmp_txt'] = 'Diretório para backup temporário quando utilizado zip';
 $wb['named_conf_local_path_txt'] = 'Caminho do named.conf.local';
-$wb['php_ini_path_cgi_txt'] = 'Caminho do php.ini do cgi';
-$wb['php_ini_path_apache_txt'] = 'Caminho do php.ini do apache';
-$wb['check_apache_config_txt'] = 'Verificar as configurações do apache quando reiniciar';
+$wb['php_ini_path_cgi_txt'] = 'Caminho PHP.ini CGI';
+$wb['php_ini_path_apache_txt'] = 'Caminho PHP.ini Apache';
+$wb['check_apache_config_txt'] = 'Verificar as configurações do Apache quando reiniciar';
 $wb['network_config_warning_txt'] = 'A configuração de rede está disponível apenas para servidores Debian e Ubuntu. Não habilite esta opção se a interface de rede for diferente de eth0.';
 $wb['CA_path_txt'] = 'Caminho da CA';
 $wb['CA_pass_txt'] = 'Senha da CA';
@@ -114,108 +114,108 @@ $wb['fastcgi_config_syntax_txt'] = 'Sintaxe das configurações do FastCGI';
 $wb['backup_mode_txt'] = 'Modo do backup';
 $wb['backup_mode_userzip'] = 'Arquivos de backup com propriedade do usuário web e compactados como zip';
 $wb['backup_mode_rootgz'] = 'Todos os arquivos no diretório web com proprietário root';
-$wb['tmpdir_path_error_empty'] = 'Caminho do diretório temporário está em branco.';
+$wb['tmpdir_path_error_empty'] = 'Caminho do diretório temporário está vazio.';
 $wb['tmpdir_path_error_regex'] = 'Caminho do diretório temporário é inválido.';
 $wb['backup_time_txt'] = 'Hora do backup';
 $wb['server_type_txt'] = 'Tipo do servidor';
-$wb['nginx_vhost_conf_dir_txt'] = 'Diretório de configurações vhost do nginx';
-$wb['nginx_vhost_conf_enabled_dir_txt'] = 'Diretório de configurações vhost do nginx habilitado';
+$wb['nginx_vhost_conf_dir_txt'] = 'Diretório de configurações vhost nginx';
+$wb['nginx_vhost_conf_enabled_dir_txt'] = 'Diretório de configurações vhost nginx habilitado';
 $wb['nginx_user_txt'] = 'Usuário nginx';
 $wb['nginx_group_txt'] = 'Grupo do nginx';
 $wb['nginx_cgi_socket_txt'] = 'Socket CGI do nginx';
-$wb['backup_dir_error_empty'] = 'Diretório de backup está em branco.';
-$wb['maildir_path_error_empty'] = 'Caminho do maildir está em branco.';
-$wb['homedir_path_error_empty'] = 'Caminho do homedir está em branco.';
-$wb['mailuser_uid_error_empty'] = 'UID do mailuser UID está em branco.';
-$wb['mailuser_gid_error_empty'] = 'GID do mailuser GID está em branco.';
-$wb['mailuser_name_error_empty'] = 'Usuário do mailuser está em branco.';
-$wb['mailuser_group_error_empty'] = 'Grupo do mailuser Group está em branco.';
-$wb['getmail_config_dir_error_empty'] = 'Diretório de configurações do getmail está em branco.';
-$wb['website_basedir_error_empty'] = 'Diretório basedir de sites está em branco.';
-$wb['website_path_error_empty'] = 'Caminho do site está em branco.';
-$wb['website_symlinks_error_empty'] = 'Links simbólicos de site está em branco.';
-$wb['vhost_conf_dir_error_empty'] = 'Diretório de configurações do vhost está em branco.';
-$wb['vhost_conf_enabled_dir_error_empty'] = 'Diretório de configurações vhost habilitadas está em branco.';
-$wb['nginx_vhost_conf_dir_error_empty'] = 'Diretório de configurações vhost do nginx está em branco.';
-$wb['nginx_vhost_conf_enabled_dir_error_empty'] = 'Diretório de configurações vhost habilitadas do nginx está em branco.';
-$wb['apache_user_error_empty'] = 'Usuário do apache está em branco.';
-$wb['apache_group_error_empty'] = 'Grupo do apache está em branco.';
-$wb['nginx_user_error_empty'] = 'Usuário do nginx está em branco.';
-$wb['nginx_group_error_empty'] = 'Grupo do nginx está em branco.';
-$wb['php_ini_path_apache_error_empty'] = 'Caminho do php.ini do apache está em branco.';
-$wb['php_ini_path_cgi_error_empty'] = 'Caminho do php.ini CGI está em branco.';
-$wb['nginx_cgi_socket_empty'] = 'O socket CGI do nginx está em branco.';
-$wb['apps_vhost_port_error_empty'] = 'Portas de apps-vhost está em branco.';
-$wb['apps_vhost_ip_error_empty'] = 'IP do apps-vhost está em branco.';
-$wb['fastcgi_starter_path_error_empty'] = 'Caminho do script de inicialização do FastCGI está em branco.';
-$wb['fastcgi_starter_script_error_empty'] = 'Script de inicialização do FastCGI está em branco.';
-$wb['fastcgi_alias_error_empty'] = 'Alias do FastCGI está em branco.';
-$wb['fastcgi_phpini_path_error_empty'] = 'O caminho do php.ini do FastCGI está em branco.';
-$wb['fastcgi_children_error_empty'] = 'Os processos filhos do FastCGI está em branco.';
-$wb['fastcgi_max_requests_error_empty'] = 'O limite de requisições FastCGI está em branco.';
-$wb['fastcgi_bin_error_empty'] = 'O binário do FastCGI está em branco.';
-$wb['jailkit_chroot_home_error_empty'] = 'O home em chroot do jailkit está em branco.';
-$wb['jailkit_chroot_app_sections_error_empty'] = 'Seções de aplicações no jailkit está em branco.';
-$wb['jailkit_chroot_app_programs_error_empty'] = 'Aplicações no jailkit está em branco.';
-$wb['jailkit_chroot_cron_programs_error_empty'] = 'Tarefas de aplicações no jailkit está em branco.';
-$wb['vlogger_config_dir_error_empty'] = 'Diretório de configuração está em branco.';
-$wb['cron_init_script_error_empty'] = 'Script de inicialização do cron está em branco.';
-$wb['crontab_dir_error_empty'] = 'Caminho para tarefas individuais no cron está em branco.';
-$wb['cron_wget_error_empty'] = 'Caminho do binário wget está em branco.';
-$wb['php_fpm_init_script_txt'] = 'Script de inicialização do php-fpm';
-$wb['php_fpm_init_script_error_empty'] = 'Script de inicialização do php-fpm está em branco.';
-$wb['php_fpm_ini_path_txt'] = 'Caminho do php.ini do php-fpm';
-$wb['php_fpm_ini_path_error_empty'] = 'Caminho do php.ini do php-fpm está em branco.';
-$wb['php_fpm_pool_dir_txt'] = 'Diretório de faixas do php-fpm';
-$wb['php_fpm_pool_dir_error_empty'] = 'Diretório de faixas do php-fpm está em branco.';
-$wb['php_fpm_start_port_txt'] = 'Porta do php-fpm';
-$wb['php_fpm_start_port_error_empty'] = 'Porta do php-fpm está em branco.';
-$wb['php_fpm_socket_dir_txt'] = 'Diretório do socket php-fpm';
-$wb['php_fpm_socket_dir_error_empty'] = 'O diretório do socket php-fpm está em branco.';
-$wb['try_rescue_txt'] = 'Habilitar monitoramento de reiniciar em caso de falha';
-$wb['do_not_try_rescue_httpd_txt'] = 'Desabilitar monitoramento do httpd';
-$wb['do_not_try_rescue_mongodb_txt'] = 'Desabilitar monitoramento do mongodb';
-$wb['do_not_try_rescue_mysql_txt'] = 'Desabilitar monitoramento do mysql';
-$wb['do_not_try_rescue_mail_txt'] = 'Desabilitar monitoramento de e-mail';
-$wb['rescue_description_txt'] = '<b>Informação:</b> Se o serviço mysql for desligado e estiver selecionado "Desabilitar monitoramento do mysql" aguarde entre 2 e 3 minutos sem abandonar a aba. <br>Se não aguardar o sistema de recuperação de falhas tentará reiniciar o mysql!';
+$wb['backup_dir_error_empty'] = 'Diretório de backup está vazio.';
+$wb['maildir_path_error_empty'] = 'Caminho do Maildir está vazio.';
+$wb['homedir_path_error_empty'] = 'Caminho do Homedir está vazio.';
+$wb['mailuser_uid_error_empty'] = 'UID do Mailuser UID está vazio.';
+$wb['mailuser_gid_error_empty'] = 'GID do Mailuser GID está vazio.';
+$wb['mailuser_name_error_empty'] = 'Usuário do Mailuser está vazio.';
+$wb['mailuser_group_error_empty'] = 'Grupo do Mailuser Group está vazio.';
+$wb['getmail_config_dir_error_empty'] = 'Diretório de configurações do Getmail está vazio.';
+$wb['website_basedir_error_empty'] = 'Diretório basedir de sites está vazio.';
+$wb['website_path_error_empty'] = 'Caminho do site está vazio.';
+$wb['website_symlinks_error_empty'] = 'Links simbólicos de site está vazio.';
+$wb['vhost_conf_dir_error_empty'] = 'Diretório de configurações do vhost está vazio.';
+$wb['vhost_conf_enabled_dir_error_empty'] = 'Diretório de configurações vhost habilitadas está vazio.';
+$wb['nginx_vhost_conf_dir_error_empty'] = 'Diretório de configurações vhost nginx está vazio.';
+$wb['nginx_vhost_conf_enabled_dir_error_empty'] = 'Diretório de configurações vhost nginx habilitadas está vazio.';
+$wb['apache_user_error_empty'] = 'Usuário do Apache está vazio.';
+$wb['apache_group_error_empty'] = 'Grupo do Apache está vazio.';
+$wb['nginx_user_error_empty'] = 'Usuário do nginx está vazio.';
+$wb['nginx_group_error_empty'] = 'Grupo do nginx está vazio.';
+$wb['php_ini_path_apache_error_empty'] = 'Caminho PHP.ini Apache está vazio.';
+$wb['php_ini_path_cgi_error_empty'] = 'Caminho PHP.ini CGI está vazio.';
+$wb['nginx_cgi_socket_empty'] = 'O socket CGI nginx está vazio.';
+$wb['apps_vhost_port_error_empty'] = 'Portas de apps-vhost está vazio.';
+$wb['apps_vhost_ip_error_empty'] = 'IP do apps-vhost está vazio.';
+$wb['fastcgi_starter_path_error_empty'] = 'Caminho do script de inicialização FastCGI está vazio.';
+$wb['fastcgi_starter_script_error_empty'] = 'Script de inicialização FastCGI está vazio.';
+$wb['fastcgi_alias_error_empty'] = 'Alias FastCGI está vazio.';
+$wb['fastcgi_phpini_path_error_empty'] = 'O caminho PHP.ini FastCGI está vazio.';
+$wb['fastcgi_children_error_empty'] = 'Os processos filhos FastCGI está vazio.';
+$wb['fastcgi_max_requests_error_empty'] = 'O limite de requisições FastCGI está vazio.';
+$wb['fastcgi_bin_error_empty'] = 'O binário FastCGI está vazio.';
+$wb['jailkit_chroot_home_error_empty'] = 'O home em chroot Jailkit está vazio.';
+$wb['jailkit_chroot_app_sections_error_empty'] = 'Seções de aplicações chroot Jailkit está vazio.';
+$wb['jailkit_chroot_app_programs_error_empty'] = 'Aplicações chroot Jailkit está vazio.';
+$wb['jailkit_chroot_cron_programs_error_empty'] = 'Tarefas de aplicações chroot Jailkit está vazio.';
+$wb['vlogger_config_dir_error_empty'] = 'Diretório de configuração está vazio.';
+$wb['cron_init_script_error_empty'] = 'Script de inicialização do cron está vazio.';
+$wb['crontab_dir_error_empty'] = 'Caminho para tarefas individuais no Cron está vazio.';
+$wb['cron_wget_error_empty'] = 'Caminho do binário wget está vazio.';
+$wb['php_fpm_init_script_txt'] = 'Script de inicialização PHP-FPM';
+$wb['php_fpm_init_script_error_empty'] = 'Script de inicialização PHP-FPM está vazio.';
+$wb['php_fpm_ini_path_txt'] = 'Caminho PHP.ini PHP-FPM';
+$wb['php_fpm_ini_path_error_empty'] = 'Caminho PHP.ini PHP-FPM está vazio.';
+$wb['php_fpm_pool_dir_txt'] = 'Diretório da pool PHP-FPM';
+$wb['php_fpm_pool_dir_error_empty'] = 'Diretório da pool PHP-FPM está vazio.';
+$wb['php_fpm_start_port_txt'] = 'Porta PHP-FPM';
+$wb['php_fpm_start_port_error_empty'] = 'Porta PHP-FPM está vazio.';
+$wb['php_fpm_socket_dir_txt'] = 'Diretório do socket PHP-FPM';
+$wb['php_fpm_socket_dir_error_empty'] = 'O diretório do socket PHP-FPM está vazio.';
+$wb['try_rescue_txt'] = 'Habilitar monitoramento e reiniciar em caso de falha';
+$wb['do_not_try_rescue_httpd_txt'] = 'Desabilitar monitoramento do HTTPD';
+$wb['do_not_try_rescue_mongodb_txt'] = 'Desabilitar monitoramento do MongoDB';
+$wb['do_not_try_rescue_mysql_txt'] = 'Desabilitar monitoramento do MySQL';
+$wb['do_not_try_rescue_mail_txt'] = 'Desabilitar monitoramento do servidor de emails';
+$wb['rescue_description_txt'] = '<b>Informação:</b> Se o serviço MySQL for desligado e estiver selecionado "Desabilitar monitoramento do MySQL" aguarde entre 2 e 3 minutos sem abandonar a aba. <br>Se não aguardar o sistema de recuperação de falhas tentará reiniciar o MySQL!';
 $wb['enable_sni_txt'] = 'Habilitar SNI';
 $wb['set_folder_permissions_on_update_txt'] = 'Configurar permissões de pasta quando atualizar';
-$wb['add_web_users_to_sshusers_group_txt'] = 'Adicionar novos usuários web para o grupo ssh';
+$wb['add_web_users_to_sshusers_group_txt'] = 'Adicionar novos usuários Web para o grupo SSH';
 $wb['connect_userid_to_webid_txt'] = 'Conectar o UID do usuário no sistema para webID';
 $wb['connect_userid_to_webid_start_txt'] = 'Conexão do ID inicial do usuário com o webID';
 $wb['realtime_blackhole_list_txt'] = 'Lista RBL em tempo real';
 $wb['realtime_blackhole_list_note_txt'] = '(separar as RBLs com vírgulas)';
-$wb['stress_adaptive_txt'] = 'Adapt to temporary load spikes';
-$wb['tooltip_stress_adaptive_txt'] = 'Enables Postfix stress-adaptive behavior.';
+$wb['stress_adaptive_txt'] = 'Adaptar-se a picos de carga temporários';
+$wb['tooltip_stress_adaptive_txt'] = 'Ativa o comportamento adaptativo ao estresse do Postfix.';
 $wb['ssl_settings_txt'] = 'Configurações SSL';
 $wb['permissions_txt'] = 'Permissões';
-$wb['php_settings_txt'] = 'Configurações php';
+$wb['php_settings_txt'] = 'Configurações PHP';
 $wb['apps_vhost_settings_txt'] = 'Configurações de apps vhost';
-$wb['awstats_settings_txt'] = 'Configurações do awstats';
+$wb['awstats_settings_txt'] = 'Configurações do AWStats';
 $wb['firewall_txt'] = 'Firewall';
-$wb['mailbox_quota_stats_txt'] = 'Estatísticas das cotas das contas de e-mail';
-$wb['enable_ip_wildcard_txt'] = 'Habilitar curingas de IP (*)';
-$wb['web_folder_protection_txt'] = 'Tornar pastas web imutáveis (atributos estendidos)';
+$wb['mailbox_quota_stats_txt'] = 'Estatísticas das cotas para contas de email';
+$wb['enable_ip_wildcard_txt'] = 'Habilitar curingas IP (*)';
+$wb['web_folder_protection_txt'] = 'Tornar pastas Web imutáveis (atributos estendidos)';
 $wb['overtraffic_notify_admin_txt'] = 'Enviar notificação de tráfego excedido para o administrador';
 $wb['overtraffic_notify_client_txt'] = 'Enviar notificação de tráfego excedido para o cliente';
 $wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
-$wb['rbl_error_regex'] = 'Por favor, nomes de host válidos para RBLs.';
+$wb['rbl_error_regex'] = 'Por favor, insira nomes de host válidos para RBLs.';
 $wb['overquota_notify_admin_txt'] = 'Enviar alerta da cota para o administrador';
 $wb['overquota_notify_client_txt'] = 'Enviar alerta da cota para o cliente';
 $wb['overquota_notify_onok_txt'] = 'Enviar mensagem da cota para o cliente';
-$wb['overquota_notify_freq_txt'] = 'Enviar alerta da cota a cada X dias';
+$wb['overquota_notify_freq_txt'] = 'Enviar alerta da cota a cada N dias';
 $wb['overquota_notify_freq_note_txt'] = '0 = enviar mensagem apenas uma vez, sem repetir';
-$wb['admin_notify_events_txt'] = 'Enviar e-mail para o administrador iniciando com o seguinte nível';
+$wb['admin_notify_events_txt'] = 'Enviar email para o administrador iniciando com o seguinte nível:';
 $wb['no_notifications_txt'] = 'Sem notificações';
-$wb['monit_url_txt'] = 'URL de monitoramento do monit';
-$wb['monit_user_txt'] = 'Usuário do monit';
-$wb['monit_password_txt'] = 'Senha do monit';
-$wb['monit_url_error_regex'] = 'URL do monit é inválida';
+$wb['monit_url_txt'] = 'URL de monitoramento do Monit';
+$wb['monit_user_txt'] = 'Usuário do Monit';
+$wb['monit_password_txt'] = 'Senha do Monit';
+$wb['monit_url_error_regex'] = 'URL do Monit inválida';
 $wb['monit_url_note_txt'] = 'Área reservada:';
-$wb['munin_url_txt'] = 'URL do munin';
-$wb['munin_user_txt'] = 'Usuário do munin';
-$wb['munin_password_txt'] = 'Senda do munin';
-$wb['munin_url_error_regex'] = 'URL do munin e inválida';
+$wb['munin_url_txt'] = 'URL do Munin';
+$wb['munin_user_txt'] = 'Usuário do Munin';
+$wb['munin_password_txt'] = 'Senha do Munin';
+$wb['munin_url_error_regex'] = 'URL do Munin inválida';
 $wb['munin_url_note_txt'] = 'Área reservada:';
 $wb['v6_prefix_txt'] = 'Prefixo IPv6';
 $wb['vhost_rewrite_v6_txt'] = 'Reescrever IPv6 no espelho';
@@ -223,107 +223,106 @@ $wb['v6_prefix_length'] = 'O prefixo é muito longo de acordo com as definiçõe
 $wb['backup_dir_is_mount_txt'] = 'O diretório de backup está montando?';
 $wb['backup_dir_mount_cmd_txt'] = 'Comando mount, se o diretório não está montado';
 $wb['backup_delete_txt'] = 'Remover backups de domínios/site';
-$wb['overquota_db_notify_admin_txt'] = 'Enviar alerta da cota do banco de dados para o administrador';
-$wb['overquota_db_notify_client_txt'] = 'Enviar alerta da cota do banco de dados para o cliente';
+$wb['overquota_db_notify_admin_txt'] = 'Enviar alerta da cota do Banco de Dados para o administrador';
+$wb['overquota_db_notify_client_txt'] = 'Enviar alerta da cota do Banco de Dados para o cliente';
 $wb['monitor_system_updates_txt'] = 'Verificar por atualizações do sistema';
-$wb['php_handler_txt'] = 'Manipulador padrão do php';
-$wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
-$wb['php_fpm_incron_reload_txt'] = 'Instale o arquivo de disparo do incron para recarregar o php-fpm.';
+$wb['php_handler_txt'] = 'Manipulador padrão PHP';
+$wb['php_fpm_default_chroot_txt'] = 'Definir PHP-FPM em chroot';
+$wb['php_fpm_incron_reload_txt'] = 'Instale o arquivo de disparo do incron para recarregar o PHP-FPM.';
 $wb['disabled_txt'] = 'Desabilitado';
 $wb['dkim_strength_txt'] = 'Dificuldade do DKIM';
-$wb['monitor_system_updates_txt'] = 'Verificar por atualizações do sistema';
-$wb['invalid_apache_user_txt'] = 'Usuário do apache é inválido.';
-$wb['invalid_apache_group_txt'] = 'Grupo do apache é inválido.';
-$wb['backup_dir_error_regex'] = 'Diretório de backup é inválido.';
-$wb['maildir_path_error_regex'] = 'Caminho do maildir é inválido.';
-$wb['homedir_path_error_regex'] = 'Caminho do homedir é inválido.';
-$wb['mailuser_name_error_regex'] = 'Caminho do mailuser é inválido.';
-$wb['mailuser_group_name_error_regex'] = 'Grupo do mailuser é inválido.';
-$wb['mailuser_uid_error_range'] = 'A UID do mailuser deve ser >= 2000.';
-$wb['mailuser_gid_error_range'] = 'A GID do mailuser deve ser >= 2000.';
-$wb['getmail_config_dir_error_regex'] = 'Diretório de configurações do getmail é inválido.';
-$wb['website_basedir_error_regex'] = 'Caminho do basedir para sites é inválido. Comprimento mínimo 5 caracteres.';
-$wb['website_symlinks_error_regex'] = 'Links simbólicos para site são inválidos.';
-$wb['vhost_conf_dir_error_regex'] = 'Diretório de configurações vhost é inválido.';
-$wb['vhost_conf_enabled_dir_error_regex'] = 'Diretório de configuração vhost habilitado é inválido.';
-$wb['nginx_vhost_conf_dir_error_regex'] = 'Diretório de configurações do nginx é inválido.';
-$wb['nginx_vhost_conf_enabled_dir_error_regex'] = 'Diretório de configurações do nginx habilitado é inválido.';
-$wb['ca_path_error_regex'] = 'Caminho da CA é inválido.';
-$wb['invalid_nginx_user_txt'] = 'Usuário do nginx é inválido.';
-$wb['invalid_nginx_group_txt'] = 'Grupo do nginx é inválido.';
-$wb['php_ini_path_apache_error_regex'] = 'Caminho do php.ini do apache é inválido.';
-$wb['php_ini_path_cgi_error_regex'] = 'Caminho do php.ini do cgi é inválido.';
-$wb['php_fpm_init_script_error_regex'] = 'Script de inicialização do php-fpm é inválido.';
-$wb['php_fpm_ini_path_error_regex'] = 'Caminho de inicialização do php-fpm é inválido.';
-$wb['php_fpm_pool_dir_error_regex'] = 'Caminho do diretório de faixas do php-fpm é inválido.';
-$wb['php_fpm_socket_dir_error_regex'] = 'Caminho do diretório de socket do php-fpm é inválido.';
-$wb['php_open_basedir_error_regex'] = 'Caminho do open_basedir do php é inválido.';
-$wb['awstats_data_dir_empty'] = 'O diretório de dados do awstats está em branco.';
-$wb['awstats_data_dir_error_regex'] = 'O diretório de dados do awstats é inválido.';
-$wb['awstats_pl_empty'] = 'A configuração do awstats.pl está em branco.';
-$wb['awstats_pl_error_regex'] = 'O caminho do awstats.pl é inválido.';
-$wb['awstats_buildstaticpages_pl_empty'] = 'O awstats_buildstaticpages.pl está em branco';
-$wb['awstats_buildstaticpages_pl_error_regex'] = 'O caminho do awstats_buildstaticpages.pl é inválido.';
-$wb['invalid_bind_user_txt'] = 'O usuário do bind é inválido.';
-$wb['invalid_bind_group_txt'] = 'O grupo do bind é inválido.';
-$wb['bind_zonefiles_dir_error_regex'] = 'O diretório de zonas do bind é inválido.';
-$wb['named_conf_path_error_regex'] = 'O caminho do named.conf é inválido.';
-$wb['named_conf_local_path_error_regex'] = 'O caminho do named.conf.local é inválido.';
-$wb['fastcgi_starter_path_error_regex'] = 'O caminho do script de inicialização do fastcgi é inválido.';
-$wb['fastcgi_starter_script_error_regex'] = 'O script de inicialização do fastcgi é inválido.';
-$wb['fastcgi_alias_error_regex'] = 'O alias do fastcgi é inválido.';
-$wb['fastcgi_phpini_path_error_regex'] = 'O caminho do fastcgi é inválido.';
-$wb['fastcgi_bin_error_regex'] = 'O binário do fastcgi é inválido.';
-$wb['jailkit_chroot_home_error_regex'] = 'O diretório home em chroot do jailkit é inválido.';
-$wb['jailkit_chroot_app_sections_error_regex'] = 'As seções de aplicações no jaikit são inválidas.';
-$wb['jailkit_chroot_app_programs_error_regex'] = 'As aplicações em chroot no jailkit são inválidas.';
-$wb['jailkit_chroot_cron_programs_error_regex'] = 'As tarefas de aplicações em chroot no jailkit são inválidas.';
-$wb['vlogger_config_dir_error_regex'] = 'Diretório de configurações do vlogger é inválido.';
-$wb['cron_init_script_error_regex'] = 'Script de inicialização do cron é inválido.';
-$wb['crontab_dir_error_regex'] = 'Diretório do cron é inválido.';
-$wb['cron_wget_error_regex'] = 'Caminho do wget no cron é inválido.';
+$wb['invalid_apache_user_txt'] = 'Usuário do Apache inválido.';
+$wb['invalid_apache_group_txt'] = 'Grupo do Apache inválido.';
+$wb['backup_dir_error_regex'] = 'Diretório de backup inválido.';
+$wb['maildir_path_error_regex'] = 'Caminho do Maildir inválido.';
+$wb['homedir_path_error_regex'] = 'Caminho do Homedir inválido.';
+$wb['mailuser_name_error_regex'] = 'Caminho do Mailuser inválido.';
+$wb['mailuser_group_name_error_regex'] = 'Grupo do Mailuser inválido.';
+$wb['mailuser_uid_error_range'] = 'A UID do Mailuser deve ser >= 2000.';
+$wb['mailuser_gid_error_range'] = 'A GID do Mailuser deve ser >= 2000.';
+$wb['getmail_config_dir_error_regex'] = 'Diretório de configurações do Getmail inválido.';
+$wb['website_basedir_error_regex'] = 'Caminho do basedir para sites inválido. Comprimento mínimo 5 caracteres.';
+$wb['website_symlinks_error_regex'] = 'Links simbólicos para site inválidos.';
+$wb['vhost_conf_dir_error_regex'] = 'Diretório de configurações vhost inválido.';
+$wb['vhost_conf_enabled_dir_error_regex'] = 'Diretório de configuração vhost habilitado inválido.';
+$wb['nginx_vhost_conf_dir_error_regex'] = 'Diretório de configurações do nginx inválido.';
+$wb['nginx_vhost_conf_enabled_dir_error_regex'] = 'Diretório de configurações do nginx habilitado inválido.';
+$wb['ca_path_error_regex'] = 'Caminho da CA inválido.';
+$wb['invalid_nginx_user_txt'] = 'Usuário do nginx inválido.';
+$wb['invalid_nginx_group_txt'] = 'Grupo do nginx inválido.';
+$wb['php_ini_path_apache_error_regex'] = 'Caminho PHP.ini Apache inválido.';
+$wb['php_ini_path_cgi_error_regex'] = 'Caminho PHP.ini CGI inválido.';
+$wb['php_fpm_init_script_error_regex'] = 'Script de inicialização PHP-FPM inválido.';
+$wb['php_fpm_ini_path_error_regex'] = 'Caminho de inicialização PHP-FPM inválido.';
+$wb['php_fpm_pool_dir_error_regex'] = 'Caminho do diretório de pools PHP-FPM inválido.';
+$wb['php_fpm_socket_dir_error_regex'] = 'Caminho do diretório de socket PHP-FPM inválido.';
+$wb['php_open_basedir_error_regex'] = 'Caminho do open_basedir PHP inválido.';
+$wb['awstats_data_dir_empty'] = 'Diretório de dados do AWStats está vazio.';
+$wb['awstats_data_dir_error_regex'] = 'Diretório de dados do AWStats inválido.';
+$wb['awstats_pl_empty'] = 'A configuração do awstats.pl está vazia.';
+$wb['awstats_pl_error_regex'] = 'Caminho do awstats.pl inválido.';
+$wb['awstats_buildstaticpages_pl_empty'] = 'O awstats_buildstaticpages.pl está vazio';
+$wb['awstats_buildstaticpages_pl_error_regex'] = 'Caminho do awstats_buildstaticpages.pl inválido.';
+$wb['invalid_bind_user_txt'] = 'Usuário Bind inválido.';
+$wb['invalid_bind_group_txt'] = 'Grupo Bind inválido.';
+$wb['bind_zonefiles_dir_error_regex'] = 'Diretório de zonas do Bind inválido.';
+$wb['named_conf_path_error_regex'] = 'Caminho do named.conf inválido.';
+$wb['named_conf_local_path_error_regex'] = 'Caminho do named.conf.local inválido.';
+$wb['fastcgi_starter_path_error_regex'] = 'Caminho do script de inicialização FastCGI inválido.';
+$wb['fastcgi_starter_script_error_regex'] = 'Script de inicialização FastCGI inválido.';
+$wb['fastcgi_alias_error_regex'] = 'Alias FastCGI inválido.';
+$wb['fastcgi_phpini_path_error_regex'] = 'Caminho do fastcgi inválido.';
+$wb['fastcgi_bin_error_regex'] = 'Binário do fastcgi inválido.';
+$wb['jailkit_chroot_home_error_regex'] = 'Diretório home em chroot Jailkit inválido.';
+$wb['jailkit_chroot_app_sections_error_regex'] = 'Seções de aplicações em chroot Jailkit inválidas.';
+$wb['jailkit_chroot_app_programs_error_regex'] = 'Aplicações em chroot Jailkit inválidas.';
+$wb['jailkit_chroot_cron_programs_error_regex'] = 'Tarefas de aplicações em chroot Jailkit inválidas.';
+$wb['vlogger_config_dir_error_regex'] = 'Diretório de configurações do vlogger inválido.';
+$wb['cron_init_script_error_regex'] = 'Script de inicialização do cron inválido.';
+$wb['crontab_dir_error_regex'] = 'Diretório do cron inválido.';
+$wb['cron_wget_error_regex'] = 'Caminho do wget no Cron inválido.';
 $wb['network_filesystem_txt'] = 'Sistema de arquivos de rede';
-$wb['php_ini_check_minutes_txt'] = 'Verificar alterações no php.ini a cada X minutos';
-$wb['php_ini_check_minutes_error_empty'] = 'Por favor, insira um valor para verificação de alterações no php.ini.';
+$wb['php_ini_check_minutes_txt'] = 'Verificar modificações no php.ini a cada N minutos';
+$wb['php_ini_check_minutes_error_empty'] = 'Por favor, insira um valor para verificação de modificações no php.ini.';
 $wb['php_ini_check_minutes_info_txt'] = '0 = sem verificações';
-$wb['web_settings_txt'] = 'Servidor web';
-$wb['xmpp_server_txt'] = 'Servidor xmpp';
+$wb['web_settings_txt'] = 'Servidor Web';
+$wb['xmpp_server_txt'] = 'Servidor XMPP';
 $wb['xmpp_use_ipv6_txt'] = 'Usar IPv6';
 $wb['xmpp_bosh_max_inactivity_txt'] = 'Tempo de inatividade do BOSH';
-$wb['xmpp_bosh_timeout_range_wrong'] = 'Por favor, insira um valor para o timeout do bosh entre 15 e 360.';
+$wb['xmpp_bosh_timeout_range_wrong'] = 'Por favor, insira um valor para o tempo de inatividade do BOSH, entre 15 e 360.';
 $wb['xmpp_module_saslauth'] = 'Autenticação SASL';
 $wb['xmpp_server_admins_txt'] = 'Administradores do servidor (JIDs)';
 $wb['xmpp_modules_enabled_txt'] = 'Plugins habilitados no servidor (um por linha)';
 $wb['xmpp_ports_txt'] = 'Portas dos componentes';
-$wb['xmpp_port_http_txt'] = 'http';
-$wb['xmpp_port_https_txt'] = 'https';
+$wb['xmpp_port_http_txt'] = 'HTTP';
+$wb['xmpp_port_https_txt'] = 'HTTPS';
 $wb['xmpp_port_pastebin_txt'] = 'Pastebin';
 $wb['xmpp_port_bosh_txt'] = 'BOSH';
-$wb['disable_bind_log_txt'] = 'Desabilitar mensagens de alerta do bind9';
+$wb['disable_bind_log_txt'] = 'Desabilitar mensagens de alerta do Bind9';
 $wb['apps_vhost_enabled_txt'] = 'Habilitar apps-vhost';
-$wb['skip_le_check_txt'] = 'Ignorar verificação do Lets Encrypt';
+$wb['skip_le_check_txt'] = 'Ignorar verificação do Let\\'s Encrypt';
 $wb['migration_mode_txt'] = 'Modo migração de servidor';
 $wb['nginx_enable_pagespeed_txt'] = 'Tornar pagespeed disponível';
 $wb['logging_txt'] = 'Gravar logs de acesso e erros de sites';
 $wb['logging_desc_txt'] = 'Usar Ferramentas > Sicronizar para aplicar mudanças em sites existentes. Para o Apache, os logs de acesso e erros podem ser anonimizados. Para o nginx, apenas o log de acesso é anonimizado, o log de erros conterá endereços IP.';
 $wb['log_retention_txt'] = 'Tempo de retenção do log (dias)';
 $wb['log_retention_error_ispositive'] = 'O tempo de retenção do log deve ser um número > 0.';
-$wb['php_default_hide_txt'] = 'Hide Default PHP-Version in selectbox';
-$wb['php_default_name_txt'] = 'Descrição da versão padrão do php';
-$wb['php_default_name_error_empty'] = 'A descrição da versão padrão do php está em branco.';
-$wb['error_mailbox_message_size_txt'] = 'O tamanho da cota da conta de e-mail deve ser maior ou igual o tamanho da cota de mensagens.';
-$wb['php_fpm_reload_mode_txt'] = 'Modo da recarga do php-fpm';
+$wb['php_default_hide_txt'] = 'Ocultar versão padrao PHP na caixa de seleção';
+$wb['php_default_name_txt'] = 'Descrição da versão padrão PHP';
+$wb['php_default_name_error_empty'] = 'A descrição da versão padrão PHP está vazia.';
+$wb['error_mailbox_message_size_txt'] = 'O tamanho da cota da conta de email deve ser maior ou igual o tamanho da cota de mensagens.';
+$wb['php_fpm_reload_mode_txt'] = 'Modo da recarga PHP-FPM';
 $wb['content_filter_txt'] = 'Filtro de conteúdo';
-$wb['rspamd_url_txt'] = 'URL do rspamd';
-$wb['rspamd_user_txt'] = 'Usuário do rspamd';
-$wb['rspamd_password_txt'] = 'Senha do rspamd';
-$wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
-$wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
-$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
-$wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template';
-$wb['jailkit_chroot_authorized_keys_template_error_regex'] = 'Invalid jaikit chroot authorized_keys template file.';
-$wb['jailkit_hardlinks_txt'] = 'Hardlinks within Jailkit chroot';
-$wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves disk space.';
-$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
-$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
-$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
+$wb['rspamd_url_txt'] = 'URL do RSPAMD';
+$wb['rspamd_user_txt'] = 'Usuário RSPAMD';
+$wb['rspamd_password_txt'] = 'Senha RSPAMD';
+$wb['vhost_proxy_protocol_enabled_txt'] = 'Habilitar protocolo PROXY';
+$wb['vhost_proxy_protocol_http_port_txt'] = 'Porta HTTP protocolo PROXY';
+$wb['vhost_proxy_protocol_https_port_txt'] = 'Porta HTTPS protocolo PROXY';
+$wb['jailkit_chroot_authorized_keys_template_txt'] = 'Gabarito authorized_keys Jailkit';
+$wb['jailkit_chroot_authorized_keys_template_error_regex'] = 'Arquivo do gabarito authorized_keys Jailkit inválido.';
+$wb['jailkit_hardlinks_txt'] = 'Links físicos (hardlinks) em chroot Jailkit';
+$wb['tooltip_jailkit_hardlinks_txt'] = 'Usar links físicos é inseguro, mas economiza espaço em disco.';
+$wb['jailkit_hardlinks_allow_txt'] = 'Permitir links físicos enjaulados';
+$wb['jailkit_hardlinks_no_txt'] = 'Não, remover arquivos de links físicos';
+$wb['jailkit_hardlinks_yes_txt'] = 'Sim, usar links físicos quando possível';
diff --git a/interface/web/admin/lib/lang/br_server_config_list.lng b/interface/web/admin/lib/lang/br_server_config_list.lng
index b9329de9b4..ecb3ce1e0a 100644
--- a/interface/web/admin/lib/lang/br_server_config_list.lng
+++ b/interface/web/admin/lib/lang/br_server_config_list.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['list_head_txt'] = 'Configuração do servidor';
 $wb['server_name_txt'] = 'Servidor';
-?>
diff --git a/interface/web/admin/lib/lang/br_server_ip.lng b/interface/web/admin/lib/lang/br_server_ip.lng
index 8380b61ebd..135cf8ca66 100644
--- a/interface/web/admin/lib/lang/br_server_ip.lng
+++ b/interface/web/admin/lib/lang/br_server_ip.lng
@@ -1,13 +1,12 @@
 <?php
-$wb['server_ip_edit_title'] = 'IP Adresses';
-$wb['server_ip_edit_desc'] = 'Form to edit system IP adresses';
+$wb['server_ip_edit_title'] = 'Endereço IP';
+$wb['server_ip_edit_desc'] = 'Editar endereço IP do sistema';
 $wb['server_id_txt'] = 'Servidor';
 $wb['client_id_txt'] = 'Cliente';
 $wb['ip_type_txt'] = 'Tipo';
 $wb['ip_address_txt'] = 'Endereço IP';
-$wb['virtualhost_txt'] = 'Nome do vhost http';
-$wb['virtualhost_port_txt'] = 'Porta http';
-$wb['ip_error_wrong'] = 'O endereço IP é inválido.';
+$wb['virtualhost_txt'] = 'Nome do vhost HTTP';
+$wb['virtualhost_port_txt'] = 'Porta HTTP';
+$wb['ip_error_wrong'] = 'Endereço IP inválido.';
 $wb['ip_error_unique'] = 'O endereço IP deve ser exclusivo.';
-$wb['error_port_syntax'] = 'Caracteres inválidos para porta http, por favor, insira apenas uma porta ou separe portas por vírgula. Exemplo: 80,443.';
-?>
+$wb['error_port_syntax'] = 'Caracteres inválidos para porta HTTP, por favor, insira apenas uma porta ou separe portas por vírgula. Exemplo: 80,443.';
diff --git a/interface/web/admin/lib/lang/br_server_ip_list.lng b/interface/web/admin/lib/lang/br_server_ip_list.lng
index 0ae892af87..97edd7bc4d 100644
--- a/interface/web/admin/lib/lang/br_server_ip_list.lng
+++ b/interface/web/admin/lib/lang/br_server_ip_list.lng
@@ -4,7 +4,6 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['client_id_txt'] = 'Cliente';
 $wb['ip_address_txt'] = 'Endereço IP';
 $wb['add_new_record_txt'] = 'Adicionar novo endereço IP';
-$wb['virtualhost_txt'] = 'Virtual host http';
-$wb['virtualhost_port_txt'] = 'Portas http';
+$wb['virtualhost_txt'] = 'Virtual host HTTP';
+$wb['virtualhost_port_txt'] = 'Portas HTTP';
 $wb['ip_type_txt'] = 'Tipo';
-?>
diff --git a/interface/web/admin/lib/lang/br_server_ip_map.lng b/interface/web/admin/lib/lang/br_server_ip_map.lng
index 51af1099ab..287ae957ad 100644
--- a/interface/web/admin/lib/lang/br_server_ip_map.lng
+++ b/interface/web/admin/lib/lang/br_server_ip_map.lng
@@ -1,14 +1,13 @@
 <?php
-$wb['server_ip_map_title'] = 'IPv4 Address mapping';
-$wb['server_ip_map_desc'] = 'Form to map IPv4-addresses for Web-Server';
-$wb['server_id_txt'] = 'Servidor para mapeamento IP';
+$wb['server_ip_map_title'] = 'Mapeamento de endereço IPv4';
+$wb['server_ip_map_desc'] = 'Forma para mapear endereços IPv4 para servidor Web';
+$wb['server_id_txt'] = 'Reescrever no servidor';
 $wb['source_txt'] = 'Endereço IP de origem';
 $wb['destination_txt'] = 'Endereço IP de destino';
 $wb['active_txt'] = 'Ativo';
 $wb['ip_error_wrong'] = 'O endereço IP de destino é inválido.';
-$wb['destination_ip_empty'] = 'O endereço IP de destino está em branco.';
-$wb['source_ip_empty'] = 'O endereço IP de origem está em branco.';
-$wb['server_empty_error'] = 'O servidor está em branco.';
+$wb['destination_ip_empty'] = 'O endereço IP de destino está vazio.';
+$wb['source_ip_empty'] = 'O endereço IP de origem está vazio.';
+$wb['server_empty_error'] = 'O servidor está vazio.';
 $wb['duplicate_mapping_error'] = 'Este mapeamento IP já existe.';
-$wb['ip_mapping_error'] = 'Endereço IP de origem não pode ser o mesmo IP do servidor para o mapeamento.';
-?>
+$wb['ip_mapping_error'] = 'Endereço IP de origem não pode ser o IP do servidor a ser reescrito ';
diff --git a/interface/web/admin/lib/lang/br_server_ip_map_list.lng b/interface/web/admin/lib/lang/br_server_ip_map_list.lng
index 8cb0a1e20f..044270fa2e 100644
--- a/interface/web/admin/lib/lang/br_server_ip_map_list.lng
+++ b/interface/web/admin/lib/lang/br_server_ip_map_list.lng
@@ -4,4 +4,3 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['source_ip_txt'] = 'Endereço de origem';
 $wb['destination_ip_txt'] = 'Endereço de destino';
 $wb['active_txt'] = 'Ativo';
-?>
diff --git a/interface/web/admin/lib/lang/br_server_list.lng b/interface/web/admin/lib/lang/br_server_list.lng
index ae3bb52810..1bd6c31563 100644
--- a/interface/web/admin/lib/lang/br_server_list.lng
+++ b/interface/web/admin/lib/lang/br_server_list.lng
@@ -1,14 +1,13 @@
 <?php
 $wb['list_head_txt'] = 'Servidor';
 $wb['server_name_txt'] = 'Nome';
-$wb['mail_server_txt'] = 'E-MAIL';
+$wb['mail_server_txt'] = 'EMAIL';
 $wb['web_server_txt'] = 'SITES';
 $wb['dns_server_txt'] = 'DNS';
 $wb['file_server_txt'] = 'FTP';
 $wb['db_server_txt'] = 'BD';
 $wb['vserver_server_txt'] = 'VPS';
-$wb['proxy_server_txt'] = 'Proxy';
+$wb['proxy_server_txt'] = 'PROXY';
 $wb['firewall_server_txt'] = 'Firewall';
 $wb['add_new_record_txt'] = 'Adicionar novo servidor';
 $wb['xmpp_server_txt'] = 'XMPP';
-?>
diff --git a/interface/web/admin/lib/lang/br_server_php.lng b/interface/web/admin/lib/lang/br_server_php.lng
index 377763ce45..6524531be5 100644
--- a/interface/web/admin/lib/lang/br_server_php.lng
+++ b/interface/web/admin/lib/lang/br_server_php.lng
@@ -1,17 +1,18 @@
 <?php
 $wb['server_id_txt'] = 'Servidor';
 $wb['client_id_txt'] = 'Cliente';
-$wb['name_txt'] = 'Nome da versão do php';
+$wb['name_txt'] = 'Nome da versão PHP';
 $wb['Name'] = 'Nome';
 $wb['FastCGI Settings'] = 'Configurações FastCGI';
 $wb['PHP-FPM Settings'] = 'Configurações PHP-FPM';
-$wb['Additional PHP Versions'] = 'Versões adicionais do php';
-$wb['Form to edit additional PHP versions'] = 'Editar verões adicionais do php';
-$wb['server_php_name_error_empty'] = 'O campo nome está em branco.';
+$wb['Additional PHP Versions'] = 'Versões adicionais PHP';
+$wb['Form to edit additional PHP versions'] = 'Editar verões adicionais PHP';
+$wb['server_php_name_error_empty'] = 'O campo nome está vazio.';
 $wb['php_fastcgi_binary_txt'] = 'Caminho do binário do FastCGI';
-$wb['php_fastcgi_ini_dir_txt'] = 'Diretório do php.ini';
-$wb['php_fpm_init_script_txt'] = 'Caminho do script de inicialização do php-fpm';
-$wb['php_fpm_ini_dir_txt'] = 'Caminho do diretório do php.ini';
-$wb['php_fpm_pool_dir_txt'] = 'Caminho do diretório pool do php-fpm';
+$wb['php_fastcgi_ini_dir_txt'] = 'Diretório PHP.ini';
+$wb['php_fpm_init_script_txt'] = 'Caminho do script de inicialização PHP-FPM';
+$wb['php_fpm_ini_dir_txt'] = 'Caminho do diretório PHP.ini';
+$wb['php_fpm_pool_dir_txt'] = 'Caminho do diretório da pool PHP-FPM';
 $wb['active_txt'] = 'Ativo';
-?>
+$wb['php_in_use_error'] = 'Esta versão PHP está em uso.';
+$wb['php_name_in_use_error'] = 'O nome não pode ser modificado.';
diff --git a/interface/web/admin/lib/lang/br_server_php_list.lng b/interface/web/admin/lib/lang/br_server_php_list.lng
index ce558e9054..423f123759 100644
--- a/interface/web/admin/lib/lang/br_server_php_list.lng
+++ b/interface/web/admin/lib/lang/br_server_php_list.lng
@@ -1,9 +1,8 @@
 <?php
-$wb['list_head_txt'] = 'Versões adicionais do php';
+$wb['list_head_txt'] = 'Versões adicionais PHP';
 $wb['server_id_txt'] = 'Servidor';
-$wb['add_new_record_txt'] = 'Adicionar nova versão do php';
+$wb['add_new_record_txt'] = 'Adicionar nova versão PHP';
 $wb['client_id_txt'] = 'Cliente';
 $wb['name_txt'] = 'Nome da versão';
 $wb['active_txt'] = 'Ativo';
-$wb['usage_txt'] = 'Usage count';
-?>
+$wb['usage_txt'] = 'Contador de utilização';
diff --git a/interface/web/admin/lib/lang/br_software_package.lng b/interface/web/admin/lib/lang/br_software_package.lng
index 94ccc930de..d26e1d4450 100644
--- a/interface/web/admin/lib/lang/br_software_package.lng
+++ b/interface/web/admin/lib/lang/br_software_package.lng
@@ -2,5 +2,4 @@
 $wb['package_title_txt'] = 'Título do pacote';
 $wb['package_key_txt'] = 'Chave do pacote';
 $wb['Software Package'] = 'Pacote de software';
-$wb['Modify software package details'] = 'Alterar detalhes do pacote de software';
-?>
+$wb['Modify software package details'] = 'Modificar detalhes do pacote de software';
diff --git a/interface/web/admin/lib/lang/br_software_package_install.lng b/interface/web/admin/lib/lang/br_software_package_install.lng
index 0fcccf939e..77d24f2e15 100644
--- a/interface/web/admin/lib/lang/br_software_package_install.lng
+++ b/interface/web/admin/lib/lang/br_software_package_install.lng
@@ -3,4 +3,3 @@ $wb['head_txt'] = 'Instalar pacote de software';
 $wb['install_key_txt'] = 'Insira a chave de instalação';
 $wb['btn_save_txt'] = 'Iniciar instalação';
 $wb['btn_cancel_txt'] = 'Cancelar';
-?>
diff --git a/interface/web/admin/lib/lang/br_software_package_list.lng b/interface/web/admin/lib/lang/br_software_package_list.lng
index de62e3d305..5dda114faf 100644
--- a/interface/web/admin/lib/lang/br_software_package_list.lng
+++ b/interface/web/admin/lib/lang/br_software_package_list.lng
@@ -10,4 +10,3 @@ $wb['package_id_txt'] = 'ID local do APP';
 $wb['no_packages_txt'] = 'Nenhum pacote disponível.';
 $wb['edit_txt'] = 'Editar';
 $wb['delete_txt'] = 'Remover';
-?>
diff --git a/interface/web/admin/lib/lang/br_software_repo.lng b/interface/web/admin/lib/lang/br_software_repo.lng
index dbc14e2032..13b4a2d87f 100644
--- a/interface/web/admin/lib/lang/br_software_repo.lng
+++ b/interface/web/admin/lib/lang/br_software_repo.lng
@@ -5,4 +5,3 @@ $wb['repo_username_txt'] = 'Usuário (opcional)';
 $wb['repo_password_txt'] = 'Senha (opcional)';
 $wb['active_txt'] = 'Ativo';
 $wb['Software Repository which may contain addons or updates'] = 'Repositório de software pode conter complementos ou atualizações';
-?>
diff --git a/interface/web/admin/lib/lang/br_software_repo_list.lng b/interface/web/admin/lib/lang/br_software_repo_list.lng
index 6941c7f147..86886e7671 100644
--- a/interface/web/admin/lib/lang/br_software_repo_list.lng
+++ b/interface/web/admin/lib/lang/br_software_repo_list.lng
@@ -3,4 +3,3 @@ $wb['list_head_txt'] = 'Repositório';
 $wb['active_txt'] = 'Ativo';
 $wb['repo_name_txt'] = 'Repositório';
 $wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/br_software_update_list.lng b/interface/web/admin/lib/lang/br_software_update_list.lng
index 0dff3a245c..77315b76c4 100644
--- a/interface/web/admin/lib/lang/br_software_update_list.lng
+++ b/interface/web/admin/lib/lang/br_software_update_list.lng
@@ -6,4 +6,3 @@ $wb['update_title_txt'] = 'Atualizar';
 $wb['version_txt'] = 'Versão';
 $wb['action_txt'] = 'Ação';
 $wb['no_updates_txt'] = 'Nenhuma atualização disponível.';
-?>
diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng
index b74f29df08..0d3e473496 100644
--- a/interface/web/admin/lib/lang/br_system_config.lng
+++ b/interface/web/admin/lib/lang/br_system_config.lng
@@ -1,60 +1,60 @@
 <?php
-$wb['system_config_title'] = 'System Config';
-$wb['system_config_desc_txt'] = 'Configurações do Sistema';
-$wb['smtp_missing_admin_mail_txt'] = 'Por favor, insira um nome e e-mail do administrador se você usar smtp para envio dos e-mails do sistema.';
-$wb['dashboard_atom_url_admin_txt'] = 'URL do Dashboard atom (admin)';
-$wb['dashboard_atom_url_reseller_txt'] = 'URL do Dashboard atom (revendas)';
-$wb['dashboard_atom_url_client_txt'] = 'URL do Dashboard atom  (clientes)';
+$wb['system_config_title'] = 'Configuração do Sistema';
+$wb['system_config_desc_txt'] = '';
+$wb['smtp_missing_admin_mail_txt'] = 'Por favor, insira um nome e email do administrador se você usar smtp para envio dos emails do sistema.';
+$wb['dashboard_atom_url_admin_txt'] = 'URL do Dashboard Atom (admin)';
+$wb['dashboard_atom_url_reseller_txt'] = 'URL do Dashboard Atom (revendas)';
+$wb['dashboard_atom_url_client_txt'] = 'URL do Dashboard Atom  (clientes)';
 $wb['warning'] = 'Edite estes valores com cuidado! Não remova os prefixos em um sistema com mais de um cliente!';
-$wb['tab_change_discard_txt'] = 'Descartar alterações nesta aba';
-$wb['tab_change_warning_txt'] = 'Alerta de alterações';
-$wb['tab_change_warning_note_txt'] = 'Exibir alertas de alterações nesta aba se qualquer dado for alterado pelo usuário.';
-$wb['dbname_prefix_txt'] = 'Prefixo de banco de dados';
-$wb['dbuser_prefix_txt'] = 'Prefixo de usuário de banco de dados';
-$wb['shelluser_prefix_txt'] = 'Prefixo de usuário do shell';
-$wb['webdavuser_prefix_txt'] = 'Prefixo de usuário webdav';
-$wb['ftpuser_prefix_txt'] = 'Prefixo de usuário ftp';
+$wb['tab_change_discard_txt'] = 'Descartar modificações nesta aba';
+$wb['tab_change_warning_txt'] = 'Alerta de modificações';
+$wb['tab_change_warning_note_txt'] = 'Exibir alertas de modificações nesta aba se qualquer dado for modificado pelo usuário.';
+$wb['dbname_prefix_txt'] = 'Prefixo do Banco de Dados';
+$wb['dbuser_prefix_txt'] = 'Prefixo do usuário do Banco de Dados';
+$wb['shelluser_prefix_txt'] = 'Prefixo do usuário shell';
+$wb['webdavuser_prefix_txt'] = 'Prefixo do usuário Webdav';
+$wb['ftpuser_prefix_txt'] = 'Prefixo do usuário FTP';
 $wb['vhost_subdomains_txt'] = 'Adicionar subdomínios como um site';
 $wb['vhost_subdomains_note_txt'] = 'Você não pode desabilitar esta configuração enquanto existirem subdomínios vhost no sistema!';
 $wb['vhost_aliasdomains_txt'] = 'Adicionar alias de domínio como um site';
 $wb['vhost_aliasdomains_note_txt'] = 'Você não pode desabilitar esta configuração enquanto existirem alias de domínios vhost no sistema!';
-$wb['dbname_prefix_error_regex'] = 'Caractere não permitido para o prefixo de banco de dados.';
-$wb['dbuser_prefix_error_regex'] = 'Caractere não permitido para o prefixo de usuário de banco de dados.';
-$wb['ftpuser_prefix_error_regex'] = 'Caractere não permitido para o prefixo de usuário ftp.';
-$wb['shelluser_prefix_error_regex'] = 'Caractere não permitido para o prefixo de usuário do shell.';
-$wb['webdavuser_prefix_error_regex'] = 'Caractere não permitido para o prefixo de usuários webdav.';
-$wb['dblist_phpmyadmin_link_txt'] = 'Link para o phpmyadmin';
+$wb['dbname_prefix_error_regex'] = 'Caractere não permitido para o prefixo do Banco de Dados.';
+$wb['dbuser_prefix_error_regex'] = 'Caractere não permitido para o prefixo de usuário do Banco de Dados.';
+$wb['ftpuser_prefix_error_regex'] = 'Caractere não permitido para o prefixo de usuário FTP.';
+$wb['shelluser_prefix_error_regex'] = 'Caractere não permitido para o prefixo de usuário shell.';
+$wb['webdavuser_prefix_error_regex'] = 'Caractere não permitido para o prefixo de usuário Webdav.';
+$wb['dblist_phpmyadmin_link_txt'] = 'Link para o PHPMyAdmin';
 $wb['enable_custom_login_txt'] = 'Permitir nome de usuário personalizado';
-$wb['mailboxlist_webmail_link_txt'] = 'Link para o webmail';
-$wb['mailbox_show_autoresponder_tab_txt'] = 'Exibir aba de auto-resposta nos detalhes da conta de e-mail';
-$wb['mailbox_show_mail_filter_tab_txt'] = 'Exibir aba de filtro de e-mails nos detalhes da conta de e-mail';
-$wb['mailbox_show_custom_rules_tab_txt'] = 'Exibir aba de filtros personalizados de e-mail nos detalhes da conta de e-mail';
-$wb['webmail_url_txt'] = 'URL do webmail';
-$wb['mailmailinglist_link_txt'] = 'Link para lista de e-mails na lista de e-mails';
-$wb['mailmailinglist_url_txt'] = 'URL da lista de e-mails';
-$wb['phpmyadmin_url_txt'] = 'URL do phpMyAdmin';
+$wb['mailboxlist_webmail_link_txt'] = 'Link para o Webmail';
+$wb['mailbox_show_autoresponder_tab_txt'] = 'Exibir aba de auto-resposta nos detalhes da conta de email';
+$wb['mailbox_show_mail_filter_tab_txt'] = 'Exibir aba de filtro de emails nos detalhes da conta de email';
+$wb['mailbox_show_custom_rules_tab_txt'] = 'Exibir aba de filtros personalizados de email nos detalhes da conta de email';
+$wb['webmail_url_txt'] = 'URL do Webmail';
+$wb['mailmailinglist_link_txt'] = 'Link para lista de emails na Lista de eMails';
+$wb['mailmailinglist_url_txt'] = 'URL da Lista de eMails';
+$wb['phpmyadmin_url_txt'] = 'URL PHPMyAdmin';
 $wb['use_domain_module_txt'] = 'Use o módulo de cliente para adicionar novos domínios';
-$wb['use_domain_module_hint'] = 'Se você usar este módulo, os clientes podem selecionar apenas um dos domínios que o administrador adicionar para eles. Eles não podem editar o campo domínio livremente. Você deve sair e acessar novamente após alterar este valor para que as mudanças sejam aplicadas.';
+$wb['use_domain_module_hint'] = 'Se você usar este módulo, os clientes podem selecionar apenas um dos domínios que o administrador adicionar para eles. Eles não podem editar o campo domínio livremente. Você deve sair e acessar novamente após modificar este valor para que as mudanças sejam aplicadas.';
 $wb['new_domain_txt'] = 'Código HTML para criar um novo domínio';
-$wb['webftp_url_txt'] = 'URL do FTPweb';
-$wb['admin_mail_txt'] = 'Administrador(es) de e-mails';
+$wb['webftp_url_txt'] = 'URL do WebFTP';
+$wb['admin_mail_txt'] = 'Administrador de emails';
 $wb['admin_name_txt'] = 'Nome do administrador';
 $wb['maintenance_mode_txt'] = 'Modo manutenção';
-$wb['maintenance_mode_exclude_ips_txt'] = 'Exclude IP\'s from maintenance';
-$wb['maintenance_mode_exclude_ips_error_isip'] = 'One or more invalid IP addresses in maintenance mode exclude list. Must be a list of comma-separated IPv4 and/or IPv6 addresses.';
-$wb['smtp_enabled_txt'] = 'Usar SMTP para enviar e-mails do sistema';
+$wb['maintenance_mode_exclude_ips_txt'] = 'Excluir IPs da manutenção';
+$wb['maintenance_mode_exclude_ips_error_isip'] = 'Um ou mais endereços IP inválido(s) na lista de exclusão da manutenção. A lista de IPv4 e/ou IPv6 deve ser separada por vírgulas.';
+$wb['smtp_enabled_txt'] = 'Usar SMTP para enviar emails do sistema';
 $wb['smtp_host_txt'] = 'Host SMTP';
 $wb['smtp_port_txt'] = 'Porta SMTP';
 $wb['smtp_user_txt'] = 'Usuário SMTP';
 $wb['smtp_pass_txt'] = 'Senha do SMTP';
 $wb['smtp_crypt_txt'] = 'Usar conexão criptografada SSL/TLS para o SMTP';
-$wb['phpmyadmin_url_error_regex'] = 'URL do phpmyadmin é inválida.';
+$wb['phpmyadmin_url_error_regex'] = 'URL PHPMyAdmin inválida.';
 $wb['use_combobox_txt'] = 'Usar combobox jQuery UI';
 $wb['use_loadindicator_txt'] = 'Usar indicador de carga';
 $wb['f5_to_reload_js_txt'] = 'Se você modificar esta configuração, talvez será necessário pressionar F5 no seu navegador para recarregar as bibliotecas do JavaScript ou esvaziar o cache.';
-$wb['client_username_web_check_disabled_txt'] = 'Desabilitar verificação da palavra reservada "web" para o nome de usuário (não recomendado!).';
+$wb['client_username_web_check_disabled_txt'] = 'Desabilitar verificação da palavra reservada \\'web\\' para o nome de usuário (não recomendado!).';
 $wb['backups_include_into_web_quota_txt'] = 'Incluir arquivos de backup na cota do site.';
-$wb['webmail_url_error_regex'] = 'URL do webmail é inválida.';
+$wb['webmail_url_error_regex'] = 'URL do Webmail é inválida.';
 $wb['phpmyadmin_url_note_txt'] = 'Área reservada:';
 $wb['webmail_url_note_txt'] = 'Área reservada:';
 $wb['available_dashlets_note_txt'] = 'Dashlets disponíveis:';
@@ -73,34 +73,34 @@ $wb['session_allow_endless_txt'] = 'Habilitar "Manter-me conectado"';
 $wb['No'] = 'Não';
 $wb['min_password_length_txt'] = 'Comprimento mínimo da senha';
 $wb['min_password_strength_txt'] = 'Dificuldade mínima da senha';
-$wb['ssh_authentication_txt'] = 'Allowed SSH authentication';
-$wb['ssh_authentication_password_key'] = 'Password & Key';
-$wb['ssh_authentication_password'] = 'Password';
-$wb['ssh_authentication_key'] = 'Key';
-$wb['default_mailserver_txt'] = 'Servidor de e-mails padrão';
-$wb['default_webserver_txt'] = 'Servidor web padrão';
-$wb['default_dnsserver_txt'] = 'Servidor dns padrão';
-$wb['default_slave_dnsserver_txt'] = 'Servidor dns secundário padrão';
-$wb['default_dbserver_txt'] = 'Servidor de banco de dados padrão';
+$wb['ssh_authentication_txt'] = 'Autenticação SSH permitida';
+$wb['ssh_authentication_password_key'] = 'Senha e Chave';
+$wb['ssh_authentication_password'] = 'Senha';
+$wb['ssh_authentication_key'] = 'Chave';
+$wb['default_mailserver_txt'] = 'Servidor de emails padrão';
+$wb['default_webserver_txt'] = 'Servidor Web padrão';
+$wb['default_dnsserver_txt'] = 'Servidor DNS padrão';
+$wb['default_slave_dnsserver_txt'] = 'Servidor DNS secundário padrão';
+$wb['default_dbserver_txt'] = 'Servidor do Banco de Dados padrão';
 $wb['company_name_txt'] = 'Nome da empresa para título da página';
 $wb['reseller_can_use_options_txt'] = 'Revendas podem utilizar o menu sites';
 $wb['custom_login_text_txt'] = 'Texto personalizado para a página de acesso';
 $wb['custom_login_link_txt'] = 'Link personalizado para página de acesso';
 $wb['login_link_error_regex'] = 'Link personalizado para acesso inválido';
-$wb['default_remote_dbserver_txt'] = 'Default DB Remote servers';
-$wb['disable_client_remote_dbserver_txt'] = 'Disable DB Remote sections for Clients';
+$wb['default_remote_dbserver_txt'] = 'Servidor do Banco de Dados remoto padrão';
+$wb['disable_client_remote_dbserver_txt'] = 'Desabilitar seções do Banco de Dados remoto para clientes';
 $wb['ca_name_txt'] = 'Nome';
 $wb['ca_issue_txt'] = 'Questão';
 $wb['ca_wildcard_txt'] = 'Usar curingas';
-$wb['ca_critical_txt'] = 'Strict Check';
+$wb['ca_critical_txt'] = 'Verificação Restrita';
 $wb['ca_iodef_txt'] = 'Definições de E/S';
 $wb['active_txt'] = 'Ativo';
 $wb['btn_save_txt'] = 'Salvar';
 $wb['btn_cancel_txt'] = 'Cancelar';
-$wb['web_php_options_txt'] = 'Manipulador do php (Somente apache)';
-$wb['client_protection_txt'] = 'Client protection';
+$wb['web_php_options_txt'] = 'Manipulador PHP (Somente apache)';
+$wb['client_protection_txt'] = 'Proteção de Cliente';
 $wb['show_support_messages_txt'] = 'Show message function in help module';
 $wb['show_aps_menu_txt'] = 'Show APS menu';
 $wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
 $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
-?>
+$wb['monitor_key_txt'] = 'Senha do Monitor';
diff --git a/interface/web/admin/lib/lang/br_tpl_default_admin.lng b/interface/web/admin/lib/lang/br_tpl_default_admin.lng
index dbad6b1766..74daca0f33 100644
--- a/interface/web/admin/lib/lang/br_tpl_default_admin.lng
+++ b/interface/web/admin/lib/lang/br_tpl_default_admin.lng
@@ -3,16 +3,15 @@ $wb['tpl_default_admin_head_txt'] = 'Configurações globais do tema padrão';
 $wb['tpl_default_admin_desc_txt'] = 'Descrição';
 $wb['server_id_txt'] = 'Servidor';
 $wb['client_id_txt'] = 'Cliente';
-$wb['name_txt'] = 'Nome da versão do php';
+$wb['name_txt'] = 'Nome da versão PHP';
 $wb['Name'] = 'Nome';
 $wb['FastCGI Settings'] = 'Configurações FastCGI';
 $wb['PHP-FPM Settings'] = 'Configurações PHP-FPM';
-$wb['Additional PHP Versions'] = 'Versões adicionais do php';
-$wb['Form to edit additional PHP versions'] = 'Editar versões adicionais do php';
-$wb['server_php_name_error_empty'] = 'O nome está em branco.';
-$wb['php_fastcgi_binary_txt'] = 'Caminho do binário do FastCGI';
-$wb['php_fastcgi_ini_dir_txt'] = 'Caminho do diretório do php.ini';
-$wb['php_fpm_init_script_txt'] = 'Caminho do script de inicialização php-fpm';
-$wb['php_fpm_ini_dir_txt'] = 'Caminho do diretório do php.ini';
-$wb['php_fpm_pool_dir_txt'] = 'Caminho do diretório de faixas php-fpm';
-?>
+$wb['Additional PHP Versions'] = 'Versões adicionais PHP';
+$wb['Form to edit additional PHP versions'] = 'Editar versões adicionais PHP';
+$wb['server_php_name_error_empty'] = 'O nome está vazio.';
+$wb['php_fastcgi_binary_txt'] = 'Caminho do binário FastCGI';
+$wb['php_fastcgi_ini_dir_txt'] = 'Caminho do diretório para php.ini';
+$wb['php_fpm_init_script_txt'] = 'Caminho do script de inicialização para PHP-FPM';
+$wb['php_fpm_ini_dir_txt'] = 'Caminho do diretório para php.ini';
+$wb['php_fpm_pool_dir_txt'] = 'Caminho do diretório para pool PHP-FPM';
diff --git a/interface/web/admin/lib/lang/br_users.lng b/interface/web/admin/lib/lang/br_users.lng
index de664c674d..2e60a744c0 100644
--- a/interface/web/admin/lib/lang/br_users.lng
+++ b/interface/web/admin/lib/lang/br_users.lng
@@ -1,8 +1,8 @@
 <?php
-$wb['users_txt'] = 'Users';
+$wb['users_txt'] = 'Usuários';
 $wb['username_txt'] = 'Usuário';
 $wb['username_err'] = 'O nome do usuário é muito longo ou contém caracteres inválidos.';
-$wb['username_empty'] = 'O nome do usuário está em branco.';
+$wb['username_empty'] = 'O nome do usuário está vazio.';
 $wb['username_unique'] = 'Já existe um usuário com este nome.';
 $wb['password_txt'] = 'Senha';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
@@ -19,7 +19,7 @@ $wb['strasse_txt'] = 'Endereço';
 $wb['ort_txt'] = 'Cidade';
 $wb['plz_txt'] = 'CEP';
 $wb['land_txt'] = 'País';
-$wb['email_txt'] = 'e-Mail';
+$wb['email_txt'] = 'eMail';
 $wb['url_txt'] = 'URL';
 $wb['telefon_txt'] = 'Telefone';
 $wb['fax_txt'] = 'Fax';
@@ -30,8 +30,11 @@ $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-$wb['username_error_collision'] = 'O nome de usuário não pode conter a palavra "web" ou "web" seguida de um número."';
+$wb['username_error_collision'] = 'O nome de usuário não pode conter a palavra "web" ou "web" seguida de um número.';
 $wb['client_not_admin_err'] = 'Um usuário que pertence a um cliente não pode ser configurado para: admin.';
 $wb['lost_password_function_txt'] = 'Função de senha esquecida disponível';
 $wb['no_user_insert'] = 'Os usuários do Painel de Controle (ISPC) do tipo -user- são adicionados e atualizados automaticamente quando você adiciona um cliente ou revenda.';
-?>
+$wb['startmodule_empty'] = 'O módulo inicial está vazio.';
+$wb['startmodule_regex'] = 'Caracteres inválidos no módulo inicial.';
+$wb['app_theme_empty'] = 'Tema está vazio.';
+$wb['app_theme_regex'] = 'Caracteres inválidos no tema.';
diff --git a/interface/web/admin/lib/lang/br_users_list.lng b/interface/web/admin/lib/lang/br_users_list.lng
index 26910186c5..c1258d0b07 100644
--- a/interface/web/admin/lib/lang/br_users_list.lng
+++ b/interface/web/admin/lib/lang/br_users_list.lng
@@ -5,5 +5,4 @@ $wb['client_id_txt'] = 'ID do usuário';
 $wb['active_txt'] = 'Ativo';
 $wb['groups_txt'] = 'Grupos';
 $wb['add_new_record_txt'] = 'Adicionar novo usuário';
-$wb['warning_txt'] = '<b>ALERTA:</b> Não editar ou alterar qualquer configuração de usuário aqui. Use o módulo de clientes e revendas para isso. Editar ou alterar usuários ou grupos aqui pode causar perda de dados!';
-?>
+$wb['warning_txt'] = '<b>ALERTA:</b> Não editar ou modificar qualquer configuração de usuário aqui. Use o módulo de clientes e revendas para isso. Editar ou modificar usuários ou grupos aqui pode causar perda de dados!';
diff --git a/interface/web/admin/lib/lang/cz.lng b/interface/web/admin/lib/lang/cz.lng
index 957ddffebf..71ed4372d3 100644
--- a/interface/web/admin/lib/lang/cz.lng
+++ b/interface/web/admin/lib/lang/cz.lng
@@ -1,6 +1,6 @@
 <?php
-$wb['1001'] = 'Uživatelské jméno nebo heslo je prázdné.';
-$wb['1002'] = 'Uživatelské jméno nebo heslo je nesprávné.';
+$wb['0'] = 'Uživatelské jméno nebo heslo je prázdné.';
+$wb['1'] = 'Uživatelské jméno nebo heslo je nesprávné.';
 $wb['Groups'] = 'Skupiny';
 $wb['groups_description'] = 'Úprava skupin systémových uživatelů.';
 $wb['Servers'] = 'Servery';
@@ -20,12 +20,12 @@ $wb['Server Services'] = 'Služby serveru';
 $wb['Services'] = 'Služby';
 $wb['Server Config'] = 'Konfigurace serveru';
 $wb['Server'] = 'Server';
-$wb['Mail'] = 'E-mail';
+$wb['Mail'] = 'Pošta';
 $wb['Getmail'] = 'Getmail';
 $wb['Web'] = 'Web';
 $wb['FastCGI'] = 'FastCGI';
 $wb['Jailkit'] = 'Jailkit';
-$wb['Rescue'] = 'Zachrána';
+$wb['Rescue'] = 'Monitorování služeb ';
 $wb['Server IP addresses'] = 'IP adresy serveru';
 $wb['Additional PHP Versions'] = 'Další verze PHP';
 $wb['Firewall'] = 'Firewall';
@@ -49,4 +49,5 @@ $wb['Do ISPConfig-Update'] = 'Aktualizovat ISPConfig';
 $wb['Directive Snippets'] = 'Šablony částí prog. kódu';
 $wb['Sites'] = 'Stránky';
 $wb['DNS'] = 'DNS';
-?>
+$wb['2'] = 'Uživatelské jméno nebo heslo je prázdné.';
+$wb['3'] = 'Uživatelské jméno nebo heslo je nesprávné.';
diff --git a/interface/web/admin/lib/lang/cz_directive_snippets.lng b/interface/web/admin/lib/lang/cz_directive_snippets.lng
index 48a3280cd1..1f008dc93a 100644
--- a/interface/web/admin/lib/lang/cz_directive_snippets.lng
+++ b/interface/web/admin/lib/lang/cz_directive_snippets.lng
@@ -8,8 +8,8 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.';
 $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.';
 $wb['variables_txt'] = 'Proměnné';
 $wb['customer_viewable_txt'] = 'Dostupná volba pro klienta';
-$wb['required_php_snippets_txt'] = 'Required PHP Snippet';
+$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet';
 $wb['update_sites_txt'] = 'Update sites using this snippet';
 $wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.';
 $wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.';
-$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.';
\ No newline at end of file
+$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.';
diff --git a/interface/web/admin/lib/lang/cz_directive_snippets_list.lng b/interface/web/admin/lib/lang/cz_directive_snippets_list.lng
index a4a365c0a8..8059270ab1 100644
--- a/interface/web/admin/lib/lang/cz_directive_snippets_list.lng
+++ b/interface/web/admin/lib/lang/cz_directive_snippets_list.lng
@@ -5,4 +5,3 @@ $wb['name_txt'] = 'Název části prog. kódu';
 $wb['type_txt'] = 'Verze';
 $wb['add_new_record_txt'] = 'Add Directive Snippet';
 $wb['customer_viewable_txt'] = 'Dostupná volba pro klienta';
-?>
diff --git a/interface/web/admin/lib/lang/cz_firewall.lng b/interface/web/admin/lib/lang/cz_firewall.lng
index c6146ae93d..a75b9ed594 100644
--- a/interface/web/admin/lib/lang/cz_firewall.lng
+++ b/interface/web/admin/lib/lang/cz_firewall.lng
@@ -8,4 +8,3 @@ $wb['active_txt'] = 'Aktivní';
 $wb['firewall_error_unique'] = 'Pro tento server již existuje záznam firewallu.';
 $wb['tcp_ports_error_regex'] = 'Znak není povole v definici TCP portu. Povolené symboly jsou čísla, : a ,.';
 $wb['udp_ports_error_regex'] = 'Znak není povole v definici UDP portu. Povolené symboly jsou čísla, : a ,.';
-?>
diff --git a/interface/web/admin/lib/lang/cz_firewall_list.lng b/interface/web/admin/lib/lang/cz_firewall_list.lng
index c350ddc418..7ae9ac4725 100644
--- a/interface/web/admin/lib/lang/cz_firewall_list.lng
+++ b/interface/web/admin/lib/lang/cz_firewall_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['tcp_port_txt'] = 'Otevřené TCP porty';
 $wb['udp_port_txt'] = 'Otevřené UDP porty';
 $wb['add_new_record_txt'] = 'Vytvořit záznam';
-?>
diff --git a/interface/web/admin/lib/lang/cz_groups.lng b/interface/web/admin/lib/lang/cz_groups.lng
index a6281be247..0dce6cbd59 100644
--- a/interface/web/admin/lib/lang/cz_groups.lng
+++ b/interface/web/admin/lib/lang/cz_groups.lng
@@ -2,4 +2,3 @@
 $wb['description_txt'] = 'Popis';
 $wb['name_txt'] = 'Skupina';
 $wb['name_err'] = 'Skupina musí mít min. 1, max. 30 znaků.';
-?>
diff --git a/interface/web/admin/lib/lang/cz_groups_list.lng b/interface/web/admin/lib/lang/cz_groups_list.lng
index 967e3ec0f7..8db04d86a0 100644
--- a/interface/web/admin/lib/lang/cz_groups_list.lng
+++ b/interface/web/admin/lib/lang/cz_groups_list.lng
@@ -4,4 +4,3 @@ $wb['description_txt'] = 'Popis';
 $wb['name_txt'] = 'Skupina';
 $wb['add_new_record_txt'] = 'Vytvořit skupinu';
 $wb['warning_txt'] = '<b>VAROVÁNÍ:</b> Zde neupravujte uživatelská nastavení. Použijte klientská a distributorská nastavení v klientském modulu. Úprava uživatelů nebo skupin zde může způsobit ztrátu dat!';
-?>
diff --git a/interface/web/admin/lib/lang/cz_iptables.lng b/interface/web/admin/lib/lang/cz_iptables.lng
index a40fc0490f..45bda7499a 100644
--- a/interface/web/admin/lib/lang/cz_iptables.lng
+++ b/interface/web/admin/lib/lang/cz_iptables.lng
@@ -10,4 +10,3 @@ $wb['destination_ip_txt'] = 'Cílové adresy';
 $wb['source_ip_txt'] = 'Zdrojové adresy';
 $wb['active_txt'] = 'Aktivní';
 $wb['iptables_error_unique'] = 'Stejný záznam pro firewall je již na tomto serveru použit.';
-?>
diff --git a/interface/web/admin/lib/lang/cz_iptables_list.lng b/interface/web/admin/lib/lang/cz_iptables_list.lng
index 65cef7507e..bfac4c29fa 100644
--- a/interface/web/admin/lib/lang/cz_iptables_list.lng
+++ b/interface/web/admin/lib/lang/cz_iptables_list.lng
@@ -12,4 +12,3 @@ $wb['destination_ip_txt'] = 'Cílové adresy';
 $wb['source_ip_txt'] = 'Zdrojové adresy';
 $wb['active_txt'] = 'Aktivní';
 $wb['iptables_error_unique'] = 'Stejný záznam pro firewall je již na tomto serveru použit.';
-?>
diff --git a/interface/web/admin/lib/lang/cz_language_add.lng b/interface/web/admin/lib/lang/cz_language_add.lng
index e0d381051f..1873038ef2 100644
--- a/interface/web/admin/lib/lang/cz_language_add.lng
+++ b/interface/web/admin/lib/lang/cz_language_add.lng
@@ -2,7 +2,6 @@
 $wb['list_head_txt'] = 'Vytvořit nový jazyk';
 $wb['language_select_txt'] = 'Vybrat jazykový základ';
 $wb['language_new_txt'] = 'Název nového jazyka';
-$wb['language_new_hint_txt'] = '2 znakové ISO 639-1 jazykové kódy (Viz: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)';
+$wb['language_new_hint_txt'] = '2 znakové ISO 639-1 jazykové kódy (Viz: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)';
 $wb['btn_save_txt'] = 'Vytvořit novou jazykovou sadu souborů';
 $wb['btn_cancel_txt'] = 'Zrušit';
-?>
diff --git a/interface/web/admin/lib/lang/cz_language_complete.lng b/interface/web/admin/lib/lang/cz_language_complete.lng
index e63b3301f2..1b4ad4fd73 100644
--- a/interface/web/admin/lib/lang/cz_language_complete.lng
+++ b/interface/web/admin/lib/lang/cz_language_complete.lng
@@ -4,4 +4,3 @@ $wb['list_desc_txt'] = 'Sloučit vybraný jazykový soubor s hlavním anglickým
 $wb['language_select_txt'] = 'Vybrat jazyk k doplnění';
 $wb['btn_save_txt'] = 'Sloučit / doplnit jazykový soubor';
 $wb['btn_cancel_txt'] = 'Zrušit';
-?>
diff --git a/interface/web/admin/lib/lang/cz_language_edit.lng b/interface/web/admin/lib/lang/cz_language_edit.lng
index 3efa7e3037..0bb3938cd9 100644
--- a/interface/web/admin/lib/lang/cz_language_edit.lng
+++ b/interface/web/admin/lib/lang/cz_language_edit.lng
@@ -5,4 +5,3 @@ $wb['module_txt'] = 'Modul';
 $wb['lang_file_txt'] = 'Jazykový soubor';
 $wb['btn_save_txt'] = 'Uložit';
 $wb['btn_cancel_txt'] = 'Zrušit';
-?>
diff --git a/interface/web/admin/lib/lang/cz_language_export.lng b/interface/web/admin/lib/lang/cz_language_export.lng
index e02f861738..8d0654c3f7 100644
--- a/interface/web/admin/lib/lang/cz_language_export.lng
+++ b/interface/web/admin/lib/lang/cz_language_export.lng
@@ -3,4 +3,3 @@ $wb['list_head_txt'] = 'Exportovat jazykové soubory';
 $wb['language_select_txt'] = 'Vybrat jazykovou sadu';
 $wb['btn_save_txt'] = 'Uložit vybranou jazykovou sadu do souboru';
 $wb['btn_cancel_txt'] = 'Zrušit';
-?>
diff --git a/interface/web/admin/lib/lang/cz_language_import.lng b/interface/web/admin/lib/lang/cz_language_import.lng
index 5dc4ccac38..e68efb5c57 100644
--- a/interface/web/admin/lib/lang/cz_language_import.lng
+++ b/interface/web/admin/lib/lang/cz_language_import.lng
@@ -6,4 +6,3 @@ $wb['language_overwrite_txt'] = 'Přepsat soubor, pokud existuje.';
 $wb['btn_cancel_txt'] = 'Zrušit';
 $wb['ignore_version_txt'] = 'Přeskočit kontrolu verze ISPConfigu.';
 $wb['list_desc_txt'] = 'VAROVÁNÍ: Nepoužívejte import souborů jazyku z nedůvěryhodných zdrojů.';
-?>
diff --git a/interface/web/admin/lib/lang/cz_language_list.lng b/interface/web/admin/lib/lang/cz_language_list.lng
index b2a7863715..1612b8682a 100644
--- a/interface/web/admin/lib/lang/cz_language_list.lng
+++ b/interface/web/admin/lib/lang/cz_language_list.lng
@@ -4,4 +4,3 @@ $wb['language_select_txt'] = 'Vybrat jazyk';
 $wb['module_txt'] = 'Modul';
 $wb['lang_file_txt'] = 'Jazykový soubor';
 $wb['lang_file_date_txt'] = 'Poslední úprava';
-?>
diff --git a/interface/web/admin/lib/lang/cz_package_install.lng b/interface/web/admin/lib/lang/cz_package_install.lng
index 2bdc9df315..72379faca0 100644
--- a/interface/web/admin/lib/lang/cz_package_install.lng
+++ b/interface/web/admin/lib/lang/cz_package_install.lng
@@ -4,4 +4,3 @@ $wb['repo_url_txt'] = 'URL';
 $wb['repo_username_txt'] = 'Uživatel (volitelné)';
 $wb['repo_password_txt'] = 'Heslo (volitelné)';
 $wb['active_txt'] = 'Aktivní';
-?>
diff --git a/interface/web/admin/lib/lang/cz_remote_action.lng b/interface/web/admin/lib/lang/cz_remote_action.lng
index aa3316aa46..c361f6d664 100644
--- a/interface/web/admin/lib/lang/cz_remote_action.lng
+++ b/interface/web/admin/lib/lang/cz_remote_action.lng
@@ -2,11 +2,10 @@
 $wb['select_server_txt'] = 'Zvolit server';
 $wb['btn_do_txt'] = 'Provést akci';
 $wb['do_osupdate_caption'] = 'Aktualizace operačního systému na vzdáleném serveru.';
-$wb['do_osupdate_desc'] = 'Tato akce provede \\"aptitude -y\\" aktualizaci na vybraném serveru.<br><br><strong>POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !</strong>';
+$wb['do_osupdate_desc'] = 'Tato akce provede \"aptitude -y\" aktualizaci na vybraném serveru.<br><br><strong>POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !</strong>';
 $wb['do_ispcupdate_caption'] = 'Provedení ISPConfig 3 - aktualizace na vzdáleném serveru';
-$wb['do_ispcupdate_desc'] = 'Tato akce provede \\"ISPConfig 3\\" aktualizaci na vašem vybraném serveru.<br><br><strong>POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !</strong>';
+$wb['do_ispcupdate_desc'] = 'Tato akce provede \"ISPConfig 3\" aktualizaci na vašem vybraném serveru.<br><br><strong>POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !</strong>';
 $wb['action_scheduled'] = 'Akce je naplánována na provedení';
 $wb['select_all_server'] = 'Všechny servery';
 $wb['ispconfig_update_title'] = 'ISPConfig pokyny k aktualizaci';
-$wb['ispconfig_update_text'] = 'Přihlaste se jako uživatel root na terminal (shell) serveru a proveďte příkaz<br /><br /> <strong>ispconfig_update.sh</strong><br /><br />spustí se ISPConfig aktualizace.<br /><br /><a href=https://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-update-ispconfig-3/ target=_blank>Klikněte zde pro podrobnější informace o provedení aktualizace</a>';
-?>
+$wb['ispconfig_update_text'] = 'Přihlaste se jako uživatel root na terminal (shell) serveru a proveďte příkaz<br /><br /> <strong>ispconfig_update.sh</strong><br /><br />spustí se ISPConfig aktualizace.<br /><br /><a href=http://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-update-ispconfig-3/ target=_blank>Klikněte zde pro podrobnější informace o provedení aktualizace</a>';
diff --git a/interface/web/admin/lib/lang/cz_remote_user.lng b/interface/web/admin/lib/lang/cz_remote_user.lng
index 4ea38e6aaa..81ee225383 100644
--- a/interface/web/admin/lib/lang/cz_remote_user.lng
+++ b/interface/web/admin/lib/lang/cz_remote_user.lng
@@ -1,5 +1,5 @@
 <?php
-$wb['remote_user_txt'] = 'Remote User';
+$wb['remote_user_txt'] = 'Vzdálený uživatel';
 $wb['username_txt'] = 'Uživatelské jméno:';
 $wb['password_txt'] = 'Heslo:';
 $wb['function_txt'] = 'Funkce:';
@@ -35,7 +35,7 @@ $wb['DNS alias functions'] = 'Funkce DNS ALIAS';
 $wb['DNS cname functions'] = 'Funkce DNS CNAME';
 $wb['DNS hinfo functions'] = 'Funkce DNS HINFO';
 $wb['DNS mx functions'] = 'Funkce DNS MX';
-$wb['DNS naptr functions'] = 'Funkce DNS NAPTR';
+$wb['DNS naptr functions'] = 'DNS naptr functions';
 $wb['DNS ns functions'] = 'Funkce DNS NS';
 $wb['DNS ptr functions'] = 'Funkce DNS PTR';
 $wb['DNS rp functions'] = 'Funkce DNS RP';
@@ -49,4 +49,3 @@ $wb['password_match_txt'] = 'Hesla se shodují.';
 $wb['remote_access_txt'] = 'Remote Access';
 $wb['remote_ips_txt'] = 'Remote Access IPs / Hostnames (separate by , and leave blank for <i>any</i>)';
 $wb['remote_user_error_ips'] = 'At least one of the entered ip addresses or hostnames is invalid.';
-?>
diff --git a/interface/web/admin/lib/lang/cz_remote_user_list.lng b/interface/web/admin/lib/lang/cz_remote_user_list.lng
index 3f4a008f39..a462d0fb5e 100644
--- a/interface/web/admin/lib/lang/cz_remote_user_list.lng
+++ b/interface/web/admin/lib/lang/cz_remote_user_list.lng
@@ -4,4 +4,3 @@ $wb['list_desc_txt'] = '';
 $wb['add_new_record_txt'] = 'Vytvořit uživatele';
 $wb['parent_remote_userid_txt'] = 'ID';
 $wb['username_txt'] = 'Uživatel';
-?>
diff --git a/interface/web/admin/lib/lang/cz_server.lng b/interface/web/admin/lib/lang/cz_server.lng
index 8b86caf76b..e213853198 100644
--- a/interface/web/admin/lib/lang/cz_server.lng
+++ b/interface/web/admin/lib/lang/cz_server.lng
@@ -1,8 +1,8 @@
 <?php
 $wb['config_txt'] = 'Konfigurace';
 $wb['server_name_txt'] = 'Název serveru';
-$wb['mail_server_txt'] = 'Mail server';
-$wb['web_server_txt'] = 'Web server';
+$wb['mail_server_txt'] = 'Poštovní server';
+$wb['web_server_txt'] = 'Webový Server';
 $wb['dns_server_txt'] = 'DNS server';
 $wb['file_server_txt'] = 'Souborový server';
 $wb['db_server_txt'] = 'DB server';
@@ -13,4 +13,3 @@ $wb['- None -'] = '- Žádný -';
 $wb['proxy_server_txt'] = 'Proxy-Server';
 $wb['firewall_server_txt'] = 'Firewall-Server';
 $wb['xmpp_server_txt'] = 'XMPP Server';
-?>
diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng
index ea8d6dd731..633db75fbd 100644
--- a/interface/web/admin/lib/lang/cz_server_config.lng
+++ b/interface/web/admin/lib/lang/cz_server_config.lng
@@ -1,6 +1,6 @@
 <?php
 $wb['server_config'] = 'Server Config';
-$wb['config_for_txt'] = 'Configuration for';
+$wb['config_for_txt'] = 'Konfigurace pro';
 $wb['server_config_error_not_updated'] = 'Error in Server Config: not updated';
 $wb['server_config_error_section_not_updated'] = 'Error in Server Config: %s section not updated';
 $wb['jailkit_chroot_home_txt'] = 'Jailkit chroot adresář';
@@ -13,9 +13,9 @@ $wb['website_symlinks_rel_txt'] = 'Make relative symlinks';
 $wb['website_basedir_txt'] = 'Website config adresář';
 $wb['vhost_conf_dir_txt'] = 'Vhost config adresář';
 $wb['vhost_conf_enabled_dir_txt'] = 'Vhost config enabled adresář';
-$wb['apache_init_script_txt'] = 'Inicializační skript Apache';
-$wb['apache_init_script_note_txt'] = 'Ponecháte-li toto prázdné, automaticky detekuje iniciační skript Apache';
-$wb['apache_init_script_error_regex'] = 'Neplatný iniciační skript Apache.';
+$wb['apache_init_script_txt'] = 'Apache init script';
+$wb['apache_init_script_note_txt'] = 'Leaving this empty will auto-detect the Apache init script';
+$wb['apache_init_script_error_regex'] = 'Invalid Apache init script.';
 $wb['getmail_config_dir_txt'] = 'Getmail složka pro konfigurace';
 $wb['fastcgi_starter_path_txt'] = 'FastCGI starter cesta';
 $wb['fastcgi_starter_script_txt'] = 'FastCGI starter skript';
@@ -25,7 +25,7 @@ $wb['fastcgi_children_txt'] = 'FastCGI děti';
 $wb['fastcgi_max_requests_txt'] = 'FastCGI max. požadavků';
 $wb['fastcgi_bin_txt'] = 'FastCGI cesta k binarnímu balíčku';
 $wb['module_txt'] = 'Modul';
-$wb['maildir_path_txt'] = 'Cesta k mail adresáři';
+$wb['maildir_path_txt'] = 'Cesta k e-mail adresáři';
 $wb['homedir_path_txt'] = 'Cesta k domácímu adresáři';
 $wb['mailuser_uid_txt'] = 'E-mail uživatel UID';
 $wb['mailuser_gid_txt'] = 'E-mail uživatel GID';
@@ -150,7 +150,7 @@ $wb['php_fpm_socket_dir_error_empty'] = 'PHP-FPM adresář pro socket je prázdn
 $wb['try_rescue_txt'] = 'Povolit monitorování služeb a restartovat při selhání';
 $wb['do_not_try_rescue_mysql_txt'] = 'Zakázat MySQL monitorování';
 $wb['do_not_try_rescue_mail_txt'] = 'Zakázat E-mail monitorování';
-$wb['rescue_description_txt'] = '<b>Informace:</b> Pokud chcete např. vypnout MySQL službu zatrhněte políčko \\"Zakázat MySQL monitorování\\" změna se provede do 2-3 minut.<br>Pokud nepočkáte 2-3 minuty, monitorování nastartuje službu MySQL automaticky znovu !';
+$wb['rescue_description_txt'] = '<b>Informace:</b> Pokud chcete např. vypnout MySQL službu zatrhněte políčko \"Zakázat MySQL monitorování\" změna se provede do 2-3 minut.<br>Pokud nepočkáte 2-3 minuty, monitorování nastartuje službu MySQL automaticky znovu !';
 $wb['enable_sni_txt'] = 'Aktivovat SNI (Server Name Indication)';
 $wb['do_not_try_rescue_httpd_txt'] = 'Zakázat HTTPD monitorování';
 $wb['set_folder_permissions_on_update_txt'] = 'Nastavení oprávnění složky při aktualizaci';
@@ -196,7 +196,7 @@ $wb['munin_user_txt'] = 'Munin uživatel';
 $wb['munin_password_txt'] = 'Munin heslo';
 $wb['munin_url_error_regex'] = 'Invalid Munin URL';
 $wb['munin_url_note_txt'] = 'Zástupný symbol';
-$wb['backup_dir_is_mount_txt'] = 'Připojit adresář pro zálohy ?';
+$wb['backup_dir_is_mount_txt'] = 'Připojit adresář pro zálohy';
 $wb['monitor_system_updates_txt'] = 'Kontrolovat aktualizace Linuxu';
 $wb['invalid_apache_user_txt'] = 'Invalid apache user.';
 $wb['invalid_apache_group_txt'] = 'Invalid apache group.';
@@ -257,13 +257,13 @@ $wb['mailbox_virtual_uidgid_maps_info_txt'] = 'only in single web and mail-serve
 $wb['mailbox_virtual_uidgid_maps_error_nosingleserver'] = 'Uid cannot be mapped in multi-server-setup.';
 $wb['mailbox_virtual_uidgid_maps_error_nodovecot'] = 'Uid-mapping can only be used with dovecot.';
 $wb['mailbox_virtual_uidgid_maps_error_alreadyusers'] = 'Uid-mapping cannot be changed if there are already mail users.';
-$wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch';
-$wb['reject_unknown_txt'] = 'Reject unknown hostnames';
-$wb['tooltip_reject_unknown_txt'] = 'Requires hostnames to pass DNS checks.  Not checked for authenticated users.';
-$wb['reject_unknown_helo_txt'] = 'Reject unknown helo hostnames';
-$wb['reject_unknown_client_txt'] = 'Reject unknown client hostnames';
+$wb['reject_sender_login_mismatch_txt'] = 'Odmítnout při nesouladu odesílatele s jeho přihlášením';
+$wb['reject_unknown_txt'] = 'Odmítat hostitele s neznámým jménem';
+$wb['tooltip_reject_unknown_txt'] = 'Vyžaduje jména hostitelů již zadaných v DNS pro úspěšnou zpětnou kontrolu v DNS. Kontrola se neprovádí u ověřených uživatelů.';
+$wb['reject_unknown_helo_txt'] = 'reject_unknown_helo_hostname - Odmítne požadavek, pokud název hostitele HELO nebo EHLO nemá žádný záznam DNS A nebo MX.';
+$wb['reject_unknown_client_txt'] = 'reject_unknown_client_hostname - Odmítne požadavek, když 1) IP adresa klienta->nelze přeložit na DNS jmeno, nebo 2) DNS jmeno->nelze přeložit na IP adresu, nebo 3) DNS jmeno->překlad DNS adresy neodpovídá IP adrese klienta.';
 $wb['reject_unknown_client_helo_txt'] = 'Reject unknown helo and client hostnames';
-$wb['do_not_try_rescue_mongodb_txt'] = 'Zakázat  MongoDB monitorování';
+$wb['do_not_try_rescue_mongodb_txt'] = 'Zakázat MongoDB monitorování';
 $wb['v6_prefix_txt'] = 'IPv6 Prefix';
 $wb['vhost_rewrite_v6_txt'] = 'Rewrite IPv6 on Mirror';
 $wb['v6_prefix_length'] = 'Prefix too long according to defined IPv6 ';
@@ -278,7 +278,7 @@ $wb['disabled_txt'] = 'Vypnuto';
 $wb['php_ini_check_minutes_txt'] = 'Provádět kontrolu změny obsahu souboru php.ini každých X minut';
 $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['web_settings_txt'] = 'Web Server';
+$wb['web_settings_txt'] = 'Webový Server';
 $wb['xmpp_server_txt'] = 'XMPP Server';
 $wb['xmpp_use_ipv6_txt'] = 'Použít IPv6';
 $wb['xmpp_bosh_max_inactivity_txt'] = 'Max. BOSH inactivity time';
@@ -291,38 +291,38 @@ $wb['xmpp_port_http_txt'] = 'HTTP';
 $wb['xmpp_port_https_txt'] = 'HTTPS';
 $wb['xmpp_port_pastebin_txt'] = 'Pastebin';
 $wb['xmpp_port_bosh_txt'] = 'BOSH';
-$wb['disable_bind_log_txt'] = 'Disable bind9 messages for Loglevel WARN';
+$wb['disable_bind_log_txt'] = 'Zakázat zprávy bind9 pro Loglevel WARN';
 $wb['apps_vhost_enabled_txt'] = 'Apps-vhost enabled';
 $wb['hostname_txt'] = 'Název hostitele';
 $wb['hostname_error_empty'] = 'Název hostitele je prázdný';
 $wb['hostname_error_regex'] = 'Neplatný název hostitele.';
 $wb['backup_time_txt'] = 'Spustit zálohovaní v';
-$wb['skip_le_check_txt'] = 'Skip Lets Encrypt Check';
-$wb['migration_mode_txt'] = 'Server Migration Mode';
+$wb['skip_le_check_txt'] = 'Vynechat Lets Encrypt kontrolu ';
+$wb['migration_mode_txt'] = 'Režim migrace serveru ';
 $wb['nginx_enable_pagespeed_txt'] = 'Makes Pagespeed available';
-$wb['backup_tmp_txt'] = 'Backup tmp directory for zip';
-$wb['tmpdir_path_error_empty'] = 'tmp-dir Path is empty.';
-$wb['tmpdir_path_error_regex'] = 'Invalid tmp-dir path.';
-$wb['logging_txt'] = 'Store website access and error logs';
-$wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.';
-$wb['log_retention_txt'] = 'Log retention (days)';
+$wb['backup_tmp_txt'] = 'Pracovní tmp adresář při vytváření zip záloh';
+$wb['tmpdir_path_error_empty'] = 'Cesta k pracovnímu tmp adresáři je prázdná.';
+$wb['tmpdir_path_error_regex'] = 'Neplatná cesta k pracovnímu tmp adresáři.';
+$wb['logging_txt'] = 'Povolit přístupové a chybové protokoly webových stránek';
+$wb['logging_desc_txt'] = 'Chcete-li uplatnit změny již u stávajících webových stránek, použijte Nástroje > Znovu synchronizovat. U Apache lze přístup a protokol chyb anonymizovat. U nginx je anonymizován pouze protokol přístupu, protokol chyb bude obsahovat IP adresy.';
+$wb['log_retention_txt'] = 'Zachování protokolu (dny)';
 $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0';
-$wb['php_default_hide_txt'] = 'Hide Default PHP-Version in selectbox';
-$wb['php_default_name_txt'] = 'Description Default PHP-Version';
-$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty';
+$wb['php_default_hide_txt'] = 'Skrýt výchozí verzi PHP při volbě výběru verze PHP';
+$wb['php_default_name_txt'] = 'Popis výchozí verze PHP';
+$wb['php_default_name_error_empty'] = 'Popis výchozí verze PHP nesmí být prázdný';
 $wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
 $wb['php_fpm_reload_mode_txt'] = 'PHP-FPM reload mode';
-$wb['content_filter_txt'] = 'Content Filter';
+$wb['content_filter_txt'] = 'Filtr obsahu';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
-$wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_password_txt'] = 'Rspamd heslo';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
 $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template';
 $wb['jailkit_chroot_authorized_keys_template_error_regex'] = 'Invalid jaikit chroot authorized_keys template file.';
-$wb['jailkit_hardlinks_txt'] = 'Hardlinks within Jailkit chroot';
+$wb['jailkit_hardlinks_txt'] = 'Pevné odkazy v rámci Jailkit chroot';
 $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves disk space.';
 $wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
-$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
-$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
+$wb['jailkit_hardlinks_no_txt'] = 'Ne, odstranit soubory s pevným odkazem';
+$wb['jailkit_hardlinks_yes_txt'] = 'Ano, pokud je to možné, použijte pevné odkazy';
diff --git a/interface/web/admin/lib/lang/cz_server_config_list.lng b/interface/web/admin/lib/lang/cz_server_config_list.lng
index 2118c35357..29d42a20ed 100644
--- a/interface/web/admin/lib/lang/cz_server_config_list.lng
+++ b/interface/web/admin/lib/lang/cz_server_config_list.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['list_head_txt'] = 'Konfigurace serveru';
 $wb['server_name_txt'] = 'Server';
-?>
diff --git a/interface/web/admin/lib/lang/cz_server_ip.lng b/interface/web/admin/lib/lang/cz_server_ip.lng
index 3698df5c74..5de51014aa 100644
--- a/interface/web/admin/lib/lang/cz_server_ip.lng
+++ b/interface/web/admin/lib/lang/cz_server_ip.lng
@@ -10,4 +10,3 @@ $wb['client_id_txt'] = 'Klient';
 $wb['ip_type_txt'] = 'Verze';
 $wb['virtualhost_port_txt'] = 'HTTP Porty';
 $wb['error_port_syntax'] = 'Neplatné znaky ve volbě HTTP Portů. Prosím, zadejte pouze číselné hodnoty oddělené čárkami. Příklad: 80,443';
-?>
diff --git a/interface/web/admin/lib/lang/cz_server_ip_list.lng b/interface/web/admin/lib/lang/cz_server_ip_list.lng
index a0c10060b3..076c433fee 100644
--- a/interface/web/admin/lib/lang/cz_server_ip_list.lng
+++ b/interface/web/admin/lib/lang/cz_server_ip_list.lng
@@ -7,4 +7,3 @@ $wb['client_id_txt'] = 'Klient';
 $wb['virtualhost_txt'] = 'HTTP Vhost';
 $wb['virtualhost_port_txt'] = 'HTTP Ports';
 $wb['ip_type_txt'] = 'Verze';
-?>
diff --git a/interface/web/admin/lib/lang/cz_server_ip_map.lng b/interface/web/admin/lib/lang/cz_server_ip_map.lng
index 57c5ba0108..d82d4f9878 100644
--- a/interface/web/admin/lib/lang/cz_server_ip_map.lng
+++ b/interface/web/admin/lib/lang/cz_server_ip_map.lng
@@ -11,4 +11,3 @@ $wb['source_ip_empty'] = 'Zdrojová IP adresa je prázdná.';
 $wb['server_empty_error'] = 'The Server is empty.';
 $wb['duplicate_mapping_error'] = 'Mapování již existuje.';
 $wb['ip_mapping_error'] = 'Source IP can not be an IP of the Rewrite-Server';
-?>
diff --git a/interface/web/admin/lib/lang/cz_server_ip_map_list.lng b/interface/web/admin/lib/lang/cz_server_ip_map_list.lng
index 9997bb477b..1ca4104dc9 100644
--- a/interface/web/admin/lib/lang/cz_server_ip_map_list.lng
+++ b/interface/web/admin/lib/lang/cz_server_ip_map_list.lng
@@ -4,4 +4,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['source_ip_txt'] = 'Zdrojová IP adresa';
 $wb['destination_ip_txt'] = 'Cílová IP adresa';
 $wb['active_txt'] = 'Aktivní';
-?>
diff --git a/interface/web/admin/lib/lang/cz_server_list.lng b/interface/web/admin/lib/lang/cz_server_list.lng
index 8aaea041f4..662b17c1d4 100644
--- a/interface/web/admin/lib/lang/cz_server_list.lng
+++ b/interface/web/admin/lib/lang/cz_server_list.lng
@@ -11,4 +11,3 @@ $wb['add_new_record_txt'] = 'Vytvořit server';
 $wb['proxy_server_txt'] = 'Proxy';
 $wb['firewall_server_txt'] = 'Firewall';
 $wb['xmpp_server_txt'] = 'XMPP';
-?>
diff --git a/interface/web/admin/lib/lang/cz_server_php.lng b/interface/web/admin/lib/lang/cz_server_php.lng
index e326870340..d955c3b633 100644
--- a/interface/web/admin/lib/lang/cz_server_php.lng
+++ b/interface/web/admin/lib/lang/cz_server_php.lng
@@ -14,4 +14,5 @@ $wb['php_fpm_init_script_txt'] = 'Cesta k PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Cesta k php.ini adresáři';
 $wb['php_fpm_pool_dir_txt'] = 'Cesta k PHP-FPM pool adresáři';
 $wb['active_txt'] = 'Aktivní';
-?>
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
diff --git a/interface/web/admin/lib/lang/cz_server_php_list.lng b/interface/web/admin/lib/lang/cz_server_php_list.lng
index 70bb2af8aa..cc7f4ee57e 100644
--- a/interface/web/admin/lib/lang/cz_server_php_list.lng
+++ b/interface/web/admin/lib/lang/cz_server_php_list.lng
@@ -6,4 +6,3 @@ $wb['client_id_txt'] = 'Klient';
 $wb['name_txt'] = 'Verze PHP';
 $wb['active_txt'] = 'Aktivní';
 $wb['usage_txt'] = 'Usage count';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_package.lng b/interface/web/admin/lib/lang/cz_software_package.lng
index faffe38217..d4dc8af0b2 100644
--- a/interface/web/admin/lib/lang/cz_software_package.lng
+++ b/interface/web/admin/lib/lang/cz_software_package.lng
@@ -3,4 +3,3 @@ $wb['package_title_txt'] = 'Package Title';
 $wb['package_key_txt'] = 'Package Key';
 $wb['Software Package'] = 'Software Package';
 $wb['Modify software package details'] = 'Modify software package details';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_package_install.lng b/interface/web/admin/lib/lang/cz_software_package_install.lng
index 0d079ef6d3..74837beaff 100644
--- a/interface/web/admin/lib/lang/cz_software_package_install.lng
+++ b/interface/web/admin/lib/lang/cz_software_package_install.lng
@@ -3,4 +3,3 @@ $wb['head_txt'] = 'Instalace software';
 $wb['install_key_txt'] = 'Enter install key';
 $wb['btn_save_txt'] = 'Spustit instalaci';
 $wb['btn_cancel_txt'] = 'Zrušit';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_package_list.lng b/interface/web/admin/lib/lang/cz_software_package_list.lng
index 6896a9feb4..433cdcffd0 100644
--- a/interface/web/admin/lib/lang/cz_software_package_list.lng
+++ b/interface/web/admin/lib/lang/cz_software_package_list.lng
@@ -10,4 +10,3 @@ $wb['package_id_txt'] = 'místní App-ID';
 $wb['no_packages_txt'] = 'Žádné balíčky nejsou k dispozici';
 $wb['edit_txt'] = 'Upravit';
 $wb['delete_txt'] = 'Smazat';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_repo.lng b/interface/web/admin/lib/lang/cz_software_repo.lng
index bd7bc9d0f2..beca429d9a 100644
--- a/interface/web/admin/lib/lang/cz_software_repo.lng
+++ b/interface/web/admin/lib/lang/cz_software_repo.lng
@@ -5,4 +5,3 @@ $wb['repo_username_txt'] = 'Uživatel (volitelné)';
 $wb['repo_password_txt'] = 'Heslo (volitelné)';
 $wb['active_txt'] = 'Aktivní';
 $wb['Software Repository which may contain addons or updates'] = 'Softwarové zdroje, které mohou obsahovat addony nebo aktualizace';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_repo_list.lng b/interface/web/admin/lib/lang/cz_software_repo_list.lng
index ca04f41dcf..8d434ca336 100644
--- a/interface/web/admin/lib/lang/cz_software_repo_list.lng
+++ b/interface/web/admin/lib/lang/cz_software_repo_list.lng
@@ -3,4 +3,3 @@ $wb['list_head_txt'] = 'Zdroje repozitářů';
 $wb['active_txt'] = 'Aktivní';
 $wb['repo_name_txt'] = 'Název zdroje';
 $wb['repo_url_txt'] = 'URL';
-?>
diff --git a/interface/web/admin/lib/lang/cz_software_update_list.lng b/interface/web/admin/lib/lang/cz_software_update_list.lng
index c48ad8ce30..921db7594d 100644
--- a/interface/web/admin/lib/lang/cz_software_update_list.lng
+++ b/interface/web/admin/lib/lang/cz_software_update_list.lng
@@ -6,4 +6,3 @@ $wb['update_title_txt'] = 'Aktualizovat';
 $wb['version_txt'] = 'Verze';
 $wb['action_txt'] = 'Akce';
 $wb['no_updates_txt'] = 'Žádné aktualizace nejsou k dispozici';
-?>
diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng
index e0bbb2b691..e6d62968f2 100644
--- a/interface/web/admin/lib/lang/cz_system_config.lng
+++ b/interface/web/admin/lib/lang/cz_system_config.lng
@@ -29,7 +29,7 @@ $wb['enable_custom_login_txt'] = 'Povolit vlastní přihlašovací jméno u e-ma
 $wb['mailmailinglist_link_txt'] = 'Ikonový odkaz na aplikaci E-mailových konferencí seznamu e-mailových konferencí';
 $wb['mailmailinglist_url_txt'] = 'E-mailové konference URL';
 $wb['maintenance_mode_txt'] = 'Režim údržby';
-$wb['maintenance_mode_exclude_ips_txt'] = 'Exclude IP\'s from maintenance';
+$wb['maintenance_mode_exclude_ips_txt'] = 'Exclude IP\\'s from maintenance';
 $wb['maintenance_mode_exclude_ips_error_isip'] = 'One or more invalid IP addresses in maintenance mode exclude list. Must be a list of comma-separated IPv4 and/or IPv6 addresses.';
 $wb['smtp_enabled_txt'] = 'Použít (zvolit) SMTP server pro zasílání systémových mailů';
 $wb['smtp_host_txt'] = 'SMTP host';
@@ -47,10 +47,10 @@ $wb['phpmyadmin_url_error_regex'] = 'phpmyadmin neplatné URL';
 $wb['use_combobox_txt'] = 'Použití jQuery UI Combobox';
 $wb['use_loadindicator_txt'] = 'Použití indikátoru zatížení';
 $wb['f5_to_reload_js_txt'] = 'Pokud vypnete tuto volbu, zřejmě budete muset používat klávesu F5, aby internetový prohlížeč znovu načetl JavaScript knihovny nebo budete muset ručně vyprázdňovat mezipaměť (cache) vašeho internetového prohlížeče.';
-$wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
-$wb['mailbox_show_autoresponder_tab_txt'] = 'Ukázat kartu automatická odpověď v podrobnostech u e-mailové schránky';
-$wb['mailbox_show_mail_filter_tab_txt'] = 'Ukázat kartu e-mailové filtry v podrobnostech u e-mailové schránky';
-$wb['mailbox_show_custom_rules_tab_txt'] = 'Ukázat kartu vlastní pravidla v podrobnostech u e-mailové schránky';
+$wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \\'web\\'.';
+$wb['mailbox_show_autoresponder_tab_txt'] = 'Ukázat kartu automatická odpověď v podrobnostech u poštovní schránky';
+$wb['mailbox_show_mail_filter_tab_txt'] = 'Ukázat kartu poštovní filtry v podrobnostech u poštovní schránky';
+$wb['mailbox_show_custom_rules_tab_txt'] = 'Ukázat kartu vlastní pravidla v podrobnostech u poštovní schránky';
 $wb['webmail_url_error_regex'] = 'Neplatný webmail URL';
 $wb['phpmyadmin_url_note_txt'] = 'Zástupný symbol';
 $wb['webmail_url_note_txt'] = 'Zástupný symbol';
@@ -72,7 +72,7 @@ $wb['min_password_length_txt'] = 'Minimální délka hesla';
 $wb['min_password_strength_txt'] = 'Minimální síla hesla';
 $wb['ssh_authentication_txt'] = 'Allowed SSH authentication';
 $wb['ssh_authentication_password_key'] = 'Password & Key';
-$wb['ssh_authentication_password'] = 'Password';
+$wb['ssh_authentication_password'] = 'Heslo';
 $wb['ssh_authentication_key'] = 'Key';
 $wb['vhost_aliasdomains_txt'] = 'Create aliasdomains as web site';
 $wb['vhost_aliasdomains_note_txt'] = 'You cannot disable this as long as vhost aliasdomains exist in the system!';
@@ -103,4 +103,4 @@ $wb['show_support_messages_txt'] = 'Show message function in help module';
 $wb['show_aps_menu_txt'] = 'Show APS menu';
 $wb['show_aps_menu_note_txt'] = 'APS will be removed from the panel in the near future.';
 $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.';
-?>
+$wb['monitor_key_txt'] = 'Monitor keyword';
diff --git a/interface/web/admin/lib/lang/cz_tpl_default_admin.lng b/interface/web/admin/lib/lang/cz_tpl_default_admin.lng
index 480d504421..9ba5257374 100644
--- a/interface/web/admin/lib/lang/cz_tpl_default_admin.lng
+++ b/interface/web/admin/lib/lang/cz_tpl_default_admin.lng
@@ -15,4 +15,3 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Cesta k php.ini adresáři';
 $wb['php_fpm_init_script_txt'] = 'Cesta k PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Cesta k php.ini adresáři';
 $wb['php_fpm_pool_dir_txt'] = 'Cesta k PHP-FPM pool adresáři';
-?>
diff --git a/interface/web/admin/lib/lang/cz_users.lng b/interface/web/admin/lib/lang/cz_users.lng
index 00eefa1d5c..c973ea2f80 100644
--- a/interface/web/admin/lib/lang/cz_users.lng
+++ b/interface/web/admin/lib/lang/cz_users.lng
@@ -4,7 +4,7 @@ $wb['username_txt'] = 'Uživatelské jméno';
 $wb['username_err'] = 'Uživatelské jméno je příliš dlouhé nebo obsahuje neplatné znaky.';
 $wb['username_empty'] = 'Uživatelské jméno je prázdné.';
 $wb['username_unique'] = 'Toto uživatelské jméno již existuje.';
-$wb['password_txt'] = 'Heslo';
+$wb['password_txt'] = 'Password';
 $wb['password_strength_txt'] = 'Bezpečnost hesla';
 $wb['modules_txt'] = 'Modul';
 $wb['startmodule_txt'] = 'Výchozí modul';
@@ -34,4 +34,7 @@ $wb['username_error_collision'] = 'Uživatelské jméno nesmí být web nebo web
 $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
 $wb['lost_password_function_txt'] = 'Forgot password function is available';
 $wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
-?>
+$wb['startmodule_empty'] = 'Startmodule empty.';
+$wb['startmodule_regex'] = 'Invalid chars in Startmodule.';
+$wb['app_theme_empty'] = 'App theme empty.';
+$wb['app_theme_regex'] = 'Invalid chars in App theme.';
diff --git a/interface/web/admin/lib/lang/cz_users_list.lng b/interface/web/admin/lib/lang/cz_users_list.lng
index 5f2b9d6880..7ff861b928 100644
--- a/interface/web/admin/lib/lang/cz_users_list.lng
+++ b/interface/web/admin/lib/lang/cz_users_list.lng
@@ -6,4 +6,3 @@ $wb['active_txt'] = 'Aktivní';
 $wb['add_new_record_txt'] = 'Vytvořit uživatele';
 $wb['warning_txt'] = '<b>VAROVÁNÍ:</b> Zde neupravujte uživatelská nastavení. Použijte klientská a distributorská nastavení v klientském modulu. Úprava uživatelů nebo skupin zde může způsobit ztrátu dat!';
 $wb['groups_txt'] = 'Skupiny';
-?>
diff --git a/interface/web/client/lib/lang/br.lng b/interface/web/client/lib/lang/br.lng
index b65fba3044..ebc3055eaa 100644
--- a/interface/web/client/lib/lang/br.lng
+++ b/interface/web/client/lib/lang/br.lng
@@ -14,17 +14,16 @@ $wb['error_has_clients'] = 'Esta revenda possui clientes associados. Certifique-
 $wb['add_additional_template_txt'] = 'Adicionar gabarito personalizado';
 $wb['delete_additional_template_txt'] = 'Remover gabarito personalizado';
 $wb['Messaging'] = 'Mensagens';
-$wb['Send email'] = 'Enviar e-mail';
+$wb['Send email'] = 'Enviar email';
 $wb['Edit Client Circle'] = 'Editar círculo de clientes';
 $wb['Domains'] = 'Domínios';
-$wb['Add Domain'] = 'Add Domain';
+$wb['Add Domain'] = 'Adicionar domínio';
 $wb['domain_txt'] = 'Domínio';
 $wb['client_txt'] = 'Cliente';
-$wb['error_domain_in dnsuse'] = 'Este domínio não pode ser removido pois é utilizado em uma zona dns.';
-$wb['error_domain_in dnsslaveuse'] = 'Este domínio não pode ser removido pois é utilizado em uma zona dns secundária.';
-$wb['error_domain_in mailuse'] = 'Este domínio não pode ser removido pois é utilizado como um domínio de e-mail.';
+$wb['error_domain_in dnsuse'] = 'Este domínio não pode ser removido pois é utilizado em uma zona DNS.';
+$wb['error_domain_in dnsslaveuse'] = 'Este domínio não pode ser removido pois é utilizado em uma zona DNS secundária.';
+$wb['error_domain_in mailuse'] = 'Este domínio não pode ser removido pois é utilizado como um domínio de email.';
 $wb['error_domain_in webuse'] = 'Este domínio não pode ser removido pois é utilizado como um domínio de site.';
 $wb['error_client_can_not_add_domain'] = 'Você não tem permissão para adicionar novos domínios.';
 $wb['error_client_group_id_empty'] = 'Você deve selecionar um cliente.';
-$wb['Email-Templates'] = 'Gabaritos de e-mail';
-?>
+$wb['Email-Templates'] = 'Gabaritos de email';
diff --git a/interface/web/client/lib/lang/br_client.lng b/interface/web/client/lib/lang/br_client.lng
index 46ad85698b..81b9872248 100644
--- a/interface/web/client/lib/lang/br_client.lng
+++ b/interface/web/client/lib/lang/br_client.lng
@@ -1,19 +1,19 @@
 <?php
-$wb['limit_maildomain_txt'] = 'Limite de domínios de e-mail';
-$wb['limit_mailmailinglist_txt'] = 'Limite de listas de e-mail';
-$wb['limit_mailbox_txt'] = 'Limite de contas de e-mail';
-$wb['limit_mailalias_txt'] = 'Limite de alias de e-mail';
+$wb['limit_maildomain_txt'] = 'Limite de domínios de email';
+$wb['limit_mailmailinglist_txt'] = 'Limite de listas de email';
+$wb['limit_mailbox_txt'] = 'Limite de contas de email';
+$wb['limit_mailalias_txt'] = 'Limite de alias de email';
 $wb['limit_mailaliasdomain_txt'] = 'Limite de alias de domínios';
-$wb['limit_mailforward_txt'] = 'Limite de encaminhamentos de e-mail';
-$wb['limit_mailcatchall_txt'] = 'Limite de contas cata-tudo';
-$wb['limit_mailrouting_txt'] = 'Limite de rotas de e-mail';
-$wb['limit_mailfilter_txt'] = 'Limite de filtros de e-mail';
+$wb['limit_mailforward_txt'] = 'Limite de encaminhamentos de email';
+$wb['limit_mailcatchall_txt'] = 'Limite de contas cata tudo';
+$wb['limit_mailrouting_txt'] = 'Limite de rotas de email';
+$wb['limit_mailfilter_txt'] = 'Limite de filtros de email';
 $wb['limit_fetchmail_txt'] = 'Limite de contas de busca';
-$wb['limit_mailquota_txt'] = 'Cota da conta de e-mail';
-$wb['limit_spamfilter_wblist_txt'] = 'Limite de filtros anti-spam "lista branca/negra"';
-$wb['limit_spamfilter_user_txt'] = 'Limite de filtros anti-spam por conta de e-mail';
+$wb['limit_mailquota_txt'] = 'Cota da conta de email';
+$wb['limit_spamfilter_wblist_txt'] = 'Limite de filtros anti-spam "lista de permissões/bloqueio"';
+$wb['limit_spamfilter_user_txt'] = 'Limite de filtros anti-spam por conta de email';
 $wb['limit_spamfilter_policy_txt'] = 'Limite de políticas anti-spam';
-$wb['default_mailserver_txt'] = 'Servidor de e-mail padrão';
+$wb['default_mailserver_txt'] = 'Servidor de email padrão';
 $wb['company_name_txt'] = 'Empresa';
 $wb['contact_firstname_txt'] = 'Nome do contato';
 $wb['contact_name_txt'] = 'Contato';
@@ -31,7 +31,7 @@ $wb['country_txt'] = 'País';
 $wb['telephone_txt'] = 'Telefone';
 $wb['mobile_txt'] = 'Celular';
 $wb['fax_txt'] = 'Fax';
-$wb['email_txt'] = 'e-Mail';
+$wb['email_txt'] = 'eMail';
 $wb['internet_txt'] = 'Internet';
 $wb['icq_txt'] = 'Redes sociais';
 $wb['notes_txt'] = 'Notas';
@@ -42,63 +42,63 @@ $wb['surname_txt'] = 'Sobrenome';
 $wb['limit_domain_txt'] = 'Limite de domínios';
 $wb['limit_subdomain_txt'] = 'Limite de subdomínios';
 $wb['limit_webquota_txt'] = 'Limite da cota de sites';
-$wb['limit_database_txt'] = 'Limite de banco de dados';
-$wb['limit_cron_txt'] = 'Limite de tarefas no cron';
-$wb['limit_cron_type_txt'] = 'Limite de tipos de tarefa no cron (chroot e url implícitas)';
+$wb['limit_database_txt'] = 'Limite do Banco de Dados';
+$wb['limit_cron_txt'] = 'Limite de tarefas no Cron';
+$wb['limit_cron_type_txt'] = 'Limite de tipos de tarefa no Cron (chroot e url implícitas)';
 $wb['limit_cron_frequency_txt'] = 'Tempo de espera entre as execuções';
 $wb['ip_address_txt'] = 'Endereço IP';
 $wb['limit_client_error_notint'] = 'Limite de clientes deve ser um número.';
-$wb['firstname_error_empty'] = 'Nome está em branco.';
-$wb['contact_error_empty'] = 'Contato está em branco.';
+$wb['firstname_error_empty'] = 'Nome está vazio.';
+$wb['contact_error_empty'] = 'Contato está vazio.';
 $wb['default_webserver_txt'] = 'Servidor web padrão';
 $wb['limit_web_domain_txt'] = 'Limite de domínios de site';
 $wb['limit_web_aliasdomain_txt'] = 'Limite de alias de domínios de site';
 $wb['limit_web_subdomain_txt'] = 'Limite de subdomínios de site';
-$wb['limit_ftp_user_txt'] = 'Limite de usuários ftp';
-$wb['default_dnsserver_txt'] = 'Servidor dns padrão';
-$wb['limit_dns_zone_txt'] = 'Limite de zonas dns';
-$wb['limit_dns_slave_zone_txt'] = 'Limite de zonas dns secundárias';
-$wb['limit_dns_record_txt'] = 'Limite de registros dns';
-$wb['limit_shell_user_txt'] = 'Limite de usuários do shell';
-$wb['limit_webdav_user_txt'] = 'Limite de usuários webdav';
+$wb['limit_ftp_user_txt'] = 'Limite de usuários FTP';
+$wb['default_dnsserver_txt'] = 'Servidor DNS padrão';
+$wb['limit_dns_zone_txt'] = 'Limite de zonas DNS';
+$wb['limit_dns_slave_zone_txt'] = 'Limite de zonas DNS secundárias';
+$wb['limit_dns_record_txt'] = 'Limite de registros DNS';
+$wb['limit_shell_user_txt'] = 'Limite de usuários Shell';
+$wb['limit_webdav_user_txt'] = 'Limite de usuários Webdav';
 $wb['limit_backup_txt'] = 'Função de backup disponível';
 $wb['limit_client_txt'] = 'Limite de clientes';
-$wb['username_error_empty'] = 'Nome do usuário está em branco.';
+$wb['username_error_empty'] = 'Nome do usuário está vazio.';
 $wb['username_error_unique'] = 'O nome do usuário deve ser exclusivo.';
-$wb['limit_maildomain_error_notint'] = 'O limite de domínios de e-mail deve ser um número.';
-$wb['limit_mailmailinglist_error_notint'] = 'O limite de listas de e-mail deve ser um número.';
-$wb['limit_mailbox_error_notint'] = 'O limite de contas de e-mail deve ser um número.';
-$wb['limit_mailalias_error_notint'] = 'O limite de alias de e-mail deve ser um número.';
-$wb['limit_mailaliasdomain_error_notint'] = 'O limite de alias de domínios de e-mail deve ser um número.';
-$wb['limit_mailforward_error_notint'] = 'O limite de encaminhamentos de e-mail deve ser um número.';
-$wb['limit_mailcatchall_error_notint'] = 'O limite de contas cata-tudo deve ser um número.';
-$wb['limit_mailrouting_error_notint'] = 'O limite de rotas de e-mail deve ser um número.';
-$wb['limit_mailfilter_error_notint'] = 'O limite de filtros de e-mail deve ser um número.';
+$wb['limit_maildomain_error_notint'] = 'O limite de domínios de email deve ser um número.';
+$wb['limit_mailmailinglist_error_notint'] = 'O limite de listas de email deve ser um número.';
+$wb['limit_mailbox_error_notint'] = 'O limite de contas de email deve ser um número.';
+$wb['limit_mailalias_error_notint'] = 'O limite de alias de email deve ser um número.';
+$wb['limit_mailaliasdomain_error_notint'] = 'O limite de alias de domínios de email deve ser um número.';
+$wb['limit_mailforward_error_notint'] = 'O limite de encaminhamentos de email deve ser um número.';
+$wb['limit_mailcatchall_error_notint'] = 'O limite de contas cata tudo deve ser um número.';
+$wb['limit_mailrouting_error_notint'] = 'O limite de rotas de email deve ser um número.';
+$wb['limit_mailfilter_error_notint'] = 'O limite de filtros de email deve ser um número.';
 $wb['limit_mailfetchmail_error_notint'] = 'O limite de contas de busca deve ser um número.';
-$wb['limit_mailquota_error_notint'] = 'O limite das cotas de e-mail deve ser um número.';
-$wb['limit_spamfilter_wblist_error_notint'] = 'O limite de filtros anti-spam "lista branca/negra" deve ser um número.';
-$wb['limit_spamfilter_user_error_notint'] = 'O limite de filtros anti-spam por conta de e-mail deve ser um número.';
+$wb['limit_mailquota_error_notint'] = 'O limite das cotas de email deve ser um número.';
+$wb['limit_spamfilter_wblist_error_notint'] = 'O limite de filtros anti-spam "lista de permissões/bloqueio" deve ser um número.';
+$wb['limit_spamfilter_user_error_notint'] = 'O limite de filtros anti-spam por conta de email deve ser um número.';
 $wb['limit_spamfilter_policy_error_notint'] = 'O limite de políticas anti-spam deve ser um número.';
 $wb['limit_web_domain_error_notint'] = 'O limite de domínios de site deve ser um número.';
 $wb['limit_web_aliasdomain_error_notint'] = 'O limite de alias de domínios de site deve ser um número.';
 $wb['limit_web_subdomain_error_notint'] = 'O limite de subdomínios de site deve ser um número.';
-$wb['limit_ftp_user_error_notint'] = 'O limite de usuários ftp deve ser um número.';
-$wb['limit_shell_user_error_notint'] = 'O limite de usuários do shell deve ser um número.';
-$wb['limit_webdav_user_error_notint'] = 'O limite de usuários webdav deve ser um número.';
-$wb['limit_dns_zone_error_notint'] = 'O limite de zonas dns deve ser um número.';
-$wb['limit_dns_slave_zone_error_notint'] = 'O limite de zonas dns secundárias deve ser um número.';
-$wb['limit_dns_record_error_notint'] = 'O limite de registros dns deve ser um número.';
-$wb['default_dbserver_txt'] = 'Servidor de banco de dados padrão';
-$wb['limit_database_error_notint'] = 'O limite de banco de dados deve ser um número.';
-$wb['limit_cron_error_notint'] = 'O limite de tarefas no cron deve ser um número.';
-$wb['limit_cron_error_frequency'] = 'O limite de frequência de tarefas no cron deve ser um número.';
+$wb['limit_ftp_user_error_notint'] = 'O limite de usuários FTP deve ser um número.';
+$wb['limit_shell_user_error_notint'] = 'O limite de usuários Shell deve ser um número.';
+$wb['limit_webdav_user_error_notint'] = 'O limite de usuários Webdav deve ser um número.';
+$wb['limit_dns_zone_error_notint'] = 'O limite de zonas DNS deve ser um número.';
+$wb['limit_dns_slave_zone_error_notint'] = 'O limite de zonas DNS secundárias deve ser um número.';
+$wb['limit_dns_record_error_notint'] = 'O limite de registros DNS deve ser um número.';
+$wb['default_dbserver_txt'] = 'Servidor do Banco de Dados padrão';
+$wb['limit_database_error_notint'] = 'O limite do Banco de Dados deve ser um número.';
+$wb['limit_cron_error_notint'] = 'O limite de tarefas no Cron deve ser um número.';
+$wb['limit_cron_error_frequency'] = 'O limite de frequência de tarefas no Cron deve ser um número.';
 $wb['username_error_regex'] = 'O nome de usuário contém caracteres inválidos.';
 $wb['template_master_txt'] = 'Gabarito mestre';
 $wb['template_additional_txt'] = 'Gabarito personalizado';
 $wb['active_template_additional_txt'] = 'Ativar gabarito personalizado';
 $wb['add_additional_template_txt'] = 'Adicionar gabarito personalizado';
 $wb['delete_additional_template_txt'] = 'Remover gabarito personalizado';
-$wb['ssh_chroot_txt'] = 'Opções SSH-Chroot';
+$wb['ssh_chroot_txt'] = 'Opções SSH chroot';
 $wb['web_php_options_txt'] = 'Opções PHP';
 $wb['limit_cgi_txt'] = 'CGI disponível';
 $wb['limit_ssi_txt'] = 'SSI disponível';
@@ -106,10 +106,10 @@ $wb['limit_perl_txt'] = 'Perl disponível';
 $wb['limit_ruby_txt'] = 'Ruby disponível';
 $wb['limit_python_txt'] = 'Python disponível';
 $wb['force_suexec_txt'] = 'Forçar SuEXEC';
-$wb['limit_hterror_txt'] = 'Custom errordocs disponível';
+$wb['limit_hterror_txt'] = 'Diretório custom error docs disponível';
 $wb['limit_wildcard_txt'] = 'Curingas de subdomínio disponível';
 $wb['limit_ssl_txt'] = 'SSL disponível';
-$wb['limit_ssl_letsencrypt_txt'] = 'Let\'s Encrypt disponível';
+$wb['limit_ssl_letsencrypt_txt'] = 'Let\\'s Encrypt disponível';
 $wb['limit_client_error'] = 'O limite de clientes foi alcançado.';
 $wb['limit_web_quota_txt'] = 'Cota de site';
 $wb['limit_traffic_quota_txt'] = 'Cota de tráfego';
@@ -121,8 +121,8 @@ $wb['company_id_txt'] = 'Código da empresa';
 $wb['limit_openvz_vm_txt'] = 'Limite de máquinas virtuais';
 $wb['limit_openvz_vm_template_id_txt'] = 'Forçar gabarito de máquina virtual';
 $wb['limit_openvz_vm_error_notint'] = 'O limite de máquinas virtuais deve ser um número.';
-$wb['web_php_options_notempty'] = 'Nenhuma opção php selecionada. Selecione ao menos uma opção.';
-$wb['ssh_chroot_notempty'] = 'Nenhuma opção ssh chroot selecionada. Selecione ao menos uma opção.';
+$wb['web_php_options_notempty'] = 'Nenhuma opção PHP selecionada. Selecione ao menos uma opção.';
+$wb['ssh_chroot_notempty'] = 'Nenhuma opção SSH chroot selecionada. Selecione ao menos uma opção.';
 $wb['username_error_collision'] = 'O nome de usuário não pode conter as palavras "web" ou "web" seguida de um número.';
 $wb['bank_account_number_txt'] = 'Conta corrente';
 $wb['bank_account_owner_txt'] = 'Proprietário da conta corrente';
@@ -131,54 +131,54 @@ $wb['bank_name_txt'] = 'Nome do banco';
 $wb['bank_account_iban_txt'] = 'IBAN';
 $wb['bank_account_swift_txt'] = 'BIC/Swift';
 $wb['web_limits_txt'] = 'Limites de site';
-$wb['email_limits_txt'] = 'Limites de e-mail';
-$wb['xmpp_limits_txt'] = 'Limites xmpp';
-$wb['database_limits_txt'] = 'Limites de banco de dados';
-$wb['cron_job_limits_txt'] = 'Limites de tarefas no cron';
-$wb['dns_limits_txt'] = 'Limites de registros dns';
+$wb['email_limits_txt'] = 'Limites de email';
+$wb['xmpp_limits_txt'] = 'Limites XMPP';
+$wb['database_limits_txt'] = 'Limites do Banco de Dados';
+$wb['cron_job_limits_txt'] = 'Limites de tarefas no Cron';
+$wb['dns_limits_txt'] = 'Limites de registros DNS';
 $wb['virtualization_limits_txt'] = 'Limites de máquinas virtuais';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-$wb['email_error_isemail'] = 'Por favor, insira um endereço de e-mail válido.';
-$wb['customer_no_error_unique'] = 'O código do cliente deve ser exclusivo ou não pode estar está em branco.';
-$wb['paypal_email_error_isemail'] = 'Por favor, insira um e-mail do PayPal válido.';
-$wb['paypal_email_txt'] = 'e-Mail do PayPal';
+$wb['email_error_isemail'] = 'Por favor, insira um endereço de email válido.';
+$wb['customer_no_error_unique'] = 'O código do cliente deve ser exclusivo e não pode estar vazio.';
+$wb['paypal_email_error_isemail'] = 'Por favor, insira um email do PayPal válido.';
+$wb['paypal_email_txt'] = 'eMail do PayPal';
 $wb['err_msg_master_tpl_set'] = 'Todas as configurações de limites serão ignoradas se for selecionado a opção de gabarito personalizado.';
 $wb['aps_limits_txt'] = 'Limites de instalações de APPs';
 $wb['limit_aps_txt'] = 'Limite de instâncias de APPs';
 $wb['limit_aps_error_notint'] = 'O limite de instâncias de APPs deve ser um número.';
-$wb['default_slave_dnsserver_txt'] = 'Servidor dns secundário padrão';
-$wb['locked_txt'] = 'Locked (disables everything except DNS)';
+$wb['default_slave_dnsserver_txt'] = 'Servidor DNS secundário padrão';
+$wb['locked_txt'] = 'Bloqueado (desabilita tudo, exceto DNS)';
 $wb['canceled_txt'] = 'Cancelado (desabilita o acesso do cliente.)';
 $wb['gender_txt'] = 'Título';
 $wb['gender_m_txt'] = 'Sr.';
 $wb['gender_f_txt'] = 'Sra.';
-$wb['web_servers_txt'] = 'Servidores web';
-$wb['web_servers_placeholder'] = 'Selecione os servidores web';
-$wb['no_web_server_error'] = 'Ao menos um servidor web deve ser selecionado.';
-$wb['web_servers_used'] = 'O servidor web que você está tentando remover para este cliente é utilizado pelo mesmo. Certifique-se que este servidor não esteja em uso pelo cliente antes de removê-lo.';
+$wb['web_servers_txt'] = 'Servidores Web';
+$wb['web_servers_placeholder'] = 'Selecione os servidores Web';
+$wb['no_web_server_error'] = 'Ao menos um servidor Web deve ser selecionado.';
+$wb['web_servers_used'] = 'O servidor Web que você está tentando remover para este cliente é utilizado pelo mesmo. Certifique-se que este servidor não esteja em uso pelo cliente antes de removê-lo.';
 $wb['dns_servers_txt'] = 'Servidores DNS';
-$wb['dns_servers_placeholder'] = 'Selecione os servidores dns';
+$wb['dns_servers_placeholder'] = 'Selecione os servidores DNS';
 $wb['no_dns_server_error'] = 'Ao menos um servidor DNS deve ser selecionado.';
-$wb['dns_servers_used'] = 'O servidor dns que você está tentando remover para este cliente é utilizado pelo mesmo. Certifique-se que este servidor não esteja em uso pelo cliente antes de removê-lo.';
-$wb['db_servers_txt'] = 'Servidores de banco de dados';
-$wb['db_servers_placeholder'] = 'Selecione os servidores de banco de dados';
-$wb['no_db_server_error'] = 'Ao menos um servidor de banco de dados deve ser selecionado.';
-$wb['db_servers_used'] = 'O servidor de banco de dados que você está tentando remover para este cliente é utilizado pelo mesmo. Certifique-se que este servidor não esteja em uso pelo cliente antes de removê-lo.';
-$wb['mail_servers_txt'] = 'Servidores de e-mail';
-$wb['mail_servers_placeholder'] = 'Selecione os servidores de e-mail';
-$wb['no_mail_server_error'] = 'Ao menos um servidor de e-mail deve ser selecionado.';
-$wb['mail_servers_used'] = 'O servidor de e-mail que você está tentando remover para este cliente é utilizado pelo mesmo. Certifique-se que este servidor não esteja em uso pelo cliente antes de removê-lo.';
+$wb['dns_servers_used'] = 'O servidor DNS que você está tentando remover para este cliente é utilizado pelo mesmo. Certifique-se que este servidor não esteja em uso pelo cliente antes de removê-lo.';
+$wb['db_servers_txt'] = 'Servidores do Banco de Dados';
+$wb['db_servers_placeholder'] = 'Selecione os servidores do Banco de Dados';
+$wb['no_db_server_error'] = 'Ao menos um servidor do Banco de Dados deve ser selecionado.';
+$wb['db_servers_used'] = 'O servidor do Banco de Dados que você está tentando remover para este cliente é utilizado pelo mesmo. Certifique-se que este servidor não esteja em uso pelo cliente antes de removê-lo.';
+$wb['mail_servers_txt'] = 'Servidores de email';
+$wb['mail_servers_placeholder'] = 'Selecione os servidores de email';
+$wb['no_mail_server_error'] = 'Ao menos um servidor de email deve ser selecionado.';
+$wb['mail_servers_used'] = 'O servidor de email que você está tentando remover para este cliente é utilizado pelo mesmo. Certifique-se que este servidor não esteja em uso pelo cliente antes de removê-lo.';
 $wb['xmpp_servers_txt'] = 'Servidores XMPP';
-$wb['xmpp_servers_placeholder'] = 'Selecione o(s) servidor(es) xmpp';
-$wb['no_xmpp_server_error'] = 'Ao menos um servidor xmpp deve ser selecionado.';
-$wb['xmpp_servers_used'] = 'O servidor xmpp que você está tentando remover para este cliente é utilizado pelo mesmo. Certifique-se que este servidor não esteja em uso pelo cliente antes de removê-lo.';
-$wb['limit_xmpp_domain_error_notint'] = 'O limite de domínios xmpp deve ser um número.';
-$wb['limit_xmpp_user_error_notint'] = 'O limite de usuários xmpp deve ser um número.';
-$wb['limit_xmpp_domain_txt'] = 'Limite de domínios xmpp';
-$wb['limit_xmpp_user_txt'] = 'Limite de usuários xmpp';
+$wb['xmpp_servers_placeholder'] = 'Selecione o(s) servidor(es) XMPP';
+$wb['no_xmpp_server_error'] = 'Ao menos um servidor XMPP deve ser selecionado.';
+$wb['xmpp_servers_used'] = 'O servidor XMPP que você está tentando remover para este cliente é utilizado pelo mesmo. Certifique-se que este servidor não esteja em uso pelo cliente antes de removê-lo.';
+$wb['limit_xmpp_domain_error_notint'] = 'O limite de domínios XMPP deve ser um número.';
+$wb['limit_xmpp_user_error_notint'] = 'O limite de usuários XMPP deve ser um número.';
+$wb['limit_xmpp_domain_txt'] = 'Limite de domínios XMPP';
+$wb['limit_xmpp_user_txt'] = 'Limite de usuários XMPP';
 $wb['limit_xmpp_muc_txt'] = 'Chat multiusuário (MUC) disponível';
 $wb['limit_xmpp_pastebin_txt'] = 'Pastebin para MUC disponível';
 $wb['limit_xmpp_httparchive_txt'] = 'Arquivos http para MUC disponível';
@@ -190,16 +190,15 @@ $wb['added_by_txt'] = 'Cadastrado por';
 $wb['added_date_txt'] = 'Data do cadastro';
 $wb['parent_client_id_txt'] = 'Cliente da revenda';
 $wb['none_txt'] = 'nenhum';
-$wb['limit_database_quota_txt'] = 'Cota do banco de dados';
-$wb['limit_database_quota_error_notint'] = 'O limite da cota de banco de dados deve ser um número.';
-$wb['limit_database_user_txt'] = 'Limite de  usuários do banco de dados';
-$wb['limit_database_user_error_notint'] = 'O limite de usuários do banco de dados deve ser um número.';
+$wb['limit_database_quota_txt'] = 'Cota do Banco de Dados';
+$wb['limit_database_quota_error_notint'] = 'O limite da cota do Banco de Dados deve ser um número.';
+$wb['limit_database_user_txt'] = 'Limite de  usuários do Banco de Dados';
+$wb['limit_database_user_error_notint'] = 'O limite de usuários do Banco de Dados deve ser um número.';
 $wb['reseller_txt'] = 'Revenda';
 $wb['btn_save_txt'] = 'Salvar';
 $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['invalid_vat_id'] = 'O ID do VAT é inválido.';
-$wb['email_error_empty'] = 'O e-mail está em branco';
-$wb['limit_directive_snippets_txt'] = 'Exibir configurações de seleção do servidor web';
-$wb['Address'] = 'Address';
+$wb['email_error_empty'] = 'O email está vazio';
+$wb['limit_directive_snippets_txt'] = 'Exibir configurações de seleção do servidor Web';
+$wb['Address'] = 'Cliente';
 $wb['Limits'] = 'Limites';
-?>
diff --git a/interface/web/client/lib/lang/br_client_circle.lng b/interface/web/client/lib/lang/br_client_circle.lng
index 6c6cb13271..e0a745ed90 100644
--- a/interface/web/client/lib/lang/br_client_circle.lng
+++ b/interface/web/client/lib/lang/br_client_circle.lng
@@ -6,4 +6,3 @@ $wb['circle_name_txt'] = 'Nome do círculo';
 $wb['client_ids_txt'] = 'Clientes/Revendas';
 $wb['description_txt'] = 'Descrição';
 $wb['active_txt'] = 'Ativo';
-?>
diff --git a/interface/web/client/lib/lang/br_client_circle_list.lng b/interface/web/client/lib/lang/br_client_circle_list.lng
index 1c1a43f49a..5f7c017264 100644
--- a/interface/web/client/lib/lang/br_client_circle_list.lng
+++ b/interface/web/client/lib/lang/br_client_circle_list.lng
@@ -7,4 +7,3 @@ $wb['add_new_record_txt'] = 'Adicionar novo círculo';
 $wb['filter_txt'] = 'Filtro';
 $wb['delete_txt'] = 'Remover';
 $wb['active_txt'] = 'Ativo';
-?>
diff --git a/interface/web/client/lib/lang/br_client_del.lng b/interface/web/client/lib/lang/br_client_del.lng
index fbea0a66a0..ce138c609a 100644
--- a/interface/web/client/lib/lang/br_client_del.lng
+++ b/interface/web/client/lib/lang/br_client_del.lng
@@ -4,7 +4,6 @@ $wb['delete_explanation'] = 'Esta ação removerá os seguintes registros associ
 $wb['btn_save_txt'] = 'Remover o cliente';
 $wb['btn_cancel_txt'] = 'Cancelar sem remover o cliente';
 $wb['confirm_client_delete_txt'] = 'Você tem certeza que deseja remover este cliente?';
-$wb['list_head_txt'] = 'Delete Client';
-$wb['table_txt'] = 'Table';
-$wb['data_txt'] = 'Data';
-?>
+$wb['list_head_txt'] = 'Remover cliente';
+$wb['table_txt'] = 'Tabela';
+$wb['data_txt'] = 'Dados';
diff --git a/interface/web/client/lib/lang/br_client_message.lng b/interface/web/client/lib/lang/br_client_message.lng
index 75aa3480c5..a0b3c19940 100644
--- a/interface/web/client/lib/lang/br_client_message.lng
+++ b/interface/web/client/lib/lang/br_client_message.lng
@@ -1,20 +1,19 @@
 <?php
-$wb['page_head_txt'] = 'Enviar informações do cliente';
-$wb['btn_send_txt'] = 'Enviar e-mail';
+$wb['page_head_txt'] = 'Enviar informações do cliente e revendas';
+$wb['btn_send_txt'] = 'Enviar email';
 $wb['btn_cancel_txt'] = 'Cancelar';
-$wb['sender_txt'] = 'e-Mail do remetente';
+$wb['sender_txt'] = 'eMail do remetente';
 $wb['subject_txt'] = 'Assunto';
 $wb['message_txt'] = 'Mensagem';
-$wb['form_legend_client_txt'] = 'Enviar e-mail para clientes.';
-$wb['form_legend_admin_txt'] = 'Enviar e-mail para clientes e revendas.';
+$wb['form_legend_client_txt'] = 'Enviar email para clientes.';
+$wb['form_legend_admin_txt'] = 'Enviar email para clientes e revendas.';
 $wb['sender_invalid_error'] = 'Remetente inválido.';
-$wb['subject_invalid_error'] = 'Assunto está em branco.';
-$wb['message_invalid_error'] = 'Mensagem está em branco.';
-$wb['email_sent_to_txt'] = 'e-Mail enviado para:';
+$wb['subject_invalid_error'] = 'Assunto está vazio.';
+$wb['message_invalid_error'] = 'Mensagem está vazia.';
+$wb['email_sent_to_txt'] = 'eMail enviado para:';
 $wb['recipient_txt'] = 'Destinatário';
 $wb['all_clients_resellers_txt'] = 'Todos os clientes e revendas';
 $wb['all_clients_txt'] = 'Todos os clientes';
 $wb['variables_txt'] = 'Variáveis:';
 $wb['gender_m_txt'] = 'Sr.';
 $wb['gender_f_txt'] = 'Sra.';
-?>
diff --git a/interface/web/client/lib/lang/br_client_message_template.lng b/interface/web/client/lib/lang/br_client_message_template.lng
index 8fb0934837..dcf08c32a2 100644
--- a/interface/web/client/lib/lang/br_client_message_template.lng
+++ b/interface/web/client/lib/lang/br_client_message_template.lng
@@ -1,13 +1,12 @@
 <?php
-$wb['template_type_txt'] = 'Tipo de e-mail';
+$wb['template_type_txt'] = 'Tipo de email';
 $wb['template_name_txt'] = 'Nome do gabarito';
 $wb['subject_txt'] = 'Assunto';
 $wb['message_txt'] = 'Mensagem';
-$wb['Email template'] = 'Gabarito do e-mail';
+$wb['Email template'] = 'Gabarito do email';
 $wb['Settings'] = 'Configurações';
 $wb['variables_txt'] = 'Variáveis';
-$wb['variables_description_txt'] = '(Variáveis de usuário e senha só estão disponíveis em e-mail de boas-vindas.)';
-$wb['duplicate_welcome_error'] = 'Só pode existir apenas um gabarito de e-mail de boas-vindas. Edite o modelo existente ao invés de adicionar um novo.';
-$wb['subject_error_empty'] = 'Assunto está em branco.';
-$wb['message_error_empty'] = 'Mensagem está em branco.';
-?>
+$wb['variables_description_txt'] = '(Variáveis de usuário e senha só estão disponíveis em email de boas-vindas.)';
+$wb['duplicate_welcome_error'] = 'Só pode existir um gabarito de email de boas-vindas. Edite o modelo existente ao invés de adicionar um novo.';
+$wb['subject_error_empty'] = 'Assunto está vazio.';
+$wb['message_error_empty'] = 'Mensagem está vazia.';
diff --git a/interface/web/client/lib/lang/br_client_message_template_list.lng b/interface/web/client/lib/lang/br_client_message_template_list.lng
index 3673769354..3f9aef7b3a 100644
--- a/interface/web/client/lib/lang/br_client_message_template_list.lng
+++ b/interface/web/client/lib/lang/br_client_message_template_list.lng
@@ -1,5 +1,4 @@
 <?php
-$wb['list_head_txt'] = 'Gabaritos de e-mail';
+$wb['list_head_txt'] = 'Gabaritos de email';
 $wb['template_type_txt'] = 'Mensagem de';
 $wb['template_name_txt'] = 'Nome do gabarito';
-?>
diff --git a/interface/web/client/lib/lang/br_client_template.lng b/interface/web/client/lib/lang/br_client_template.lng
index ee96172de8..8f3d14c5c9 100644
--- a/interface/web/client/lib/lang/br_client_template.lng
+++ b/interface/web/client/lib/lang/br_client_template.lng
@@ -1,81 +1,80 @@
 <?php
-$wb['ssh_chroot_notempty'] = 'No SSH chroot option selected. Select at least one option.';
+$wb['ssh_chroot_notempty'] = 'Nenhuma opção chroot SSH selecionada. Selecione ao menos uma opção.';
 $wb['template_type_txt'] = 'Tipo de gabarito';
 $wb['template_name_txt'] = 'Nome do gabarito';
 $wb['limit_client_error_notint'] = 'Limite de cliente não é um número.';
-$wb['default_mailserver_txt'] = 'Servidor de e-mail padrão';
-$wb['limit_maildomain_txt'] = 'Limite de domínios de e-mail';
-$wb['limit_mailbox_txt'] = 'Limite de contas de e-mail';
-$wb['limit_mailalias_txt'] = 'Limite de alias de e-mail';
-$wb['limit_mailaliasdomain_txt'] = 'Limite de alias de domínios de e-mail';
-$wb['limit_mailmailinglist_txt'] = 'Limite de listas de e-mail';
-$wb['limit_mailforward_txt'] = 'Limite de encaminhamentos de e-mail';
-$wb['limit_mailcatchall_txt'] = 'Limite de contas cata-tudo';
-$wb['limit_mailrouting_txt'] = 'Limite de rotas de e-mail';
-$wb['limit_mailfilter_txt'] = 'Limite de filtros de e-mail';
+$wb['default_mailserver_txt'] = 'Servidor de email padrão';
+$wb['limit_maildomain_txt'] = 'Limite de domínios de email';
+$wb['limit_mailbox_txt'] = 'Limite de contas de email';
+$wb['limit_mailalias_txt'] = 'Limite de alias de email';
+$wb['limit_mailaliasdomain_txt'] = 'Limite de alias de domínios de email';
+$wb['limit_mailmailinglist_txt'] = 'Limite de listas de email';
+$wb['limit_mailforward_txt'] = 'Limite de encaminhamentos de email';
+$wb['limit_mailcatchall_txt'] = 'Limite de contas cata tudo';
+$wb['limit_mailrouting_txt'] = 'Limite de rotas de email';
+$wb['limit_mailfilter_txt'] = 'Limite de filtros de email';
 $wb['limit_fetchmail_txt'] = 'Limite de contas de busca';
-$wb['limit_mailquota_txt'] = 'Cota da conta de e-mail';
-$wb['limit_spamfilter_wblist_txt'] = 'Limite de filtros anti-spam "lista branca/negra"';
-$wb['limit_spamfilter_user_txt'] = 'Limite de filtros anti-spam para conta de e-mail';
+$wb['limit_mailquota_txt'] = 'Cota da conta de email';
+$wb['limit_spamfilter_wblist_txt'] = 'Limite de filtros anti-spam "lista de permissões/lista de bloqueio"';
+$wb['limit_spamfilter_user_txt'] = 'Limite de filtros anti-spam para conta de email';
 $wb['limit_spamfilter_policy_txt'] = 'Limite de políticas anti-spam';
 $wb['limit_domain_txt'] = 'Limite de domínios';
-$wb['limit_subdomain_txt'] = 'Limite de sub-domínios';
+$wb['limit_subdomain_txt'] = 'Limite de subdomínios';
 $wb['limit_webquota_txt'] = 'Limite da cota de site';
-$wb['limit_database_txt'] = 'Limite de banco de dados';
-$wb['limit_cron_txt'] = 'Limite de tarefas no cron';
-$wb['limit_cron_type_txt'] = 'Limite de tipos de tarefa no cron (chroot e url implícitas)';
+$wb['limit_database_txt'] = 'Limite do Banco de Dados';
+$wb['limit_cron_txt'] = 'Limite de tarefas no Cron';
+$wb['limit_cron_type_txt'] = 'Limite de tipos de tarefa no Cron (chroot e url implícitas)';
 $wb['limit_cron_frequency_txt'] = 'Tempo de espera entre as execuções';
 $wb['default_webserver_txt'] = 'Servidor web padrão';
 $wb['limit_web_domain_txt'] = 'Limite de domínios de site';
 $wb['limit_web_aliasdomain_txt'] = 'Limite de alias de domínios de site';
 $wb['limit_web_subdomain_txt'] = 'Limite de sud-domínios de site';
-$wb['limit_ftp_user_txt'] = 'Limite de usuário FTP';
+$wb['limit_ftp_user_txt'] = 'Limite de usuários FTP';
 $wb['default_dnsserver_txt'] = 'Servidor DNS padrão';
-$wb['limit_dns_zone_txt'] = 'Limite de zonas dns';
+$wb['limit_dns_zone_txt'] = 'Limite de zonas DNS';
 $wb['default_slave_dnsserver_txt'] = 'Servidor DNS secundário';
-$wb['limit_dns_slave_zone_txt'] = 'Limite de zonas dns secundárias';
-$wb['limit_dns_record_txt'] = 'Limite de registros dns';
-$wb['limit_shell_user_txt'] = 'Limite de usuários do shell';
+$wb['limit_dns_slave_zone_txt'] = 'Limite de zonas DNS secundárias';
+$wb['limit_dns_record_txt'] = 'Limite de registros DNS';
+$wb['limit_shell_user_txt'] = 'Limite de usuários Shell';
 $wb['limit_webdav_user_txt'] = 'Limite de usuário Webdav';
 $wb['limit_backup_txt'] = 'Funções de backup disponível';
 $wb['limit_client_txt'] = 'Limite de clientes';
-$wb['limit_maildomain_error_notint'] = 'O limite de domínios de e-mail deve ser um número.';
-$wb['limit_mailmailinglist_error_notint'] = 'O limite de listas de e-mail deve ser um número.';
-$wb['limit_mailbox_error_notint'] = 'O limite de contas de e-mail deve ser um número.';
-$wb['limit_mailalias_error_notint'] = 'O limite de alias de e-mail deve ser um número.';
+$wb['limit_maildomain_error_notint'] = 'O limite de domínios de email deve ser um número.';
+$wb['limit_mailmailinglist_error_notint'] = 'O limite de listas de email deve ser um número.';
+$wb['limit_mailbox_error_notint'] = 'O limite de contas de email deve ser um número.';
+$wb['limit_mailalias_error_notint'] = 'O limite de alias de email deve ser um número.';
 $wb['limit_mailaliasdomain_error_notint'] = 'O limite de alias de domínios deve ser um número.';
-$wb['limit_mailforward_error_notint'] = 'O limite de encaminhamento de e-mails deve ser um número.';
-$wb['limit_mailcatchall_error_notint'] = 'O limite de contas cata-tudo deve ser um número.';
-$wb['limit_mailrouting_error_notint'] = 'O limite de rotas de e-mail deve ser um número.';
-$wb['limit_mailfilter_error_notint'] = 'O limite de filtros de e-mail deve ser um número.';
+$wb['limit_mailforward_error_notint'] = 'O limite de encaminhamento de emails deve ser um número.';
+$wb['limit_mailcatchall_error_notint'] = 'O limite de contas cata tudo deve ser um número.';
+$wb['limit_mailrouting_error_notint'] = 'O limite de rotas de email deve ser um número.';
+$wb['limit_mailfilter_error_notint'] = 'O limite de filtros de email deve ser um número.';
 $wb['limit_mailfetchmail_error_notint'] = 'O limite de contas de busca deve ser um número.';
-$wb['limit_mailquota_error_notint'] = 'O limite da cota de e-mails deve ser um número.';
-$wb['limit_spamfilter_wblist_error_notint'] = 'O limite de filtros anti-spam "lista branca/negra" deve ser um número.';
-$wb['limit_spamfilter_user_error_notint'] = 'O limite de filtros anti-spam por conta de e-mail deve ser um número.';
+$wb['limit_mailquota_error_notint'] = 'O limite da cota de emails deve ser um número.';
+$wb['limit_spamfilter_wblist_error_notint'] = 'O limite de filtros anti-spam "lista de permissões/bloqueio" deve ser um número.';
+$wb['limit_spamfilter_user_error_notint'] = 'O limite de filtros anti-spam por conta de email deve ser um número.';
 $wb['limit_spamfilter_policy_error_notint'] = 'O limite de políticas anti-spam deve ser um número.';
 $wb['limit_web_domain_error_notint'] = 'O limite de sites deve ser um número.';
 $wb['limit_web_aliasdomain_error_notint'] = 'O limite de alias de domínio para sites deve ser um número.';
-$wb['limit_web_subdomain_error_notint'] = 'O limite de sub-domínios para site deve ser um número.';
-$wb['limit_ftp_user_error_notint'] = 'O limite de usuários ftp deve ser um número.';
-$wb['limit_shell_user_error_notint'] = 'O limite de usuários do shell deve ser um número.';
-$wb['limit_webdav_user_error_notint'] = 'O limite de usuários webdav deve ser um número.';
-$wb['limit_dns_zone_error_notint'] = 'O limite de zonas dns deve ser um número.';
-$wb['limit_dns_slave_zone_error_notint'] = 'O limite de zonas dns secundárias deve ser um número.';
-$wb['limit_dns_record_error_notint'] = 'O limite de registros dns deve ser um número.';
-$wb['default_dbserver_txt'] = 'Servidor de banco de dados padrão';
-$wb['limit_database_txt'] = 'Limite de banco de dados';
-$wb['limit_database_error_notint'] = 'O limite de banco de dados deve ser um número.';
-$wb['limit_cron_error_notint'] = 'O limite de tarefas no cron deve ser um número.';
-$wb['limit_cron_error_frequency'] = 'O limite de execuções no cron deve ser um número.';
+$wb['limit_web_subdomain_error_notint'] = 'O limite de subdomínios para site deve ser um número.';
+$wb['limit_ftp_user_error_notint'] = 'O limite de usuários FTP deve ser um número.';
+$wb['limit_shell_user_error_notint'] = 'O limite de usuários Shell deve ser um número.';
+$wb['limit_webdav_user_error_notint'] = 'O limite de usuários Webdav deve ser um número.';
+$wb['limit_dns_zone_error_notint'] = 'O limite de zonas DNS deve ser um número.';
+$wb['limit_dns_slave_zone_error_notint'] = 'O limite de zonas DNS secundárias deve ser um número.';
+$wb['limit_dns_record_error_notint'] = 'O limite de registros DNS deve ser um número.';
+$wb['default_dbserver_txt'] = 'Servidor do Banco de Dados padrão';
+$wb['limit_database_error_notint'] = 'O limite do Banco de Dados deve ser um número.';
+$wb['limit_cron_error_notint'] = 'O limite de tarefas no Cron deve ser um número.';
+$wb['limit_cron_error_frequency'] = 'O limite de execuções no Cron deve ser um número.';
 $wb['error_template_name_empty'] = 'Por favor, insira um nome para o gabarito';
 $wb['limit_web_quota_txt'] = 'Cota de site';
 $wb['limit_traffic_quota_txt'] = 'Cota de tráfego';
-$wb['limit_trafficquota_error_notint'] = 'Cota de tráfego deve ser um número.';
+$wb['limit_trafficquota_error_notint'] = 'A cota de tráfego deve ser um número.';
 $wb['template_del_aborted_txt'] = 'Remover cancelado. Ainda existe algum cliente com este gabarito em uso.';
 $wb['limit_openvz_vm_txt'] = 'Limite de máquinas virtuais';
 $wb['limit_openvz_vm_template_id_txt'] = 'Forçar gabarito para máquina virtual';
 $wb['limit_openvz_vm_error_notint'] = 'O limite de máquinas virtuais deve ser um número.';
-$wb['ssh_chroot_txt'] = 'Opções de SSH-Chroot';
+$wb['ssh_chroot_txt'] = 'Opções SSH chroot';
 $wb['web_php_options_txt'] = 'Opções PHP';
 $wb['limit_cgi_txt'] = 'CGI disponível';
 $wb['limit_ssi_txt'] = 'SSI disponível';
@@ -83,14 +82,14 @@ $wb['limit_perl_txt'] = 'Perl disponível';
 $wb['limit_ruby_txt'] = 'Ruby disponível';
 $wb['limit_python_txt'] = 'Python disponível';
 $wb['force_suexec_txt'] = 'Forçar SuEXEC';
-$wb['limit_hterror_txt'] = 'Custom-error-docs disponível';
+$wb['limit_hterror_txt'] = 'Diretório custom error docs disponível';
 $wb['limit_wildcard_txt'] = 'Curingas de sub-domínio disponível';
 $wb['limit_ssl_txt'] = 'SSL disponível';
-$wb['limit_ssl_letsencrypt_txt'] = 'Let';
+$wb['limit_ssl_letsencrypt_txt'] = '"Let\\'s" Encrypt disponível';
 $wb['web_limits_txt'] = 'Limites de site';
-$wb['email_limits_txt'] = 'Limites de e-mails';
-$wb['database_limits_txt'] = 'Limites de banco de dados';
-$wb['cron_job_limits_txt'] = 'Limite de tarefas no cron';
+$wb['email_limits_txt'] = 'Limites de emails';
+$wb['database_limits_txt'] = 'Limites do Banco de Dados';
+$wb['cron_job_limits_txt'] = 'Limite de tarefas no Cron';
 $wb['dns_limits_txt'] = 'Limites de DNS';
 $wb['virtualization_limits_txt'] = 'Limites de virtualização';
 $wb['aps_limits_txt'] = 'Limites de instalações de aplicações - APPs';
@@ -98,31 +97,30 @@ $wb['limit_aps_txt'] = 'Limite de instâncias para APPs';
 $wb['limit_aps_error_notint'] = 'O limite de instância para APPs deve ser um número.';
 $wb['limit_domainmodule_txt'] = 'Limites de módulos de domínio';
 $wb['client_limits_txt'] = 'Limites de clientes';
-$wb['limit_database_quota_txt'] = 'Cotas de banco de dados';
-$wb['limit_database_quota_error_notint'] = 'O limite das cotas de banco de dados deve ser um número.';
-$wb['xmpp_limits_txt'] = 'Limites de xmpp';
-$wb['xmpp_servers_txt'] = 'Servidores xmpp';
-$wb['xmpp_servers_placeholder'] = 'Selecione o(s) servidor(es) xmpp';
-$wb['no_xmpp_server_error'] = 'Ao menos um servidor xmpp deve ser selecionado.';
-$wb['xmpp_servers_used'] = 'O servidor que você está tentando remover para este cliente é usado como um servidor xmpp. Garanta que este servidor não é usado por este cliente antes de removê-lo.';
-$wb['limit_xmpp_domain_error_notint'] = 'O limite de domínios xmpp deve ser um número.';
-$wb['limit_xmpp_user_error_notint'] = 'O limite de usuários xmpp deve ser um número.';
-$wb['limit_xmpp_domain_txt'] = 'Limite de domínios xmpp';
-$wb['limit_xmpp_user_txt'] = 'Limite de usuários xmpp';
+$wb['limit_database_quota_txt'] = 'Cotas do Banco de Dados';
+$wb['limit_database_quota_error_notint'] = 'O limite das cotas do Banco de Dados deve ser um número.';
+$wb['xmpp_limits_txt'] = 'Limites para XMPP';
+$wb['xmpp_servers_txt'] = 'Servidores XMPP';
+$wb['xmpp_servers_placeholder'] = 'Selecione o(s) servidor(es) XMPP';
+$wb['no_xmpp_server_error'] = 'Ao menos um servidor XMPP deve ser selecionado.';
+$wb['xmpp_servers_used'] = 'O servidor que você está tentando remover para este cliente é usado como um servidor XMPP. Garanta que este servidor não é usado por este cliente antes de removê-lo.';
+$wb['limit_xmpp_domain_error_notint'] = 'O limite de domínios XMPP deve ser um número.';
+$wb['limit_xmpp_user_error_notint'] = 'O limite de usuários XMPP deve ser um número.';
+$wb['limit_xmpp_domain_txt'] = 'Limite de domínios XMPP';
+$wb['limit_xmpp_user_txt'] = 'Limite de usuários XMPP';
 $wb['limit_xmpp_muc_txt'] = 'Chat multiusuário disponível';
 $wb['limit_xmpp_pastebin_txt'] = 'Pastebin para MUC disponível';
-$wb['limit_xmpp_httparchive_txt'] = 'Arquivos http para MUC disponível';
+$wb['limit_xmpp_httparchive_txt'] = 'Arquivos HTTP para MUC disponível';
 $wb['limit_xmpp_anon_txt'] = 'Host anônimo disponível';
 $wb['limit_xmpp_vjud_txt'] = 'Diretório de usuário VJUD disponível';
 $wb['limit_xmpp_proxy_txt'] = 'Proxy Bytestream disponível';
 $wb['limit_xmpp_status_txt'] = 'Estado do host disponível';
-$wb['dns_servers_txt'] = 'Servidores dns';
-$wb['limit_directive_snippets_txt'] = 'Exibir seleção de configurações do servidor web';
-$wb['limit_database_user_txt'] = 'Limite de usuários do banco de dados';
-$wb['web_servers_txt'] = 'Servidores web';
-$wb['dns_servers_txt'] = 'Servidores dns';
-$wb['xmpp_servers_txt'] = 'Servidores xmpp';
-$wb['db_servers_txt'] = 'Servidores de banco de dados';
-$wb['mail_servers_txt'] = 'Servidores de e-mail';
+$wb['dns_servers_txt'] = 'Servidores DNS';
+$wb['limit_directive_snippets_txt'] = 'Exibir seleção de configurações do servidor Web';
+$wb['limit_database_user_txt'] = 'Limite de usuários do Banco de Dados';
+$wb['web_servers_txt'] = 'Servidores Web';
+$wb['db_servers_txt'] = 'Servidores do Banco de Dados';
+$wb['mail_servers_txt'] = 'Servidores de email';
 $wb['Limits'] = 'Limites';
-?>
+$wb['Client-Templates'] = 'Gabaritos de clientes';
+$wb['Template'] = 'Gabarito';
diff --git a/interface/web/client/lib/lang/br_client_template_list.lng b/interface/web/client/lib/lang/br_client_template_list.lng
index 47bd2e5779..7a81d5c907 100644
--- a/interface/web/client/lib/lang/br_client_template_list.lng
+++ b/interface/web/client/lib/lang/br_client_template_list.lng
@@ -4,4 +4,3 @@ $wb['template_type_txt'] = 'Tipo';
 $wb['template_name_txt'] = 'Nome do gabarito';
 $wb['template_id_txt'] = 'ID do gabarito';
 $wb['sys_groupid_txt'] = 'Revenda';
-?>
diff --git a/interface/web/client/lib/lang/br_clients_list.lng b/interface/web/client/lib/lang/br_clients_list.lng
index 8016151a9b..a4047fd4d2 100644
--- a/interface/web/client/lib/lang/br_clients_list.lng
+++ b/interface/web/client/lib/lang/br_clients_list.lng
@@ -11,4 +11,3 @@ $wb['customer_no_txt'] = 'Código do cliente';
 $wb['locked_txt'] = 'Bloqueado';
 $wb['yes_txt'] = 'Sim';
 $wb['no_txt'] = 'Não';
-?>
diff --git a/interface/web/client/lib/lang/br_domain.lng b/interface/web/client/lib/lang/br_domain.lng
index 988976d2ce..0ebd82d63c 100644
--- a/interface/web/client/lib/lang/br_domain.lng
+++ b/interface/web/client/lib/lang/br_domain.lng
@@ -1,6 +1,5 @@
 <?php
-$wb['domain_error_empty'] = 'O domínio está em branco.';
+$wb['domain_error_empty'] = 'O domínio está vazio.';
 $wb['domain_error_unique'] = 'O domínio já existe.';
 $wb['domain_error_regex'] = 'O nome do domínio não é permitido.';
 $wb['Domain'] = 'Domínio';
-?>
diff --git a/interface/web/client/lib/lang/br_domain_list.lng b/interface/web/client/lib/lang/br_domain_list.lng
index 57ec6c1064..2d7db28a65 100644
--- a/interface/web/client/lib/lang/br_domain_list.lng
+++ b/interface/web/client/lib/lang/br_domain_list.lng
@@ -3,4 +3,3 @@ $wb['list_head_txt'] = 'Domínios';
 $wb['add_new_record_txt'] = 'Adicionar novo domínio';
 $wb['domain_txt'] = 'Domínio';
 $wb['user_txt'] = 'Cliente';
-?>
diff --git a/interface/web/client/lib/lang/br_reseller.lng b/interface/web/client/lib/lang/br_reseller.lng
index 322235d36b..7e32b85938 100644
--- a/interface/web/client/lib/lang/br_reseller.lng
+++ b/interface/web/client/lib/lang/br_reseller.lng
@@ -1,19 +1,19 @@
 <?php
-$wb['limit_maildomain_txt'] = 'Limite de domínios de e-mail';
-$wb['limit_mailmailinglist_txt'] = 'Limite de listas de e-mail';
-$wb['limit_mailbox_txt'] = 'Limite de contas de e-mail';
-$wb['limit_mailalias_txt'] = 'Limite de alias de e-mail';
+$wb['limit_maildomain_txt'] = 'Limite de domínios de email';
+$wb['limit_mailmailinglist_txt'] = 'Limite de listas de email';
+$wb['limit_mailbox_txt'] = 'Limite de contas de email';
+$wb['limit_mailalias_txt'] = 'Limite de alias de email';
 $wb['limit_mailaliasdomain_txt'] = 'Limite de alias de domínios';
-$wb['limit_mailforward_txt'] = 'Limite de encaminhamentos de e-mail';
-$wb['limit_mailcatchall_txt'] = 'Limite de contas cata-tudo';
-$wb['limit_mailrouting_txt'] = 'Limite de rotas de e-mail';
-$wb['limit_mailfilter_txt'] = 'Limite de filtros de e-mail';
+$wb['limit_mailforward_txt'] = 'Limite de encaminhamentos de email';
+$wb['limit_mailcatchall_txt'] = 'Limite de contas cata tudo';
+$wb['limit_mailrouting_txt'] = 'Limite de rotas de email';
+$wb['limit_mailfilter_txt'] = 'Limite de filtros de email';
 $wb['limit_fetchmail_txt'] = 'Limite de contas de busca';
-$wb['limit_mailquota_txt'] = 'Cota de contas de e-mail';
-$wb['limit_spamfilter_wblist_txt'] = 'Limite de filtros anti-spam "lista branca/negra"';
+$wb['limit_mailquota_txt'] = 'Cota de contas de email';
+$wb['limit_spamfilter_wblist_txt'] = 'Limite de filtros anti-spam "lista de permissões/bloqueio"';
 $wb['limit_spamfilter_user_txt'] = 'Limite de filtros anti-spam por usuário';
 $wb['limit_spamfilter_policy_txt'] = 'Limite de políticas anti-spam';
-$wb['default_mailserver_txt'] = 'Servidor de e-mail padrão';
+$wb['default_mailserver_txt'] = 'Servidor de email padrão';
 $wb['company_name_txt'] = 'Empresa';
 $wb['contact_firstname_txt'] = 'Contato';
 $wb['contact_name_txt'] = 'Nome do contato';
@@ -31,7 +31,7 @@ $wb['country_txt'] = 'País';
 $wb['telephone_txt'] = 'Telefone';
 $wb['mobile_txt'] = 'Celular';
 $wb['fax_txt'] = 'Fax';
-$wb['email_txt'] = 'e-Mail';
+$wb['email_txt'] = 'eMail';
 $wb['internet_txt'] = 'Site';
 $wb['icq_txt'] = 'Redes Sociais';
 $wb['notes_txt'] = 'Observações';
@@ -42,62 +42,62 @@ $wb['surname_txt'] = 'Sobrenome';
 $wb['limit_domain_txt'] = 'Limite de domínios';
 $wb['limit_subdomain_txt'] = 'Limite de subdomínios';
 $wb['limit_webquota_txt'] = 'Cota de sites';
-$wb['limit_database_txt'] = 'Limite de banco de dados';
-$wb['limit_database_user_txt'] = 'Limite de usuários do banco de dados';
-$wb['limit_cron_txt'] = 'Limite de tarefas no cron';
-$wb['limit_cron_type_txt'] = 'Limite de tipos de tarefa no cron (chrooted e url implícitas)';
+$wb['limit_database_txt'] = 'Limite do Banco de Dados';
+$wb['limit_database_user_txt'] = 'Limite de usuários do Banco de Dados';
+$wb['limit_cron_txt'] = 'Limite de tarefas no Cron';
+$wb['limit_cron_type_txt'] = 'Limite de tipos de tarefa no Cron (chrooted e url implícitas)';
 $wb['limit_cron_frequency_txt'] = 'Tempo de espera entre as execuções';
 $wb['ip_address_txt'] = 'Endereço IP';
 $wb['limit_client_error_notint'] = 'O limite de clientes deve ser um número.';
-$wb['firstname_error_empty'] = 'Nome está em branco.';
-$wb['contact_error_empty'] = 'Contato está em branco.';
+$wb['firstname_error_empty'] = 'Nome está vazio.';
+$wb['contact_error_empty'] = 'Contato está vazio.';
 $wb['default_webserver_txt'] = 'Servidor web padrão';
 $wb['limit_web_domain_txt'] = 'Limite de domínios de site';
 $wb['limit_web_aliasdomain_txt'] = 'Limite de alias de domínios de site';
-$wb['limit_web_subdomain_txt'] = 'Limite subdomínios de site';
-$wb['limit_ftp_user_txt'] = 'Limite de usuários ftp';
-$wb['default_dnsserver_txt'] = 'Servidor dns padrão';
-$wb['limit_dns_zone_txt'] = 'Limite de zonas dns';
-$wb['limit_dns_slave_zone_txt'] = 'Limite de zonas dns secundárias';
-$wb['limit_dns_record_txt'] = 'Limite de registros dns';
-$wb['limit_shell_user_txt'] = 'Limite de usuários do shell';
-$wb['limit_webdav_user_txt'] = 'Limite de usuários webdav';
+$wb['limit_web_subdomain_txt'] = 'Limite de subdomínios de site';
+$wb['limit_ftp_user_txt'] = 'Limite de usuários FTP';
+$wb['default_dnsserver_txt'] = 'Servidor DNS padrão';
+$wb['limit_dns_zone_txt'] = 'Limite de zonas DNS';
+$wb['limit_dns_slave_zone_txt'] = 'Limite de zonas DNS secundárias';
+$wb['limit_dns_record_txt'] = 'Limite de registros DNS';
+$wb['limit_shell_user_txt'] = 'Limite de usuários Shell';
+$wb['limit_webdav_user_txt'] = 'Limite de usuários Webdav';
 $wb['limit_backup_txt'] = 'Função de backup disponível';
 $wb['limit_client_txt'] = 'Limite de clientes';
-$wb['username_error_empty'] = 'Usuário está em branco.';
+$wb['username_error_empty'] = 'Usuário está vazio.';
 $wb['username_error_unique'] = 'O nome de usuário deve ser exclusivo.';
-$wb['limit_maildomain_error_notint'] = 'O limite de domínios de e-mail deve ser um número.';
-$wb['limit_mailmailinglist_error_notint'] = 'O limite de registro de listas de e-mail deve ser um número.';
-$wb['limit_mailbox_error_notint'] = 'O limite de contas de e-mail deve ser um número.';
-$wb['limit_mailalias_error_notint'] = 'O limite de alias de e-mail deve ser um número.';
+$wb['limit_maildomain_error_notint'] = 'O limite de domínios de email deve ser um número.';
+$wb['limit_mailmailinglist_error_notint'] = 'O limite de registros de listas de email deve ser um número.';
+$wb['limit_mailbox_error_notint'] = 'O limite de contas de email deve ser um número.';
+$wb['limit_mailalias_error_notint'] = 'O limite de alias de email deve ser um número.';
 $wb['limit_mailforward_error_notint'] = 'O limite de encaminhamentos deve ser um número.';
-$wb['limit_mailcatchall_error_notint'] = 'O limite de contas cata-tudo deve ser um número.';
-$wb['limit_mailrouting_error_notint'] = 'O limite de rotas de e-mail deve ser um número.';
-$wb['limit_mailfilter_error_notint'] = 'O limite de filtros de e-mail deve ser um número.';
+$wb['limit_mailcatchall_error_notint'] = 'O limite de contas cata tudo deve ser um número.';
+$wb['limit_mailrouting_error_notint'] = 'O limite de rotas de email deve ser um número.';
+$wb['limit_mailfilter_error_notint'] = 'O limite de filtros de email deve ser um número.';
 $wb['limit_mailfetchmail_error_notint'] = 'O limite de contas de busca deve ser um número.';
-$wb['limit_mailquota_error_notint'] = 'O limite das cotas de e-mail deve ser um número.';
-$wb['limit_spamfilter_wblist_error_notint'] = 'O limite de filtros anti-spam "lista branca/negra" deve ser um número.';
-$wb['limit_spamfilter_user_error_notint'] = 'O limite de filtros anti-spam por conta de e-mail deve ser um número.';
+$wb['limit_mailquota_error_notint'] = 'O limite das cotas de email deve ser um número.';
+$wb['limit_spamfilter_wblist_error_notint'] = 'O limite de filtros anti-spam "lista de permissões/bloqueio" deve ser um número.';
+$wb['limit_spamfilter_user_error_notint'] = 'O limite de filtros anti-spam por conta de email deve ser um número.';
 $wb['limit_spamfilter_policy_error_notint'] = 'O limite de políticas anti-spam deve ser um número.';
 $wb['limit_web_domain_error_notint'] = 'O limite de sites deve ser um número.';
 $wb['limit_web_aliasdomain_error_notint'] = 'O limite de alias de domínios de site deve ser um número.';
 $wb['limit_web_subdomain_error_notint'] = 'O limite de subdomínios de site deve ser um número.';
-$wb['limit_ftp_user_error_notint'] = 'O limite de usuários ftp deve ser um número.';
-$wb['limit_webdav_user_error_notint'] = 'O limite de usuários webdav deve ser um número.';
-$wb['limit_shell_user_error_notint'] = 'O limite de usuários do shell deve ser um número.';
-$wb['limit_dns_zone_error_notint'] = 'O limite de zonas dns deve ser um número.';
-$wb['limit_dns_slave_zone_error_notint'] = 'O limite de zonas dns secundárias deve ser um número.';
-$wb['limit_dns_record_error_notint'] = 'O limite de registros dns deve ser um número.';
-$wb['default_dbserver_txt'] = 'Servidor de banco de dados padrão';
-$wb['limit_database_error_notint'] = 'O limite de banco de dados deve ser um número.';
-$wb['limit_cron_error_notint'] = 'O limite de tarefas no cron deve ser um número.';
-$wb['limit_cron_error_frequency'] = 'O limite da frequência de execuções no cron deve ser um número.';
+$wb['limit_ftp_user_error_notint'] = 'O limite de usuários FTP deve ser um número.';
+$wb['limit_webdav_user_error_notint'] = 'O limite de usuários Webdav deve ser um número.';
+$wb['limit_shell_user_error_notint'] = 'O limite de usuários Shell deve ser um número.';
+$wb['limit_dns_zone_error_notint'] = 'O limite de zonas DNS deve ser um número.';
+$wb['limit_dns_slave_zone_error_notint'] = 'O limite de zonas DNS secundárias deve ser um número.';
+$wb['limit_dns_record_error_notint'] = 'O limite de registros DNS deve ser um número.';
+$wb['default_dbserver_txt'] = 'Servidor do Banco de Dados padrão';
+$wb['limit_database_error_notint'] = 'O limite do Banco de Dados deve ser um número.';
+$wb['limit_cron_error_notint'] = 'O limite de tarefas no Cron deve ser um número.';
+$wb['limit_cron_error_frequency'] = 'O limite da frequência de execuções no Cron deve ser um número.';
 $wb['username_error_regex'] = 'O nome do usuário contém caracteres inválidos.';
 $wb['template_master_txt'] = 'Gabarito Mestre';
 $wb['template_additional_txt'] = 'Gabarito Personalizado';
 $wb['add_additional_template_txt'] = 'Adicionar gabarito personalizado';
 $wb['delete_additional_template_txt'] = 'Remover gabarito personalizado';
-$wb['ssh_chroot_txt'] = 'Opções SSH-Chroot';
+$wb['ssh_chroot_txt'] = 'Opções SSH chroot';
 $wb['web_php_options_txt'] = 'Opções PHP';
 $wb['limit_cgi_txt'] = 'CGI disponível';
 $wb['limit_ssi_txt'] = 'SSI disponível';
@@ -108,7 +108,7 @@ $wb['force_suexec_txt'] = 'Forçar SuEXEC';
 $wb['limit_hterror_txt'] = 'Custom error docs disponível';
 $wb['limit_wildcard_txt'] = 'Curingas de subdomínios disponível';
 $wb['limit_ssl_txt'] = 'SSL disponível';
-$wb['limit_ssl_letsencrypt_txt'] = 'Let\'s Encrypt disponível';
+$wb['limit_ssl_letsencrypt_txt'] = 'Let\\'s Encrypt disponível';
 $wb['limit_client_error'] = 'O limite de clientes para esta conta foi alcançado.';
 $wb['limit_client_error_positive_or_unlimited'] = 'O número de clientes deve ser > 0 ou -1 (ilimitado)';
 $wb['limit_web_quota_txt'] = 'Cota web';
@@ -122,10 +122,10 @@ $wb['limit_openvz_vm_template_id_txt'] = 'Forçar gabarito para máquina virtual
 $wb['limit_openvz_vm_error_notint'] = 'O limite de máquinas virtuais deve ser um número.';
 $wb['web_php_options_notempty'] = 'Nenhuma opção PHP selecionado. Selecione ao menos uma opção PHP.';
 $wb['ssh_chroot_notempty'] = 'Nenhuma opção SSH chroot selecionada. Selecione ao menos uma opção SSH chroot.';
-$wb['username_error_collision'] = 'O nome de usuário não pode iniciar com -web- ou -web- seguida de um número.';
+$wb['username_error_collision'] = 'O nome de usuário não pode iniciar com "web" ou "web" seguida de um número.';
 $wb['web_limits_txt'] = 'Limite de site';
-$wb['email_limits_txt'] = 'Limites de e-mail';
-$wb['database_limits_txt'] = 'Limite de banco de dados';
+$wb['email_limits_txt'] = 'Limites de email';
+$wb['database_limits_txt'] = 'Limite do Banco de Dados';
 $wb['cron_job_limits_txt'] = 'Limites de tarefa no Cron';
 $wb['dns_limits_txt'] = 'Limites de DNS';
 $wb['virtualization_limits_txt'] = 'Limites de máquinas virtuais';
@@ -133,10 +133,10 @@ $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-$wb['email_error_isemail'] = 'Por favor, insira um e-mail válido.';
-$wb['customer_no_error_unique'] = 'O código do cliente deve ser exclusivo e não pode estar está em branco.';
-$wb['paypal_email_error_isemail'] = 'Por favor, insira um e-mail do PayPal válido.';
-$wb['paypal_email_txt'] = 'e-Mail PayPal';
+$wb['email_error_isemail'] = 'Por favor, insira um email válido.';
+$wb['customer_no_error_unique'] = 'O código do cliente deve ser exclusivo e não pode estar vazio.';
+$wb['paypal_email_error_isemail'] = 'Por favor, insira um email do PayPal válido.';
+$wb['paypal_email_txt'] = 'eMail PayPal';
 $wb['company_id_txt'] = 'Código da Empresa';
 $wb['bank_account_number_txt'] = 'Conta bancária';
 $wb['bank_account_owner_txt'] = 'Proprietário da conta bancária';
@@ -155,33 +155,33 @@ $wb['gender_f_txt'] = 'Sra.';
 $wb['gender_txt'] = 'Título';
 $wb['web_servers_txt'] = 'Servidores Web';
 $wb['web_servers_placeholder'] = 'Selecione o(s) servidor(es) web';
-$wb['no_web_server_error'] = 'Ao menos um servidor web deve ser selecionado.';
-$wb['web_servers_used'] = 'O servidor web que você está tentando remover para este cliente é usado pelo mesmo. Certifique-se que este servidor não esteja em uso para este cliente antes de removê-lo.';
+$wb['no_web_server_error'] = 'Ao menos um servidor Web deve ser selecionado.';
+$wb['web_servers_used'] = 'O servidor Web que você está tentando remover para este cliente é usado pelo mesmo. Certifique-se que este servidor não esteja em uso para este cliente antes de removê-lo.';
 $wb['dns_servers_txt'] = 'Servidor DNS';
 $wb['dns_servers_placeholder'] = 'Selecione os servidores DNS';
 $wb['no_dns_server_error'] = 'Ao menos um servidor DNS deve ser selecionado.';
 $wb['dns_servers_used'] = 'O servidor DNS que você está tentando remover para este cliente é usado pelo mesmo. Certifique-se que este servidor não esteja em uso para este cliente antes de removê-lo.';
-$wb['db_servers_txt'] = 'Servidor de banco de dados';
-$wb['db_servers_placeholder'] = 'Selecione os servidores de banco de dados';
-$wb['no_db_server_error'] = 'Ao menos um servidor de banco de dados deve ser selecionado.';
-$wb['db_servers_used'] = 'O servidor de banco de dados que você está tentando remover para este cliente é usado pelo mesmo. Certifique-se que este servidor não esteja em uso para este cliente antes de removê-lo.';
-$wb['mail_servers_txt'] = 'Servidores de e-mail';
-$wb['mail_servers_placeholder'] = 'Selecione os servidores de e-mail';
-$wb['no_mail_server_error'] = 'Ao menos um servidor de e-mail deve ser selecionado.';
-$wb['mail_servers_used'] = 'O servidor de e-mails que você está tentando remover para este cliente é usado pelo mesmo. Certifique-se que este servidor não esteja em uso para este cliente antes de removê-lo.';
+$wb['db_servers_txt'] = 'Servidor do Banco de Dados';
+$wb['db_servers_placeholder'] = 'Selecione os servidores do Banco de Dados';
+$wb['no_db_server_error'] = 'Ao menos um servidor do Banco de Dados deve ser selecionado.';
+$wb['db_servers_used'] = 'O servidor do Banco de Dados que você está tentando remover para este cliente é usado pelo mesmo. Certifique-se que este servidor não esteja em uso para este cliente antes de removê-lo.';
+$wb['mail_servers_txt'] = 'Servidores de email';
+$wb['mail_servers_placeholder'] = 'Selecione os servidores de email';
+$wb['no_mail_server_error'] = 'Ao menos um servidor de email deve ser selecionado.';
+$wb['mail_servers_used'] = 'O servidor de emails que você está tentando remover para este cliente é usado pelo mesmo. Certifique-se que este servidor não esteja em uso para este cliente antes de removê-lo.';
 $wb['customer_no_template_txt'] = 'Código do gabarito de clientes';
 $wb['customer_no_template_error_regex_txt'] = 'O código de gabarito de clientes possui caracteres inválidos.';
 $wb['customer_no_start_txt'] = 'Iniciar código de clientes em';
 $wb['customer_no_counter_txt'] = 'Contador de código do cliente';
-$wb['xmpp_limits_txt'] = 'Limites xmpp';
-$wb['xmpp_servers_txt'] = 'Servidores xmpp';
-$wb['xmpp_servers_placeholder'] = 'Selecione os servidores xmpp';
-$wb['no_xmpp_server_error'] = 'Ao menos um servidor xmpp deve ser selecionado.';
-$wb['xmpp_servers_used'] = 'O servidor xmpp que você está tentando remover para este cliente é usado pelo mesmo. Certifique-se que este servidor não esteja em uso para este cliente antes de removê-lo.';
-$wb['limit_xmpp_domain_error_notint'] = 'O limite de domínios xmpp deve ser um número.';
-$wb['limit_xmpp_user_error_notint'] = 'O limite de usuários xmpp deve ser um número.';
-$wb['limit_xmpp_domain_txt'] = 'Limite de domínios xmpp';
-$wb['limit_xmpp_user_txt'] = 'Limite de usuários xmpp';
+$wb['xmpp_limits_txt'] = 'Limites XMPP';
+$wb['xmpp_servers_txt'] = 'Servidores XMPP';
+$wb['xmpp_servers_placeholder'] = 'Selecione os servidores XMPP';
+$wb['no_xmpp_server_error'] = 'Ao menos um servidor XMPP deve ser selecionado.';
+$wb['xmpp_servers_used'] = 'O servidor XMPP que você está tentando remover para este cliente é usado pelo mesmo. Certifique-se que este servidor não esteja em uso para este cliente antes de removê-lo.';
+$wb['limit_xmpp_domain_error_notint'] = 'O limite de domínios XMPP deve ser um número.';
+$wb['limit_xmpp_user_error_notint'] = 'O limite de usuários XMPP deve ser um número.';
+$wb['limit_xmpp_domain_txt'] = 'Limite de domínios XMPP';
+$wb['limit_xmpp_user_txt'] = 'Limite de usuários XMPP';
 $wb['limit_xmpp_muc_txt'] = 'Chat multiusuário (MUC) disponível';
 $wb['limit_xmpp_pastebin_txt'] = 'Pastebin para MUC disponível';
 $wb['limit_xmpp_httparchive_txt'] = 'Arquivo HTTP para MUC disponível';
@@ -198,12 +198,11 @@ $wb['err_msg_master_tpl_set'] = 'Todas as configurações de limites serão igno
 $wb['invalid_vat_id'] = 'O ID do VAT é inválido.';
 $wb['btn_save_txt'] = 'Salvar';
 $wb['btn_cancel_txt'] = 'Cancelar';
-$wb['email_error_empty'] = 'O endereço de e-mail está em branco.';
-$wb['limit_directive_snippets_txt'] = 'Exibir seleção de configuração do servidor web';
-$wb['limit_database_user_error_notint'] = 'O limite de usuários do banco de dados deve ser um número.';
-$wb['limit_database_quota_txt'] = 'Cota do banco de dados';
-$wb['limit_database_quota_error_notint'] = 'A cota do banco de dados deve ser um número.';
-$wb['Reseller'] = 'Reseller';
-$wb['Address'] = 'Address';
+$wb['email_error_empty'] = 'O endereço de email está vazio.';
+$wb['limit_directive_snippets_txt'] = 'Exibir seleção de configuração do servidor Web';
+$wb['limit_database_user_error_notint'] = 'O limite de usuários do Banco de Dados deve ser um número.';
+$wb['limit_database_quota_txt'] = 'Cota do Banco de Dados';
+$wb['limit_database_quota_error_notint'] = 'A cota do Banco de Dados deve ser um número.';
+$wb['Reseller'] = 'Revenda';
+$wb['Address'] = 'Revenda';
 $wb['Limits'] = 'Limites';
-?>
diff --git a/interface/web/client/lib/lang/br_resellers_list.lng b/interface/web/client/lib/lang/br_resellers_list.lng
index 1f67e7f593..4417a64a19 100644
--- a/interface/web/client/lib/lang/br_resellers_list.lng
+++ b/interface/web/client/lib/lang/br_resellers_list.lng
@@ -8,4 +8,3 @@ $wb['country_txt'] = 'País';
 $wb['add_new_record_txt'] = 'Adicionar nova revenda';
 $wb['customer_no_txt'] = 'Código do cliente';
 $wb['username_txt'] = 'Usuário';
-?>
diff --git a/interface/web/client/lib/lang/cz.lng b/interface/web/client/lib/lang/cz.lng
index c8c8f50074..f0c18e31fc 100644
--- a/interface/web/client/lib/lang/cz.lng
+++ b/interface/web/client/lib/lang/cz.lng
@@ -17,14 +17,13 @@ $wb['Messaging'] = 'Odesílání zpráv';
 $wb['Send email'] = 'Odeslat e-mail';
 $wb['Edit Client Circle'] = 'Upravit skupinu klientů';
 $wb['Domains'] = 'Domény';
-$wb['Add Domain'] = 'Add Domain';
+$wb['Add Domain'] = 'Přidat doménu';
 $wb['domain_txt'] = 'Doména';
 $wb['client_txt'] = 'Klient';
 $wb['error_domain_in mailuse'] = 'Tato doména nelze odstranit, protože je v používána jako poštovní doména';
 $wb['error_domain_in webuse'] = 'Tato doména nelze odstranit, protože je v používána jako webová doména';
 $wb['error_client_can_not_add_domain'] = 'Nemůžete přidat novou doménu';
 $wb['error_client_group_id_empty'] = 'Musíte vybrat zákazníka<br>';
-$wb['error_domain_in dnsuse'] = 'This domain cannot be deleted, because it is in use as dns zone';
-$wb['error_domain_in dnsslaveuse'] = 'This domain cannot be deleted, because it is in use as secondary dns zone';
-$wb['Email-Templates'] = 'E-mailové šablony';
-?>
+$wb['error_domain_in dnsuse'] = 'Tuto doménu nelze odstranit, protože se používá jako zóna DNS';
+$wb['error_domain_in dnsslaveuse'] = 'Tuto doménu nelze odstranit, protože se používá jako sekundární dns zóna';
+$wb['Email-Templates'] = 'Poštovní šablony';
diff --git a/interface/web/client/lib/lang/cz_client.lng b/interface/web/client/lib/lang/cz_client.lng
index 5d26a51cda..372080507e 100644
--- a/interface/web/client/lib/lang/cz_client.lng
+++ b/interface/web/client/lib/lang/cz_client.lng
@@ -1,6 +1,6 @@
 <?php
 $wb['limit_maildomain_txt'] = 'Max. počet e-mailových domén';
-$wb['limit_mailbox_txt'] = 'Max. počet mailboxů';
+$wb['limit_mailbox_txt'] = 'Max. počet e-mailových schránek';
 $wb['limit_mailalias_txt'] = 'Max. počet e-mailových aliasů';
 $wb['limit_mailaliasdomain_txt'] = 'Max. počet doménových přezdívek';
 $wb['limit_mailforward_txt'] = 'Max. počet e-mailových předavačů';
@@ -139,12 +139,12 @@ $wb['email_error_isemail'] = 'Zadejte prosím platnou e-mailovou adresu.';
 $wb['customer_no_error_unique'] = 'Zákaznické číslo musí být jedinečné (nebo prázdné).';
 $wb['paypal_email_error_isemail'] = 'Zadejte prosím platnou PayPal e-mail addresu.';
 $wb['paypal_email_txt'] = 'PayPal e-mail';
-$wb['err_msg_master_tpl_set'] = 'Nelze nastavit vlastní limity, pokud chtete nastavit vlatní limity musí být \\"hlavní šablona\\" nastavena na volbu \\"Custom\\".';
+$wb['err_msg_master_tpl_set'] = 'Nelze nastavit vlastní limity, pokud chtete nastavit vlatní limity musí být \"hlavní šablona\" nastavena na volbu \"Custom\".';
 $wb['aps_limits_txt'] = 'APS limity instalátoru';
 $wb['limit_aps_txt'] = 'Max. počet APS instalací';
 $wb['limit_aps_error_notint'] = 'Limit pro APS instalace musí být číslo.';
 $wb['default_slave_dnsserver_txt'] = 'Výchozí sekundární DNS server';
-$wb['locked_txt'] = 'Locked (disables everything except DNS)';
+$wb['locked_txt'] = 'Zamčeno (zakáže všechny weby atd.)';
 $wb['canceled_txt'] = 'Zrušeno (zakáže přihlášení klienta)';
 $wb['gender_txt'] = 'Oslovení';
 $wb['gender_m_txt'] = 'Pan';
@@ -200,6 +200,5 @@ $wb['limit_database_user_txt'] = 'Max. počet databázových uživatelů';
 $wb['limit_database_user_error_notint'] = 'Limit databázové kvóty musí být číslo.';
 $wb['password_click_to_set_txt'] = 'Pro nastavení klikni zde';
 $wb['limit_dns_record_error_notint'] = 'Limit DNS záznamů musí být číslo.';
-$wb['Address'] = 'Address';
+$wb['Address'] = 'Adresa';
 $wb['Limits'] = 'Limity';
-?>
diff --git a/interface/web/client/lib/lang/cz_client_circle.lng b/interface/web/client/lib/lang/cz_client_circle.lng
index f26e2d6d4b..24b624a88e 100644
--- a/interface/web/client/lib/lang/cz_client_circle.lng
+++ b/interface/web/client/lib/lang/cz_client_circle.lng
@@ -6,4 +6,3 @@ $wb['circle_name_txt'] = 'Název skupiny';
 $wb['client_ids_txt'] = 'Klienti/Distributoři';
 $wb['description_txt'] = 'Popis';
 $wb['active_txt'] = 'Aktivní';
-?>
diff --git a/interface/web/client/lib/lang/cz_client_circle_list.lng b/interface/web/client/lib/lang/cz_client_circle_list.lng
index e1e0da1443..70f60728cf 100644
--- a/interface/web/client/lib/lang/cz_client_circle_list.lng
+++ b/interface/web/client/lib/lang/cz_client_circle_list.lng
@@ -7,4 +7,3 @@ $wb['add_new_record_txt'] = 'Vytvořit skupinu';
 $wb['filter_txt'] = 'Filtr';
 $wb['delete_txt'] = 'Smazat';
 $wb['active_txt'] = 'Aktivní';
-?>
diff --git a/interface/web/client/lib/lang/cz_client_del.lng b/interface/web/client/lib/lang/cz_client_del.lng
index d19949fec5..406dd0a91c 100644
--- a/interface/web/client/lib/lang/cz_client_del.lng
+++ b/interface/web/client/lib/lang/cz_client_del.lng
@@ -7,4 +7,3 @@ $wb['confirm_client_delete_txt'] = 'Jste si jisti, že chcete smazat tohoto klie
 $wb['list_head_txt'] = 'Delete Client';
 $wb['table_txt'] = 'Table';
 $wb['data_txt'] = 'Data';
-?>
diff --git a/interface/web/client/lib/lang/cz_client_message.lng b/interface/web/client/lib/lang/cz_client_message.lng
index 3710cbd254..4f05afc2c7 100644
--- a/interface/web/client/lib/lang/cz_client_message.lng
+++ b/interface/web/client/lib/lang/cz_client_message.lng
@@ -17,4 +17,3 @@ $wb['all_clients_txt'] = 'Všichni klienti';
 $wb['variables_txt'] = 'Výběr (možnosti):';
 $wb['gender_m_txt'] = 'Pan';
 $wb['gender_f_txt'] = 'Paní';
-?>
diff --git a/interface/web/client/lib/lang/cz_client_message_template.lng b/interface/web/client/lib/lang/cz_client_message_template.lng
index b1d730c067..9c770d03ab 100644
--- a/interface/web/client/lib/lang/cz_client_message_template.lng
+++ b/interface/web/client/lib/lang/cz_client_message_template.lng
@@ -10,4 +10,3 @@ $wb['variables_description_txt'] = 'Proměnné uživatelské jméno a heslo jsou
 $wb['duplicate_welcome_error'] = 'There can be only one default welcome email template. Please edit the existing template instead of adding a new one.';
 $wb['subject_error_empty'] = 'Subject is empty';
 $wb['message_error_empty'] = 'Message is empty';
-?>
diff --git a/interface/web/client/lib/lang/cz_client_message_template_list.lng b/interface/web/client/lib/lang/cz_client_message_template_list.lng
index d4c2f63857..3dd0a7cd40 100644
--- a/interface/web/client/lib/lang/cz_client_message_template_list.lng
+++ b/interface/web/client/lib/lang/cz_client_message_template_list.lng
@@ -1,5 +1,4 @@
 <?php
-$wb['list_head_txt'] = 'E-mailové šablony';
+$wb['list_head_txt'] = 'Poštovní šablony';
 $wb['template_type_txt'] = 'Zpráva pro';
 $wb['template_name_txt'] = 'Název šablony';
-?>
diff --git a/interface/web/client/lib/lang/cz_client_template.lng b/interface/web/client/lib/lang/cz_client_template.lng
index 6b711f44de..8cb8b34a4e 100644
--- a/interface/web/client/lib/lang/cz_client_template.lng
+++ b/interface/web/client/lib/lang/cz_client_template.lng
@@ -2,7 +2,7 @@
 $wb['ssh_chroot_notempty'] = 'No SSH chroot option selected. Select at least one option.';
 $wb['limit_client_error_notint'] = 'Klientský limit není číslo.';
 $wb['limit_maildomain_txt'] = 'Max. počet e-mailových domén';
-$wb['limit_mailbox_txt'] = 'Max. počet mailboxů';
+$wb['limit_mailbox_txt'] = 'Max. počet e-mailových schránek';
 $wb['limit_mailalias_txt'] = 'Max. e-mailových aliasů';
 $wb['limit_mailaliasdomain_txt'] = 'Max. počet doménových přezdívek';
 $wb['limit_mailforward_txt'] = 'Max. počet e-mailových předávání';
@@ -122,4 +122,3 @@ $wb['web_servers_txt'] = 'Webové servery';
 $wb['db_servers_txt'] = 'Databázové servery';
 $wb['mail_servers_txt'] = 'E-mailové servery';
 $wb['Limits'] = 'Limity';
-?>
diff --git a/interface/web/client/lib/lang/cz_client_template_list.lng b/interface/web/client/lib/lang/cz_client_template_list.lng
index 28a5d3bf63..e7914073ea 100644
--- a/interface/web/client/lib/lang/cz_client_template_list.lng
+++ b/interface/web/client/lib/lang/cz_client_template_list.lng
@@ -3,5 +3,4 @@ $wb['list_head_txt'] = 'Klientské šablony';
 $wb['template_type_txt'] = 'Typ';
 $wb['template_name_txt'] = 'Název šablony';
 $wb['template_id_txt'] = 'ID šablony';
-$wb['sys_groupid_txt'] = 'Reseller';
-?>
+$wb['sys_groupid_txt'] = 'Prodejce';
diff --git a/interface/web/client/lib/lang/cz_clients_list.lng b/interface/web/client/lib/lang/cz_clients_list.lng
index 270da3674d..92ebc7e2d7 100644
--- a/interface/web/client/lib/lang/cz_clients_list.lng
+++ b/interface/web/client/lib/lang/cz_clients_list.lng
@@ -11,4 +11,3 @@ $wb['customer_no_txt'] = 'Zákaznické číslo';
 $wb['locked_txt'] = 'Zamčené';
 $wb['yes_txt'] = 'Ano';
 $wb['no_txt'] = 'Ne';
-?>
diff --git a/interface/web/client/lib/lang/cz_domain.lng b/interface/web/client/lib/lang/cz_domain.lng
index 08b113fc4d..33d634d8e3 100644
--- a/interface/web/client/lib/lang/cz_domain.lng
+++ b/interface/web/client/lib/lang/cz_domain.lng
@@ -3,4 +3,3 @@ $wb['domain_error_empty'] = 'Doménové jméno je prázdné';
 $wb['domain_error_unique'] = 'Doména již existuje';
 $wb['domain_error_regex'] = 'Toto doménové jméno je zakázáno';
 $wb['Domain'] = 'Doména';
-?>
diff --git a/interface/web/client/lib/lang/cz_domain_list.lng b/interface/web/client/lib/lang/cz_domain_list.lng
index 25adf20c25..220ab3d9e1 100644
--- a/interface/web/client/lib/lang/cz_domain_list.lng
+++ b/interface/web/client/lib/lang/cz_domain_list.lng
@@ -3,4 +3,3 @@ $wb['list_head_txt'] = 'Domény';
 $wb['add_new_record_txt'] = 'Vytvořit doménu';
 $wb['domain_txt'] = 'Doména';
 $wb['user_txt'] = 'Klient';
-?>
diff --git a/interface/web/client/lib/lang/cz_reseller.lng b/interface/web/client/lib/lang/cz_reseller.lng
index d9ddb4c5c4..751afa6990 100644
--- a/interface/web/client/lib/lang/cz_reseller.lng
+++ b/interface/web/client/lib/lang/cz_reseller.lng
@@ -1,6 +1,6 @@
 <?php
 $wb['limit_maildomain_txt'] = 'Max. počet e-mailových domén';
-$wb['limit_mailbox_txt'] = 'Max. počet mailboxů';
+$wb['limit_mailbox_txt'] = 'Max. počet e-mailových schránek';
 $wb['limit_mailalias_txt'] = 'Max. počet e-mailových aliasů';
 $wb['limit_mailforward_txt'] = 'Max. počet e-mailových předávání';
 $wb['limit_mailcatchall_txt'] = 'Max. počet e-mailových košů';
@@ -156,7 +156,7 @@ $wb['added_date_txt'] = 'Datum vytvoření účtu';
 $wb['limit_domainmodule_error_notint'] = 'Domainmodule limit must be a number.';
 $wb['limit_domainmodule_txt'] = 'Domainmodule Limit';
 $wb['client_limits_txt'] = 'Klientské limity';
-$wb['err_msg_master_tpl_set'] = 'Nelze nastavit vlastní limity, pokud chtete nastavit vlatní limity musí být \\"hlavní šablona\\" nastavena na volbu \\"Custom\\".';
+$wb['err_msg_master_tpl_set'] = 'Nelze nastavit vlastní limity, pokud chtete nastavit vlatní limity musí být \"hlavní šablona\" nastavena na volbu \"Custom\".';
 $wb['contact_firstname_txt'] = 'Kontakt křestní jméno';
 $wb['limit_backup_txt'] = 'Funkce zálohování (volitelné)';
 $wb['limit_client_error_positive_or_unlimited'] = 'The number of clients must be > 0 or -1 (unlimited)';
@@ -203,7 +203,6 @@ $wb['limit_database_user_error_notint'] = 'Limit databázové kvóty musí být
 $wb['limit_database_quota_txt'] = 'Databázové kvóty';
 $wb['limit_database_quota_error_notint'] = 'Limit databázové kvóty musí být číslo.';
 $wb['password_click_to_set_txt'] = 'Pro nastavení klikni zde';
-$wb['Reseller'] = 'Reseller';
-$wb['Address'] = 'Address';
+$wb['Reseller'] = 'Prodejce';
+$wb['Address'] = 'Adresa';
 $wb['Limits'] = 'Limity';
-?>
diff --git a/interface/web/client/lib/lang/cz_resellers_list.lng b/interface/web/client/lib/lang/cz_resellers_list.lng
index 13202ff743..8d7d2a89fe 100644
--- a/interface/web/client/lib/lang/cz_resellers_list.lng
+++ b/interface/web/client/lib/lang/cz_resellers_list.lng
@@ -8,4 +8,3 @@ $wb['country_txt'] = 'Stát';
 $wb['add_new_record_txt'] = 'Vytvořit distributora';
 $wb['customer_no_txt'] = 'Zákaznické číslo';
 $wb['username_txt'] = 'Uživatelské jméno';
-?>
diff --git a/interface/web/dashboard/lib/lang/br.lng b/interface/web/dashboard/lib/lang/br.lng
index 4ad7fc9c3c..df1c239087 100644
--- a/interface/web/dashboard/lib/lang/br.lng
+++ b/interface/web/dashboard/lib/lang/br.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['welcome_user_txt'] = 'Bem-vindo %s';
 $wb['available_modules_txt'] = 'Módulos disponíveis';
-?>
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_customer.lng b/interface/web/dashboard/lib/lang/br_dashlet_customer.lng
index 8c110cc29b..6bfd8fef29 100644
--- a/interface/web/dashboard/lib/lang/br_dashlet_customer.lng
+++ b/interface/web/dashboard/lib/lang/br_dashlet_customer.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['customerdata_txt'] = 'Meus dados';
 $wb['edit_txt'] = 'Editar';
-?>
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_databasequota.lng b/interface/web/dashboard/lib/lang/br_dashlet_databasequota.lng
index 9279d2230a..a682d966e0 100644
--- a/interface/web/dashboard/lib/lang/br_dashlet_databasequota.lng
+++ b/interface/web/dashboard/lib/lang/br_dashlet_databasequota.lng
@@ -1,7 +1,6 @@
 <?php
-$wb['databasequota_txt'] = 'Cota do banco de dados';
+$wb['databasequota_txt'] = 'Cota do Banco de Dados';
 $wb['database_txt'] = 'Banco de dados';
 $wb['used_txt'] = 'Espaço utilizado';
 $wb['quota_txt'] = 'Cota';
 $wb['no_database_accounts_txt'] = 'Nenhum banco de dados encontrado.';
-?>
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_donate.lng b/interface/web/dashboard/lib/lang/br_dashlet_donate.lng
index a8ae8a69ef..b970e28839 100644
--- a/interface/web/dashboard/lib/lang/br_dashlet_donate.lng
+++ b/interface/web/dashboard/lib/lang/br_dashlet_donate.lng
@@ -4,4 +4,3 @@ $wb['donate2_txt'] = 'O valor da doação pode ser 5 EUR ou mais, o qual é esco
 $wb['hide_btn_txt'] = 'Ocultar';
 $wb['donate_btn_txt'] = 'Doar para ISPConfig e receber o manual';
 $wb['more_btn_txt'] = 'Mais';
-?>
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_invoice_client_settings.lng b/interface/web/dashboard/lib/lang/br_dashlet_invoice_client_settings.lng
index 1ac4ee2fae..6cea8cb62d 100644
--- a/interface/web/dashboard/lib/lang/br_dashlet_invoice_client_settings.lng
+++ b/interface/web/dashboard/lib/lang/br_dashlet_invoice_client_settings.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['invoice_client_settings_txt'] = 'Configurações de fatura de clientes';
 $wb['edit_txt'] = 'Editar';
-?>
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_invoices.lng b/interface/web/dashboard/lib/lang/br_dashlet_invoices.lng
index 545c6994a6..acc6e6e592 100644
--- a/interface/web/dashboard/lib/lang/br_dashlet_invoices.lng
+++ b/interface/web/dashboard/lib/lang/br_dashlet_invoices.lng
@@ -15,4 +15,3 @@ $wb['invoice_type_invoice_txt'] = 'Fatura';
 $wb['invoice_type_proforma_txt'] = 'Proforma';
 $wb['invoice_type_refund_txt'] = 'Reembolso';
 $wb['invoice_type_reminder_txt'] = 'Lembrar';
-?>
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_limits.lng b/interface/web/dashboard/lib/lang/br_dashlet_limits.lng
index 739c7e4445..057a1c780c 100644
--- a/interface/web/dashboard/lib/lang/br_dashlet_limits.lng
+++ b/interface/web/dashboard/lib/lang/br_dashlet_limits.lng
@@ -1,33 +1,32 @@
 <?php
 $wb['limits_txt'] = 'Limites de contas';
 $wb['of_txt'] = 'de';
-$wb['limit_maildomain_txt'] = 'Número de domínios de e-mail';
-$wb['limit_mailmailinglist_txt'] = 'Número de listas de e-mail';
-$wb['limit_mailbox_txt'] = 'Número de contas de e-mail';
-$wb['limit_mailalias_txt'] = 'Número de alias de e-mail';
-$wb['limit_mailaliasdomain_txt'] = 'Número de alias de domínios de e-mail';
-$wb['limit_mailforward_txt'] = 'Número de encaminhamentos de e-mail';
-$wb['limit_mailcatchall_txt'] = 'Número de contas cata-tudo';
-$wb['limit_mailrouting_txt'] = 'Número de rotas de e-mail';
-$wb['limit_mailfilter_txt'] = 'Número de filtros de e-mail';
+$wb['limit_maildomain_txt'] = 'Número de domínios de email';
+$wb['limit_mailmailinglist_txt'] = 'Número de listas de email';
+$wb['limit_mailbox_txt'] = 'Número de contas de email';
+$wb['limit_mailalias_txt'] = 'Número de alias de email';
+$wb['limit_mailaliasdomain_txt'] = 'Número de alias de domínios de email';
+$wb['limit_mailforward_txt'] = 'Número de encaminhamentos de email';
+$wb['limit_mailcatchall_txt'] = 'Número de contas cata tudo';
+$wb['limit_mailrouting_txt'] = 'Número de rotas de email';
+$wb['limit_mailfilter_txt'] = 'Número de filtros de email';
 $wb['limit_fetchmail_txt'] = 'Número de contas de busca';
-$wb['limit_spamfilter_wblist_txt'] = 'Número de filtros anti-spam "lista branca/negra"';
+$wb['limit_spamfilter_wblist_txt'] = 'Número de filtros anti-spam "lista de permissões/bloqueio"';
 $wb['limit_spamfilter_user_txt'] = 'Número de filtros anti-spam';
 $wb['limit_spamfilter_policy_txt'] = 'Número de políticas anti-spam';
-$wb['limit_cron_txt'] = 'Número de tarefas no cron';
+$wb['limit_cron_txt'] = 'Número de tarefas no Cron';
 $wb['limit_web_domain_txt'] = 'Número de domínios de site';
 $wb['limit_web_aliasdomain_txt'] = 'Número de alias de domínios de site';
 $wb['limit_web_subdomain_txt'] = 'Número de subdomínios de site';
-$wb['limit_ftp_user_txt'] = 'Número de usuários ftp';
-$wb['limit_dns_zone_txt'] = 'Número de zonas dns';
-$wb['limit_dns_slave_zone_txt'] = 'Número de zonas dns secundárias';
-$wb['limit_dns_record_txt'] = 'Número de registros dns';
-$wb['limit_shell_user_txt'] = 'Número de usuários do shell';
-$wb['limit_webdav_user_txt'] = 'Número de usuários webdav';
+$wb['limit_ftp_user_txt'] = 'Número de usuários FTP';
+$wb['limit_dns_zone_txt'] = 'Número de zonas DNS';
+$wb['limit_dns_slave_zone_txt'] = 'Número de zonas DNS secundárias';
+$wb['limit_dns_record_txt'] = 'Número de registros DNS';
+$wb['limit_shell_user_txt'] = 'Número de usuários Shell';
+$wb['limit_webdav_user_txt'] = 'Número de usuários Webdav';
 $wb['limit_client_txt'] = 'Número de clientes';
-$wb['limit_database_txt'] = 'Número de banco de dados';
+$wb['limit_database_txt'] = 'Número do Banco de Dados';
 $wb['limit_domain_txt'] = 'Número de domínios';
-$wb['limit_mailquota_txt'] = 'Cotas atribuídas para contas de e-mail';
+$wb['limit_mailquota_txt'] = 'Cotas atribuídas para contas de email';
 $wb['limit_web_quota_txt'] = 'Cotas atribuídas para sites';
-$wb['limit_database_quota_txt'] = 'Cotas atribuídas para banco de dados';
-?>
+$wb['limit_database_quota_txt'] = 'Cotas atribuídas para Banco de Dados';
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/br_dashlet_mailquota.lng
index d164a35661..a513f387a8 100644
--- a/interface/web/dashboard/lib/lang/br_dashlet_mailquota.lng
+++ b/interface/web/dashboard/lib/lang/br_dashlet_mailquota.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['mailquota_txt'] = 'Cota de contas de e-mail';
-$wb['email_txt'] = 'Endereço de e-mail';
+$wb['mailquota_txt'] = 'Cota de contas de email';
+$wb['email_txt'] = 'Endereço de email';
 $wb['name_txt'] = 'Nome';
 $wb['used_txt'] = 'Espaço utilizado';
 $wb['quota_txt'] = 'Cota';
-$wb['no_email_accounts_txt'] = 'Nenhuma conta de e-mail encontrada.';
-?>
+$wb['no_email_accounts_txt'] = 'Nenhuma conta de email encontrada.';
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_modules.lng b/interface/web/dashboard/lib/lang/br_dashlet_modules.lng
index 905d3d6007..398d8b2a78 100644
--- a/interface/web/dashboard/lib/lang/br_dashlet_modules.lng
+++ b/interface/web/dashboard/lib/lang/br_dashlet_modules.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['available_modules_txt'] = 'Módulos disponíveis';
 $wb['go_to_txt'] = 'Ir para';
-?>
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_products.lng b/interface/web/dashboard/lib/lang/br_dashlet_products.lng
index c750052ad7..aceb307454 100644
--- a/interface/web/dashboard/lib/lang/br_dashlet_products.lng
+++ b/interface/web/dashboard/lib/lang/br_dashlet_products.lng
@@ -6,4 +6,3 @@ $wb['next_payment_date_txt'] = 'Próxima fatura';
 $wb['no_products_txt'] = 'Nenhum produto encontrado.';
 $wb['edit_txt'] = 'Editar';
 $wb['cancellation_date_txt'] = 'Cancelado por';
-?>
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_quota.lng b/interface/web/dashboard/lib/lang/br_dashlet_quota.lng
index 589e3dca3e..492d70c1b3 100644
--- a/interface/web/dashboard/lib/lang/br_dashlet_quota.lng
+++ b/interface/web/dashboard/lib/lang/br_dashlet_quota.lng
@@ -5,4 +5,3 @@ $wb['used_txt'] = 'Espaço utilizado';
 $wb['hard_txt'] = 'Limite para bloqueio';
 $wb['soft_txt'] = 'Limite para alerta';
 $wb['no_sites_txt'] = 'Nenhum site encontrado.';
-?>
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_shop.lng b/interface/web/dashboard/lib/lang/br_dashlet_shop.lng
index 9fd37d5250..a7854c8c9b 100644
--- a/interface/web/dashboard/lib/lang/br_dashlet_shop.lng
+++ b/interface/web/dashboard/lib/lang/br_dashlet_shop.lng
@@ -5,4 +5,3 @@ $wb['price_txt'] = 'Preço';
 $wb['setup_fee_txt'] = 'Taxa criada';
 $wb['no_products_txt'] = 'Nenhum produto encontrado.';
 $wb['order_txt'] = 'Ordem';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz.lng b/interface/web/dashboard/lib/lang/cz.lng
index 9d2a3211cb..ba718be0b6 100644
--- a/interface/web/dashboard/lib/lang/cz.lng
+++ b/interface/web/dashboard/lib/lang/cz.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['welcome_user_txt'] = 'Vítejte %s';
 $wb['available_modules_txt'] = 'Dostupné moduly';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_customer.lng b/interface/web/dashboard/lib/lang/cz_dashlet_customer.lng
index f337141de6..3197df7959 100644
--- a/interface/web/dashboard/lib/lang/cz_dashlet_customer.lng
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_customer.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['customerdata_txt'] = 'My Data';
 $wb['edit_txt'] = 'Editovat';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_databasequota.lng b/interface/web/dashboard/lib/lang/cz_dashlet_databasequota.lng
index 93be2e3425..c060befe54 100644
--- a/interface/web/dashboard/lib/lang/cz_dashlet_databasequota.lng
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_databasequota.lng
@@ -4,4 +4,3 @@ $wb['used_txt'] = 'Využité místo';
 $wb['quota_txt'] = 'Kvóta';
 $wb['no_database_accounts_txt'] = 'Nebyla nalezena žádná databáze.';
 $wb['databasequota_txt'] = 'Kvóty databází';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_donate.lng b/interface/web/dashboard/lib/lang/cz_dashlet_donate.lng
index c3e857d85a..bf9c968609 100644
--- a/interface/web/dashboard/lib/lang/cz_dashlet_donate.lng
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_donate.lng
@@ -4,4 +4,3 @@ $wb['donate2_txt'] = 'Výše daru může být 5 EUR nebo více, částku si zvol
 $wb['hide_btn_txt'] = 'Skrýt';
 $wb['donate_btn_txt'] = 'Podpořit ISPConfig a získat manuál';
 $wb['more_btn_txt'] = 'Více';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_invoice_client_settings.lng b/interface/web/dashboard/lib/lang/cz_dashlet_invoice_client_settings.lng
index 113d919c00..d4ee2e264d 100644
--- a/interface/web/dashboard/lib/lang/cz_dashlet_invoice_client_settings.lng
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_invoice_client_settings.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['invoice_client_settings_txt'] = 'Invoice Client Settings';
 $wb['edit_txt'] = 'Editovat';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_invoices.lng b/interface/web/dashboard/lib/lang/cz_dashlet_invoices.lng
index ab093825c6..f7dd19b0dd 100644
--- a/interface/web/dashboard/lib/lang/cz_dashlet_invoices.lng
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_invoices.lng
@@ -15,4 +15,3 @@ $wb['invoice_type_invoice_txt'] = 'Invoice';
 $wb['invoice_type_proforma_txt'] = 'Proforma';
 $wb['invoice_type_refund_txt'] = 'Refund';
 $wb['invoice_type_reminder_txt'] = 'Reminder';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_limits.lng b/interface/web/dashboard/lib/lang/cz_dashlet_limits.lng
index d93dd87761..7386ff3c4d 100644
--- a/interface/web/dashboard/lib/lang/cz_dashlet_limits.lng
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_limits.lng
@@ -30,4 +30,3 @@ $wb['limit_domain_txt'] = 'Počet domén';
 $wb['limit_mailquota_txt'] = 'Přiřazená e-mailová kvóta';
 $wb['limit_web_quota_txt'] = 'Přiřazená webová kvóta';
 $wb['limit_database_quota_txt'] = 'Přiřazená databázová kvóta';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/cz_dashlet_mailquota.lng
index 742721c5ff..432e9b5a84 100644
--- a/interface/web/dashboard/lib/lang/cz_dashlet_mailquota.lng
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_mailquota.lng
@@ -5,4 +5,3 @@ $wb['name_txt'] = 'Jméno';
 $wb['used_txt'] = 'Využité místo';
 $wb['quota_txt'] = 'Kvóta';
 $wb['no_email_accounts_txt'] = 'Nenalezeny žádné e-mailové účty.';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_modules.lng b/interface/web/dashboard/lib/lang/cz_dashlet_modules.lng
index b4cade4795..3c715ae229 100644
--- a/interface/web/dashboard/lib/lang/cz_dashlet_modules.lng
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_modules.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['available_modules_txt'] = 'Dostupné moduly';
 $wb['go_to_txt'] = 'Vstoupit do sekce:';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_products.lng b/interface/web/dashboard/lib/lang/cz_dashlet_products.lng
index 187bc35933..01b1ee5174 100644
--- a/interface/web/dashboard/lib/lang/cz_dashlet_products.lng
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_products.lng
@@ -6,4 +6,3 @@ $wb['next_payment_date_txt'] = 'Next Invoice';
 $wb['no_products_txt'] = 'Nebyly nalezeny žádné produkty.';
 $wb['edit_txt'] = 'Editovat';
 $wb['cancellation_date_txt'] = 'Cancelled by';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_quota.lng b/interface/web/dashboard/lib/lang/cz_dashlet_quota.lng
index 0c2074a996..457cce103b 100644
--- a/interface/web/dashboard/lib/lang/cz_dashlet_quota.lng
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_quota.lng
@@ -5,4 +5,3 @@ $wb['used_txt'] = 'Využité místo';
 $wb['hard_txt'] = 'Kvóta max. obsazení';
 $wb['soft_txt'] = 'Kvóta pro upozornění';
 $wb['no_sites_txt'] = 'Nenalezeny žádné webové stránky.';
-?>
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_shop.lng b/interface/web/dashboard/lib/lang/cz_dashlet_shop.lng
index 79c306dc45..cead774ac2 100644
--- a/interface/web/dashboard/lib/lang/cz_dashlet_shop.lng
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_shop.lng
@@ -5,4 +5,3 @@ $wb['price_txt'] = 'Cena';
 $wb['setup_fee_txt'] = 'Setup Fee';
 $wb['no_products_txt'] = 'Nebyly nalezeny žádné produkty.';
 $wb['order_txt'] = 'Order';
-?>
diff --git a/interface/web/dns/lib/lang/br.lng b/interface/web/dns/lib/lang/br.lng
index 9228373fdf..00e0b3138d 100644
--- a/interface/web/dns/lib/lang/br.lng
+++ b/interface/web/dns/lib/lang/br.lng
@@ -1,24 +1,34 @@
 <?php
-
 $wb['DNS'] = 'DNS';
 $wb['Zones'] = 'Zonas';
-$wb['DNS A'] = 'A';
-$wb['DNS ALIAS'] = 'ALIAS';
-$wb['DNS CNAME'] = 'CNAME';
-$wb['DNS hinfo'] = 'HINFO';
-$wb['DNS mx'] = 'MX';
-$wb['DNS ns'] = 'NS';
-$wb['DNS ptr'] = 'PTR';
-$wb['DNS RP'] = 'RP';
+$wb['DNS A'] = 'Registro A';
+$wb['DNS ALIAS'] = 'Registro ALIAS';
+$wb['DNS CNAME'] = 'Registro CNAME';
+$wb['DNS hinfo'] = 'Registro HINFO';
+$wb['DNS mx'] = 'Registro MX';
+$wb['DNS ns'] = 'Registro NS';
+$wb['DNS ptr'] = 'Registro PTR';
+$wb['DNS RP'] = 'Registro RP';
 $wb['DNS Zone'] = 'ZONA';
 $wb['Records'] = 'Registros';
-$wb['DNS SRV'] = 'SRV';
+$wb['DNS SRV'] = 'Registro SRV';
 $wb['DNS TXT Record'] = 'Registro TXT';
-$wb['DNS TXT'] = 'TXT';
+$wb['DNS TXT'] = 'Registro TXT';
 $wb['DNS Wizard'] = 'Assistente DNS';
-$wb['Add DNS Zone'] = 'Adicionar zona dns';
+$wb['Add DNS Zone'] = 'Adicionar zona DNS';
 $wb['Templates'] = 'Gabaritos';
 $wb['Secondary DNS'] = 'DNS secundário';
 $wb['Secondary Zones'] = 'Zonas secundárias';
 $wb['Import Zone File'] = 'Importar arquivo de zona';
-?>
+$wb['DNS CAA Record'] = 'Registro CAA';
+$wb['DNS DS Record'] = 'Registro DS';
+$wb['DNS DKIM Record'] = 'Registro DKIM';
+$wb['DNS DMARC Record'] = 'Registro DMARC';
+$wb['DNS tlsa'] = 'Registro TLSA';
+$wb['Zone settings'] = 'Configurações da Zona';
+$wb['DNS AAAA'] = 'Registro AAAA';
+$wb['DNS NAPTR'] = 'Registro NAPTR';
+$wb['DNS SPF Record'] = 'Registro SPF';
+$wb['DNS LOC Record'] = 'Registro LOC';
+$wb['DNS DNAME'] = 'Registro DNAME';
+$wb['DNS SSHFP Record'] = 'Registro SSHFP';
diff --git a/interface/web/dns/lib/lang/br_dns_a.lng b/interface/web/dns/lib/lang/br_dns_a.lng
index 130480ee8f..32e2dab3d3 100644
--- a/interface/web/dns/lib/lang/br_dns_a.lng
+++ b/interface/web/dns/lib/lang/br_dns_a.lng
@@ -6,12 +6,11 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Endereço IP';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'Endereço IP está em branco.';
+$wb['data_error_empty'] = 'Endereço IP está vazio.';
 $wb['ip_error_wrong'] = 'Endereço IP inválido.';
-$wb['data_error_duplicate'] = 'Duplicate A, ALIAS or CNAME record';
+$wb['data_error_duplicate'] = 'Registro A, ALIAS ou CNAME duplicado';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_a_list.lng b/interface/web/dns/lib/lang/br_dns_a_list.lng
index 6387c14cbe..c80df0d5a5 100644
--- a/interface/web/dns/lib/lang/br_dns_a_list.lng
+++ b/interface/web/dns/lib/lang/br_dns_a_list.lng
@@ -12,4 +12,3 @@ $wb['add_new_record_txt'] = 'Adicionar novo registro A';
 $wb['page_txt'] = 'Página';
 $wb['page_of_txt'] = 'de';
 $wb['delete_confirmation'] = 'Tem certeza que deseja remover este registro?';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_aaaa.lng b/interface/web/dns/lib/lang/br_dns_aaaa.lng
index 74f6ca957e..b5475c5737 100644
--- a/interface/web/dns/lib/lang/br_dns_aaaa.lng
+++ b/interface/web/dns/lib/lang/br_dns_aaaa.lng
@@ -6,12 +6,11 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Endereço IPv6';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'Endereço IPv6 está em branco.';
-$wb['data_error_duplicate'] = 'Duplicate AAAA, ALIAS or CNAME record';
+$wb['data_error_empty'] = 'Endereço IPv6 está vazio.';
+$wb['data_error_duplicate'] = 'Registro AAAA, ALIAS ou CNAME duplicado';
 $wb['ip_error_wrong'] = 'O endereço IPv6 possui formato inválido.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_alias.lng b/interface/web/dns/lib/lang/br_dns_alias.lng
index c9ce9498ca..f956a1261a 100644
--- a/interface/web/dns/lib/lang/br_dns_alias.lng
+++ b/interface/web/dns/lib/lang/br_dns_alias.lng
@@ -6,12 +6,11 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Alvo do host';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'O alvo do host está em branco.';
+$wb['data_error_empty'] = 'O alvo do host está vazio.';
 $wb['data_error_regex'] = 'O formato do alvo do host é inválido.';
-$wb['data_error_duplicate'] = 'Duplicate A, AAAA, ALIAS, CNAME, or DNAME record';
+$wb['data_error_duplicate'] = 'Registro A, AAAA, ALIAS, CNAME ou DNAME duplicado';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_caa.lng b/interface/web/dns/lib/lang/br_dns_caa.lng
index 16bf267862..efd4ba682d 100644
--- a/interface/web/dns/lib/lang/br_dns_caa.lng
+++ b/interface/web/dns/lib/lang/br_dns_caa.lng
@@ -2,7 +2,7 @@
 $wb['ca_list_txt'] = 'Autoridade Certificadora - CA';
 $wb['ca_domain_txt'] = 'Domínio';
 $wb['ca_hostname_txt'] = 'Nome de hosts adicionais';
-$wb['ca_hostname_note_txt'] = '(separado por vírgulas - em branco para todos os hosts)';
+$wb['ca_hostname_note_txt'] = '(separado por vírgulas - vazio para todos os hosts)';
 $wb['ca_options_txt'] = 'Opções adicionais';
 $wb['ca_options_note_txt'] = 'solicitado pela CA (lista separado por vírgulas)';
 $wb['ca_wildcard_txt'] = 'Usar curingas SSL';
@@ -10,10 +10,9 @@ $wb['ca_critical_txt'] = 'Verificação estrita';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
 $wb['select_txt'] = 'Selecionar autoridade certificadora';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
 $wb['ca_error_txt'] = 'Nenhuma autoridade certificadora selecionada.';
 $wb['caa_exists_error'] = 'Registro CAA já existe.';
 $wb['ca_option_error'] = 'Formato inválido para opções adicionais; OPÇÃO=VALOR';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_cname.lng b/interface/web/dns/lib/lang/br_dns_cname.lng
index 5f52aa14fb..cbba6dfc11 100644
--- a/interface/web/dns/lib/lang/br_dns_cname.lng
+++ b/interface/web/dns/lib/lang/br_dns_cname.lng
@@ -6,12 +6,11 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Alvo do host';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'O alvo do host está em branco.';
+$wb['data_error_empty'] = 'O alvo do host está vazio.';
 $wb['data_error_regex'] = 'O alvo do host possui formato inválido.';
-$wb['data_error_duplicate'] = 'Duplicate A, AAAA, ALIAS, CNAME, or DNAME record';
+$wb['data_error_duplicate'] = 'Registro A, AAAA, ALIAS, CNAME ou DNAME duplicado';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_dkim.lng b/interface/web/dns/lib/lang/br_dns_dkim.lng
index a24976194d..b8700cf9ab 100644
--- a/interface/web/dns/lib/lang/br_dns_dkim.lng
+++ b/interface/web/dns/lib/lang/br_dns_dkim.lng
@@ -2,12 +2,12 @@
 $wb['public_key_txt'] = 'Chave Pública';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['record_exists_txt'] = 'Este registro dns já existe.';
-$wb['dkim_disabled_txt'] = 'Chave DKIM está desabilitada para este domínio de e-mail.';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
+$wb['record_exists_txt'] = 'Este registro DNS já existe.';
+$wb['dkim_disabled_txt'] = 'Chave DKIM está desabilitada para este domínio de email.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
 $wb['selector_txt'] = 'Seletor DKIM';
 $wb['data_error_empty'] = 'Chave pública ausente.';
-$wb['dkim_selector_empty_txt'] = 'Seletor DKIM está em branco.';
-?>
+$wb['dkim_selector_empty_txt'] = 'Seletor DKIM está vazio.';
+$wb['DNS DKIM'] = 'Registro DKIM';
diff --git a/interface/web/dns/lib/lang/br_dns_dmarc.lng b/interface/web/dns/lib/lang/br_dns_dmarc.lng
index bacd3af25f..d45457e00c 100644
--- a/interface/web/dns/lib/lang/br_dns_dmarc.lng
+++ b/interface/web/dns/lib/lang/br_dns_dmarc.lng
@@ -1,26 +1,26 @@
 <?php
 $wb['data_txt'] = 'Registro DMARC';
 $wb['domain_txt'] = 'Domínio';
-$wb['dmarc_policy_txt'] = 'Política para recepção de e-mails';
+$wb['dmarc_policy_txt'] = 'Política para recepção de emails';
 $wb['dmarc_policy_note_txt'] = 'Como os ISPs devem manipular as mensagens que falharam para SPF ou DKIM (DMARC).';
 $wb['dmarc_policy_none_txt'] = 'nenhuma';
 $wb['dmarc_policy_quarantine_txt'] = 'quarentena';
 $wb['dmarc_policy_reject_txt'] = 'rejeitar';
 $wb['dmarc_rua_txt'] = 'Relatório de dados de endereços sumarizado';
-$wb['dmarc_rua_note_txt'] = 'Endereços de e-mail para receber relatórios dos ISPs sobre mensagens de falhas DMARC para este domínio (separado por espaço).';
+$wb['dmarc_rua_note_txt'] = 'Endereços de email para receber relatórios dos ISPs sobre mensagens de falhas DMARC para este domínio (separado por espaço).';
 $wb['dmarc_ruf_txt'] = 'Endereço para relatório de dados forense';
-$wb['dmarc_ruf_note_txt'] = 'Endereços de e-mail para receber mensagens simples sobre falhas DMARC para este domínio (separado por espaço).';
+$wb['dmarc_ruf_note_txt'] = 'Endereços de email para receber mensagens simples sobre falhas DMARC para este domínio (separado por espaço).';
 $wb['dmarc_fo_txt'] = 'Opções de relatório forense';
-$wb['dmarc_fo0_txt'] = 'Gerar relatório se todos os mecanismos de autenticação falharem em produzir um resultado \'pass\' do DMARC.';
+$wb['dmarc_fo0_txt'] = 'Gerar relatório se todos os mecanismos de autenticação falharem em produzir um resultado \\'pass\\' do DMARC.';
 $wb['dmarc_fo1_txt'] = 'Gerar relatório se qualquer mecanismo falhar.';
 $wb['dmarc_fod_txt'] = 'Gerar relatório se a assinatura DKIM falhar na verificação.';
 $wb['dmarc_fos_txt'] = 'Gerar relatório se a consulta SPF falhar.';
 $wb['dmarc_adkim_txt'] = 'Alinhamento do identificador DKIM';
-$wb['dmarc_adkim_note_txt'] = '\'strict\' requer combinação exata entre DKIM do domínio e oremetente do e-mail';
+$wb['dmarc_adkim_note_txt'] = '\\'strict\\' requer combinação exata entre DKIM do domínio e oremetente do email';
 $wb['dmarc_adkim_r_txt'] = 'relaxed';
 $wb['dmarc_adkim_s_txt'] = 'strict';
 $wb['dmarc_aspf_txt'] = 'Alinhamento do identificador SPF';
-$wb['dmarc_aspf_note_txt'] = '\'strict\' requer combinação exata o SPF do domínio e oremetente do e-mail';
+$wb['dmarc_aspf_note_txt'] = '\\'strict\\' requer combinação exata o SPF do domínio e oremetente do email';
 $wb['dmarc_aspf_r_txt'] = 'relaxed';
 $wb['dmarc_aspf_s_txt'] = 'strict';
 $wb['dmarc_rf_txt'] = 'Formato do Relatório';
@@ -37,14 +37,14 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarentena';
 $wb['dmarc_sp_reject_txt'] = 'rejeitar';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['dmarc_policy_error_txt'] = 'A política \'nenhuma\' é permitida apenas para e-mails sem assinatura DKIM.';
+$wb['dmarc_policy_error_txt'] = 'A política \\'nenhuma\\' é permitida apenas para emails sem assinatura DKIM.';
 $wb['dmarc_no_dkim_txt'] = 'Nenhum registro DKIM ativo.';
 $wb['dmarc_no_spf_txt'] = 'Nenhum registro SPF ativo.';
 $wb['dmarc_more_spf_txt'] = 'Existe mais de um registro SPF ativo';
-$wb['dmarc_invalid_email_txt'] = 'Endereço de e-mail inválido';
-$wb['dmarc_empty_txt'] = 'Registro DMARC em branco - especifique ao menos uma opção';
-$wb['record_exists_txt'] = 'Registro dns já existe';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
+$wb['dmarc_invalid_email_txt'] = 'Endereço de email inválido';
+$wb['dmarc_empty_txt'] = 'Registro DMARC vazio - especifique ao menos uma opção';
+$wb['record_exists_txt'] = 'Registro DNS já existe';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
 $wb['ttl_range_error'] = 'TTL mínimo são 60 segundos.';
-?>
+$wb['DNS DMARC'] = 'Registro DMARC';
diff --git a/interface/web/dns/lib/lang/br_dns_dname.lng b/interface/web/dns/lib/lang/br_dns_dname.lng
index c2ba45f86e..9adc3b42fe 100644
--- a/interface/web/dns/lib/lang/br_dns_dname.lng
+++ b/interface/web/dns/lib/lang/br_dns_dname.lng
@@ -6,12 +6,11 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Alvo do host';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'O alvo do host está em branco.';
+$wb['data_error_empty'] = 'O alvo do host está vazio.';
 $wb['data_error_regex'] = 'O alvo do host possui formato inválido.';
-$wb['data_error_duplicate'] = 'Duplicate CNAME or DNAME record';
+$wb['data_error_duplicate'] = 'Registro CNAME ou DNAME duplicado';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_ds.lng b/interface/web/dns/lib/lang/br_dns_ds.lng
index 843338a943..afdb15fb29 100644
--- a/interface/web/dns/lib/lang/br_dns_ds.lng
+++ b/interface/web/dns/lib/lang/br_dns_ds.lng
@@ -6,13 +6,12 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Dados';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'O campo texto (Text) em branco';
+$wb['data_error_empty'] = 'O campo texto (Text) vazio';
 $wb['data_error_regex'] = 'O campo texto (Text) possui formato inválido.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
 $wb['invalid_type_ds'] = 'O registro DS possui formato inválido.';
-
-?>
+$wb['DNS DS'] = 'Registro DS';
diff --git a/interface/web/dns/lib/lang/br_dns_hinfo.lng b/interface/web/dns/lib/lang/br_dns_hinfo.lng
index e7bdfa2f4c..b7093bd47c 100644
--- a/interface/web/dns/lib/lang/br_dns_hinfo.lng
+++ b/interface/web/dns/lib/lang/br_dns_hinfo.lng
@@ -6,11 +6,11 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Informação do host';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'Informação do host está em branco.';
+$wb['data_error_empty'] = 'Informação do host está vazio.';
 $wb['data_error_regex'] = 'Informação do host possui formato inválido.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
+$wb['DNS HINFO'] = 'Registro HINFO';
diff --git a/interface/web/dns/lib/lang/br_dns_import.lng b/interface/web/dns/lib/lang/br_dns_import.lng
index 8bcc0ddff4..1bdc7774b5 100644
--- a/interface/web/dns/lib/lang/br_dns_import.lng
+++ b/interface/web/dns/lib/lang/br_dns_import.lng
@@ -5,21 +5,20 @@ $wb['client_txt'] = 'Cliente';
 $wb['btn_save_txt'] = 'Importar arquivo de zona';
 $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['domain_txt'] = 'Domínio';
-$wb['zone_file_successfully_imported_txt'] = 'O arquivo de zona dns foi importado com sucesso!';
-$wb['error_no_valid_zone_file_txt'] = 'Aparentemente este não é um arquivo de zona dns válido!';
+$wb['zone_file_successfully_imported_txt'] = 'O arquivo de zona DNS foi importado com sucesso!';
+$wb['error_no_valid_zone_file_txt'] = 'Aparentemente este não é um arquivo de zona DNS válido!';
 $wb['zonefile_to_import_txt'] = 'Arquivo de Zona';
-$wb['domain_field_desc_txt'] = 'Pode ficar em branco caso o domínio seja o mesmo nome do arquivo ou faz parte do conteúdo do mesmo.';
+$wb['domain_field_desc_txt'] = 'Pode ficar vazio caso o domínio seja o mesmo nome do arquivo ou faz parte do conteúdo do mesmo.';
 $wb['title'] = 'Importar arquivo de zona';
-$wb['no_file_uploaded_error'] = 'Nenhum arquivo de zona dns foi carregado.';
+$wb['no_file_uploaded_error'] = 'Nenhum arquivo de zona DNS foi carregado.';
 $wb['error_no_server_id'] = 'Nenhum servidor foi informado.';
 $wb['error_not_allowed_server_id'] = 'O servidor selecionado não é permitido nesta conta.';
-$wb['zone_already_exists'] = 'This zone already exists, you must delete or rename it first.';
-$wb['zone_not_allowed'] = 'This zone is not allowed for this account.';
-$wb['zone_file_missing_soa'] = 'The zone file must contain a SOA record.';
-$wb['zone_file_multiple_soa'] = 'The zone file cannot contain multiple SOA records.';
-$wb['zone_file_soa_parser'] = 'The SOA record in this zone file could not be processed.  Ensure SERIAL, REFRESH, RETRY, EXPIRE and MINIMUM are each on a separate line from other data.';
-$wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.';
-$wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.';
-$wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.';
-$wb['zone_file_import_fail'] = 'The zone file did not import.';
-?>
+$wb['zone_already_exists'] = 'Esta zona já existe, você deve remover ou renomear a zona existente primeiro.';
+$wb['zone_not_allowed'] = 'Esta zona não é permitida para esta conta.';
+$wb['zone_file_missing_soa'] = 'A zona deve conter um registro SOA.';
+$wb['zone_file_multiple_soa'] = 'A zona não contém múltiplos registros SOA.';
+$wb['zone_file_soa_parser'] = 'O registro SOA nesta zona não pôde ser processado. Certifique-se de que SERIAL, REFRESH, RETRY, EXPIRE e MINIMUM estão cada um em uma linha separada de outros dados.';
+$wb['ignore_record_not_class_in'] = 'Registro DNS ignorado, sem classe IN.';
+$wb['ignore_record_unknown_type'] = 'Registro DNS ignorado, tipo desconhecido.';
+$wb['ignore_record_invalid_owner'] = 'Registro DNS ignorado, não foi possível validar o proprietário.';
+$wb['zone_file_import_fail'] = 'O arquivo de zona não foi importado.';
diff --git a/interface/web/dns/lib/lang/br_dns_loc.lng b/interface/web/dns/lib/lang/br_dns_loc.lng
index f84c2af034..56c1b2b26e 100644
--- a/interface/web/dns/lib/lang/br_dns_loc.lng
+++ b/interface/web/dns/lib/lang/br_dns_loc.lng
@@ -6,11 +6,11 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Texto';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'Texto está em branco.';
+$wb['data_error_empty'] = 'Texto está vazio.';
 $wb['data_error_regex'] = 'Texto possui formato inválido.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
+$wb['DNS LOC'] = 'Registro LOC';
diff --git a/interface/web/dns/lib/lang/br_dns_mx.lng b/interface/web/dns/lib/lang/br_dns_mx.lng
index 45b721c1a8..d28b8af569 100644
--- a/interface/web/dns/lib/lang/br_dns_mx.lng
+++ b/interface/web/dns/lib/lang/br_dns_mx.lng
@@ -3,16 +3,15 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['zone_txt'] = 'Zona';
 $wb['name_txt'] = 'Nome do host';
 $wb['type_txt'] = 'Tipo';
-$wb['data_txt'] = 'Nome do servidor de e-mail';
+$wb['data_txt'] = 'Nome do servidor de email';
 $wb['aux_txt'] = 'Prioridade';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'O nome do servidor de e-mails está em branco.';
-$wb['data_error_regex'] = 'O nome do servidor de e-mails possui formato inválido.';
+$wb['data_error_empty'] = 'O nome do servidor de emails está vazio.';
+$wb['data_error_regex'] = 'O nome do servidor de emails possui formato inválido.';
 $wb['duplicate_mx_record_txt'] = 'Registro MX duplicado.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_naptr.lng b/interface/web/dns/lib/lang/br_dns_naptr.lng
index b39373c13d..31faa64f9d 100644
--- a/interface/web/dns/lib/lang/br_dns_naptr.lng
+++ b/interface/web/dns/lib/lang/br_dns_naptr.lng
@@ -1,21 +1,20 @@
 <?php
-$wb['server_id_txt'] = 'Server';
-$wb['zone_txt'] = 'Zone';
-$wb['name_txt'] = 'Hostname';
-$wb['order_txt'] = 'Order';
+$wb['server_id_txt'] = 'Servidor';
+$wb['zone_txt'] = 'Zona';
+$wb['name_txt'] = 'Nome do host';
+$wb['order_txt'] = 'Ordem';
 $wb['pref_txt'] = 'Pref';
-$wb['flags_txt'] = 'Flags';
-$wb['service_txt'] = 'Service';
-$wb['regexp_txt'] = 'RegExp';
-$wb['replacement_txt'] = 'Replacement';
+$wb['flags_txt'] = 'Marcas';
+$wb['service_txt'] = 'Serviço';
+$wb['regexp_txt'] = 'Expressão regular';
+$wb['replacement_txt'] = 'Substituição';
 $wb['ttl_txt'] = 'TTL';
-$wb['active_txt'] = 'Active';
-$wb['limit_dns_record_txt'] = 'The max. number of DNS records for your account is reached.';
-$wb['no_zone_perm'] = 'You do not have the permission to add a record to this DNS zone.';
-$wb['name_error_empty'] = 'The hostname is empty.';
-$wb['name_error_regex'] = 'The hostname has the wrong format.';
-$wb['data_error_empty'] = 'NAPTR record is empty.';
-$wb['naptr_error_regex'] = 'Invalid NAPTR record.  The NAPTR record must include Order, Pref and either Regex or Replacement.';
-$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['record_parse_error'] = 'Could not parse the record found in database.';
-?>
+$wb['active_txt'] = 'Ativo';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS para esta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
+$wb['name_error_regex'] = 'Nome do host com formato inválido.';
+$wb['data_error_empty'] = 'Registro NAPTR está vazio.';
+$wb['naptr_error_regex'] = 'Registro NAPTR inválido. O registro NAPTR deve incluir Ordem, Pref e Expressão Regular ou Substituição.';
+$wb['ttl_range_error'] = 'O TTL minímo são 60 segundos.';
+$wb['record_parse_error'] = 'Não foi possível analisar o registro encontrado no banco de dados.';
diff --git a/interface/web/dns/lib/lang/br_dns_ns.lng b/interface/web/dns/lib/lang/br_dns_ns.lng
index d83d0f7b8a..bc57b8938c 100644
--- a/interface/web/dns/lib/lang/br_dns_ns.lng
+++ b/interface/web/dns/lib/lang/br_dns_ns.lng
@@ -6,11 +6,10 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Nome do servidor';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'A zona está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'A zona está vazia.';
 $wb['name_error_regex'] = 'A zona possui formato inválido.';
-$wb['data_error_empty'] = 'Nome do servidor está em branco.';
+$wb['data_error_empty'] = 'Nome do servidor está vazio.';
 $wb['data_error_regex'] = 'Nome do servidor possui formato inválido.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_ptr.lng b/interface/web/dns/lib/lang/br_dns_ptr.lng
index b6214a62e8..f39b65fb24 100644
--- a/interface/web/dns/lib/lang/br_dns_ptr.lng
+++ b/interface/web/dns/lib/lang/br_dns_ptr.lng
@@ -6,11 +6,10 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Nome canônico para o nome do host';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome está vazio.';
 $wb['name_error_regex'] = 'O nome possui formato inválido.';
-$wb['data_error_empty'] = 'O nome canônico está em branco.';
+$wb['data_error_empty'] = 'O nome canônico está vazio.';
 $wb['data_error_regex'] = 'O nome canônico possui formato inválido.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_rp.lng b/interface/web/dns/lib/lang/br_dns_rp.lng
index 4f782fb4a0..e2ba604667 100644
--- a/interface/web/dns/lib/lang/br_dns_rp.lng
+++ b/interface/web/dns/lib/lang/br_dns_rp.lng
@@ -6,11 +6,10 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Responsável técnico';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'Responsável técnico está em branco.';
+$wb['data_error_empty'] = 'Responsável técnico está vazio.';
 $wb['data_error_regex'] = 'Responsável técnico possui formato inválido.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_slave.lng b/interface/web/dns/lib/lang/br_dns_slave.lng
index a71e64c4f2..cff5fc73dd 100644
--- a/interface/web/dns/lib/lang/br_dns_slave.lng
+++ b/interface/web/dns/lib/lang/br_dns_slave.lng
@@ -4,14 +4,14 @@ $wb['origin_txt'] = 'Zona DNS';
 $wb['secondary_zone_txt'] = 'Zona DNS secundária';
 $wb['ns_txt'] = 'NS (Endereço IP)';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_slave_zone_txt'] = 'O limite de zonas dns secundárias para esta conta foi alcançado.';
+$wb['limit_dns_slave_zone_txt'] = 'O limite de zonas DNS secundárias para esta conta foi alcançado.';
 $wb['client_txt'] = 'Cliente';
 $wb['xfer_txt'] = 'Permitir transferência de zonas para <br />Endereço(s) IP(s) (lista de endereços, separados por vírgula)';
 $wb['server_id_error_empty'] = 'Nenhum servidor selecionado.';
-$wb['origin_error_empty'] = 'Zona está em branco.';
-$wb['origin_error_unique'] = 'Já existe este registro dns nesta zona.';
-$wb['origin_error_regex'] = 'Zona possui um formato inválido.';
+$wb['origin_error_empty'] = 'Zona está vazia.';
+$wb['origin_error_unique'] = 'Já existe este registro DNS nesta zona.';
+$wb['origin_error_regex'] = 'Zona possui formato inválido.';
 $wb['ns_error_regex'] = 'O NS possui formato inválido.';
 $wb['eg_domain_tld'] = 'ex.: dominio.com.br.';
 $wb['ipv4_form_txt'] = 'Separar múltiplos IPs com vírgulas.';
-?>
+$wb['Secondary DNS Zone'] = 'Zona DNS secundária';
diff --git a/interface/web/dns/lib/lang/br_dns_slave_admin_list.lng b/interface/web/dns/lib/lang/br_dns_slave_admin_list.lng
index 9b4c7e07ef..34854849e3 100644
--- a/interface/web/dns/lib/lang/br_dns_slave_admin_list.lng
+++ b/interface/web/dns/lib/lang/br_dns_slave_admin_list.lng
@@ -4,7 +4,6 @@ $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['origin_txt'] = 'Zona';
 $wb['ns_txt'] = 'NS';
-$wb['add_new_record_txt'] = 'Adicionar nova zona dns secundária';
+$wb['add_new_record_txt'] = 'Adicionar nova zona DNS secundária';
 $wb['eg_domain_tld'] = 'ex.: dominio.com.br.';
 $wb['sys_groupid_txt'] = 'Cliente';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_slave_list.lng b/interface/web/dns/lib/lang/br_dns_slave_list.lng
index adf14dfdc7..044a0005ec 100644
--- a/interface/web/dns/lib/lang/br_dns_slave_list.lng
+++ b/interface/web/dns/lib/lang/br_dns_slave_list.lng
@@ -4,6 +4,5 @@ $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['origin_txt'] = 'Zona';
 $wb['ns_txt'] = 'NS';
-$wb['add_new_record_txt'] = 'Adicionar nova zona dns secundária';
+$wb['add_new_record_txt'] = 'Adicionar nova zona DNS secundária';
 $wb['eg_domain_tld'] = 'ex.: dominio.com.br.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_soa.lng b/interface/web/dns/lib/lang/br_dns_soa.lng
index f1cb453e99..81b2bb24c7 100644
--- a/interface/web/dns/lib/lang/br_dns_soa.lng
+++ b/interface/web/dns/lib/lang/br_dns_soa.lng
@@ -2,7 +2,7 @@
 $wb['server_id_txt'] = 'Servidor';
 $wb['origin_txt'] = 'Zona (SOA)';
 $wb['ns_txt'] = 'NS';
-$wb['mbox_txt'] = 'e-Mail';
+$wb['mbox_txt'] = 'eMail';
 $wb['serial_txt'] = 'Serial';
 $wb['refresh_txt'] = 'Atualizar';
 $wb['retry_txt'] = 'Repetir';
@@ -11,19 +11,19 @@ $wb['minimum_txt'] = 'Mínimo';
 $wb['ttl_txt'] = 'TTL';
 $wb['xfer_txt'] = 'Permitir transferências de zonas para <br />Endereço(s) IP(s) (lista de endereços, separados por vírgula)';
 $wb['active_txt'] = 'Ativo';
-$wb['dnssec_info_txt'] = 'O campo DS DNSSEC para o registro';
+$wb['dnssec_info_txt'] = 'DS DNSSEC para o registro';
 $wb['dnssec_wanted_txt'] = 'Zona assinada (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'Ao desativar o DNSSEC as chaves não serão excluídas se o DNSSEC tiver sido ativado anteriormente e as chaves já tiverem sido geradas, mas a zona não será mais entregue no formato assinado posteriormente. Se você usa o PowerDNS, as chaves serão excluídas!';
-$wb['limit_dns_zone_txt'] = 'O limite de zonas dns para esta conta foi alcançado.';
+$wb['limit_dns_zone_txt'] = 'O limite de zonas DNS para esta conta foi alcançado.';
 $wb['client_txt'] = 'Cliente';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
 $wb['server_id_error_empty'] = 'Nenhum servidor selecionado';
-$wb['origin_error_empty'] = 'Zona está em branco.';
-$wb['origin_error_unique'] = 'Já existe este registro dns nesta zona.';
-$wb['origin_error_regex'] = 'A zona dns possui formato inválido.';
+$wb['origin_error_empty'] = 'Zona está vazio.';
+$wb['origin_error_unique'] = 'Já existe este registro DNS nesta zona.';
+$wb['origin_error_regex'] = 'A zona DNS possui formato inválido.';
 $wb['ns_error_regex'] = 'O registro NS possui formato inválido.';
-$wb['mbox_error_empty'] = 'O e-mail está em branco.';
-$wb['mbox_error_regex'] = 'O e-mail possui formato inválido.';
+$wb['mbox_error_empty'] = 'O email está vazio.';
+$wb['mbox_error_regex'] = 'O email possui formato inválido.';
 $wb['also_notify_txt'] = 'Também notificar';
 $wb['also_notify_error_regex'] = 'Também notificar: Por favor, use um endereço IP.';
 $wb['xfer_error_regex'] = 'Xfer: Por favor use um ou mais endereço(s) IP, separado por vírgula ou use a palavra reservada: any';
@@ -32,14 +32,13 @@ $wb['seconds_txt'] = 'Segundos';
 $wb['eg_domain_tld'] = 'ex.: dominio.com.br';
 $wb['eg_ns1_domain_tld'] = 'ex.: ns1.dominio.com.br';
 $wb['eg_webmaster_domain_tld'] = 'ex.: hostmaster@dominio.com.br';
-$wb['The Domain can not be changed. Please ask your Administrator if you want to change the domain name.'] = 'O domínio não pode ser alterado. Por favor contate o administrador se deseja alterar o domínio.';
+$wb['The Domain can not be changed. Please ask your Administrator if you want to change the domain name.'] = 'O domínio não pode ser modificado. Por favor contate o administrador se deseja modificar o domínio.';
 $wb['refresh_range_error'] = 'Intervalo mínimo entre as atualizações são 60 segundos.';
 $wb['retry_range_error'] = 'Intervalo mínimo entre as repetições são 60 segundos.';
 $wb['expire_range_error'] = 'Intervalo mínimo para expirar são 60 segundos.';
 $wb['minimum_range_error'] = 'Intervalo mínimo são 60 segundos.';
 $wb['ttl_range_error'] = 'Intervalo mínimo do TTL são 60 segundos.';
 $wb['error_not_allowed_server_id'] = 'O servidor selecionado não é permitido para esta conta.';
-$wb['soa_cannot_be_changed_txt'] = 'A zona (SOA) não pode ser alterada. Por favor, contate o administrador se deseja alterar esta zona.';
+$wb['soa_cannot_be_changed_txt'] = 'A zona (SOA) não pode ser modificada. Por favor, contate o administrador se deseja modificar esta zona.';
 $wb['configuration_error_txt'] = 'ERRO DE CONFIGURAÇÃO';
-$wb['dnssec_algo_txt'] = 'DNSSEC Algorithm';
-?>
+$wb['dnssec_algo_txt'] = 'Algoritmo DNSSEC';
diff --git a/interface/web/dns/lib/lang/br_dns_soa_admin_list.lng b/interface/web/dns/lib/lang/br_dns_soa_admin_list.lng
index 26e8062d53..dda0b4a031 100644
--- a/interface/web/dns/lib/lang/br_dns_soa_admin_list.lng
+++ b/interface/web/dns/lib/lang/br_dns_soa_admin_list.lng
@@ -4,9 +4,9 @@ $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['origin_txt'] = 'Zona';
 $wb['ns_txt'] = 'NS';
-$wb['mbox_txt'] = 'e-Mail';
-$wb['add_new_record_wizard_txt'] = 'Adicionar zona dns através do assistente';
-$wb['add_new_record_txt'] = 'Adicionar zona dns manualmente';
+$wb['mbox_txt'] = 'eMail';
+$wb['add_new_record_wizard_txt'] = 'Adicionar zona DNS através do assistente';
+$wb['add_new_record_txt'] = 'Adicionar zona DNS manualmente';
 $wb['zone_file_import_txt'] = 'Importar arquivo de zona';
 $wb['sys_groupid_txt'] = 'Cliente';
-?>
+$wb['import_zone_file_txt'] = 'Importar arquivo de zona';
diff --git a/interface/web/dns/lib/lang/br_dns_soa_list.lng b/interface/web/dns/lib/lang/br_dns_soa_list.lng
index d9fb674b87..33d0457d20 100644
--- a/interface/web/dns/lib/lang/br_dns_soa_list.lng
+++ b/interface/web/dns/lib/lang/br_dns_soa_list.lng
@@ -4,8 +4,7 @@ $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['origin_txt'] = 'Zona';
 $wb['ns_txt'] = 'NS';
-$wb['mbox_txt'] = 'e-Mail';
-$wb['add_new_record_wizard_txt'] = 'Adicionar nova zona dns através do assistente';
-$wb['add_new_record_txt'] = 'Adicionar nova zona dns manualmente';
+$wb['mbox_txt'] = 'eMail';
+$wb['add_new_record_wizard_txt'] = 'Adicionar nova zona DNS através do assistente';
+$wb['add_new_record_txt'] = 'Adicionar nova zona DNS manualmente';
 $wb['zone_file_import_txt'] = 'Importar arquivo de zona';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_spf.lng b/interface/web/dns/lib/lang/br_dns_spf.lng
index 13722f6696..e7965daf41 100644
--- a/interface/web/dns/lib/lang/br_dns_spf.lng
+++ b/interface/web/dns/lib/lang/br_dns_spf.lng
@@ -1,30 +1,30 @@
 <?php
 $wb['data_txt'] = 'Registro SPF';
-$wb['name_txt'] = 'Hostname';
+$wb['name_txt'] = 'Nome do host';
 $wb['spf_mechanism_txt'] = 'Mecanismo SPF';
-$wb['spf_mechanism_pass_txt'] = 'Pass - permitir e-mails de outros remetentes';
-$wb['spf_mechanism_fail_txt'] = 'Fail - rejeitar e-mails de outros remetentes';
-$wb['spf_mechanism_softfail_txt'] = 'SoftFail - permite e-mails de outros remetentes mas marca os mesmos';
+$wb['spf_mechanism_pass_txt'] = 'Pass - permitir emails de outros remetentes';
+$wb['spf_mechanism_fail_txt'] = 'Fail - rejeitar emails de outros remetentes';
+$wb['spf_mechanism_softfail_txt'] = 'SoftFail - permite emails de outros remetentes mas marca os mesmos';
 $wb['spf_mechanism_neutral_txt'] = 'Neutral - não faz nada';
-$wb['spf_mx_txt'] = 'Permite servidores listados como MX enviar e-mail deste domínio';
-$wb['spf_a_txt'] = 'Permite o endereço IP atual do domínio enviar e-mails deste domínio';
-$wb['spf_ip_txt'] = 'Endereço IP adicional no formato CIDR pode entregar ou retransmitir e-mails para este domínio';
+$wb['spf_mx_txt'] = 'Permite servidores listados como MX enviar email deste domínio';
+$wb['spf_a_txt'] = 'Permite o endereço IP atual do domínio enviar emails deste domínio';
+$wb['spf_ip_txt'] = 'Endereço IP adicional no formato CIDR pode entregar ou retransmitir emails para este domínio';
 $wb['spf_ip_note_txt'] = '(endereços IPs separados por espaços)';
 $wb['spf_invalid_ip_txt'] = 'Endereço IP inválido.';
-$wb['spf_hostname_txt'] = 'Qualquer outro servidor pode entregar ou retransmitir e-mails para este domínio';
+$wb['spf_hostname_txt'] = 'Qualquer outro servidor pode entregar ou retransmitir emails para este domínio';
 $wb['spf_hostname_note_txt'] = '(servidores separados por espaço)';
 $wb['spf_invalid_hostname_txt'] = 'O nome do host é inválido.';
-$wb['spf_domain_txt'] = 'Qualquer domínio pode entregar ou retransmitir e-mails para este domínio';
+$wb['spf_domain_txt'] = 'Qualquer domínio pode entregar ou retransmitir emails para este domínio';
 $wb['spf_domain_note_txt'] = '(domínios separados por espaço)';
-$wb['spf_invalid_domain_txt'] = 'O domínio é inválido.';
+$wb['spf_invalid_domain_txt'] = 'Domínio inválido.';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['record_exists_txt'] = 'Registro dns já existe.';
-$wb['spf_record_exists_txt'] = 'SPF-Record already exists for hostname "{hostname}". Do you want to <a href="#" data-load-content="dns/dns_spf_edit.php?id={existing_record_id}">edit the existing record</a>?';
-$wb['spf_record_exists_multiple_txt'] = 'Multiple SPF-Records exist for hostname "{hostname}". This will cause recipients to reject your mail! Delete or merge duplicate existing records and try again.';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
+$wb['record_exists_txt'] = 'Registro DNS já existe.';
+$wb['spf_record_exists_txt'] = 'Registro SPF já existe para este host "{hostname}". Gostaria de editar <a href="#" data-load-content="dns/dns_spf_edit.php?id={existing_record_id}"> o registro existente</a>?';
+$wb['spf_record_exists_multiple_txt'] = 'Existe múltiplos registros SPF para o host "{hostname}". Isto pode causar rejeição de destinatários para seu email! Remova ou mescle os registros duplicados e tente novamente.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-$wb['name_error_regex'] = 'The hostname has the wrong format.';
-$wb['btn_edit_as_txt_record_txt'] = 'Edit as TXT record';
-?>
+$wb['name_error_regex'] = 'O host possui formato inválido.';
+$wb['btn_edit_as_txt_record_txt'] = 'Editar registro TXT';
+$wb['DNS SPF'] = 'Registro SPF';
diff --git a/interface/web/dns/lib/lang/br_dns_srv.lng b/interface/web/dns/lib/lang/br_dns_srv.lng
index 97d2604896..f2fd60cc74 100644
--- a/interface/web/dns/lib/lang/br_dns_srv.lng
+++ b/interface/web/dns/lib/lang/br_dns_srv.lng
@@ -9,12 +9,11 @@ $wb['port_txt'] = 'Porta';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
 $wb['aux_txt'] = 'Prioridade';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'Registro SVR está em branco.';
-$wb['data_error_regex'] = 'Registro SVR possui formato inválido.';
+$wb['data_error_empty'] = 'Registro SRV está vazio.';
+$wb['data_error_regex'] = 'Registro SRV possui formato inválido.';
 $wb['srv_error_regex'] = 'O formato do registro SVR é inválido. O registro SVR deve conter 3 cadeias de texto separados por espaços.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_sshfp.lng b/interface/web/dns/lib/lang/br_dns_sshfp.lng
index f84c2af034..7c8152f745 100644
--- a/interface/web/dns/lib/lang/br_dns_sshfp.lng
+++ b/interface/web/dns/lib/lang/br_dns_sshfp.lng
@@ -6,11 +6,11 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Texto';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'Texto está em branco.';
+$wb['data_error_empty'] = 'Texto está vazio.';
 $wb['data_error_regex'] = 'Texto possui formato inválido.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
+$wb['DNS SSHFP'] = 'Registro SSHFP';
diff --git a/interface/web/dns/lib/lang/br_dns_template.lng b/interface/web/dns/lib/lang/br_dns_template.lng
index 81a8f190ed..9efac145b9 100644
--- a/interface/web/dns/lib/lang/br_dns_template.lng
+++ b/interface/web/dns/lib/lang/br_dns_template.lng
@@ -1,7 +1,8 @@
 <?php
 $wb['name_txt'] = 'Nome';
-$wb['fields_txt'] = 'O campos';
+$wb['fields_txt'] = 'Campos';
 $wb['template_txt'] = 'Gabarito';
 $wb['visible_txt'] = 'Visível';
 $wb['placeholder_txt'] = 'Área Reservada';
-?>
+$wb['DNS Wizard template'] = 'Gabarito do Assistente DNS';
+$wb['DNS Template'] = 'Gabarito DNS';
diff --git a/interface/web/dns/lib/lang/br_dns_template_list.lng b/interface/web/dns/lib/lang/br_dns_template_list.lng
index 8ec480d727..e9a918a778 100644
--- a/interface/web/dns/lib/lang/br_dns_template_list.lng
+++ b/interface/web/dns/lib/lang/br_dns_template_list.lng
@@ -3,4 +3,3 @@ $wb['list_head_txt'] = 'Gabarito do Assistente DNS';
 $wb['visible_txt'] = 'Visível';
 $wb['name_txt'] = 'Nome';
 $wb['add_new_record_txt'] = 'Adicionar novo registro';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_tlsa.lng b/interface/web/dns/lib/lang/br_dns_tlsa.lng
index 4037ebe595..e0e78cadcd 100644
--- a/interface/web/dns/lib/lang/br_dns_tlsa.lng
+++ b/interface/web/dns/lib/lang/br_dns_tlsa.lng
@@ -6,11 +6,10 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Dados TLSA';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
-$wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados). Correto: _&lt;port&gt;._(tcp|udp).&lt;hostname&gt;';
-$wb['data_error_empty'] = 'Dados TLSA está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
+$wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados). Correto: porta(tcp|udp);hostname;';
+$wb['data_error_empty'] = 'Dados TLSA está vazio.';
 $wb['data_error_regex'] = 'Formato dos dados TLSA inválido. Correto: n n n HASH';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_txt.lng b/interface/web/dns/lib/lang/br_dns_txt.lng
index 641cb9f2e1..27d73480a9 100644
--- a/interface/web/dns/lib/lang/br_dns_txt.lng
+++ b/interface/web/dns/lib/lang/br_dns_txt.lng
@@ -6,14 +6,13 @@ $wb['type_txt'] = 'Tipo';
 $wb['data_txt'] = 'Texto';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_dns_record_txt'] = 'O limite de registros dns para esta conta foi alcançado.';
-$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros dns nesta zona.';
-$wb['name_error_empty'] = 'O nome do host está em branco.';
+$wb['limit_dns_record_txt'] = 'O limite de registros DNS para esta conta foi alcançado.';
+$wb['no_zone_perm'] = 'Você não tem permissão para adicionar registros DNS nesta zona.';
+$wb['name_error_empty'] = 'O nome do host está vazio.';
 $wb['name_error_regex'] = 'O nome do host possui formato inválido (somente nomes canônicos são suportados).';
-$wb['data_error_empty'] = 'O texto está em branco.';
+$wb['data_error_empty'] = 'O texto está vazio.';
 $wb['data_error_regex'] = 'O texto é inválido.';
 $wb['ttl_range_error'] = 'O TTL mínimo são 60 segundos.';
 $wb['invalid_type_dkim'] = 'Sem permissão para DKIM. Use o botão DKIM.';
 $wb['invalid_type_dmarc'] = 'Sem permissão para DMARC. Use o botão DMARC.';
 $wb['invalid_type_spf'] = 'Sem permissão para SPF. Use o botão SPF.';
-?>
diff --git a/interface/web/dns/lib/lang/br_dns_wizard.lng b/interface/web/dns/lib/lang/br_dns_wizard.lng
index d132d4646b..198ecbe6e6 100644
--- a/interface/web/dns/lib/lang/br_dns_wizard.lng
+++ b/interface/web/dns/lib/lang/br_dns_wizard.lng
@@ -1,38 +1,38 @@
 <?php
-$wb['list_head_txt'] = 'Assistente de zona dns';
-$wb['list_desc_txt'] = 'Adicionar zona dns através do assistente';
+$wb['list_head_txt'] = 'Assistente de zona DNS';
+$wb['list_desc_txt'] = 'Adicionar zona DNS através do assistente';
 $wb['dns_zone_txt'] = 'Zona DNS';
 $wb['template_id_txt'] = 'Gabarito';
 $wb['server_id_txt'] = 'Servidor';
 $wb['client_txt'] = 'Cliente';
-$wb['btn_save_txt'] = 'Adicionar zona dns';
+$wb['btn_save_txt'] = 'Adicionar zona DNS';
 $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['domain_txt'] = 'Domínio';
-$wb['email_txt'] = 'e-Mail';
+$wb['email_txt'] = 'eMail';
 $wb['dkim_txt'] = 'DKIM';
 $wb['dnssec_txt'] = 'Assinar zona (DNSSEC)';
 $wb['ns1_txt'] = 'NS 1';
 $wb['ns2_txt'] = 'NS 2';
 $wb['ip_txt'] = 'Endereço IP';
 $wb['ipv6_txt'] = 'Endereço IPv6';
-$wb['error_origin_empty'] = 'Origin está em branco.';
-$wb['error_ns_empty'] = 'NS está em branco.';
-$wb['error_mbox_empty'] = 'conta de e-mail (mbox) está em branco.';
-$wb['error_refresh_empty'] = 'Atualizar (refresh) está em branco.';
-$wb['error_retry_empty'] = 'Repetir (retry) está em branco.';
-$wb['error_expire_empty'] = 'Expirar (expire) está em branco.';
-$wb['error_minimum_empty'] = 'Mínimo (minimum) está em branco.';
-$wb['error_ttl_empty'] = 'Tempo (TTL) está em branco.';
-$wb['error_domain_empty'] = 'Domínio está em branco.';
-$wb['error_ip_empty'] = 'Endereço IP está em branco.';
-$wb['error_ipv6_empty'] = 'Endereço IPv6 está em branco.';
-$wb['error_ns1_empty'] = 'NS1 está em branco.';
-$wb['error_ns2_empty'] = 'NS2 está em branco.';
-$wb['error_email_empty'] = 'Endereço de e-mail está em branco.';
+$wb['error_origin_empty'] = 'Origin está vazio.';
+$wb['error_ns_empty'] = 'NS está vazio.';
+$wb['error_mbox_empty'] = 'conta de email (mbox) está vazio.';
+$wb['error_refresh_empty'] = 'Atualizar (refresh) está vazio.';
+$wb['error_retry_empty'] = 'Repetir (retry) está vazio.';
+$wb['error_expire_empty'] = 'Expirar (expire) está vazio.';
+$wb['error_minimum_empty'] = 'Mínimo (minimum) está vazio.';
+$wb['error_ttl_empty'] = 'Tempo (TTL) está vazio.';
+$wb['error_domain_empty'] = 'Domínio está vazio.';
+$wb['error_ip_empty'] = 'Endereço IP está vazio.';
+$wb['error_ipv6_empty'] = 'Endereço IPv6 está vazio.';
+$wb['error_ns1_empty'] = 'NS1 está vazio.';
+$wb['error_ns2_empty'] = 'NS2 está vazio.';
+$wb['error_email_empty'] = 'Endereço de email está vazio.';
 $wb['error_domain_regex'] = 'O domínio possui caracteres inválidos.';
 $wb['error_ns1_regex'] = 'NS1 possui caracteres inválidos.';
 $wb['error_ns2_regex'] = 'NS2 possui caracteres inválidos.';
-$wb['error_email_regex'] = 'O endereço de e-mail não possui um endereço válido.';
+$wb['error_email_regex'] = 'O endereço de email não possui um endereço válido.';
 $wb['globalsearch_resultslimit_of_txt'] = 'de';
 $wb['globalsearch_resultslimit_results_txt'] = 'resultados';
 $wb['globalsearch_noresults_text_txt'] = 'Sem resultados.';
@@ -41,5 +41,4 @@ $wb['globalsearch_searchfield_watermark_txt'] = 'Pesquisar';
 $wb['globalsearch_suggestions_text_txt'] = 'Sugestões';
 $wb['error_no_server_id'] = 'Nenhum servidor selecionado.';
 $wb['error_not_allowed_server_id'] = 'O servidor selecionado não é permitido para esta conta.';
-$wb['limit_dns_zone_txt'] = 'O limite de zonas dns para esta conta foi alcançado.';
-?>
+$wb['limit_dns_zone_txt'] = 'O limite de zonas DNS para esta conta foi alcançado.';
diff --git a/interface/web/dns/lib/lang/cz.lng b/interface/web/dns/lib/lang/cz.lng
index 74a1c457a7..381425cdc5 100644
--- a/interface/web/dns/lib/lang/cz.lng
+++ b/interface/web/dns/lib/lang/cz.lng
@@ -19,4 +19,3 @@ $wb['Add DNS Zone'] = 'Vytvořit DNS zónu';
 $wb['Templates'] = 'Å ablony DNS';
 $wb['Secondary Zones'] = 'Sekundární DNS zóny';
 $wb['Import Zone File'] = 'Importovat DNS zonový soubor';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_a.lng b/interface/web/dns/lib/lang/cz_dns_a.lng
index 47af668d8a..2c3a7f1b0e 100644
--- a/interface/web/dns/lib/lang/cz_dns_a.lng
+++ b/interface/web/dns/lib/lang/cz_dns_a.lng
@@ -11,7 +11,6 @@ $wb['no_zone_perm'] = 'Nemáte oprávnění přidat záznam do této zóny.';
 $wb['name_error_empty'] = 'Název hostitele je prázdný.';
 $wb['name_error_regex'] = 'Název hostitele má chybný formát.';
 $wb['data_error_empty'] = 'IP adresa je prázdná';
-$wb['data_error_duplicate'] = 'Duplicate A, ALIAS or CNAME record';
+$wb['data_error_duplicate'] = 'Duplikace A záznamu';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
 $wb['ip_error_wrong'] = 'IP - formát adresy neplatný';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_a_list.lng b/interface/web/dns/lib/lang/cz_dns_a_list.lng
index 5096f96127..f877e2b199 100644
--- a/interface/web/dns/lib/lang/cz_dns_a_list.lng
+++ b/interface/web/dns/lib/lang/cz_dns_a_list.lng
@@ -12,4 +12,3 @@ $wb['add_new_record_txt'] = 'Vytvořit DNS A záznam';
 $wb['page_txt'] = 'Stránka';
 $wb['page_of_txt'] = 'z';
 $wb['delete_confirmation'] = 'Skutečně chcete smazat tento záznam ?';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_aaaa.lng b/interface/web/dns/lib/lang/cz_dns_aaaa.lng
index 00f7d49745..ce80f2d881 100644
--- a/interface/web/dns/lib/lang/cz_dns_aaaa.lng
+++ b/interface/web/dns/lib/lang/cz_dns_aaaa.lng
@@ -11,7 +11,6 @@ $wb['no_zone_perm'] = 'Nemáte oprávnění přidat záznam do této zóny.';
 $wb['name_error_empty'] = 'Název hostitele je prázdný.';
 $wb['name_error_regex'] = 'Název hostitele má chybný formát.';
 $wb['data_error_empty'] = 'IP adresa je prázdná';
-$wb['data_error_duplicate'] = 'Duplicate AAAA, ALIAS or CNAME record';
+$wb['data_error_duplicate'] = 'Duplicitní AAAA nebo CNAME záznam';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
 $wb['ip_error_wrong'] = 'IP - formát adresy neplatný';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_alias.lng b/interface/web/dns/lib/lang/cz_dns_alias.lng
index 7eaeba6c95..d889d10d26 100644
--- a/interface/web/dns/lib/lang/cz_dns_alias.lng
+++ b/interface/web/dns/lib/lang/cz_dns_alias.lng
@@ -14,4 +14,3 @@ $wb['data_error_empty'] = 'Cílový název hostitele je prázdný';
 $wb['data_error_regex'] = 'Cílový název hostitele má chybný formát';
 $wb['data_error_duplicate'] = 'Duplicate A, AAAA, ALIAS, CNAME, or DNAME record';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_caa.lng b/interface/web/dns/lib/lang/cz_dns_caa.lng
index f4ba690c5a..211fc294f9 100644
--- a/interface/web/dns/lib/lang/cz_dns_caa.lng
+++ b/interface/web/dns/lib/lang/cz_dns_caa.lng
@@ -16,4 +16,3 @@ $wb['ca_error_txt'] = 'Nebyla vybrána žádná certifikační autorita';
 $wb['caa_exists_error'] = 'CAA záznam již existuje';
 $wb['ca_option_error'] = 'Neplatný formát pro další možnosti; OPTION=VALUE';
 $wb['ttl_range_error'] = 'Min. TTL čas je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_cname.lng b/interface/web/dns/lib/lang/cz_dns_cname.lng
index 7eaeba6c95..e3286e4a55 100644
--- a/interface/web/dns/lib/lang/cz_dns_cname.lng
+++ b/interface/web/dns/lib/lang/cz_dns_cname.lng
@@ -12,6 +12,5 @@ $wb['name_error_empty'] = 'Název hostitele je prázdný.';
 $wb['name_error_regex'] = 'Název hostitele má chybný formát.';
 $wb['data_error_empty'] = 'Cílový název hostitele je prázdný';
 $wb['data_error_regex'] = 'Cílový název hostitele má chybný formát';
-$wb['data_error_duplicate'] = 'Duplicate A, AAAA, ALIAS, CNAME, or DNAME record';
+$wb['data_error_duplicate'] = 'Duplikace A záznamu nebo CNAME-záznamu';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_dkim.lng b/interface/web/dns/lib/lang/cz_dns_dkim.lng
index e3a93bc8b8..311efa2071 100644
--- a/interface/web/dns/lib/lang/cz_dns_dkim.lng
+++ b/interface/web/dns/lib/lang/cz_dns_dkim.lng
@@ -10,4 +10,3 @@ $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
 $wb['selector_txt'] = 'DKIM selektor';
 $wb['data_error_empty'] = 'Public-Key missing';
 $wb['dkim_selector_empty_txt'] = 'DKIM-Selector is empty';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_dmarc.lng b/interface/web/dns/lib/lang/cz_dns_dmarc.lng
index c4c3bb4f24..8e11e14d81 100644
--- a/interface/web/dns/lib/lang/cz_dns_dmarc.lng
+++ b/interface/web/dns/lib/lang/cz_dns_dmarc.lng
@@ -16,11 +16,11 @@ $wb['dmarc_fo1_txt'] = 'Zaslat zprávu, pokud jakýkoli z autentizačních mecha
 $wb['dmarc_fod_txt'] = 'Zaslat zprávu, pokud selže ověření podpisu DKIM.';
 $wb['dmarc_fos_txt'] = 'Zaslat zprávu, pokud SPF selhal.';
 $wb['dmarc_adkim_txt'] = 'Režim porovnávání domény pro DKIM';
-$wb['dmarc_adkim_note_txt'] = '\'strict\' vyžaduje přesnou shodu mezi DKIM doménou a e-maily od';
+$wb['dmarc_adkim_note_txt'] = '\\'strict\\' vyžaduje přesnou shodu mezi DKIM doménou a e-maily od';
 $wb['dmarc_adkim_r_txt'] = 'relaxed';
 $wb['dmarc_adkim_s_txt'] = 'strict';
 $wb['dmarc_aspf_txt'] = 'Režim porovnávání domény pro SPF';
-$wb['dmarc_aspf_note_txt'] = '\'strict\' vyžaduje přesnou shodu mezi SPF doménou a e-maily od';
+$wb['dmarc_aspf_note_txt'] = '\\'strict\\' vyžaduje přesnou shodu mezi SPF doménou a e-maily od';
 $wb['dmarc_aspf_r_txt'] = 'relaxed';
 $wb['dmarc_aspf_s_txt'] = 'strict';
 $wb['dmarc_rf_txt'] = 'Formát hlášení';
@@ -37,7 +37,7 @@ $wb['dmarc_sp_quarantine_txt'] = 'karanténa';
 $wb['dmarc_sp_reject_txt'] = 'odmítnout';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Aktivní';
-$wb['dmarc_policy_error_txt'] = 'Only policy \'none\' is allowed without DKIM-signed emails.';
+$wb['dmarc_policy_error_txt'] = 'Only policy \\'none\\' is allowed without DKIM-signed emails.';
 $wb['dmarc_no_dkim_txt'] = 'Není aktivní žádný DKIM záznam.';
 $wb['dmarc_no_spf_txt'] = 'Není aktivní žádný SPF záznam.';
 $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record';
@@ -47,4 +47,3 @@ $wb['record_exists_txt'] = 'DNS záznam již existuje';
 $wb['limit_dns_record_txt'] = 'Byl dosažen max. počet DNS záznamů pro váš účet.';
 $wb['no_zone_perm'] = 'Nemáte oprávnění přidat záznam do této zóny DNS.';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_dname.lng b/interface/web/dns/lib/lang/cz_dns_dname.lng
index 1419acf02f..94dae46aa6 100644
--- a/interface/web/dns/lib/lang/cz_dns_dname.lng
+++ b/interface/web/dns/lib/lang/cz_dns_dname.lng
@@ -14,4 +14,3 @@ $wb['data_error_empty'] = 'Cílový název hostitele je prázdný';
 $wb['data_error_regex'] = 'Cílový název hostitele má chybný formát';
 $wb['data_error_duplicate'] = 'Duplicate CNAME or DNAME record';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_ds.lng b/interface/web/dns/lib/lang/cz_dns_ds.lng
index f7dd779ef8..e54fb6ccc4 100644
--- a/interface/web/dns/lib/lang/cz_dns_ds.lng
+++ b/interface/web/dns/lib/lang/cz_dns_ds.lng
@@ -1,6 +1,6 @@
 <?php
 $wb['server_id_txt'] = 'Server';
-$wb['zone_txt'] = 'Zone';
+$wb['zone_txt'] = 'Zóna';
 $wb['name_txt'] = 'Název hostitele';
 $wb['type_txt'] = 'Typ';
 $wb['data_txt'] = 'Data';
@@ -14,4 +14,3 @@ $wb['data_error_empty'] = 'Text empty';
 $wb['data_error_regex'] = 'Text format invalid';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
 $wb['invalid_type_ds'] = 'DS-Record has a wrong format.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_hinfo.lng b/interface/web/dns/lib/lang/cz_dns_hinfo.lng
index edd9aa3694..da00c42d3b 100644
--- a/interface/web/dns/lib/lang/cz_dns_hinfo.lng
+++ b/interface/web/dns/lib/lang/cz_dns_hinfo.lng
@@ -13,4 +13,3 @@ $wb['name_error_regex'] = 'Název hostitele má chybný formát.';
 $wb['data_error_empty'] = 'Informace o hostovi je prázdná';
 $wb['data_error_regex'] = 'Informace o hostovi má chybný formát';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_import.lng b/interface/web/dns/lib/lang/cz_dns_import.lng
index ed254338a5..ddbcce0875 100644
--- a/interface/web/dns/lib/lang/cz_dns_import.lng
+++ b/interface/web/dns/lib/lang/cz_dns_import.lng
@@ -22,4 +22,3 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.';
 $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.';
 $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.';
 $wb['zone_file_import_fail'] = 'The zone file did not import.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_loc.lng b/interface/web/dns/lib/lang/cz_dns_loc.lng
index 4ed9018152..1fa6fa87d1 100644
--- a/interface/web/dns/lib/lang/cz_dns_loc.lng
+++ b/interface/web/dns/lib/lang/cz_dns_loc.lng
@@ -1,6 +1,6 @@
 <?php
 $wb['server_id_txt'] = 'Server';
-$wb['zone_txt'] = 'Zone';
+$wb['zone_txt'] = 'Zóna';
 $wb['name_txt'] = 'Název hostitele';
 $wb['type_txt'] = 'Typ';
 $wb['data_txt'] = 'Data';
@@ -13,4 +13,3 @@ $wb['name_error_regex'] = 'Název hostitele má chybný formát.';
 $wb['data_error_empty'] = 'Text empty';
 $wb['data_error_regex'] = 'Text format invalid';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_mx.lng b/interface/web/dns/lib/lang/cz_dns_mx.lng
index 8d62a01921..17ab260c89 100644
--- a/interface/web/dns/lib/lang/cz_dns_mx.lng
+++ b/interface/web/dns/lib/lang/cz_dns_mx.lng
@@ -15,4 +15,3 @@ $wb['data_error_empty'] = 'Název hostitele e-mailového serveru je prázdný';
 $wb['data_error_regex'] = 'Název hostitele e-mailového serveru má chybný formát';
 $wb['duplicate_mx_record_txt'] = 'Duplicitní MX záznam.';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_naptr.lng b/interface/web/dns/lib/lang/cz_dns_naptr.lng
index b39373c13d..75f2580ea8 100644
--- a/interface/web/dns/lib/lang/cz_dns_naptr.lng
+++ b/interface/web/dns/lib/lang/cz_dns_naptr.lng
@@ -1,7 +1,7 @@
 <?php
 $wb['server_id_txt'] = 'Server';
-$wb['zone_txt'] = 'Zone';
-$wb['name_txt'] = 'Hostname';
+$wb['zone_txt'] = 'Zóna';
+$wb['name_txt'] = 'Název hostitele';
 $wb['order_txt'] = 'Order';
 $wb['pref_txt'] = 'Pref';
 $wb['flags_txt'] = 'Flags';
@@ -9,13 +9,12 @@ $wb['service_txt'] = 'Service';
 $wb['regexp_txt'] = 'RegExp';
 $wb['replacement_txt'] = 'Replacement';
 $wb['ttl_txt'] = 'TTL';
-$wb['active_txt'] = 'Active';
-$wb['limit_dns_record_txt'] = 'The max. number of DNS records for your account is reached.';
-$wb['no_zone_perm'] = 'You do not have the permission to add a record to this DNS zone.';
-$wb['name_error_empty'] = 'The hostname is empty.';
-$wb['name_error_regex'] = 'The hostname has the wrong format.';
-$wb['data_error_empty'] = 'NAPTR record is empty.';
+$wb['active_txt'] = 'Aktivní';
+$wb['limit_dns_record_txt'] = 'Byl dosažen maximální počet DNS záznamů pro Váš účet.';
+$wb['no_zone_perm'] = 'Nemáte oprávnění přidat záznam do této zóny.';
+$wb['name_error_empty'] = 'Název hostitele je prázdný.';
+$wb['name_error_regex'] = 'Název hostitele má chybný formát.';
+$wb['data_error_empty'] = 'NAPTR záznam je prázdný.';
 $wb['naptr_error_regex'] = 'Invalid NAPTR record.  The NAPTR record must include Order, Pref and either Regex or Replacement.';
-$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
+$wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
 $wb['record_parse_error'] = 'Could not parse the record found in database.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_ns.lng b/interface/web/dns/lib/lang/cz_dns_ns.lng
index f2a1e6856e..c3fc7253e7 100644
--- a/interface/web/dns/lib/lang/cz_dns_ns.lng
+++ b/interface/web/dns/lib/lang/cz_dns_ns.lng
@@ -13,4 +13,3 @@ $wb['name_error_regex'] = 'Zóna má chybný formát.';
 $wb['data_error_empty'] = 'Jmenný server je prázdný';
 $wb['data_error_regex'] = 'Jmenný server má chybný formát';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_ptr.lng b/interface/web/dns/lib/lang/cz_dns_ptr.lng
index 4d4403df9e..ea5a3561a9 100644
--- a/interface/web/dns/lib/lang/cz_dns_ptr.lng
+++ b/interface/web/dns/lib/lang/cz_dns_ptr.lng
@@ -13,4 +13,3 @@ $wb['name_error_regex'] = 'Název má chybný formát.';
 $wb['data_error_empty'] = 'Kanonický hostname je prázdný';
 $wb['data_error_regex'] = 'Kanonického hostname má chybný formát';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_rp.lng b/interface/web/dns/lib/lang/cz_dns_rp.lng
index b4582ba1c8..c805b60380 100644
--- a/interface/web/dns/lib/lang/cz_dns_rp.lng
+++ b/interface/web/dns/lib/lang/cz_dns_rp.lng
@@ -13,4 +13,3 @@ $wb['name_error_regex'] = 'Název hostitele má chybný formát.';
 $wb['data_error_empty'] = 'Odpovědná osoba je prázdná';
 $wb['data_error_regex'] = 'Odpovědná osoba má chybný formát';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_slave.lng b/interface/web/dns/lib/lang/cz_dns_slave.lng
index 349a01bdbb..8493bd2fda 100644
--- a/interface/web/dns/lib/lang/cz_dns_slave.lng
+++ b/interface/web/dns/lib/lang/cz_dns_slave.lng
@@ -14,4 +14,3 @@ $wb['ns_error_regex'] = 'NS má neplatný formát.';
 $wb['eg_domain_tld'] = 'napÅ™. domena.cz';
 $wb['ipv4_form_txt'] = 'IPV4 formát, např. 1.2.3.4';
 $wb['secondary_zone_txt'] = 'Sekundární DNS zóna';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_slave_admin_list.lng b/interface/web/dns/lib/lang/cz_dns_slave_admin_list.lng
index 2b4160735a..c973ffcee6 100644
--- a/interface/web/dns/lib/lang/cz_dns_slave_admin_list.lng
+++ b/interface/web/dns/lib/lang/cz_dns_slave_admin_list.lng
@@ -7,4 +7,3 @@ $wb['ns_txt'] = 'NS';
 $wb['add_new_record_txt'] = 'Vytvořit novou Sekundarní DNS-Zónu';
 $wb['eg_domain_tld'] = 'napÅ™. domena.cz';
 $wb['sys_groupid_txt'] = 'Klient';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_slave_list.lng b/interface/web/dns/lib/lang/cz_dns_slave_list.lng
index a0d68bc201..fabcd4d3fd 100644
--- a/interface/web/dns/lib/lang/cz_dns_slave_list.lng
+++ b/interface/web/dns/lib/lang/cz_dns_slave_list.lng
@@ -6,4 +6,3 @@ $wb['origin_txt'] = 'Zóna';
 $wb['ns_txt'] = 'NS';
 $wb['add_new_record_txt'] = 'Vytvořit sekundární DNS zónu';
 $wb['eg_domain_tld'] = 'napÅ™. domena.cz';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_soa.lng b/interface/web/dns/lib/lang/cz_dns_soa.lng
index ba6b2d4b52..ef6fdf82d8 100644
--- a/interface/web/dns/lib/lang/cz_dns_soa.lng
+++ b/interface/web/dns/lib/lang/cz_dns_soa.lng
@@ -7,9 +7,9 @@ $wb['serial_txt'] = 'Serial';
 $wb['refresh_txt'] = 'Refresh';
 $wb['retry_txt'] = 'Retry';
 $wb['expire_txt'] = 'Expire';
-$wb['minimum_txt'] = 'Minimum (negative cache ttl)';
+$wb['minimum_txt'] = 'Minimum';
 $wb['ttl_txt'] = 'TTL';
-$wb['xfer_txt'] = 'Povolot přenos zóny do <br />těchto IP adres (položky oddělené čárkami)';
+$wb['xfer_txt'] = 'Povolit přenos zóny do <br />těchto IP adres (položky oddělené čárkami)';
 $wb['active_txt'] = 'Aktivní';
 $wb['limit_dns_zone_txt'] = 'Byl dosažen maximální počet DNS záznamů pro Váš účet.';
 $wb['client_txt'] = 'Klient';
@@ -41,5 +41,4 @@ $wb['dnssec_wanted_info'] = 'Když deaktivujete DNSSEC klíče nebudou odstraně
 $wb['error_not_allowed_server_id'] = 'Vybraný server není pro tento účet povolen.';
 $wb['soa_cannot_be_changed_txt'] = 'Die Zone (SOA) kann nicht verändert werden. Bitte kontaktieren Sie ihren Administrator, um die Zone zu ändern.';
 $wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
-$wb['dnssec_algo_txt'] = 'DNSSEC Algorithm';
-?>
+$wb['dnssec_algo_txt'] = 'DNSSEC Algoritmus';
diff --git a/interface/web/dns/lib/lang/cz_dns_soa_admin_list.lng b/interface/web/dns/lib/lang/cz_dns_soa_admin_list.lng
index a4f27d2472..ab39140c78 100644
--- a/interface/web/dns/lib/lang/cz_dns_soa_admin_list.lng
+++ b/interface/web/dns/lib/lang/cz_dns_soa_admin_list.lng
@@ -7,6 +7,5 @@ $wb['ns_txt'] = 'NS';
 $wb['mbox_txt'] = 'E-mail';
 $wb['add_new_record_wizard_txt'] = 'Vytvořit DNS zónu pomocí průvodce';
 $wb['add_new_record_txt'] = 'Vytvořit DNS zónu manuálně';
-$wb['import_zone_file_txt'] = 'Importovat DNS zonový soubor';
+$wb['import_zone_file_txt'] = 'Import Zone File';
 $wb['sys_groupid_txt'] = 'Klient';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_soa_list.lng b/interface/web/dns/lib/lang/cz_dns_soa_list.lng
index 6168c8b808..f884097149 100644
--- a/interface/web/dns/lib/lang/cz_dns_soa_list.lng
+++ b/interface/web/dns/lib/lang/cz_dns_soa_list.lng
@@ -8,4 +8,3 @@ $wb['mbox_txt'] = 'E-mail';
 $wb['add_new_record_txt'] = 'Vytvořit DNS zónu (SOA záznam)';
 $wb['add_new_record_wizard_txt'] = 'Vytvořit DNS zónu (dle šablony)';
 $wb['import_zone_file_txt'] = 'Importovat DNS zonový soubor';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_spf.lng b/interface/web/dns/lib/lang/cz_dns_spf.lng
index 637d0ca767..3eb2a6ec2f 100644
--- a/interface/web/dns/lib/lang/cz_dns_spf.lng
+++ b/interface/web/dns/lib/lang/cz_dns_spf.lng
@@ -1,6 +1,6 @@
 <?php
 $wb['data_txt'] = 'SPF Záznam';
-$wb['name_txt'] = 'Hostname';
+$wb['name_txt'] = 'Název hostitele';
 $wb['spf_mechanism_txt'] = 'SPF Mechanismus';
 $wb['spf_mechanism_pass_txt'] = 'Přijmout - přijímat e-mail od ostatních odesílatelů';
 $wb['spf_mechanism_fail_txt'] = 'Odmítat - odmítnout e-mail od ostatních odesílatelů';
@@ -20,11 +20,10 @@ $wb['spf_invalid_domain_txt'] = 'Neplatné doménové jméno';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Aktivní';
 $wb['record_exists_txt'] = 'DNS záznam již existuje';
-$wb['spf_record_exists_txt'] = 'SPF-Record already exists for hostname "{hostname}". Do you want to <a href="#" data-load-content="dns/dns_spf_edit.php?id={existing_record_id}">edit the existing record</a>?';
-$wb['spf_record_exists_multiple_txt'] = 'Multiple SPF-Records exist for hostname "{hostname}". This will cause recipients to reject your mail! Delete or merge duplicate existing records and try again.';
+$wb['spf_record_exists_txt'] = 'SPF-Record already exists for hostname \"{hostname}\". Do you want to <a href=\"#\" data-load-content=\"dns/dns_spf_edit.php?id={existing_record_id}\">edit the existing record</a>?';
+$wb['spf_record_exists_multiple_txt'] = 'Multiple SPF-Records exist for hostname \"{hostname}\". This will cause recipients to reject your mail! Delete or merge duplicate existing records and try again.';
 $wb['limit_dns_record_txt'] = 'Byl dosažen max. počet DNS záznamů pro váš účet.';
 $wb['no_zone_perm'] = 'Nemáte oprávnění přidat záznam do této zóny DNS.';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-$wb['name_error_regex'] = 'The hostname has the wrong format.';
-$wb['btn_edit_as_txt_record_txt'] = 'Edit as TXT record';
-?>
+$wb['name_error_regex'] = 'Název hostitele má chybný formát.';
+$wb['btn_edit_as_txt_record_txt'] = 'Upravit jako TXT záznam';
diff --git a/interface/web/dns/lib/lang/cz_dns_srv.lng b/interface/web/dns/lib/lang/cz_dns_srv.lng
index 00b1fc4cf1..914c6f3efb 100644
--- a/interface/web/dns/lib/lang/cz_dns_srv.lng
+++ b/interface/web/dns/lib/lang/cz_dns_srv.lng
@@ -17,4 +17,3 @@ $wb['data_error_regex'] = 'Záznam serveru má chybný formát';
 $wb['srv_error_regex'] = 'Neplatný formát záznamu serveru. Záznam serveru musí­ obsahovat 3 textové řetězce oddělené mezerami.';
 $wb['aux_txt'] = 'Priorita';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_sshfp.lng b/interface/web/dns/lib/lang/cz_dns_sshfp.lng
index 4ed9018152..1fa6fa87d1 100644
--- a/interface/web/dns/lib/lang/cz_dns_sshfp.lng
+++ b/interface/web/dns/lib/lang/cz_dns_sshfp.lng
@@ -1,6 +1,6 @@
 <?php
 $wb['server_id_txt'] = 'Server';
-$wb['zone_txt'] = 'Zone';
+$wb['zone_txt'] = 'Zóna';
 $wb['name_txt'] = 'Název hostitele';
 $wb['type_txt'] = 'Typ';
 $wb['data_txt'] = 'Data';
@@ -13,4 +13,3 @@ $wb['name_error_regex'] = 'Název hostitele má chybný formát.';
 $wb['data_error_empty'] = 'Text empty';
 $wb['data_error_regex'] = 'Text format invalid';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_template.lng b/interface/web/dns/lib/lang/cz_dns_template.lng
index 5927faef53..cb6e47f99c 100644
--- a/interface/web/dns/lib/lang/cz_dns_template.lng
+++ b/interface/web/dns/lib/lang/cz_dns_template.lng
@@ -4,4 +4,3 @@ $wb['fields_txt'] = 'Pole';
 $wb['template_txt'] = 'Å ablona';
 $wb['visible_txt'] = 'Viditelný';
 $wb['placeholder_txt'] = 'Placeholder';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_template_list.lng b/interface/web/dns/lib/lang/cz_dns_template_list.lng
index a4b2e40657..f67137b7d7 100644
--- a/interface/web/dns/lib/lang/cz_dns_template_list.lng
+++ b/interface/web/dns/lib/lang/cz_dns_template_list.lng
@@ -3,4 +3,3 @@ $wb['list_head_txt'] = 'DNS průvodce šablonou';
 $wb['visible_txt'] = 'Viditelný';
 $wb['name_txt'] = 'Název';
 $wb['add_new_record_txt'] = 'Vytvořit záznam';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_tlsa.lng b/interface/web/dns/lib/lang/cz_dns_tlsa.lng
index 3891ad37c7..10bc29a57d 100644
--- a/interface/web/dns/lib/lang/cz_dns_tlsa.lng
+++ b/interface/web/dns/lib/lang/cz_dns_tlsa.lng
@@ -1,6 +1,6 @@
 <?php
 $wb['server_id_txt'] = 'Server';
-$wb['zone_txt'] = 'Zone';
+$wb['zone_txt'] = 'Zóna';
 $wb['name_txt'] = 'Service-Descriptor';
 $wb['type_txt'] = 'Typ';
 $wb['data_txt'] = 'TLSA-Data';
@@ -13,4 +13,3 @@ $wb['name_error_regex'] = 'The hostname has the wrong format. Correct: _&lt;port
 $wb['data_error_empty'] = 'TLSA-Data empty';
 $wb['data_error_regex'] = 'TLSA dataformat is wrong. Correct: n n n HASH';
 $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_txt.lng b/interface/web/dns/lib/lang/cz_dns_txt.lng
index 4912f965b3..bb4549993f 100644
--- a/interface/web/dns/lib/lang/cz_dns_txt.lng
+++ b/interface/web/dns/lib/lang/cz_dns_txt.lng
@@ -16,4 +16,3 @@ $wb['ttl_range_error'] = 'Min. TTL doba je 60 sekund.';
 $wb['invalid_type_dkim'] = 'Přímá editace DKIM záznamu zde není povolena. Editujte záznam pomocí tlačítka DKIM.';
 $wb['invalid_type_dmarc'] = 'Přímá editace DMARC záznamu zde není povolena. Editujte záznam pomocí tlačítka DMARC.';
 $wb['invalid_type_spf'] = 'Přímá editace SPF záznamu zde není povolena. Editujte záznam pomocí tlačítka SPF.';
-?>
diff --git a/interface/web/dns/lib/lang/cz_dns_wizard.lng b/interface/web/dns/lib/lang/cz_dns_wizard.lng
index a4a1ddf539..21d9170838 100644
--- a/interface/web/dns/lib/lang/cz_dns_wizard.lng
+++ b/interface/web/dns/lib/lang/cz_dns_wizard.lng
@@ -42,4 +42,3 @@ $wb['error_no_server_id'] = 'No server provided.';
 $wb['error_not_allowed_server_id'] = 'Vybraný server není pro tento účet povolen.';
 $wb['dnssec_txt'] = 'Podepsat zónu (DNSSEC)';
 $wb['limit_dns_zone_txt'] = 'The max. number of DNS zones for your account is reached.';
-?>
diff --git a/interface/web/help/lib/lang/br.lng b/interface/web/help/lib/lang/br.lng
index 217d3afa14..da6fbf2403 100644
--- a/interface/web/help/lib/lang/br.lng
+++ b/interface/web/help/lib/lang/br.lng
@@ -11,4 +11,3 @@ $wb['FAQ Sections'] = 'Seções FAQ';
 $wb['Manage Sections'] = 'Gerenciar seções';
 $wb['Add a Question & Answer Pair'] = 'Adicionar novo par questão/resposta';
 $wb['Manage Questions'] = 'Gerenciar questões';
-?>
diff --git a/interface/web/help/lib/lang/br_faq_form.lng b/interface/web/help/lib/lang/br_faq_form.lng
index b24ec1c58f..89f8685de4 100644
--- a/interface/web/help/lib/lang/br_faq_form.lng
+++ b/interface/web/help/lib/lang/br_faq_form.lng
@@ -3,4 +3,3 @@ $wb['faq_faq_txt'] = 'Questões Frequentes';
 $wb['faq_question_txt'] = 'Questão';
 $wb['faq_answer_txt'] = 'Resposta';
 $wb['faq_section_txt'] = 'Seção';
-?>
diff --git a/interface/web/help/lib/lang/br_faq_manage_questions_list.lng b/interface/web/help/lib/lang/br_faq_manage_questions_list.lng
index ee9f769d91..df2125a7a5 100644
--- a/interface/web/help/lib/lang/br_faq_manage_questions_list.lng
+++ b/interface/web/help/lib/lang/br_faq_manage_questions_list.lng
@@ -6,4 +6,3 @@ $wb['faq_edit_txt'] = 'Editar';
 $wb['faq_sections_txt'] = 'Seção';
 $wb['faq_faq_questions_txt'] = 'Questões Frequentes';
 $wb['faq_new_question_txt'] = 'Adicionar novo par questão/resposta';
-?>
diff --git a/interface/web/help/lib/lang/br_faq_sections_form.lng b/interface/web/help/lib/lang/br_faq_sections_form.lng
index 2fb709cbd2..05237f2a20 100644
--- a/interface/web/help/lib/lang/br_faq_sections_form.lng
+++ b/interface/web/help/lib/lang/br_faq_sections_form.lng
@@ -1,3 +1,2 @@
 <?php
 $wb['faq_section_name_txt'] = 'Nome da seção';
-?>
diff --git a/interface/web/help/lib/lang/br_help_faq_list.lng b/interface/web/help/lib/lang/br_help_faq_list.lng
index 64a02c0a74..a94404919f 100644
--- a/interface/web/help/lib/lang/br_help_faq_list.lng
+++ b/interface/web/help/lib/lang/br_help_faq_list.lng
@@ -1,3 +1,2 @@
 <?php
 $wb['edit_txt'] = 'Editar';
-?>
diff --git a/interface/web/help/lib/lang/br_help_faq_sections_list.lng b/interface/web/help/lib/lang/br_help_faq_sections_list.lng
index aec81d7b59..8c22ec5c0e 100644
--- a/interface/web/help/lib/lang/br_help_faq_sections_list.lng
+++ b/interface/web/help/lib/lang/br_help_faq_sections_list.lng
@@ -5,4 +5,3 @@ $wb['faq_edit_txt'] = 'Editar';
 $wb['faq_sections_txt'] = 'Seções';
 $wb['faq_faq_sections_txt'] = 'Seções FAQ';
 $wb['faq_new_section_txt'] = 'Adicionar nova seção';
-?>
diff --git a/interface/web/help/lib/lang/br_support_message.lng b/interface/web/help/lib/lang/br_support_message.lng
index dad8ce7fd5..44da84097c 100644
--- a/interface/web/help/lib/lang/br_support_message.lng
+++ b/interface/web/help/lib/lang/br_support_message.lng
@@ -7,10 +7,9 @@ $wb['tstamp_txt'] = 'Data/Hora';
 $wb['reply_txt'] = 'Responder';
 $wb['date_txt'] = 'Data';
 $wb['support_request_subject_txt'] = 'Requisição de Suporte';
-$wb['support_request_txt'] = 'Você recebeu uma requisição de suporte. Por favor, não responda este e-mail, mas processe a requisição dentro do ISPConfig.';
-$wb['answer_to_support_request_txt'] = 'Você recebeu uma resposta à sua requisição de suporte. Por favor, não responda este e-mail, mas processe a mensagem dentro do ISPConfig.';
-$wb['answer_to_support_request_sent_txt'] = 'Sua resposta à requisição de suporte foi enviada. Por favor, não responda este e-mail.';
-$wb['support_request_sent_txt'] = 'Sua requisição de suporte foi enviada. Por favor, não responda este e-mail.';
-$wb['recipient_or_sender_email_address_not_valid_txt'] = 'A mensagem não pôde ser enviada porque o remetente e/ou destinatário são e-mails inválidos.';
-$wb['subject_is_empty'] = 'O assunto está em branco.';
-?>
+$wb['support_request_txt'] = 'Você recebeu uma requisição de suporte. Por favor, não responda este email, mas processe a requisição dentro do ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'Você recebeu uma resposta à sua requisição de suporte. Por favor, não responda este email, mas processe a mensagem dentro do ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Sua resposta à requisição de suporte foi enviada. Por favor, não responda este email.';
+$wb['support_request_sent_txt'] = 'Sua requisição de suporte foi enviada. Por favor, não responda este email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'A mensagem não pôde ser enviada porque o remetente e/ou destinatário são emails inválidos.';
+$wb['subject_is_empty'] = 'O assunto está vazio.';
diff --git a/interface/web/help/lib/lang/br_support_message_list.lng b/interface/web/help/lib/lang/br_support_message_list.lng
index e4add42b79..13e3864f89 100644
--- a/interface/web/help/lib/lang/br_support_message_list.lng
+++ b/interface/web/help/lib/lang/br_support_message_list.lng
@@ -4,4 +4,3 @@ $wb['sender_id_txt'] = 'Remetente';
 $wb['subject_txt'] = 'Assunto';
 $wb['add_new_record_txt'] = 'Adicionar nova mensagem de suporte';
 $wb['date_txt'] = 'Data';
-?>
diff --git a/interface/web/help/lib/lang/cz.lng b/interface/web/help/lib/lang/cz.lng
index 55279c6a69..c5e1bde4b2 100644
--- a/interface/web/help/lib/lang/cz.lng
+++ b/interface/web/help/lib/lang/cz.lng
@@ -11,4 +11,3 @@ $wb['FAQ Sections'] = 'Sekce FAQ - Často kladené dotazy';
 $wb['Manage Sections'] = 'Spravovat sekce';
 $wb['Manage Questions'] = 'Spravovat dotazy';
 $wb['Add a Question & Answer Pair'] = 'Vytvořit otázku a odpověď';
-?>
diff --git a/interface/web/help/lib/lang/cz_faq_form.lng b/interface/web/help/lib/lang/cz_faq_form.lng
index 73feee6955..d5ea458e14 100644
--- a/interface/web/help/lib/lang/cz_faq_form.lng
+++ b/interface/web/help/lib/lang/cz_faq_form.lng
@@ -3,4 +3,3 @@ $wb['faq_faq_txt'] = 'Často kladené dotazy';
 $wb['faq_question_txt'] = 'Otázka';
 $wb['faq_answer_txt'] = 'Odpověď';
 $wb['faq_section_txt'] = 'Sekce';
-?>
diff --git a/interface/web/help/lib/lang/cz_faq_manage_questions_list.lng b/interface/web/help/lib/lang/cz_faq_manage_questions_list.lng
index 34a03b3175..431928c246 100644
--- a/interface/web/help/lib/lang/cz_faq_manage_questions_list.lng
+++ b/interface/web/help/lib/lang/cz_faq_manage_questions_list.lng
@@ -6,4 +6,3 @@ $wb['faq_edit_txt'] = 'Upravit';
 $wb['faq_sections_txt'] = 'Sekce';
 $wb['faq_faq_questions_txt'] = 'Často kladené dotazy';
 $wb['faq_new_question_txt'] = 'Vytvořit nový dotaz';
-?>
diff --git a/interface/web/help/lib/lang/cz_faq_sections_form.lng b/interface/web/help/lib/lang/cz_faq_sections_form.lng
index f9de704d8a..20ec09e845 100644
--- a/interface/web/help/lib/lang/cz_faq_sections_form.lng
+++ b/interface/web/help/lib/lang/cz_faq_sections_form.lng
@@ -1,3 +1,2 @@
 <?php
 $wb['faq_section_name_txt'] = 'Název sekce';
-?>
diff --git a/interface/web/help/lib/lang/cz_help_faq_list.lng b/interface/web/help/lib/lang/cz_help_faq_list.lng
index 923d9b892a..dadb8e29bb 100644
--- a/interface/web/help/lib/lang/cz_help_faq_list.lng
+++ b/interface/web/help/lib/lang/cz_help_faq_list.lng
@@ -1,3 +1,2 @@
 <?php
 $wb['edit_txt'] = 'Upravit';
-?>
diff --git a/interface/web/help/lib/lang/cz_help_faq_sections_list.lng b/interface/web/help/lib/lang/cz_help_faq_sections_list.lng
index e9f8f2ea88..9c478baace 100644
--- a/interface/web/help/lib/lang/cz_help_faq_sections_list.lng
+++ b/interface/web/help/lib/lang/cz_help_faq_sections_list.lng
@@ -5,4 +5,3 @@ $wb['faq_edit_txt'] = 'Upravit';
 $wb['faq_sections_txt'] = 'Sekce';
 $wb['faq_faq_sections_txt'] = 'Sekce FAQ - Často kladené dotazy';
 $wb['faq_new_section_txt'] = 'Vytvořit sekci';
-?>
diff --git a/interface/web/help/lib/lang/cz_support_message.lng b/interface/web/help/lib/lang/cz_support_message.lng
index e2b2f4072c..f3d319f851 100644
--- a/interface/web/help/lib/lang/cz_support_message.lng
+++ b/interface/web/help/lib/lang/cz_support_message.lng
@@ -7,10 +7,9 @@ $wb['tstamp_txt'] = 'Časové razítko';
 $wb['reply_txt'] = 'Odpovědět';
 $wb['date_txt'] = 'Datum';
 $wb['support_request_subject_txt'] = 'Žádost o podporu';
-$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
-$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
-$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
-$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_txt'] = 'You have got a support request. Please don\\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\\'t reply to this email.';
 $wb['recipient_or_sender_email_address_not_valid_txt'] = 'Zprávu nelze odeslat, protože e-mailová adresa příjemce a/nebo odesílatele není platná.';
-$wb['subject_is_empty'] = 'The subject can not be empty.';
-?>
+$wb['subject_is_empty'] = 'Předmět nemůže být prázdný.';
diff --git a/interface/web/help/lib/lang/cz_support_message_list.lng b/interface/web/help/lib/lang/cz_support_message_list.lng
index 23f80584f9..3c3860ebdd 100644
--- a/interface/web/help/lib/lang/cz_support_message_list.lng
+++ b/interface/web/help/lib/lang/cz_support_message_list.lng
@@ -4,4 +4,3 @@ $wb['sender_id_txt'] = 'Odesílatel';
 $wb['subject_txt'] = 'Předmět';
 $wb['add_new_record_txt'] = 'Vytvořit zprávu pro podporu';
 $wb['date_txt'] = 'Datum';
-?>
diff --git a/interface/web/login/lib/lang/br.lng b/interface/web/login/lib/lang/br.lng
index 33cddc8fb3..382bd1b8ac 100644
--- a/interface/web/login/lib/lang/br.lng
+++ b/interface/web/login/lib/lang/br.lng
@@ -1,13 +1,13 @@
 <?php
-$wb['error_user_password_empty'] = 'Usuário ou senha está em branco.';
-$wb['error_user_password_incorrect'] = 'Usuário ou senha incorretos.';
+$wb['error_user_password_empty'] = 'Usuário ou senha está vazio.';
+$wb['error_user_password_incorrect'] = 'Usuário e/ou senha incorreto.';
 $wb['error_user_blocked'] = 'O usuário está bloqueado.';
 $wb['error_user_too_many_logins'] = 'Várias tentativas de acesso incorretas, faça uma nova tentativa dentro de 15 minutos.';
-$wb['pass_reset_txt'] = 'Uma nova senha foi gerada e será enviada para você no e-mail informado abaixo, caso o mesmo esteja cadastrado no sistema nas suas configurações de cliente.';
-$wb['pw_reset'] = 'Senha redefinida! Ela será enviada para você no e-mail cadastrado no sistema.';
-$wb['pw_error'] = 'Nome do usuário ou e-mail não coincidem.';
-$wb['pw_error_noinput'] = 'Favor informar nome do usuário e e-mail válidos.';
-$wb['pw_reset_error_smtp_connection'] = 'There was a connection problem when trying to send an email pertaining to your password reset request.';
+$wb['pass_reset_txt'] = 'Uma nova senha foi gerada e será enviada para você no email informado abaixo, caso o mesmo esteja cadastrado no sistema nas suas configurações de cliente.';
+$wb['pw_reset'] = 'Senha redefinida! Ela será enviada para você no email cadastrado no sistema.';
+$wb['pw_error'] = 'Nome do usuário ou email não coincidem.';
+$wb['pw_error_noinput'] = 'Favor informar nome do usuário e email válidos.';
+$wb['pw_reset_error_smtp_connection'] = 'Ocorreu um problema de conexão ao tentar enviar um email referente à sua solicitação de redefinição de senha.';
 $wb['pw_reset_mail_msg'] = 'A senha para esta conta no ISPConfig foi redefinida. A nova senha é: ';
 $wb['pw_reset_mail_title'] = 'A senha para esta conta no ISPConfig foi redefinida.';
 $wb['user_regex_error'] = 'O nome do usuário contém menos de 1 ou mais de 64 caracteres ou contém caracteres inválidos.';
@@ -23,7 +23,7 @@ $wb['pw_button_txt'] = 'Reenviar senha';
 $wb['email_txt'] = 'E-mail';
 $wb['theme_not_compatible'] = 'O tema escolhido não é compatível com a versão atual do ISPConfig. Por favor, procure por uma nova versão deste tema, compatível com ISPConfig.<br />O tema padrão foi configurado automaticamente.';
 $wb['back_txt'] = 'Voltar';
-$wb['email_error'] = 'O e-mail contém caracteres não permitidos ou formato é inválido.';
+$wb['email_error'] = 'O email contém caracteres não permitidos ou formato é inválido.';
 $wb['stay_logged_in_txt'] = 'Manter-me conectado';
 $wb['lost_password_function_disabled_txt'] = 'Função "redefinir senha" indisponível para este usuário.';
 $wb['pw_reset_act'] = 'Você receberá um link de ativação. Por favor, acesse o link de ativação para confirmar sua nova senha.';
@@ -32,4 +32,3 @@ $wb['pw_reset_act_mail_msg'] = 'Por favor, confirme se você deseja reiniciar su
 $wb['lost_password_function_wait_txt'] = 'Você não pode requisitar uma nova senha ainda. Por favor, aguarde alguns minutos.';
 $wb['lost_password_function_expired_txt'] = 'Este link de ativação expirou. Por favor, faça uma nova requisição.';
 $wb['lost_password_function_denied_txt'] = 'Este link de ativação não é válido.';
-?>
diff --git a/interface/web/login/lib/lang/br_login_as.lng b/interface/web/login/lib/lang/br_login_as.lng
index 1dde30d907..5441f1b53c 100644
--- a/interface/web/login/lib/lang/br_login_as.lng
+++ b/interface/web/login/lib/lang/br_login_as.lng
@@ -1,14 +1,13 @@
 <?php
 $wb['login_1_txt'] = 'Gostaria de acessar como cliente?';
-$wb['login_2_txt'] = 'Se confirmar, poderá "voltar" clicando em sair.';
+$wb['login_2_txt'] = 'Se confirmar, poderá "voltar" selecionando "Sair".';
 $wb['btn_yes_txt'] = 'Sim, acessar como cliente';
 $wb['btn_back_txt'] = 'Não, voltar para a lista';
 $wb['udp_port_help_txt'] = 'Separado por vírgula';
 $wb['active_txt'] = 'Ativo';
-$wb['firewall_error_unique'] = 'Já existe uma regra de firewall idêntica para este servidor.';
+$wb['firewall_error_unique'] = 'Já existe uma regra de Firewall idêntica para este servidor.';
 $wb['tcp_ports_error_regex'] = 'Caractere não permitido para porta tcp. Caracteres permitidos são números, ":" e ",".';
 $wb['udp_ports_error_regex'] = 'Caractere não permitido para porta udp. Caracteres permitidos são números, ":" e ",".';
 $wb['login_as_or_logout_txt'] = 'Gostaria de realizar acesso novamente como {UTYPE} ou sair?';
-$wb['btn_reloginas_txt'] = 'Yes, re-login as %s';
-$wb['btn_nologout_txt'] = 'No, logout';
-?>
+$wb['btn_reloginas_txt'] = 'Sim, acessar novamente como %s';
+$wb['btn_nologout_txt'] = 'Não, sair';
diff --git a/interface/web/login/lib/lang/cz_login_as.lng b/interface/web/login/lib/lang/cz_login_as.lng
index 1d99176adb..0c98889dc7 100644
--- a/interface/web/login/lib/lang/cz_login_as.lng
+++ b/interface/web/login/lib/lang/cz_login_as.lng
@@ -9,6 +9,5 @@ $wb['firewall_error_unique'] = 'Pro tento server již existuje záznam firewallu
 $wb['tcp_ports_error_regex'] = 'Znak není povole v definici TCP portu. Povolené symboly jsou čísla, : a ,.';
 $wb['udp_ports_error_regex'] = 'Znak není povole v definici UDP portu. Povolené symboly jsou čísla, : a ,.';
 $wb['login_as_or_logout_txt'] = 'Chcete se znovu přihlásit jako uživatel {UTYPE} nebo se chcete odhlásit ?';
-$wb['btn_reloginas_txt'] = 'Yes, re-login as %s';
-$wb['btn_nologout_txt'] = 'No, logout';
-?>
+$wb['btn_reloginas_txt'] = 'Ano, znovu se přihlásit jako %s';
+$wb['btn_nologout_txt'] = 'Ne, odhlásit se';
diff --git a/interface/web/mail/lib/lang/br.lng b/interface/web/mail/lib/lang/br.lng
index 7748342612..4fafa1b507 100644
--- a/interface/web/mail/lib/lang/br.lng
+++ b/interface/web/mail/lib/lang/br.lng
@@ -1,27 +1,26 @@
 <?php
-$wb['Email Alias'] = 'Alias de e-mail';
-$wb['Email Blacklist'] = 'Lista Negra';
-$wb['Blacklist'] = 'Lista Negra';
-$wb['Mail Content Filter'] = 'Filtro de conteúdo de e-mail';
+$wb['Email Alias'] = 'Alias de email';
+$wb['Email Blacklist'] = 'Lista de Bloqueios';
+$wb['Blacklist'] = 'Lista de Bloqueios';
+$wb['Mail Content Filter'] = 'Filtro de conteúdo de email';
 $wb['Filter'] = 'Filtro';
-$wb['Mail Domain'] = 'Domínio de e-mail';
+$wb['Mail Domain'] = 'Domínio de email';
 $wb['Domain'] = 'Domínio';
-$wb['Email Catchall'] = 'Contas cata-tudo';
-$wb['Email Forward'] = 'Encaminhamento de e-mail';
-$wb['Get Email'] = 'Busca de e-mail';
-$wb['Spamfilter'] = 'Filtro anti-spam';
-$wb['Email Routing'] = 'Rotas de e-mail';
-$wb['Mailing List'] = 'Listas de e-mail';
+$wb['Email Catchall'] = 'Contas cata tudo';
+$wb['Email Forward'] = 'Encaminhamento de email';
+$wb['Get Email'] = 'Busca de email';
+$wb['Spamfilter'] = 'Filtros anti-spam';
+$wb['Email Routing'] = 'Rotas de email';
+$wb['Mailing List'] = 'Listas de email';
 $wb['Email transport'] = 'Transportes';
-$wb['Mailbox'] = 'Contas de e-mail';
+$wb['Mailbox'] = 'Contas de email';
 $wb['Autoresponder'] = 'Auto-resposta';
-$wb['Mail Filter'] = 'Filtro de e-mail';
+$wb['Mail Filter'] = 'Filtro de email';
 $wb['Custom Rules'] = 'Regras personalizadas';
-$wb['Email filter'] = 'Filtro de e-mail';
-$wb['Email Whitelist'] = 'Lista Branca de e-mails';
-$wb['Whitelist'] = 'Lista Branca';
-$wb['Spamfilter blacklist'] = 'Filtros anti-spam - lista negra';
-$wb['Blacklist'] = 'Lista Negra';
+$wb['Email filter'] = 'Filtro de email';
+$wb['Email Whitelist'] = 'Lista de Permissões de emails';
+$wb['Whitelist'] = 'Lista de Permissões';
+$wb['Spamfilter blacklist'] = 'Filtros anti-spam - lista de bloqueios';
 $wb['Spamfilter Config'] = 'Configurações de filtros anti-spam';
 $wb['Servidor'] = 'Servidor';
 $wb['Spamfilter policy'] = 'Políticas de filtros anti-spam';
@@ -29,28 +28,26 @@ $wb['Policy'] = 'Política';
 $wb['Quarantine'] = 'Quarentena';
 $wb['Tag-Level'] = 'Nível de marcação';
 $wb['Other'] = 'Outros';
-$wb['Spamfilter users'] = 'Contas de e-mail para filtros anti-spam';
-$wb['Users'] = 'Contas de e-mail';
-$wb['Spamfilter Whitelist'] = 'Filtros anti-spam - lista branca';
-$wb['Whitelist'] = 'Lista Branca';
-$wb['Email'] = 'e-Mail';
-$wb['Email Mailbox'] = 'Conta de e-mail';
-$wb['Email Accounts'] = 'Contas de e-mail';
+$wb['Spamfilter users'] = 'Contas de email para filtros anti-spam';
+$wb['Users'] = 'Contas de email';
+$wb['Spamfilter Whitelist'] = 'Filtros anti-spam - lista de permissões';
+$wb['Email'] = 'eMail';
+$wb['Email Mailbox'] = 'Contas de email';
+$wb['Email Accounts'] = 'Contas de email';
 $wb['User / Domain'] = 'Usuário/Domínio';
 $wb['Server Settings'] = 'Configurações do Servidor';
-$wb['Spamfilter'] = 'Filtros anti-spam';
-$wb['Fetchmail'] = 'Busca de e-mails';
-$wb['XMPP Domain'] = 'Domínios xmpp';
-$wb['XMPP Account'] = 'Contas xmpp';
-$wb['Mailbox traffic'] = 'Tráfego de e-mails';
+$wb['Fetchmail'] = 'Busca de emails';
+$wb['XMPP Domain'] = 'Domínios XMPP';
+$wb['XMPP Account'] = 'Contas XMPP';
+$wb['Mailbox traffic'] = 'Tráfego de emails';
 $wb['Statistics'] = 'Estatísticas';
 $wb['Backup Stats'] = 'Estatísticas de backup';
-$wb['Postfix Whitelist'] = 'Lista Branca do Postfix';
-$wb['Postfix Blacklist'] = 'Lista Negra do Postfix';
+$wb['Postfix Whitelist'] = 'Lista de Permissões do Postfix';
+$wb['Postfix Blacklist'] = 'Lista de Bloqueios do Postfix';
 $wb['Content Filter'] = 'Filtro de Conteúdo';
 $wb['Global Filters'] = 'Filtros Globais';
 $wb['Domain Alias'] = 'Alias de domínio';
 $wb['Relay Recipients'] = 'Destinatários de retransmissão';
-$wb['Mailbox quota'] = 'Cota da conta de e-mail';
+$wb['Mailbox quota'] = 'Cotas das contas de email';
 $wb['add_header_txt'] = 'Cabeçalho (adicionar "X-Spam: Yes")';
 $wb['rewrite_subject_txt'] = 'Assunto (adicionar "***SPAM***" no início)';
diff --git a/interface/web/mail/lib/lang/br_backup_stats_list.lng b/interface/web/mail/lib/lang/br_backup_stats_list.lng
index 482e913200..004bcafd72 100644
--- a/interface/web/mail/lib/lang/br_backup_stats_list.lng
+++ b/interface/web/mail/lib/lang/br_backup_stats_list.lng
@@ -6,4 +6,3 @@ $wb['backup_count_txt'] = 'Contador de backups';
 $wb['backup_server_txt'] = 'Servidor';
 $wb['backup_interval_txt'] = 'Intervalo entre backups';
 $wb['backup_size_txt'] = 'Tamanho do backup';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_alias.lng b/interface/web/mail/lib/lang/br_mail_alias.lng
index 6361957180..6ab8c161dd 100644
--- a/interface/web/mail/lib/lang/br_mail_alias.lng
+++ b/interface/web/mail/lib/lang/br_mail_alias.lng
@@ -1,17 +1,16 @@
 <?php
-$wb['email_txt'] = 'Alias de e-mail';
+$wb['email_txt'] = 'Alias de email';
 $wb['destination_txt'] = 'Destino';
 $wb['active_txt'] = 'Ativo';
-$wb['email_error_isemail'] = 'Endereço de e-mail é inválido.';
-$wb['email_error_unique'] = 'Endereço de e-mail duplicado.';
+$wb['email_error_isemail'] = 'Endereço de email é inválido.';
+$wb['email_error_unique'] = 'Endereço de email duplicado.';
 $wb['no_domain_perm'] = 'Você não tem permissão para este domínio.';
-$wb['destination_error_isemail'] = 'Endereço de e-mail de destino é inválido.';
-$wb['limit_mailalias_txt'] = 'O limite de alias de e-mail para esta conta foi alcançado.';
-$wb['duplicate_mailbox_txt'] = 'Já existe um endereço de e-mail idêntico.';
+$wb['destination_error_isemail'] = 'Endereço de email de destino é inválido.';
+$wb['limit_mailalias_txt'] = 'O limite de alias de email para esta conta foi alcançado.';
+$wb['duplicate_mailbox_txt'] = 'Já existe um endereço de email idêntico.';
 $wb['domain_txt'] = 'Domínio';
-$wb['duplicate_email_alias_txt'] = 'Este alias de e-mail já existe.';
+$wb['duplicate_email_alias_txt'] = 'Este alias de email já existe.';
 $wb['source_txt'] = 'Alias';
 $wb['send_as_txt'] = 'Enviar como';
-$wb['send_as_exp'] = 'Permitir o destino enviar e-mails usando este alias como origem';
+$wb['send_as_exp'] = 'Permitir o destino enviar emails usando este alias como origem';
 $wb['greylisting_txt'] = 'Habilitar greylist';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_alias_list.lng b/interface/web/mail/lib/lang/br_mail_alias_list.lng
index 5e96f0fb30..d4cf80b182 100644
--- a/interface/web/mail/lib/lang/br_mail_alias_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_alias_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Alias de e-mail';
+$wb['list_head_txt'] = 'Alias de email';
 $wb['active_txt'] = 'Ativo';
 $wb['source_txt'] = 'Origem';
 $wb['destination_txt'] = 'Destino';
-$wb['email_txt'] = 'e-Mail';
-$wb['add_new_record_txt'] = 'Adicionar novo alias de e-mail';
-?>
+$wb['email_txt'] = 'eMail';
+$wb['add_new_record_txt'] = 'Adicionar novo alias de email';
diff --git a/interface/web/mail/lib/lang/br_mail_aliasdomain.lng b/interface/web/mail/lib/lang/br_mail_aliasdomain.lng
index a0f4e5067e..79ab446a82 100644
--- a/interface/web/mail/lib/lang/br_mail_aliasdomain.lng
+++ b/interface/web/mail/lib/lang/br_mail_aliasdomain.lng
@@ -5,7 +5,6 @@ $wb['active_txt'] = 'Ativo';
 $wb['no_domain_perm'] = 'Você não tem permissão para este domínio.';
 $wb['limit_mailaliasdomain_txt'] = 'O limite de alias de domínios para esta conta foi alcançado.';
 $wb['source_destination_identical_txt'] = 'Origem e destino são os mesmos.';
-$wb['source_error_empty'] = 'O domínio de origem está em branco.';
+$wb['source_error_empty'] = 'O domínio de origem está vazio.';
 $wb['source_error_unique'] = 'Domínio de origem duplicado.';
 $wb['source_error_regex'] = 'Domínio de origem é inválido.';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_aliasdomain_list.lng b/interface/web/mail/lib/lang/br_mail_aliasdomain_list.lng
index ddf1ea0a96..d5a2c81476 100644
--- a/interface/web/mail/lib/lang/br_mail_aliasdomain_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_aliasdomain_list.lng
@@ -3,6 +3,4 @@ $wb['list_head_txt'] = 'Alias de domínio';
 $wb['active_txt'] = 'Ativo';
 $wb['source_txt'] = 'Origem';
 $wb['destination_txt'] = 'Destino';
-$wb['source_txt'] = 'Origem';
 $wb['add_new_record_txt'] = 'Adicionar novo alias de domínio';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_backup_list.lng b/interface/web/mail/lib/lang/br_mail_backup_list.lng
index b8e4f82300..1481d926ae 100644
--- a/interface/web/mail/lib/lang/br_mail_backup_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_backup_list.lng
@@ -5,7 +5,7 @@ $wb['backup_type_txt'] = 'Tipo';
 $wb['filename_txt'] = 'Arquivo de backup';
 $wb['restore_backup_txt'] = 'Restaurar';
 $wb['restore_info_txt'] = 'A restauração do backup está em andamento. Esta ação demora vários minutos para concluir.';
-$wb['restore_confirm_txt'] = 'A restauração do backup pode sobrescrever arquivos das contas de e-mail. Você tem certeza que deseja restaurar este backup?';
+$wb['restore_confirm_txt'] = 'A restauração do backup pode sobrescrever arquivos das contas de email. Você tem certeza que deseja restaurar este backup?';
 $wb['download_pending_txt'] = 'Já existe um download de backup em andamento.';
 $wb['restore_pending_txt'] = 'Já existe uma restauração de backup em andamento.';
 $wb['delete_backup_txt'] = 'Remover Backup';
@@ -13,4 +13,3 @@ $wb['delete_info_txt'] = 'A remoção do backup está em andamento. Esta ação
 $wb['delete_confirm_txt'] = 'Deseja remover este backup?';
 $wb['delete_pending_txt'] = 'Já existe uma remoção de backup em andamento.';
 $wb['filesize_txt'] = 'Tamanho do arquivo';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_blacklist.lng b/interface/web/mail/lib/lang/br_mail_blacklist.lng
index 14c323c342..516946ce19 100644
--- a/interface/web/mail/lib/lang/br_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/br_mail_blacklist.lng
@@ -1,9 +1,8 @@
 <?php
 $wb['server_id_txt'] = 'Servidor';
-$wb['source_txt'] = 'Lista Negra';
+$wb['source_txt'] = 'Lista de Bloqueios';
 $wb['recipient_txt'] = 'Destinatário';
 $wb['active_txt'] = 'Ativo';
-$wb['source_error_notempty'] = 'Destinatário está em branco.';
+$wb['source_error_notempty'] = 'Destinatário está vazio.';
 $wb['type_txt'] = 'Tipo';
-$wb['limit_mailfilter_txt'] = 'O limite de filtros de e-mail para esta conta foi alcançado.';
-?>
+$wb['limit_mailfilter_txt'] = 'O limite de filtros de email para esta conta foi alcançado.';
diff --git a/interface/web/mail/lib/lang/br_mail_blacklist_list.lng b/interface/web/mail/lib/lang/br_mail_blacklist_list.lng
index 319a354016..d08c436baa 100644
--- a/interface/web/mail/lib/lang/br_mail_blacklist_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_blacklist_list.lng
@@ -1,10 +1,9 @@
 <?php
-$wb['list_head_txt'] = 'Lista negra';
+$wb['list_head_txt'] = 'Lista de Bloqueios';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
-$wb['source_txt'] = 'Endereço de e-mail';
+$wb['source_txt'] = 'Endereço de email';
 $wb['type_txt'] = 'Tipo';
 $wb['recipient_txt'] = 'Destinatário';
 $wb['add_new_record_txt'] = 'Adicionar novo registro';
 $wb['access_txt'] = 'acesso';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_content_filter.lng b/interface/web/mail/lib/lang/br_mail_content_filter.lng
index b0a7c15b12..2a9f34cd50 100644
--- a/interface/web/mail/lib/lang/br_mail_content_filter.lng
+++ b/interface/web/mail/lib/lang/br_mail_content_filter.lng
@@ -5,5 +5,4 @@ $wb['pattern_txt'] = 'Padrão da expressão regular';
 $wb['data_txt'] = 'Dados';
 $wb['action_txt'] = 'Ação';
 $wb['active_txt'] = 'Ativo';
-$wb['pattern_error_empty'] = 'Padrão da expressão regular está em branco.';
-?>
+$wb['pattern_error_empty'] = 'Padrão da expressão regular está vazio.';
diff --git a/interface/web/mail/lib/lang/br_mail_content_filter_list.lng b/interface/web/mail/lib/lang/br_mail_content_filter_list.lng
index 65674a903d..e25b128b67 100644
--- a/interface/web/mail/lib/lang/br_mail_content_filter_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_content_filter_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Verificações de cabeçalho e corpo de e-mail - Postfix';
+$wb['list_head_txt'] = 'Verificações de cabeçalho e corpo de email - Postfix';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['pattern_txt'] = 'Padrão';
 $wb['action_txt'] = 'Ação';
 $wb['add_new_record_txt'] = 'Adicionar novo filtro';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_domain.lng b/interface/web/mail/lib/lang/br_mail_domain.lng
index 0bdb473095..8cf2cdce65 100644
--- a/interface/web/mail/lib/lang/br_mail_domain.lng
+++ b/interface/web/mail/lib/lang/br_mail_domain.lng
@@ -5,19 +5,18 @@ $wb['type_txt'] = 'Tipo';
 $wb['active_txt'] = 'Ativo';
 $wb['dkim_txt'] = 'Habilitar DKIM';
 $wb['dkim_private_txt'] = 'Chave privada DKIM';
-$wb['dkim_public_txt'] = 'Chave pública DKIMapenas para informação';
+$wb['dkim_public_txt'] = 'Chave pública DKIM apenas para informação';
 $wb['dkim_generate_txt'] = 'Gerar chave privada DKIM';
-$wb['dkim_dns_txt'] = 'Registro dns';
+$wb['dkim_dns_txt'] = 'Registro DNS';
 $wb['dkim_private_key_error'] = 'A chave privada DKIM é inválida.';
-$wb['domain_error_empty'] = 'O domínio está em branco.';
+$wb['domain_error_empty'] = 'O domínio está vazio.';
 $wb['domain_error_unique'] = 'O domínio está duplicado.';
-$wb['domain_error_regex'] = 'O domínio é inválido.';
-$wb['dkim_settings_txt'] = 'Domínio de e-mail identificado por chaves de domínio (DKIM)';
+$wb['domain_error_regex'] = 'Domínio inválido.';
+$wb['dkim_settings_txt'] = 'Domínio de email identificado por chaves de domínio (DKIM)';
 $wb['client_txt'] = 'Cliente';
-$wb['limit_maildomain_txt'] = 'O limite de domínios de e-mail para esta conta foi alcançado.';
+$wb['limit_maildomain_txt'] = 'O limite de domínios de email para esta conta foi alcançado.';
 $wb['policy_txt'] = 'Filtro anti-spam';
 $wb['no_policy'] = '-desabilitado-';
 $wb['error_not_allowed_server_id'] = 'O servidor selecionado não é permitido para esta conta.';
 $wb['dkim_selector_txt'] = 'Seletor DKIM';
 $wb['dkim_selector_error'] = 'Seletor DKIM é inválido. Utilize apenas caracteres alfanuméricos em minúsculas (a-z ou 0-9) e no máximo 63 caracteres.';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_domain_admin_list.lng b/interface/web/mail/lib/lang/br_mail_domain_admin_list.lng
index 275c0a1b54..58f0a4c398 100644
--- a/interface/web/mail/lib/lang/br_mail_domain_admin_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_domain_admin_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Domínio de e-mail';
+$wb['list_head_txt'] = 'Domínio de email';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['add_new_record_txt'] = 'Adicionar novo domínio';
 $wb['active_txt'] = 'Ativo';
 $wb['sys_groupid_txt'] = 'Cliente';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_domain_catchall_list.lng b/interface/web/mail/lib/lang/br_mail_domain_catchall_list.lng
index 2d5747826c..abdeb95e6b 100644
--- a/interface/web/mail/lib/lang/br_mail_domain_catchall_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_domain_catchall_list.lng
@@ -1,9 +1,8 @@
 <?php
-$wb['list_head_txt'] = 'Conta cata-tudo';
+$wb['list_head_txt'] = 'Conta cata tudo';
 $wb['active_txt'] = 'Ativo';
 $wb['source_txt'] = 'origem';
-$wb['destination_txt'] = 'Endereço de e-mail de destino';
+$wb['destination_txt'] = 'Endereço de email de destino';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['add_new_record_txt'] = 'Adicionar nova conta';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_domain_list.lng b/interface/web/mail/lib/lang/br_mail_domain_list.lng
index a024a6a7e8..8327b3dc6c 100644
--- a/interface/web/mail/lib/lang/br_mail_domain_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_domain_list.lng
@@ -1,7 +1,6 @@
 <?php
-$wb['list_head_txt'] = 'Domínio de e-mail';
+$wb['list_head_txt'] = 'Domínio de email';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['add_new_record_txt'] = 'Adicionar novo domínio';
 $wb['active_txt'] = 'Ativo';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_forward.lng b/interface/web/mail/lib/lang/br_mail_forward.lng
index 1402019fdc..dd1eb9bb56 100644
--- a/interface/web/mail/lib/lang/br_mail_forward.lng
+++ b/interface/web/mail/lib/lang/br_mail_forward.lng
@@ -1,15 +1,14 @@
 <?php
-$wb['email_txt'] = 'e-Mail';
-$wb['destination_txt'] = 'Endereço e-mail de destino';
+$wb['email_txt'] = 'eMail';
+$wb['destination_txt'] = 'Endereço email de destino';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_mailforward_txt'] = 'O limite de encaminhamentos de e-mail para esta conta foi alcançado.';
-$wb['duplicate_mailbox_txt'] = 'Já existe um conta de e-mail idêntica.';
+$wb['limit_mailforward_txt'] = 'O limite de encaminhamentos de email para esta conta foi alcançado.';
+$wb['duplicate_mailbox_txt'] = 'Já existe um conta de email idêntica.';
 $wb['domain_txt'] = 'Domínio';
-$wb['source_txt'] = 'Endereço de e-mail de origem';
-$wb['destination_error_empty'] = 'The destination must not be empty.';
-$wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
-$wb['email_error_isemail'] = 'Por favor informe um endereço de e-mail válido.';
+$wb['source_txt'] = 'Endereço de email de origem';
+$wb['destination_error_empty'] = 'O endereço de email de destino não pode ficar vazio.';
+$wb['destination_error_isemail'] = 'O endereço de email de destino é inválido.';
+$wb['email_error_isemail'] = 'Por favor informe um endereço de email válido.';
 $wb['send_as_txt'] = 'Enviar como';
-$wb['send_as_exp'] = 'Permitir o destino enviar e-mails usando este endereço como origem (se o destino for interno)';
+$wb['send_as_exp'] = 'Permitir o destino enviar emails usando este endereço como origem (se o destino for interno)';
 $wb['greylisting_txt'] = 'Habilitar greylist';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_forward_list.lng b/interface/web/mail/lib/lang/br_mail_forward_list.lng
index 166839e2c9..4e700a141f 100644
--- a/interface/web/mail/lib/lang/br_mail_forward_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_forward_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Encaminhamento de e-mail';
+$wb['list_head_txt'] = 'Encaminhamento de email';
 $wb['active_txt'] = 'Ativo';
 $wb['source_txt'] = 'Origem';
 $wb['destination_txt'] = 'Destinatário';
-$wb['email_txt'] = 'e-Mail';
-$wb['add_new_record_txt'] = 'Adicionar novo encaminhamento de e-mail';
-?>
+$wb['email_txt'] = 'eMail';
+$wb['add_new_record_txt'] = 'Adicionar novo encaminhamento de email';
diff --git a/interface/web/mail/lib/lang/br_mail_get.lng b/interface/web/mail/lib/lang/br_mail_get.lng
index f3d055f6d8..6385a2baea 100644
--- a/interface/web/mail/lib/lang/br_mail_get.lng
+++ b/interface/web/mail/lib/lang/br_mail_get.lng
@@ -4,16 +4,15 @@ $wb['type_txt'] = 'Tipo';
 $wb['source_server_txt'] = 'Servidor POP3/IMAP';
 $wb['source_username_txt'] = 'Usuário';
 $wb['source_password_txt'] = 'Senha';
-$wb['source_delete_txt'] = 'Remover e-mails após recuperação';
-$wb['source_delete_note_txt'] = 'Verifique primeiro se a recuperação de e-mails funciona antes de ativar esta opção.';
-$wb['source_read_all_txt'] = 'Recuperar todos e-mails (inclusive e-mails lidos)';
+$wb['source_delete_txt'] = 'Remover emails após recuperação';
+$wb['source_delete_note_txt'] = 'Verifique primeiro se a recuperação de emails funciona antes de ativar esta opção.';
+$wb['source_read_all_txt'] = 'Recuperar todos emails (inclusive emails lidos)';
 $wb['destination_txt'] = 'Destino';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_fetchmail_txt'] = 'O limite de registros de busca de e-mails para esta conta foi alcançado.';
-$wb['source_server_error_isempty'] = 'O servidor está em branco.';
-$wb['source_username_error_isempty'] = 'O usuário está em branco.';
-$wb['source_password_error_isempty'] = 'A senha está em branco.';
+$wb['limit_fetchmail_txt'] = 'O limite de registros de busca de emails para esta conta foi alcançado.';
+$wb['source_server_error_isempty'] = 'O servidor está vazio.';
+$wb['source_username_error_isempty'] = 'O usuário está vazio.';
+$wb['source_password_error_isempty'] = 'A senha está vazia.';
 $wb['destination_error_isemail'] = 'Nenhum destino selecionado.';
 $wb['source_server_error_regex'] = 'O servidor POP3/IMAP é inválido.';
-$wb['error_delete_read_all_combination'] = 'Combinação ilegal nas opções. Não pode ser utilizado "Remover e-mails após recuperação" = "não" e "Recuperar todos e-mail" = "sim".';
-?>
+$wb['error_delete_read_all_combination'] = 'Combinação ilegal nas opções. Não pode ser utilizado "Remover emails após recuperação" = "não" e "Recuperar todos email" = "sim".';
diff --git a/interface/web/mail/lib/lang/br_mail_get_list.lng b/interface/web/mail/lib/lang/br_mail_get_list.lng
index 84b8bbd33e..c39b08a3a7 100644
--- a/interface/web/mail/lib/lang/br_mail_get_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_get_list.lng
@@ -1,9 +1,8 @@
 <?php
-$wb['list_head_txt'] = 'Busca de e-mails de servidores externos - POP3/IMAP';
+$wb['list_head_txt'] = 'Busca de emails de servidores externos - POP3/IMAP';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['source_server_txt'] = 'Servidor externo';
 $wb['source_username_txt'] = 'Usuário';
 $wb['destination_txt'] = 'Destino';
 $wb['add_new_record_txt'] = 'Adicionar nova conta';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_mailinglist.lng b/interface/web/mail/lib/lang/br_mail_mailinglist.lng
index 87f5bcbb64..035eb6456b 100644
--- a/interface/web/mail/lib/lang/br_mail_mailinglist.lng
+++ b/interface/web/mail/lib/lang/br_mail_mailinglist.lng
@@ -1,22 +1,21 @@
 <?php
-$wb['mailinglist_txt'] = 'Lista de e-mail';
+$wb['mailinglist_txt'] = 'Lista de email';
 $wb['limit_mailmailinglist_txt'] = 'O limite foi alcançado.';
-$wb['domain_error_empty'] = 'O domínio está em branco.';
-$wb['listname_error_empty'] = 'O nome da lista está em branco.';
+$wb['domain_error_empty'] = 'O domínio está vazio.';
+$wb['listname_error_empty'] = 'O nome da lista está vazio.';
 $wb['domain_error_regex'] = 'O domínio é inválido.';
-$wb['email_in_use_txt'] = 'O e-mail já está em uso.';
+$wb['email_in_use_txt'] = 'O email já está em uso.';
 $wb['no_domain_perm'] = 'Você não tem permissão para este domínio.';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['listname_txt'] = 'Lista';
 $wb['client_txt'] = 'Cliente';
-$wb['email_txt'] = 'e-Mail';
+$wb['email_txt'] = 'eMail';
 $wb['password_txt'] = 'Senha';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-$wb['listname_error_unique'] = 'Já existe uma lista de e-mails idêntica para este servidor. Por favor escolha um nome diferente.';
-$wb['email_error_isemail'] = 'Endereço de e-mail é inválido.';
-?>
+$wb['listname_error_unique'] = 'Já existe uma lista de emails idêntica para este servidor. Por favor escolha um nome diferente.';
+$wb['email_error_isemail'] = 'Endereço de email é inválido.';
diff --git a/interface/web/mail/lib/lang/br_mail_mailinglist_list.lng b/interface/web/mail/lib/lang/br_mail_mailinglist_list.lng
index d7dcf02c01..167c44eccf 100644
--- a/interface/web/mail/lib/lang/br_mail_mailinglist_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_mailinglist_list.lng
@@ -1,5 +1,4 @@
 <?php
-$wb['list_head_txt'] = 'Lista de e-mails';
+$wb['list_head_txt'] = 'Lista de emails';
 $wb['domain_txt'] = 'Domínio';
 $wb['listname_txt'] = 'Nome da lista';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_relay_recipient.lng b/interface/web/mail/lib/lang/br_mail_relay_recipient.lng
index 637788ce48..115ffeede6 100644
--- a/interface/web/mail/lib/lang/br_mail_relay_recipient.lng
+++ b/interface/web/mail/lib/lang/br_mail_relay_recipient.lng
@@ -3,7 +3,6 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['source_txt'] = 'Destinatário de retransmissão';
 $wb['recipient_txt'] = 'Destinatário';
 $wb['active_txt'] = 'Ativo';
-$wb['source_error_notempty'] = 'Destinatário de retransmissão está em branco.';
+$wb['source_error_notempty'] = 'Destinatário de retransmissão está vazio.';
 $wb['type_txt'] = 'Tipo';
-$wb['limit_mailfilter_txt'] = 'O limite de filtros de e-mail para esta conta foi alcançado.';
-?>
+$wb['limit_mailfilter_txt'] = 'O limite de filtros de email para esta conta foi alcançado.';
diff --git a/interface/web/mail/lib/lang/br_mail_relay_recipient_list.lng b/interface/web/mail/lib/lang/br_mail_relay_recipient_list.lng
index d96bab59eb..ff65d5e76c 100644
--- a/interface/web/mail/lib/lang/br_mail_relay_recipient_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_relay_recipient_list.lng
@@ -6,4 +6,3 @@ $wb['source_txt'] = 'Endereço do destinatário';
 $wb['recipient_txt'] = 'Destinatário';
 $wb['add_new_record_txt'] = 'Adicionar novo destinatário de retransmissão';
 $wb['access_txt'] = 'acesso';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_spamfilter.lng b/interface/web/mail/lib/lang/br_mail_spamfilter.lng
index e38894fde3..f53b484975 100644
--- a/interface/web/mail/lib/lang/br_mail_spamfilter.lng
+++ b/interface/web/mail/lib/lang/br_mail_spamfilter.lng
@@ -1,17 +1,16 @@
 <?php
-$wb['email_txt'] = 'e-Mail';
+$wb['email_txt'] = 'eMail';
 $wb['spam_rewrite_score_int_txt'] = 'Pontuação de reescrita';
 $wb['spam_redirect_score_int_txt'] = 'Redirecionar pontuação';
 $wb['spam_delete_score_int_txt'] = 'Remover pontuação';
 $wb['spam_rewrite_subject_txt'] = 'Reescrever assunto';
-$wb['spam_redirect_maildir_txt'] = 'Redirecionar conta de e-mail';
+$wb['spam_redirect_maildir_txt'] = 'Redirecionar conta de email';
 $wb['active_txt'] = 'Ativo';
-$wb['spam_rewrite_txt'] = 'Reescrever assunto do e-mail acima desta pontuação.';
-$wb['spam_redirect_txt'] = 'Redirecionar e-mail acima desta pontuação para a conta de e-mail selecionada.';
-$wb['spam_delete_txt'] = 'Remover e-mail acima desta pontuação.';
+$wb['spam_rewrite_txt'] = 'Reescrever assunto do email acima desta pontuação.';
+$wb['spam_redirect_txt'] = 'Redirecionar email acima desta pontuação para a conta de email selecionada.';
+$wb['spam_delete_txt'] = 'Remover email acima desta pontuação.';
 $wb['disable_txt'] = 'Dica: Para desabilitar uma opção de filtragem, configure a pontuação para 0.00';
-$wb['email_error_isemail'] = 'Endereço de e-mail é inválido.';
-$wb['email_error_unique'] = 'Já existe um filtro anti-spam igual para este endereço de e-mail.';
-$wb['spam_redirect_maildir_purge_txt'] = 'Remover diretório de e-mail após';
+$wb['email_error_isemail'] = 'Endereço de email é inválido.';
+$wb['email_error_unique'] = 'Já existe um filtro anti-spam igual para este endereço de email.';
+$wb['spam_redirect_maildir_purge_txt'] = 'Remover diretório de email após';
 $wb['days_txt'] = 'dias.';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_spamfilter_list.lng b/interface/web/mail/lib/lang/br_mail_spamfilter_list.lng
index 51044a3bec..a9cebbfdf4 100644
--- a/interface/web/mail/lib/lang/br_mail_spamfilter_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_spamfilter_list.lng
@@ -3,6 +3,5 @@ $wb['list_head_txt'] = 'Filtro anti-spam';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'ID do servidor';
 $wb['server_name_txt'] = 'Nome do servidor';
-$wb['email_txt'] = 'e-Mail';
+$wb['email_txt'] = 'eMail';
 $wb['add_new_record_txt'] = 'Adicionar filtro anti-spam';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_transport.lng b/interface/web/mail/lib/lang/br_mail_transport.lng
index cf59e244bb..3f87343dbc 100644
--- a/interface/web/mail/lib/lang/br_mail_transport.lng
+++ b/interface/web/mail/lib/lang/br_mail_transport.lng
@@ -6,6 +6,5 @@ $wb['type_txt'] = 'Tipo';
 $wb['mx_txt'] = 'Sem pesquisa MX';
 $wb['sort_order_txt'] = 'Ordenar por';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_mailrouting_txt'] = 'O limite de rotas de e-mail para esta conta foi alcançado.';
+$wb['limit_mailrouting_txt'] = 'O limite de rotas de email para esta conta foi alcançado.';
 $wb['transport_txt'] = 'Transporte';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_transport_list.lng b/interface/web/mail/lib/lang/br_mail_transport_list.lng
index 4597742bef..615f2b4df5 100644
--- a/interface/web/mail/lib/lang/br_mail_transport_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_transport_list.lng
@@ -1,9 +1,8 @@
 <?php
-$wb['list_head_txt'] = 'Roteamento avançado de e-mail';
+$wb['list_head_txt'] = 'Roteamento avançado de email';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['transport_txt'] = 'Transporte';
 $wb['sort_order_txt'] = 'Ordenar por';
 $wb['add_new_record_txt'] = 'Adicionar novo transporte';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_user.lng b/interface/web/mail/lib/lang/br_mail_user.lng
index db19807e43..23ff000c22 100644
--- a/interface/web/mail/lib/lang/br_mail_user.lng
+++ b/interface/web/mail/lib/lang/br_mail_user.lng
@@ -1,12 +1,12 @@
 <?php
-$wb['custom_mailfilter_txt'] = 'Modelo de filtro de e-mail personalizado';
-$wb['email_txt'] = 'e-Mail';
+$wb['custom_mailfilter_txt'] = 'Modelo de filtro de email personalizado';
+$wb['email_txt'] = 'eMail';
 $wb['cryptpwd_txt'] = 'Senha';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
 $wb['active_txt'] = 'Ativo';
-$wb['email_error_isemail'] = 'Endereço de e-mail é inválido.';
-$wb['email_error_unique'] = 'Endereço de e-mail duplicado.';
-$wb['autoresponder_subject_txt'] = 'Assunto do e-mail';
+$wb['email_error_isemail'] = 'Endereço de email é inválido.';
+$wb['email_error_unique'] = 'Endereço de email duplicado.';
+$wb['autoresponder_subject_txt'] = 'Assunto do email';
 $wb['autoresponder_subject'] = 'Resposta Automática';
 $wb['autoresponder_text_txt'] = 'Texto';
 $wb['autoresponder_txt'] = 'Ativo';
@@ -15,8 +15,8 @@ $wb['autoresponder_start_date_ispast'] = 'O campo "Iniciar em" não pode ser men
 $wb['autoresponder_end_date_txt'] = 'Terminar em';
 $wb['autoresponder_end_date_isgreater'] = 'O campo "Terminar em" deve ser configurado e não pode ser menor ou igual a data atual.';
 $wb['no_domain_perm'] = 'Você não tem permissão para este domínio.';
-$wb['error_no_pwd'] = 'A senha está em branco.';
-$wb['quota_error_isint'] = 'O tamanho da conta de e-mail deve ser um número.';
+$wb['error_no_pwd'] = 'A senha está vazia.';
+$wb['quota_error_isint'] = 'O tamanho da conta de email deve ser um número.';
 $wb['quota_txt'] = 'Cota (0 para ilimitado)';
 $wb['server_id_txt'] = 'ID do servidor';
 $wb['password_txt'] = 'Senha';
@@ -27,36 +27,36 @@ $wb['tooltip_postfix_txt'] = 'Allows incoming mail to this address.';
 $wb['greylisting_txt'] = 'Habilitar greylist';
 $wb['access_txt'] = 'Habilitar acesso';
 $wb['policy_txt'] = 'Filtros anti-spam';
-$wb['inherit_policy'] = '- Inherit domain setting -';
-$wb['limit_mailbox_txt'] = 'O limite de contas de e-mail para esta conta foi alcançado.';
-$wb['limit_mailquota_txt'] = 'O limite de tamanho para as contas de e-mails foi alcançado. O espaço disponível em MB é';
+$wb['inherit_policy'] = '- Herdar configuração de domínio -';
+$wb['limit_mailbox_txt'] = 'O limite de contas de email para esta conta foi alcançado.';
+$wb['limit_mailquota_txt'] = 'O limite de tamanho para as contas de emails foi alcançado. O espaço disponível em MB é';
 $wb['disablesmtp_txt'] = 'Desabilitar SMTP (envio)';
-$wb['tooltip_disablesmtp_txt'] = 'Disables mail submission from this mail account.';
-$wb['disabledeliver_txt'] = 'Disable (local) delivering';
-$wb['tooltip_disabledeliver_txt'] = 'Disables delivery to INBOX, and processing by mail filters and sieve scripts.  Mail forwards to \'Send copy to\' address.';
+$wb['tooltip_disablesmtp_txt'] = 'Desabilitar o envio de email desta conta.';
+$wb['disabledeliver_txt'] = 'Desabilitar entrega (local)';
+$wb['tooltip_disabledeliver_txt'] = 'Desabilita a entrega na caixa de entrada e o processamento por filtros de correio e scripts de filtragem. O email é encaminhado para o endereço \\'Enviar cópia para \\'.';
 $wb['disableimap_txt'] = 'Desabilitar IMAP';
 $wb['disablepop3_txt'] = 'Desabilitar POP3';
-$wb['duplicate_alias_or_forward_txt'] = 'Já existe um alias ou encaminhamento para este endereço de e-mail.';
+$wb['duplicate_alias_or_forward_txt'] = 'Já existe um alias ou encaminhamento para este endereço de email.';
 $wb['quota_error_value'] = 'Valor da cota é inválido. Valores permitidos são: 0 para ilimitado ou números > 1.';
-$wb['move_junk_txt'] = 'Mover e-mails marcados como spam para o diretório junk.';
-$wb['move_junk_y_txt'] = 'Move first, before custom filters.';
-$wb['move_junk_a_txt'] = 'Move last, after custom filters.';
-$wb['move_junk_n_txt'] = 'Do not move Spam Emails to Junk folder.';
+$wb['move_junk_txt'] = 'Mover emails marcados como spam para a pasta Junk.';
+$wb['move_junk_y_txt'] = 'Mover antes dos filtros personalizados.';
+$wb['move_junk_a_txt'] = 'Mover depois dos filtros personalizados.';
+$wb['move_junk_n_txt'] = 'Não mover emails marcados como spam para a pasta Junk.';
 $wb['name_txt'] = 'Nome';
 $wb['name_optional_txt'] = '(Opcional)';
 $wb['autoresponder_active'] = 'Habilitar auto-resposta';
 $wb['cc_txt'] = 'Enviar cópia para';
-$wb['cc_error_isemail'] = 'O campo "Enviar cópia para" contém um endereço de e-mail inválido.';
-$wb['forward_in_lda_txt'] = 'Copy during delivery';
-$wb['tooltip_forward_in_lda_txt'] = 'Controls if mail copy is forwarded before or during delivery to mailbox.';
+$wb['cc_error_isemail'] = 'O campo "Enviar cópia para" contém um endereço de email inválido.';
+$wb['forward_in_lda_txt'] = 'Cópia durante a entrega';
+$wb['tooltip_forward_in_lda_txt'] = 'Controla se a cópia do email é encaminhada antes ou durante a entrega na conta de email.';
 $wb['sender_cc_txt'] = 'Enviar cópia oculta (BCC) para';
-$wb['sender_cc_error_isemail'] = 'O campo "Enviar cópia oculta para" contém um endereço de e-mail inválido.';
+$wb['sender_cc_error_isemail'] = 'O campo "Enviar cópia oculta para" contém um endereço de email inválido.';
 $wb['domain_txt'] = 'Domínio';
 $wb['now_txt'] = 'Agora';
 $wb['login_error_unique'] = 'O acesso já foi realizado.';
 $wb['login_error_regex'] = 'Caracteres válidos são "A-Z", "a-z", "0-9", ".", "_" e "-".';
 $wb['login_txt'] = 'Acesso';
-$wb['error_login_email_txt'] = 'Este acesso não é permitido. Por favor, forneça um nome de usuário ou endereço de e-mail diferente para acessar.';
+$wb['error_login_email_txt'] = 'Este acesso não é permitido. Por favor, forneça um nome de usuário ou endereço de email diferente para acessar.';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
@@ -67,11 +67,10 @@ $wb['no_backup_txt'] = 'Sem backup';
 $wb['daily_backup_txt'] = 'Diário';
 $wb['weekly_backup_txt'] = 'Semanal';
 $wb['monthly_backup_txt'] = 'Mensal';
-$wb['email_error_isascii'] = 'Por favor, não use caracteres especiais para a senha. Isto poderá causar problemas no cliente de e-mail.';
-$wb['cc_note_txt'] = '(separar múltiplos endereços de e-mails com vírgulas)';
-$wb['sender_cc_note_txt'] = '(One email address only)';
-$wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days';
-$wb['tooltip_purge_trash_days_txt'] = '0 = disabled';
-$wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days';
-$wb['tooltip_purge_junk_days_txt'] = '0 = disabled';
-?>
+$wb['email_error_isascii'] = 'Por favor, não use caracteres especiais para a senha. Isto poderá causar problemas no cliente de email.';
+$wb['cc_note_txt'] = '(separar múltiplos endereços de emails com vírgulas)';
+$wb['sender_cc_note_txt'] = '(Apenas um endereço de email)';
+$wb['purge_trash_days_txt'] = 'Esvazia lixeira automaticamente após N dias';
+$wb['tooltip_purge_trash_days_txt'] = '0 = desabilitado';
+$wb['purge_junk_days_txt'] = 'Esvazia pasta Junk automaticamente após N dias';
+$wb['tooltip_purge_junk_days_txt'] = '0 = desabilitado';
diff --git a/interface/web/mail/lib/lang/br_mail_user_filter.lng b/interface/web/mail/lib/lang/br_mail_user_filter.lng
index 560858c713..39e5510cb8 100644
--- a/interface/web/mail/lib/lang/br_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/br_mail_user_filter.lng
@@ -3,29 +3,28 @@ $wb['rulename_txt'] = 'Nome';
 $wb['action_txt'] = 'Ação';
 $wb['target_txt'] = 'Pasta';
 $wb['active_txt'] = 'Ativo';
-$wb['rulename_error_empty'] = 'Nome está em branco.';
-$wb['searchterm_is_empty'] = 'Termo de pesquisa está em branco.';
+$wb['rulename_error_empty'] = 'Nome está vazio.';
+$wb['searchterm_is_empty'] = 'Termo de pesquisa está vazio.';
 $wb['source_txt'] = 'Origem';
 $wb['target_error_regex'] = 'O alvo pode conter apenas os caracteres: "a-z", "0-9", "-", ".", "_", e {espaço}';
-$wb['limit_mailfilter_txt'] = 'O limite de filtros de e-mail foi alcançado.';
+$wb['limit_mailfilter_txt'] = 'O limite de filtros de email foi alcançado.';
 $wb['subject_txt'] = 'Assunto';
 $wb['from_txt'] = 'De';
 $wb['to_txt'] = 'Para';
-$wb['list_id_txt'] = 'List ID';
+$wb['list_id_txt'] = 'ID da lista';
 $wb['contains_txt'] = 'Contêm';
 $wb['is_txt'] = 'é';
 $wb['begins_with_txt'] = 'Iniciando com';
 $wb['ends_with_txt'] = 'Terminando com';
-$wb['regex_txt'] = 'Matches Regex';
+$wb['regex_txt'] = 'Casar expressão regular';
 $wb['move_stop_txt'] = 'Mover para';
 $wb['delete_txt'] = 'Remover';
 $wb['header_txt'] = 'Cabeçalho';
-$wb['size_over_txt'] = 'Tamanho do e-mail acima de (KB)';
-$wb['size_under_txt'] = 'Tamanho do e-mail abaixo de (KB)';
+$wb['size_over_txt'] = 'Tamanho do email acima de (KB)';
+$wb['size_under_txt'] = 'Tamanho do email abaixo de (KB)';
 $wb['localpart_txt'] = 'Parte local';
 $wb['domain_txt'] = 'Domínio';
 $wb['keep_txt'] = 'Manter';
 $wb['reject_txt'] = 'Rejeitar';
 $wb['stop_txt'] = 'Parar';
 $wb['move_to_txt'] = 'Mover para';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_user_filter_list.lng b/interface/web/mail/lib/lang/br_mail_user_filter_list.lng
index 516478f9f6..58dd3d3c1d 100644
--- a/interface/web/mail/lib/lang/br_mail_user_filter_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_user_filter_list.lng
@@ -4,4 +4,3 @@ $wb['add_new_record_txt'] = 'Adicionar novo filtro';
 $wb['page_txt'] = 'Página';
 $wb['page_of_txt'] = 'de';
 $wb['delete_confirmation'] = 'Você tem certeza que deseja remover este filtro?';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_user_list.lng b/interface/web/mail/lib/lang/br_mail_user_list.lng
index 01db690515..21f9f75c17 100644
--- a/interface/web/mail/lib/lang/br_mail_user_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_user_list.lng
@@ -1,13 +1,12 @@
 <?php
-$wb['list_head_txt'] = 'Contas de e-mail';
-$wb['email_txt'] = 'e-mail';
+$wb['list_head_txt'] = 'Contas de email';
+$wb['email_txt'] = 'email';
 $wb['autoresponder_txt'] = 'Autoresposta';
-$wb['add_new_record_txt'] = 'Adicionar novo e-mail';
-$wb['name_txt'] = 'Nome real';
+$wb['add_new_record_txt'] = 'Adicionar novo email';
+$wb['name_txt'] = 'Nome Real';
 $wb['login_txt'] = 'acesso';
 $wb['postfix_txt'] = 'Recebendo';
 $wb['disablesmtp_txt'] = 'SMTP (envio)';
 $wb['disabledeliver_txt'] = 'INBOX';
 $wb['disableimap_txt'] = 'IMAP';
 $wb['disablepop3_txt'] = 'POP3';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_user_stats_list.lng b/interface/web/mail/lib/lang/br_mail_user_stats_list.lng
index f0305edac3..677f2f920b 100644
--- a/interface/web/mail/lib/lang/br_mail_user_stats_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_user_stats_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Tráfego de e-mail';
-$wb['email_txt'] = 'e-Mail';
+$wb['list_head_txt'] = 'Tráfego de email';
+$wb['email_txt'] = 'eMail';
 $wb['this_month_txt'] = 'Este mês';
 $wb['last_month_txt'] = 'Último mês';
 $wb['this_year_txt'] = 'Este ano';
 $wb['last_year_txt'] = 'Último ano';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_whitelist.lng b/interface/web/mail/lib/lang/br_mail_whitelist.lng
index 4d3eb1e219..e62e5a778e 100644
--- a/interface/web/mail/lib/lang/br_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/br_mail_whitelist.lng
@@ -1,9 +1,8 @@
 <?php
 $wb['server_id_txt'] = 'Servidor';
-$wb['source_txt'] = 'Endereço - lista branca';
+$wb['source_txt'] = 'Endereço - lista de permissões';
 $wb['recipient_txt'] = 'Destinatário';
 $wb['active_txt'] = 'Ativo';
-$wb['source_error_notempty'] = 'Endereço de e-mail está em branco.';
+$wb['source_error_notempty'] = 'Endereço de email está vazio.';
 $wb['type_txt'] = 'Tipo';
-$wb['limit_mailfilter_txt'] = 'O limite de filtros de e-mail para esta conta foi alcançado.';
-?>
+$wb['limit_mailfilter_txt'] = 'O limite de filtros de email para esta conta foi alcançado.';
diff --git a/interface/web/mail/lib/lang/br_mail_whitelist_list.lng b/interface/web/mail/lib/lang/br_mail_whitelist_list.lng
index 0c7d3c717d..e8aeac355b 100644
--- a/interface/web/mail/lib/lang/br_mail_whitelist_list.lng
+++ b/interface/web/mail/lib/lang/br_mail_whitelist_list.lng
@@ -1,10 +1,9 @@
 <?php
-$wb['list_head_txt'] = 'Filtros de e-mail - lista branca';
+$wb['list_head_txt'] = 'Filtros de email - lista de permissões';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
-$wb['source_txt'] = 'Endereços de e-mail - lista branca';
+$wb['source_txt'] = 'Endereços de email - lista de permissões';
 $wb['type_txt'] = 'Tipo';
 $wb['recipient_txt'] = 'Destinatário';
 $wb['add_new_record_txt'] = 'Adicionar novo registro';
 $wb['access_txt'] = 'acesso';
-?>
diff --git a/interface/web/mail/lib/lang/br_spamfilter_blacklist.lng b/interface/web/mail/lib/lang/br_spamfilter_blacklist.lng
index ec3dc5f66e..70dceae0ac 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_blacklist.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_blacklist.lng
@@ -1,12 +1,11 @@
 <?php
 $wb['server_id_txt'] = 'Servidor';
-$wb['wb_txt'] = 'Lista branca/negra';
+$wb['wb_txt'] = 'Lista de permissões/bloqueio';
 $wb['rid_txt'] = 'Usuário';
-$wb['email_txt'] = 'e-Mail';
+$wb['email_txt'] = 'eMail';
 $wb['priority_txt'] = 'Prioridade';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_spamfilter_wblist_txt'] = 'O limite de filtros anti-spam "lista branca ou negra" para esta conta foi alcançado.';
+$wb['limit_spamfilter_wblist_txt'] = 'O limite de filtros anti-spam "lista de permissões/bloqueio" para esta conta foi alcançado.';
 $wb['10 - highest'] = '10 - alta';
 $wb['5 - medium'] = '5 - média';
 $wb['1 - lowest'] = '1 - baixa';
-?>
diff --git a/interface/web/mail/lib/lang/br_spamfilter_blacklist_list.lng b/interface/web/mail/lib/lang/br_spamfilter_blacklist_list.lng
index 624cebfc51..7a249621b5 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_blacklist_list.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_blacklist_list.lng
@@ -1,9 +1,8 @@
 <?php
-$wb['list_head_txt'] = 'Filtro anti-spam - lista negra';
+$wb['list_head_txt'] = 'Filtro anti-spam - lista de bloqueios';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['priority_txt'] = 'Prioridade';
 $wb['rid_txt'] = 'Usuário';
-$wb['email_txt'] = 'Endereço de e-mail - lista negra';
+$wb['email_txt'] = 'Endereço de email - lista de bloqueios';
 $wb['add_new_record_txt'] = 'Adicionar novo registro';
-?>
diff --git a/interface/web/mail/lib/lang/br_spamfilter_config.lng b/interface/web/mail/lib/lang/br_spamfilter_config.lng
index 6182e8b788..86e5906460 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_config.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_config.lng
@@ -15,6 +15,5 @@ $wb['mailuser_group_txt'] = 'Grupo do mailuser';
 $wb['relayhost_txt'] = 'Host de retransmissão';
 $wb['relayhost_user_txt'] = 'Usuário de retransmissão';
 $wb['relayhost_password_txt'] = 'Senha do host de retransmissão';
-$wb['mailbox_size_limit_txt'] = 'Limite da conta de e-mail';
+$wb['mailbox_size_limit_txt'] = 'Limite da conta de email';
 $wb['message_size_limit_txt'] = 'Limite do tamanho da mensagem';
-?>
diff --git a/interface/web/mail/lib/lang/br_spamfilter_config_list.lng b/interface/web/mail/lib/lang/br_spamfilter_config_list.lng
index 6d4c1cf0e1..422535316b 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_config_list.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_config_list.lng
@@ -2,4 +2,3 @@
 $wb['list_head_txt'] = 'Configuração do Servidor';
 $wb['server_name_txt'] = 'Servidor';
 $wb['server_id_txt'] = 'ID do Servidor';
-?>
diff --git a/interface/web/mail/lib/lang/br_spamfilter_policy.lng b/interface/web/mail/lib/lang/br_spamfilter_policy.lng
index 476b27e565..1c83915172 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_policy.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_policy.lng
@@ -7,12 +7,12 @@ $wb['bad_header_lover_txt'] = 'Receber cabeçalho inválido';
 $wb['bypass_virus_checks_txt'] = 'Ignorar verificações de vírus';
 $wb['bypass_banned_checks_txt'] = 'Ignorar verificações de arquivos banidos';
 $wb['bypass_header_checks_txt'] = 'Ignorar verificações de cabeçalho inválido';
-$wb['virus_quarantine_to_txt'] = 'Encaminhar vírus para o e-mail';
-$wb['spam_quarantine_to_txt'] = 'Encaminhar spam para o e-mail';
-$wb['banned_quarantine_to_txt'] = 'Encaminhar arquivos banidos para o e-mail';
-$wb['bad_header_quarantine_to_txt'] = 'Encaminhar cabeçalho inválido para o e-mail';
-$wb['clean_quarantine_to_txt'] = 'Encaminhar mensagens/arquivos em quarentena para o e-mail';
-$wb['other_quarantine_to_txt'] = 'Encaminhar mensagens/arquivos em quarentena para outro e-mail';
+$wb['virus_quarantine_to_txt'] = 'Encaminhar vírus para o email';
+$wb['spam_quarantine_to_txt'] = 'Encaminhar spam para o email';
+$wb['banned_quarantine_to_txt'] = 'Encaminhar arquivos banidos para o email';
+$wb['bad_header_quarantine_to_txt'] = 'Encaminhar cabeçalho inválido para o email';
+$wb['clean_quarantine_to_txt'] = 'Encaminhar mensagens/arquivos em quarentena para o email';
+$wb['other_quarantine_to_txt'] = 'Encaminhar mensagens/arquivos em quarentena para outro email';
 $wb['spam_tag_level_txt'] = 'Nível 1 de marcação anti-spam';
 $wb['spam_tag2_level_txt'] = 'Nível 2 de marcação anti-spam';
 $wb['spam_kill_level_txt'] = 'Nível máximo de marcação anti-spam';
@@ -42,7 +42,6 @@ $wb['rspamd_spam_tag_method_txt'] = 'Método da marcação anti-spam';
 $wb['rspamd_spam_kill_level_txt'] = 'Nível para rejeição de spam';
 $wb['btn_save_txt'] = 'Salvar';
 $wb['btn_cancel_txt'] = 'Cancelar';
-
 $wb['amavis_settings_txt'] = 'Configurações';
 $wb['amavis_taglevel_txt'] = 'Nível de marcação';
 $wb['amavis_quarantine_txt'] = 'Quarentena';
diff --git a/interface/web/mail/lib/lang/br_spamfilter_policy_list.lng b/interface/web/mail/lib/lang/br_spamfilter_policy_list.lng
index 269862fe99..7e975ce0b4 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_policy_list.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_policy_list.lng
@@ -6,4 +6,3 @@ $wb['spam_lover_txt'] = 'Receber spam';
 $wb['banned_files_lover_txt'] = 'Receber arquivos banidos';
 $wb['bad_header_lover_txt'] = 'Receber cabeçalho inválido';
 $wb['add_new_record_txt'] = 'Adicionar registro';
-?>
diff --git a/interface/web/mail/lib/lang/br_spamfilter_users.lng b/interface/web/mail/lib/lang/br_spamfilter_users.lng
index 3b34351adb..d18fbc13a9 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_users.lng
@@ -2,12 +2,11 @@
 $wb['server_id_txt'] = 'Servidor';
 $wb['priority_txt'] = 'Prioridade';
 $wb['policy_id_txt'] = 'Política';
-$wb['email_txt'] = 'e-Mail (padrão)';
+$wb['email_txt'] = 'eMail (padrão)';
 $wb['fullname_txt'] = 'Nome';
 $wb['local_txt'] = 'Local';
-$wb['email_error_notempty'] = 'Endereço de e-mail está em branco.';
-$wb['fullname_error_notempty'] = 'Nome está em branco.';
+$wb['email_error_notempty'] = 'Endereço de email está vazio.';
+$wb['fullname_error_notempty'] = 'Nome está vazio.';
 $wb['10 - highest'] = '10 - alta';
 $wb['5 - medium'] = '5 - média';
 $wb['1 - lowest'] = '1 - baixa';
-?>
diff --git a/interface/web/mail/lib/lang/br_spamfilter_users_list.lng b/interface/web/mail/lib/lang/br_spamfilter_users_list.lng
index fe3feb25cd..a266e32ffe 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_users_list.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_users_list.lng
@@ -1,10 +1,9 @@
 <?php
-$wb['list_head_txt'] = 'Filtros anti-spam para contas de e-mail';
+$wb['list_head_txt'] = 'Filtros anti-spam para contas de email';
 $wb['local_txt'] = 'Local';
 $wb['server_id_txt'] = 'Servidor';
 $wb['priority_txt'] = 'Prioridade';
 $wb['policy_id_txt'] = 'Política';
 $wb['fullname_txt'] = 'Nome';
-$wb['email_txt'] = 'e-Mail';
+$wb['email_txt'] = 'eMail';
 $wb['add_new_record_txt'] = 'Adicionar novo filtro';
-?>
diff --git a/interface/web/mail/lib/lang/br_spamfilter_whitelist.lng b/interface/web/mail/lib/lang/br_spamfilter_whitelist.lng
index bcb9491cf0..e89d3940b9 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_whitelist.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_whitelist.lng
@@ -1,12 +1,11 @@
 <?php
 $wb['server_id_txt'] = 'Servidor';
-$wb['wb_txt'] = 'Lista branca/negra';
+$wb['wb_txt'] = 'Lista de permissões/bloqueio';
 $wb['rid_txt'] = 'Usário';
-$wb['email_txt'] = 'e-Mail';
+$wb['email_txt'] = 'eMail';
 $wb['priority_txt'] = 'Prioridade';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_spamfilter_wblist_txt'] = 'O limite de registros na lista branca/negra para esta conta foi alcançado.';
+$wb['limit_spamfilter_wblist_txt'] = 'O limite de registros na lista de permissões/bloqueio para esta conta foi alcançado.';
 $wb['10 - highest'] = '10 - alta';
 $wb['5 - medium'] = '5 - média';
 $wb['1 - lowest'] = '1 - baixa';
-?>
diff --git a/interface/web/mail/lib/lang/br_spamfilter_whitelist_list.lng b/interface/web/mail/lib/lang/br_spamfilter_whitelist_list.lng
index e6d48491ee..27614b7a5d 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_whitelist_list.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_whitelist_list.lng
@@ -1,9 +1,8 @@
 <?php
-$wb['list_head_txt'] = 'Filtros anti-spam - Lista Branca';
+$wb['list_head_txt'] = 'Filtros anti-spam - Lista de Permissões';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['priority_txt'] = 'Prioridade';
 $wb['rid_txt'] = 'Usuário';
-$wb['email_txt'] = 'Lista Branca de e-mails';
+$wb['email_txt'] = 'Lista de Permissões de emails';
 $wb['add_new_record_txt'] = 'Adicionar registro';
-?>
diff --git a/interface/web/mail/lib/lang/br_user_quota_stats_list.lng b/interface/web/mail/lib/lang/br_user_quota_stats_list.lng
index ee156b23a7..3151026daf 100644
--- a/interface/web/mail/lib/lang/br_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/br_user_quota_stats_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Cota da conta de e-mail';
+$wb['list_head_txt'] = 'Cotas das contas de email';
 $wb['quota_txt'] = 'Cota';
 $wb['name_txt'] = 'Nome';
-$wb['email_txt'] = 'Endereço de e-mail';
+$wb['email_txt'] = 'Endereço de email';
 $wb['used_txt'] = 'Espaço utilizado';
 $wb['percentage_txt'] = 'Utilizado %';
-?>
diff --git a/interface/web/mail/lib/lang/br_xmpp_domain.lng b/interface/web/mail/lib/lang/br_xmpp_domain.lng
index 1fd96ba132..67016af919 100644
--- a/interface/web/mail/lib/lang/br_xmpp_domain.lng
+++ b/interface/web/mail/lib/lang/br_xmpp_domain.lng
@@ -26,28 +26,28 @@ $wb['use_http_archive_txt'] = 'Habilitar arquivos HTTP em salas de chat';
 $wb['http_archive_show_join_txt'] = 'Exibir mensagens de ingresso no arquivo';
 $wb['http_archive_show_status_txt'] = 'Exibir estado da mudanças no arquivo';
 $wb['use_status_host_txt'] = 'Habilitar estado do XML do host';
-$wb['cant_change_domainname_txt'] = 'O nome existente do domínio xmpp não pode ser alterado.';
+$wb['cant_change_domainname_txt'] = 'O nome existente do domínio XMPP não pode ser modificado.';
 $wb['about_registration_url_txt'] = 'Ligar ao seu formulário de registro.';
 $wb['about_registration_message_txt'] = 'Descrição sobre o processo de registro da sua conta.';
-$wb['no_corresponding_maildomain_txt'] = 'O domínio de e-mail correspondente para gerenciamento de usuários não foi encontrado. Por favor, crie um domínio de e-mail primeiro.';
+$wb['no_corresponding_maildomain_txt'] = 'O domínio de email correspondente para gerenciamento de usuários não foi encontrado. Por favor, crie um domínio de email primeiro.';
 $wb['ssl_state_txt'] = 'Estado';
 $wb['ssl_locality_txt'] = 'Cidade';
 $wb['ssl_organisation_txt'] = 'Empresa';
 $wb['ssl_organisation_unit_txt'] = 'Departamento';
 $wb['ssl_country_txt'] = 'País';
-$wb['ssl_key_txt'] = 'Chave';
-$wb['ssl_request_txt'] = 'Requisição';
-$wb['ssl_cert_txt'] = 'Certificado';
-$wb['ssl_bundle_txt'] = 'Agrupar';
-$wb['ssl_action_txt'] = 'Ação';
-$wb['ssl_email_txt'] = 'Endereço de e-mail';
+$wb['ssl_key_txt'] = 'Chave SSL';
+$wb['ssl_request_txt'] = 'Requisição SSL';
+$wb['ssl_cert_txt'] = 'Certificado SSL';
+$wb['ssl_bundle_txt'] = 'Agrupar SSL';
+$wb['ssl_action_txt'] = 'Ação SSL';
+$wb['ssl_email_txt'] = 'Endereço de email';
 $wb['ssl_txt'] = 'SSL';
-$wb['error_ssl_state_empty'] = 'O campo "Estado" está em branco.';
-$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está em branco.';
-$wb['error_ssl_organisation_empty'] = 'O campo "Empresa" está em branco.';
-$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está em branco.';
-$wb['error_ssl_country_empty'] = 'O campo "País" está em branco.';
-$wb['error_ssl_cert_empty'] = 'O campo "Certificado" está em branco.';
+$wb['error_ssl_state_empty'] = 'O campo "Estado" está vazio.';
+$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está vazio.';
+$wb['error_ssl_organisation_empty'] = 'O campo "Empresa" está vazio.';
+$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está vazio.';
+$wb['error_ssl_country_empty'] = 'O campo "País" está vazio.';
+$wb['error_ssl_cert_empty'] = 'O campo "Certificado SSL" está vazio.';
 $wb['ssl_state_error_regex'] = 'Campo "Estado" é inválido. São caracteres válidos: "a-z", "0-9" e ".,-_".';
 $wb['ssl_locality_error_regex'] = 'Campo "Cidade" é inválido. São caracteres válidos: "a-z", "0-9" e ".,-_".';
 $wb['ssl_organisation_error_regex'] = 'Campo "Empresa" é inválido. São caracteres válidos: "a-z", "0-9" e ".,-_".';
@@ -57,6 +57,5 @@ $wb['none_txt'] = 'Nenhum';
 $wb['save_certificate_txt'] = 'Salvar Certificado';
 $wb['create_certificate_txt'] = 'Adicionar Certificado';
 $wb['delete_certificate_txt'] = 'Remover Certificado';
-$wb['ssl_error_isemail'] = 'Por favor, insira um endereço de e-mail válido para geração do certificado SSL.';
-$wb['limit_xmppdomain_txt'] = 'O limite de domínios xmpp para esta conta foi alcançado.';
-?>
+$wb['ssl_error_isemail'] = 'Por favor, insira um endereço de email válido para geração do certificado SSL.';
+$wb['limit_xmppdomain_txt'] = 'O limite de domínios XMPP para esta conta foi alcançado.';
diff --git a/interface/web/mail/lib/lang/br_xmpp_domain_admin_list.lng b/interface/web/mail/lib/lang/br_xmpp_domain_admin_list.lng
index b8d2208970..953777036d 100644
--- a/interface/web/mail/lib/lang/br_xmpp_domain_admin_list.lng
+++ b/interface/web/mail/lib/lang/br_xmpp_domain_admin_list.lng
@@ -5,4 +5,3 @@ $wb['domain_txt'] = 'Domínio';
 $wb['add_new_record_txt'] = 'Adicionar novo domínio';
 $wb['active_txt'] = 'Ativo';
 $wb['sys_groupid_txt'] = 'Cliente';
-?>
diff --git a/interface/web/mail/lib/lang/br_xmpp_domain_list.lng b/interface/web/mail/lib/lang/br_xmpp_domain_list.lng
index e0ff3a6fc6..be0046a9aa 100644
--- a/interface/web/mail/lib/lang/br_xmpp_domain_list.lng
+++ b/interface/web/mail/lib/lang/br_xmpp_domain_list.lng
@@ -1,7 +1,6 @@
 <?php
-$wb['list_head_txt'] = 'Domínios xmpp';
+$wb['list_head_txt'] = 'Domínios XMPP';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['add_new_record_txt'] = 'Adicionar novo domínio';
 $wb['active_txt'] = 'Ativo';
-?>
diff --git a/interface/web/mail/lib/lang/br_xmpp_user.lng b/interface/web/mail/lib/lang/br_xmpp_user.lng
index 5e7628dab2..21ca41fe89 100644
--- a/interface/web/mail/lib/lang/br_xmpp_user.lng
+++ b/interface/web/mail/lib/lang/br_xmpp_user.lng
@@ -1,15 +1,14 @@
 <?php
-$wb['list_head_txt'] = 'Contas de usuários xmpp';
+$wb['list_head_txt'] = 'Contas de usuários XMPP';
 $wb['jid_txt'] = 'ID do Jabber';
 $wb['active_txt'] = 'Ativo';
 $wb['cryptpwd_txt'] = 'Senha';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
-$wb['error_no_pwd'] = 'Senha está em branco.';
+$wb['error_no_pwd'] = 'Senha está vazia.';
 $wb['password_txt'] = 'Senha';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
 $wb['no_domain_perm'] = 'Você não tem permissão para este domínio.';
-$wb['limit_xmpp_user_txt'] = 'O limite de usuários xmpp para esta conta foi alcançado.';
-?>
+$wb['limit_xmpp_user_txt'] = 'O limite de usuários XMPP para esta conta foi alcançado.';
diff --git a/interface/web/mail/lib/lang/br_xmpp_user_list.lng b/interface/web/mail/lib/lang/br_xmpp_user_list.lng
index 0aefe11709..aa2b78cab6 100644
--- a/interface/web/mail/lib/lang/br_xmpp_user_list.lng
+++ b/interface/web/mail/lib/lang/br_xmpp_user_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Contas de usuários xmpp';
+$wb['list_head_txt'] = 'Contas de usuários XMPP';
 $wb['jid_txt'] = 'ID do Jabber';
 $wb['is_domain_admin_txt'] = 'Administrador do domínio';
 $wb['is_muc_admin_txt'] = 'Administrador MUC';
 $wb['add_new_record_txt'] = 'Adicionar novo usuário';
 $wb['active_txt'] = 'Ativo';
-?>
diff --git a/interface/web/mail/lib/lang/cz.lng b/interface/web/mail/lib/lang/cz.lng
index 040a6d0de8..b393f56798 100644
--- a/interface/web/mail/lib/lang/cz.lng
+++ b/interface/web/mail/lib/lang/cz.lng
@@ -2,7 +2,7 @@
 $wb['Email Alias'] = 'E-mailové přezdívky';
 $wb['Email Blacklist'] = 'E-mailová černá listina';
 $wb['Blacklist'] = 'Černá listina';
-$wb['Mail Content Filter'] = 'Obsahový filtr';
+$wb['Mail Content Filter'] = 'Filtr obsahu';
 $wb['Filter'] = 'Filtr';
 $wb['Mail Domain'] = 'Doména e-mailů';
 $wb['Domain'] = 'E-mailové domény';
@@ -39,12 +39,11 @@ $wb['Fetchmail'] = 'Externí získávání e-mailů';
 $wb['Mailbox traffic'] = 'Přenesená data';
 $wb['Postfix Whitelist'] = 'Postfix bílá listina';
 $wb['Postfix Blacklist'] = 'Postfix černá listina';
-$wb['Content Filter'] = 'Obsahový filtr';
+$wb['Content Filter'] = 'Filtr obsahu';
 $wb['Global Filters'] = 'Globální filtry';
 $wb['Domain Alias'] = 'Přezdívky e-mailových domén';
 $wb['Relay Recipients'] = 'Relay adresáti';
 $wb['Statistics'] = 'Statistiky';
 $wb['Mailbox quota'] = 'Kvóty pro e-mailové schránky';
-$wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")';
-$wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)';
-?>
+$wb['add_header_txt'] = 'Do záhlaví (přidat \"X-Spam: Yes\")';
+$wb['rewrite_subject_txt'] = 'Do předmětu (přidat \"***SPAM***\" na začátek)';
diff --git a/interface/web/mail/lib/lang/cz_backup_stats_list.lng b/interface/web/mail/lib/lang/cz_backup_stats_list.lng
index d37348978d..c33a950527 100644
--- a/interface/web/mail/lib/lang/cz_backup_stats_list.lng
+++ b/interface/web/mail/lib/lang/cz_backup_stats_list.lng
@@ -6,4 +6,3 @@ $wb['backup_count_txt'] = 'Počet záloh';
 $wb['backup_server_txt'] = 'Server';
 $wb['backup_interval_txt'] = 'Interval / cnt.';
 $wb['backup_size_txt'] = 'Velikost zálohy';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_alias.lng b/interface/web/mail/lib/lang/cz_mail_alias.lng
index 10d752d9d9..dbb7d74a51 100644
--- a/interface/web/mail/lib/lang/cz_mail_alias.lng
+++ b/interface/web/mail/lib/lang/cz_mail_alias.lng
@@ -2,16 +2,15 @@
 $wb['email_txt'] = 'E-mail';
 $wb['destination_txt'] = 'Cíl';
 $wb['active_txt'] = 'Aktivní';
-$wb['email_error_isemail'] = 'E-mail adresa je chybná.';
-$wb['email_error_unique'] = 'Duplikování e-mail adresy.';
+$wb['email_error_isemail'] = 'E-mailová adresa je chybná.';
+$wb['email_error_unique'] = 'Duplikování e-mailové adresy.';
 $wb['no_domain_perm'] = 'Nemáte oprávnění pro tuto doménu.';
-$wb['destination_error_isemail'] = 'Cílová e-mail adresa je chybná.';
-$wb['limit_mailalias_txt'] = 'Byl dosažen maximální počet e-mail aliasů pro Váš účet.';
-$wb['duplicate_mailbox_txt'] = 'Mailbox s touto adresou již existuje';
+$wb['destination_error_isemail'] = 'Cílová e-mailová adresa je chybná.';
+$wb['limit_mailalias_txt'] = 'Byl dosažen maximální počet e-mailových aliasů pro Váš účet.';
+$wb['duplicate_mailbox_txt'] = 'E-mailová schránka s touto adresou již existuje';
 $wb['domain_txt'] = 'Doména';
-$wb['duplicate_email_alias_txt'] = 'Tento e-mail alias již existuje.';
+$wb['duplicate_email_alias_txt'] = 'Tento e-mailový alias již existuje.';
 $wb['source_txt'] = 'Alias';
 $wb['send_as_txt'] = 'Odeslat jako';
-$wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
+$wb['send_as_exp'] = 'Povolit odesílání e-mailů identitou této přezdívky za pomocí autorizace e-mailové schránky viz. Cíl:';
 $wb['greylisting_txt'] = 'Povolit greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_alias_list.lng b/interface/web/mail/lib/lang/cz_mail_alias_list.lng
index 240c15acba..e0714114a4 100644
--- a/interface/web/mail/lib/lang/cz_mail_alias_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_alias_list.lng
@@ -5,4 +5,3 @@ $wb['source_txt'] = 'Zdroj';
 $wb['destination_txt'] = 'Cíl';
 $wb['email_txt'] = 'E-mail';
 $wb['add_new_record_txt'] = 'Vytvořit e-mailovou přezdívku';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_aliasdomain.lng b/interface/web/mail/lib/lang/cz_mail_aliasdomain.lng
index 35eb02ff4c..8d82344ab4 100644
--- a/interface/web/mail/lib/lang/cz_mail_aliasdomain.lng
+++ b/interface/web/mail/lib/lang/cz_mail_aliasdomain.lng
@@ -8,4 +8,3 @@ $wb['source_destination_identical_txt'] = 'Zdrojová a cílová doména jsou ste
 $wb['source_error_empty'] = 'Zdrojová doména je prázdná.';
 $wb['source_error_unique'] = 'Duplikování zdrojové domény.';
 $wb['source_error_regex'] = 'Chybná zdrojová doména.';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_aliasdomain_list.lng b/interface/web/mail/lib/lang/cz_mail_aliasdomain_list.lng
index d71da95dc0..3a9b4fb056 100644
--- a/interface/web/mail/lib/lang/cz_mail_aliasdomain_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_aliasdomain_list.lng
@@ -4,4 +4,3 @@ $wb['active_txt'] = 'Aktivní';
 $wb['source_txt'] = 'Zdroj';
 $wb['destination_txt'] = 'Cíl';
 $wb['add_new_record_txt'] = 'Vytvořit doménovou přezdívku';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_backup_list.lng b/interface/web/mail/lib/lang/cz_mail_backup_list.lng
index d4f941a4cd..dcf13ba748 100644
--- a/interface/web/mail/lib/lang/cz_mail_backup_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_backup_list.lng
@@ -13,4 +13,3 @@ $wb['delete_info_txt'] = 'Bylo zahájeno odstranění zálohy. Tato akce může
 $wb['delete_confirm_txt'] = 'Opravdu chcete smazat tuto zálohu ?';
 $wb['delete_pending_txt'] = 'Již existuje čekající úloha pro odstranění zálohy.';
 $wb['filesize_txt'] = 'Velikost souboru';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_blacklist.lng b/interface/web/mail/lib/lang/cz_mail_blacklist.lng
index 7e9c175c49..250d3a7ffa 100644
--- a/interface/web/mail/lib/lang/cz_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/cz_mail_blacklist.lng
@@ -6,4 +6,3 @@ $wb['active_txt'] = 'Aktivní';
 $wb['source_error_notempty'] = 'Adresa je prázdná.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Byl dosažen maximální počet e-mail filtrů pro Váš účet.';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_blacklist_list.lng b/interface/web/mail/lib/lang/cz_mail_blacklist_list.lng
index 282e109209..de67b56aa6 100644
--- a/interface/web/mail/lib/lang/cz_mail_blacklist_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_blacklist_list.lng
@@ -7,4 +7,3 @@ $wb['type_txt'] = 'Typ';
 $wb['recipient_txt'] = 'Příjemce (adresát)';
 $wb['add_new_record_txt'] = 'Přidat na černou listinu';
 $wb['access_txt'] = 'Přístup';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_content_filter.lng b/interface/web/mail/lib/lang/cz_mail_content_filter.lng
index 459ca228a2..8e8a0e5212 100644
--- a/interface/web/mail/lib/lang/cz_mail_content_filter.lng
+++ b/interface/web/mail/lib/lang/cz_mail_content_filter.lng
@@ -6,4 +6,3 @@ $wb['data_txt'] = 'Data';
 $wb['action_txt'] = 'Akce';
 $wb['active_txt'] = 'Aktivní';
 $wb['pattern_error_empty'] = 'Vzor je prázdný.';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_content_filter_list.lng b/interface/web/mail/lib/lang/cz_mail_content_filter_list.lng
index ccb9fc0b1f..7e63f22cb9 100644
--- a/interface/web/mail/lib/lang/cz_mail_content_filter_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_content_filter_list.lng
@@ -4,5 +4,4 @@ $wb['active_txt'] = 'Aktivní';
 $wb['server_id_txt'] = 'Server';
 $wb['pattern_txt'] = 'Vzor';
 $wb['action_txt'] = 'Akce';
-$wb['add_new_record_txt'] = 'Vytvořit obsahový filtr';
-?>
+$wb['add_new_record_txt'] = 'Vytvořit filtr obsahu';
diff --git a/interface/web/mail/lib/lang/cz_mail_domain.lng b/interface/web/mail/lib/lang/cz_mail_domain.lng
index 0a8c97a8d2..2d1adc0343 100644
--- a/interface/web/mail/lib/lang/cz_mail_domain.lng
+++ b/interface/web/mail/lib/lang/cz_mail_domain.lng
@@ -20,4 +20,3 @@ $wb['dkim_selector_error'] = 'Neplatný DKIM selektor. Používejte pouze malá
 $wb['policy_txt'] = 'Spamový filtr';
 $wb['no_policy'] = '- nepovoleno -';
 $wb['error_not_allowed_server_id'] = 'Zvolený server není povolen pro tento účet.';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_domain_admin_list.lng b/interface/web/mail/lib/lang/cz_mail_domain_admin_list.lng
index c2aed68625..d159040764 100644
--- a/interface/web/mail/lib/lang/cz_mail_domain_admin_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_domain_admin_list.lng
@@ -5,4 +5,3 @@ $wb['domain_txt'] = 'Doména';
 $wb['add_new_record_txt'] = 'Vytvořit doménu';
 $wb['active_txt'] = 'Aktivní';
 $wb['sys_groupid_txt'] = 'Klient';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_domain_catchall.lng b/interface/web/mail/lib/lang/cz_mail_domain_catchall.lng
index d0ae7c7e4b..0ca32d2347 100644
--- a/interface/web/mail/lib/lang/cz_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/cz_mail_domain_catchall.lng
@@ -8,5 +8,4 @@ $wb['domain_error_regex'] = 'Chybné doménové jméno nebo doména obsahuje chy
 $wb['limit_mailcatchall_txt'] = 'Byl dosažen maximální počet košů účtů pro Váš účet.';
 $wb['source_txt'] = 'Zdroj';
 $wb['destination_error_isemail'] = 'Cílová e-mailová adresa není platná.';
-$wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['greylisting_txt'] = 'Povolit greylisting';
diff --git a/interface/web/mail/lib/lang/cz_mail_domain_catchall_list.lng b/interface/web/mail/lib/lang/cz_mail_domain_catchall_list.lng
index ab502529af..a3aa634433 100644
--- a/interface/web/mail/lib/lang/cz_mail_domain_catchall_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_domain_catchall_list.lng
@@ -6,4 +6,3 @@ $wb['destination_txt'] = 'Cílová e-mailová adresa';
 $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'E-malová doména';
 $wb['add_new_record_txt'] = 'Vytvořit e-mailový koš';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_domain_list.lng b/interface/web/mail/lib/lang/cz_mail_domain_list.lng
index 9bd9770e33..53b71ae59c 100644
--- a/interface/web/mail/lib/lang/cz_mail_domain_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_domain_list.lng
@@ -4,4 +4,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Doména';
 $wb['add_new_record_txt'] = 'Vytvořit doménu';
 $wb['active_txt'] = 'Aktivní';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_forward.lng b/interface/web/mail/lib/lang/cz_mail_forward.lng
index 0685fbbd49..f1deae4081 100644
--- a/interface/web/mail/lib/lang/cz_mail_forward.lng
+++ b/interface/web/mail/lib/lang/cz_mail_forward.lng
@@ -3,7 +3,7 @@ $wb['email_txt'] = 'E-mail';
 $wb['destination_txt'] = 'Cílový e-mail';
 $wb['active_txt'] = 'Aktivní';
 $wb['limit_mailforward_txt'] = 'Byl dosažen maximální počet e-mail předávání pro Váš účet.';
-$wb['duplicate_mailbox_txt'] = 'Mailbox s touto adresou již existuje';
+$wb['duplicate_mailbox_txt'] = 'E-mailová schránka s touto adresou již existuje';
 $wb['domain_txt'] = 'Doména';
 $wb['source_txt'] = 'Zdrojový e-mail';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
@@ -12,4 +12,3 @@ $wb['email_error_isemail'] = 'Zadejte prosím platnou e-mailovou adresu.';
 $wb['send_as_txt'] = 'Odeslat jako';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
 $wb['greylisting_txt'] = 'Povolit greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_forward_list.lng b/interface/web/mail/lib/lang/cz_mail_forward_list.lng
index 17fd716406..a92cf26716 100644
--- a/interface/web/mail/lib/lang/cz_mail_forward_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_forward_list.lng
@@ -5,4 +5,3 @@ $wb['source_txt'] = 'Zdroj';
 $wb['destination_txt'] = 'Cíl';
 $wb['email_txt'] = 'E-mail';
 $wb['add_new_record_txt'] = 'Vytvořit přesměrování';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_get.lng b/interface/web/mail/lib/lang/cz_mail_get.lng
index cdb39b09a1..8861e6acbf 100644
--- a/interface/web/mail/lib/lang/cz_mail_get.lng
+++ b/interface/web/mail/lib/lang/cz_mail_get.lng
@@ -14,6 +14,5 @@ $wb['source_password_error_isempty'] = 'Heslo je prázdné.';
 $wb['destination_error_isemail'] = 'Nevybrán žádný cíl.';
 $wb['source_server_error_regex'] = 'POP3/IMAP server není validní doménový název.';
 $wb['source_read_all_txt'] = 'Načíst všechny e-maily (včetně již přečtené pošty)';
-$wb['error_delete_read_all_combination'] = 'Illegal combination of options. You can not use \\"Delete emails after retrieval\\" = no together with \\"Retrieve all emails\\" = yes';
+$wb['error_delete_read_all_combination'] = 'Illegal combination of options. You can not use \"Delete emails after retrieval\" = no together with \"Retrieve all emails\" = yes';
 $wb['source_delete_note_txt'] = 'Prosím, zkontrolujte nejprve, zda příjímání e-mailů funguje, než aktivujete tuto možnost.';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_get_list.lng b/interface/web/mail/lib/lang/cz_mail_get_list.lng
index d1a412407d..a2fddd15f8 100644
--- a/interface/web/mail/lib/lang/cz_mail_get_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_get_list.lng
@@ -6,4 +6,3 @@ $wb['source_server_txt'] = 'Externí server';
 $wb['source_username_txt'] = 'Uživatelské jméno';
 $wb['destination_txt'] = 'Cíl';
 $wb['add_new_record_txt'] = 'Vytvořit účet';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_mailinglist.lng b/interface/web/mail/lib/lang/cz_mail_mailinglist.lng
index e1f7dfbfa5..e553c95bde 100644
--- a/interface/web/mail/lib/lang/cz_mail_mailinglist.lng
+++ b/interface/web/mail/lib/lang/cz_mail_mailinglist.lng
@@ -16,7 +16,6 @@ $wb['generate_password_txt'] = 'Generovat heslo';
 $wb['repeat_password_txt'] = 'Opakujte heslo';
 $wb['password_mismatch_txt'] = 'Hesla se neshodují.';
 $wb['password_match_txt'] = 'Hesla se shodují.';
-$wb['listname_error_unique'] = 'Na serveru je již shodný \\"název seznamu\\". Prosím, vyberte si jiný \\"název seznamu\\".';
+$wb['listname_error_unique'] = 'Na serveru je již shodný \"název seznamu\". Prosím, vyberte si jiný \"název seznamu\".';
 $wb['email_error_isemail'] = 'E-mailová adresa je neplatná.';
 $wb['mailinglist_txt'] = 'E-mailové konference';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_mailinglist_list.lng b/interface/web/mail/lib/lang/cz_mail_mailinglist_list.lng
index db31273f59..7112f77b15 100644
--- a/interface/web/mail/lib/lang/cz_mail_mailinglist_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_mailinglist_list.lng
@@ -2,4 +2,3 @@
 $wb['list_head_txt'] = 'E-mailové konference';
 $wb['domain_txt'] = 'Doména';
 $wb['listname_txt'] = 'Název seznamu';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_relay_recipient.lng b/interface/web/mail/lib/lang/cz_mail_relay_recipient.lng
index edc3df9a7f..5d407b36cf 100644
--- a/interface/web/mail/lib/lang/cz_mail_relay_recipient.lng
+++ b/interface/web/mail/lib/lang/cz_mail_relay_recipient.lng
@@ -6,4 +6,3 @@ $wb['active_txt'] = 'Aktivní';
 $wb['source_error_notempty'] = 'Adresa je prázdná.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Byl dosažen maximální počet e-mail filtrů pro Váš účet.';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_relay_recipient_list.lng b/interface/web/mail/lib/lang/cz_mail_relay_recipient_list.lng
index 3f8c4987a4..4eb779fba5 100644
--- a/interface/web/mail/lib/lang/cz_mail_relay_recipient_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_relay_recipient_list.lng
@@ -6,4 +6,3 @@ $wb['source_txt'] = 'Adresa adresáta';
 $wb['recipient_txt'] = 'Příjemce (adresát)';
 $wb['add_new_record_txt'] = 'Vytvořit relay adresáta';
 $wb['access_txt'] = 'Přístup';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_spamfilter.lng b/interface/web/mail/lib/lang/cz_mail_spamfilter.lng
index 4b6cc2b5d8..7d950465e8 100644
--- a/interface/web/mail/lib/lang/cz_mail_spamfilter.lng
+++ b/interface/web/mail/lib/lang/cz_mail_spamfilter.lng
@@ -14,4 +14,3 @@ $wb['email_error_isemail'] = 'Email adresa je chybná.';
 $wb['email_error_unique'] = 'Pro tuto email adresu již existuje filtrovací záznam.';
 $wb['spam_redirect_maildir_purge_txt'] = 'Vyčistit poté mailový adresář';
 $wb['days_txt'] = 'Dny.';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_spamfilter_list.lng b/interface/web/mail/lib/lang/cz_mail_spamfilter_list.lng
index 0e4b885be1..d505030d23 100644
--- a/interface/web/mail/lib/lang/cz_mail_spamfilter_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_spamfilter_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['server_name_txt'] = 'server_name';
 $wb['email_txt'] = 'E-mail';
 $wb['add_new_record_txt'] = 'Vytvořit nový záznam spamfiltru';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_transport.lng b/interface/web/mail/lib/lang/cz_mail_transport.lng
index 9e5ddcd484..14c7dc2934 100644
--- a/interface/web/mail/lib/lang/cz_mail_transport.lng
+++ b/interface/web/mail/lib/lang/cz_mail_transport.lng
@@ -8,4 +8,3 @@ $wb['sort_order_txt'] = 'Třídit podle';
 $wb['active_txt'] = 'Aktivní';
 $wb['limit_mailrouting_txt'] = 'Byl dosažen maximální počet e-mail směrování pro Váš účet.';
 $wb['transport_txt'] = 'Transport';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_transport_list.lng b/interface/web/mail/lib/lang/cz_mail_transport_list.lng
index 8bdd31d7ce..eb5c6a27ba 100644
--- a/interface/web/mail/lib/lang/cz_mail_transport_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_transport_list.lng
@@ -6,4 +6,3 @@ $wb['domain_txt'] = 'Doména';
 $wb['transport_txt'] = 'E-mailové směrování';
 $wb['sort_order_txt'] = 'Třídit podle';
 $wb['add_new_record_txt'] = 'Vytvořit e-mailové směrování';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_user.lng b/interface/web/mail/lib/lang/cz_mail_user.lng
index 5ca5e48efa..34d81d517a 100644
--- a/interface/web/mail/lib/lang/cz_mail_user.lng
+++ b/interface/web/mail/lib/lang/cz_mail_user.lng
@@ -4,8 +4,8 @@ $wb['email_txt'] = 'E-mail';
 $wb['cryptpwd_txt'] = 'Heslo';
 $wb['password_strength_txt'] = 'Bezpečnost hesla';
 $wb['active_txt'] = 'Aktivní';
-$wb['email_error_isemail'] = 'E-mail adresa je chybná.';
-$wb['email_error_unique'] = 'Duplikování e-mail adresy.';
+$wb['email_error_isemail'] = 'E-mailová adresa je chybná.';
+$wb['email_error_unique'] = 'Duplikování e-mailové adresy.';
 $wb['autoresponder_text_txt'] = 'Text';
 $wb['autoresponder_txt'] = 'Aktivní';
 $wb['autoresponder_start_date_txt'] = 'Začít od';
@@ -23,7 +23,7 @@ $wb['postfix_txt'] = 'Povolit příjem';
 $wb['tooltip_postfix_txt'] = 'Allows incoming mail to this address.';
 $wb['access_txt'] = 'Povolit přístup';
 $wb['policy_txt'] = 'Spamový filtr';
-$wb['inherit_policy'] = '- Inherit domain setting -';
+$wb['inherit_policy'] = '- Zdědit nastavení od domény -';
 $wb['limit_mailbox_txt'] = 'Byl dosažen maximální počet mailboxů pro Váš účet.';
 $wb['limit_mailquota_txt'] = 'Dosažen maximální prostor pro mailboxy. Max. dostupné místo v MB je';
 $wb['disableimap_txt'] = 'Zakázat IMAP';
@@ -31,15 +31,15 @@ $wb['disablepop3_txt'] = 'Zakázat POP3';
 $wb['duplicate_alias_or_forward_txt'] = 'Alias nebo přesměrování s touto adresou již existuje.';
 $wb['quota_error_value'] = 'Chybná hodnota kvóty. Povolené hodnoty jsou: 0 pro neomezeno nebo čísla > 1';
 $wb['move_junk_txt'] = 'Přesunout e-maily detekované jako spam do adresáře Junk';
-$wb['move_junk_y_txt'] = 'Move first, before custom filters.';
-$wb['move_junk_a_txt'] = 'Move last, after custom filters.';
-$wb['move_junk_n_txt'] = 'Do not move Spam Emails to Junk folder.';
+$wb['move_junk_y_txt'] = 'Uplatnit přesun před použitím vlastních filtrů.';
+$wb['move_junk_a_txt'] = 'Uplatnit přesun až po použití vlastních filtrů.';
+$wb['move_junk_n_txt'] = 'Nepřesouvat nevyžádané e-maily do složky Nevyžádaná pošta.';
 $wb['name_txt'] = 'Skutečné jméno';
 $wb['name_optional_txt'] = '(volitelné)';
 $wb['autoresponder_active'] = 'Povolit automatický odpovídač';
 $wb['cc_txt'] = 'Odeslat příchozí kopii na';
 $wb['cc_error_isemail'] = 'Adresa uvedená v poli zaslat kopii na je neplatná';
-$wb['forward_in_lda_txt'] = 'Copy during delivery';
+$wb['forward_in_lda_txt'] = 'Provést kopii během doručování';
 $wb['tooltip_forward_in_lda_txt'] = 'Controls if mail copy is forwarded before or during delivery to mailbox.';
 $wb['domain_txt'] = 'Doména';
 $wb['now_txt'] = 'Nyní';
@@ -56,8 +56,8 @@ $wb['password_match_txt'] = 'Hesla se shodují.';
 $wb['email_error_isascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
 $wb['cc_note_txt'] = '(Při posílání kopií na více e-mailových adres, oddělte čárkami.)';
 $wb['tooltip_disablesmtp_txt'] = 'Disables mail submission from this mail account.';
-$wb['disabledeliver_txt'] = 'Disable (local) delivering';
-$wb['tooltip_disabledeliver_txt'] = 'Disables delivery to INBOX, and processing by mail filters and sieve scripts.  Mail forwards to \'Send copy to\' address.';
+$wb['disabledeliver_txt'] = 'Zakázat (místní) doručování';
+$wb['tooltip_disabledeliver_txt'] = 'Disables delivery to INBOX, and processing by mail filters and sieve scripts.  Mail forwards to \\'Send copy to\\' address.';
 $wb['autoresponder_start_date_is_required'] = 'Start date must be set when Autoresponder is enabled.';
 $wb['greylisting_txt'] = 'Povolit greylisting';
 $wb['sender_cc_txt'] = 'Odeslat odchozí kopii na';
@@ -68,10 +68,10 @@ $wb['no_backup_txt'] = 'Žádná záloha';
 $wb['daily_backup_txt'] = 'Denní';
 $wb['weekly_backup_txt'] = 'Týdenní';
 $wb['monthly_backup_txt'] = 'Měsíční';
-$wb['sender_cc_note_txt'] = '(One email address only)';
+$wb['sender_cc_note_txt'] = '(Při posílání kopií na více e-mailových adres, oddělte čárkami.) ';
 $wb['password_click_to_set_txt'] = 'Pro nastavení klikni zde';
-$wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days';
-$wb['tooltip_purge_trash_days_txt'] = '0 = disabled';
-$wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days';
-$wb['tooltip_purge_junk_days_txt'] = '0 = disabled';
-?>
+$wb['purge_trash_days_txt'] = 'Vysypat koš automaticky po X dnech.';
+$wb['tooltip_purge_trash_days_txt'] = '0 = neaktivní';
+$wb['purge_junk_days_txt'] = 'Vyčistit nevyžádanou poštu \"Junk\" automaticky po X dnech.';
+$wb['tooltip_purge_junk_days_txt'] = '0 = neaktivní';
+$wb['disablesmtp_txt'] = 'Zakázat SMTP (pouze odesílání)';
diff --git a/interface/web/mail/lib/lang/cz_mail_user_filter.lng b/interface/web/mail/lib/lang/cz_mail_user_filter.lng
index 156807f711..9f64639361 100644
--- a/interface/web/mail/lib/lang/cz_mail_user_filter.lng
+++ b/interface/web/mail/lib/lang/cz_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktivní';
 $wb['rulename_error_empty'] = 'Název je prázdný.';
 $wb['searchterm_is_empty'] = 'Vyhledávací řádek je prázdný.';
 $wb['source_txt'] = 'Zdroj';
-$wb['target_error_regex'] = 'Cíl může obsahovat jen tyto znaky: a-z, 0-9, -, ., _, &, /, a {mezeru}';
+$wb['target_error_regex'] = 'Cíl může obsahovat jen tyto znaky: a-z, 0-9, -, ., _, a {mezeru}';
 $wb['limit_mailfilter_txt'] = 'Byl dosažen max. počet e-mailový filtrovacích pravidel.';
 $wb['subject_txt'] = 'Předmět';
 $wb['from_txt'] = 'Odesílatel';
@@ -16,7 +16,7 @@ $wb['contains_txt'] = 'Obsahuje';
 $wb['is_txt'] = 'Je';
 $wb['begins_with_txt'] = 'Začíná na';
 $wb['ends_with_txt'] = 'Končí na';
-$wb['regex_txt'] = 'Matches Regex';
+$wb['regex_txt'] = 'Shoduje se s regulárním výrazem';
 $wb['delete_txt'] = 'Smazat';
 $wb['move_stop_txt'] = 'Přesunout';
 $wb['header_txt'] = 'Hlavička';
@@ -25,7 +25,6 @@ $wb['size_under_txt'] = 'Velikost e-mailu menší jak (KB)';
 $wb['localpart_txt'] = 'Localpart';
 $wb['domain_txt'] = 'Doména';
 $wb['keep_txt'] = 'Keep';
-$wb['reject_txt'] = 'Reject';
+$wb['reject_txt'] = 'Odmítnout';
 $wb['stop_txt'] = 'Stop';
 $wb['move_to_txt'] = 'Přesunout';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_user_filter_list.lng b/interface/web/mail/lib/lang/cz_mail_user_filter_list.lng
index 9a78b26b69..ef7c2d756a 100644
--- a/interface/web/mail/lib/lang/cz_mail_user_filter_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_user_filter_list.lng
@@ -4,4 +4,3 @@ $wb['add_new_record_txt'] = 'Vytvořit filtr';
 $wb['page_txt'] = 'Stránka';
 $wb['page_of_txt'] = 'z';
 $wb['delete_confirmation'] = 'Opravdu smazat mailový filtr ?';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_user_list.lng b/interface/web/mail/lib/lang/cz_mail_user_list.lng
index dcca69d8fe..867b5d3930 100644
--- a/interface/web/mail/lib/lang/cz_mail_user_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_user_list.lng
@@ -10,4 +10,3 @@ $wb['disablesmtp_txt'] = 'SMTP (odesílání)';
 $wb['disabledeliver_txt'] = 'INBOX';
 $wb['disableimap_txt'] = 'IMAP';
 $wb['disablepop3_txt'] = 'POP3';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_user_stats_list.lng b/interface/web/mail/lib/lang/cz_mail_user_stats_list.lng
index 50cbc31d5c..5471c0c465 100644
--- a/interface/web/mail/lib/lang/cz_mail_user_stats_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_user_stats_list.lng
@@ -5,4 +5,3 @@ $wb['this_month_txt'] = 'Tento měsíc';
 $wb['last_month_txt'] = 'Minulý měsíc';
 $wb['this_year_txt'] = 'Tento rok';
 $wb['last_year_txt'] = 'Minulý rok';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_whitelist.lng b/interface/web/mail/lib/lang/cz_mail_whitelist.lng
index 7b066bce91..c96f21909a 100644
--- a/interface/web/mail/lib/lang/cz_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/cz_mail_whitelist.lng
@@ -6,4 +6,3 @@ $wb['active_txt'] = 'Aktivní';
 $wb['source_error_notempty'] = 'Adresa je prázdná.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Byl dosažen maximální počet e-mail filtrů pro Váš účet.';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_whitelist_list.lng b/interface/web/mail/lib/lang/cz_mail_whitelist_list.lng
index ee3b0b8bdd..01f643344a 100644
--- a/interface/web/mail/lib/lang/cz_mail_whitelist_list.lng
+++ b/interface/web/mail/lib/lang/cz_mail_whitelist_list.lng
@@ -7,4 +7,3 @@ $wb['type_txt'] = 'Typ';
 $wb['recipient_txt'] = 'Příjemce (adresát)';
 $wb['add_new_record_txt'] = 'Přidat na bílou listinu';
 $wb['access_txt'] = 'Přístup';
-?>
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_blacklist.lng b/interface/web/mail/lib/lang/cz_spamfilter_blacklist.lng
index 4760bebf31..ac90b61005 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_blacklist.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_blacklist.lng
@@ -9,4 +9,3 @@ $wb['limit_spamfilter_wblist_txt'] = 'Byl dosažen maximální počet záznamů
 $wb['10 - highest'] = '10 - nejvyšší';
 $wb['5 - medium'] = '5 - střední';
 $wb['1 - lowest'] = '1 - nejnižší';
-?>
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_blacklist_list.lng b/interface/web/mail/lib/lang/cz_spamfilter_blacklist_list.lng
index d634d7242c..497e27a1c9 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_blacklist_list.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_blacklist_list.lng
@@ -6,4 +6,3 @@ $wb['priority_txt'] = 'Priorita';
 $wb['rid_txt'] = 'Uživatel';
 $wb['email_txt'] = 'E-maily na černé listině';
 $wb['add_new_record_txt'] = 'Přidat na černou listinu';
-?>
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_config.lng b/interface/web/mail/lib/lang/cz_spamfilter_config.lng
index 0d4218498e..356a47cbac 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_config.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_config.lng
@@ -5,7 +5,7 @@ $wb['netmask_txt'] = 'Maska';
 $wb['gateway_txt'] = 'Brána';
 $wb['nameservers_txt'] = 'Jmenné servery';
 $wb['module_txt'] = 'Modul serveru';
-$wb['maildir_path_txt'] = 'Cesta k mail adresáři';
+$wb['maildir_path_txt'] = 'Cesta k e-mail adresáři';
 $wb['homedir_path_txt'] = 'Cesta k domácímu adresáři';
 $wb['mailuser_uid_txt'] = 'E-mail uživatel UID';
 $wb['mailuser_gid_txt'] = 'E-mail uživatel GID';
@@ -17,4 +17,3 @@ $wb['relayhost_password_txt'] = 'Relayhost heslo';
 $wb['mailbox_size_limit_txt'] = 'Limit velikosti e-mailové schránky';
 $wb['message_size_limit_txt'] = 'Limit velikosti zprávy';
 $wb['hostname_txt'] = 'Název hostitele';
-?>
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_config_list.lng b/interface/web/mail/lib/lang/cz_spamfilter_config_list.lng
index fe2ee8d51c..db2d46d7a5 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_config_list.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_config_list.lng
@@ -2,4 +2,3 @@
 $wb['list_head_txt'] = 'Konfigurace serveru';
 $wb['server_name_txt'] = 'Server';
 $wb['server_id_txt'] = 'server_id';
-?>
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_policy.lng b/interface/web/mail/lib/lang/cz_spamfilter_policy.lng
index b8b8a2e78f..348ecb19fa 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_policy.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_policy.lng
@@ -3,7 +3,7 @@ $wb['policy_name_txt'] = 'Název antispamové politiky';
 $wb['virus_lover_txt'] = 'Viry - označit e-mail, ale doručit';
 $wb['spam_lover_txt'] = 'SPAM';
 $wb['banned_files_lover_txt'] = 'Zabanovaný obsah - doručit (*.com, ...)';
-$wb['bad_header_lover_txt'] = 'Špatné hlavičky';
+$wb['bad_header_lover_txt'] = 'Vypnout kontrolu špatné hlavičky';
 $wb['bypass_virus_checks_txt'] = 'Vypnout kontrolu na viry';
 $wb['bypass_banned_checks_txt'] = 'Vypnout kontrolu zabanovaných e-mailů';
 $wb['bypass_header_checks_txt'] = 'Vypnout kontrolu hlavičky e-mailu';
@@ -36,16 +36,15 @@ $wb['spam_admin_txt'] = 'SPAM admin';
 $wb['message_size_limit_txt'] = 'Limit velikosti zprávy';
 $wb['banned_rulenames_txt'] = 'Název pravidel zabanované';
 $wb['rspamd_greylisting_txt'] = 'Use greylisting';
-$wb['rspamd_spam_greylisting_level_txt'] = 'Greylisting level';
-$wb['rspamd_spam_tag_level_txt'] = 'SPAM tag level';
-$wb['rspamd_spam_tag_method_txt'] = 'SPAM tag method';
-$wb['rspamd_spam_kill_level_txt'] = 'SPAM reject level';
-$wb['btn_save_txt'] = 'Save';
-$wb['btn_cancel_txt'] = 'Cancel';
-$wb['amavis_settings_txt'] = 'Settings';
+$wb['rspamd_spam_greylisting_level_txt'] = 'Hodnota pro Greylisting';
+$wb['rspamd_spam_tag_level_txt'] = 'Hodnota označení jako SPAM';
+$wb['rspamd_spam_tag_method_txt'] = 'Způsob označení SPAMu';
+$wb['rspamd_spam_kill_level_txt'] = 'Hodnota odmítnutí jako SPAM';
+$wb['btn_save_txt'] = 'Uložit';
+$wb['btn_cancel_txt'] = 'Zrušit';
+$wb['amavis_settings_txt'] = 'Nastavení';
 $wb['amavis_taglevel_txt'] = 'Tag-Level';
-$wb['amavis_quarantine_txt'] = 'Quarantine';
-$wb['amavis_other_txt'] = 'Other';
-$wb['add_header_txt'] = 'Add header';
-$wb['rewrite_subject_txt'] = 'Rewrite subject';
-?>
+$wb['amavis_quarantine_txt'] = 'Karanténa';
+$wb['amavis_other_txt'] = 'Další';
+$wb['add_header_txt'] = 'Přidat záhlaví';
+$wb['rewrite_subject_txt'] = 'Přepsat předmět';
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_policy_list.lng b/interface/web/mail/lib/lang/cz_spamfilter_policy_list.lng
index 5b7cde522f..45d985ad5c 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_policy_list.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_policy_list.lng
@@ -5,5 +5,4 @@ $wb['virus_lover_txt'] = 'Viry';
 $wb['spam_lover_txt'] = 'Spam';
 $wb['banned_files_lover_txt'] = 'Zabanované soubory';
 $wb['bad_header_lover_txt'] = 'Špatné hlavičky';
-$wb['add_new_record_txt'] = 'Vytvořit záznam politiky';
-?>
+$wb['add_new_record_txt'] = 'Vytvořit politiku';
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_users.lng b/interface/web/mail/lib/lang/cz_spamfilter_users.lng
index 3473064e21..f2fff323f4 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_users.lng
@@ -10,4 +10,3 @@ $wb['fullname_error_notempty'] = 'Jméno nesmí být prázdné.';
 $wb['10 - highest'] = '10 - nejvyšší';
 $wb['5 - medium'] = '5 - střední';
 $wb['1 - lowest'] = '1 - nejnižší';
-?>
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_users_list.lng b/interface/web/mail/lib/lang/cz_spamfilter_users_list.lng
index 5f823362cf..a75d1b9ec1 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_users_list.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_users_list.lng
@@ -7,4 +7,3 @@ $wb['policy_id_txt'] = 'Politika';
 $wb['fullname_txt'] = 'Jméno';
 $wb['email_txt'] = 'E-mail';
 $wb['add_new_record_txt'] = 'Vytvořit spamfiltr uživatele';
-?>
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_whitelist.lng b/interface/web/mail/lib/lang/cz_spamfilter_whitelist.lng
index 4760bebf31..ac90b61005 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_whitelist.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_whitelist.lng
@@ -9,4 +9,3 @@ $wb['limit_spamfilter_wblist_txt'] = 'Byl dosažen maximální počet záznamů
 $wb['10 - highest'] = '10 - nejvyšší';
 $wb['5 - medium'] = '5 - střední';
 $wb['1 - lowest'] = '1 - nejnižší';
-?>
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_whitelist_list.lng b/interface/web/mail/lib/lang/cz_spamfilter_whitelist_list.lng
index 27202c19ed..ed73462508 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_whitelist_list.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_whitelist_list.lng
@@ -6,4 +6,3 @@ $wb['priority_txt'] = 'Priorita';
 $wb['rid_txt'] = 'Uživatel';
 $wb['email_txt'] = 'E-maily na bílé listině';
 $wb['add_new_record_txt'] = 'Přidat na bílou listinu';
-?>
diff --git a/interface/web/mail/lib/lang/cz_user_quota_stats_list.lng b/interface/web/mail/lib/lang/cz_user_quota_stats_list.lng
index b55af94171..96cd688824 100644
--- a/interface/web/mail/lib/lang/cz_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/cz_user_quota_stats_list.lng
@@ -5,4 +5,3 @@ $wb['name_txt'] = 'Jméno';
 $wb['email_txt'] = 'E-mailová adresa';
 $wb['used_txt'] = 'Využité místo';
 $wb['percentage_txt'] = 'Využité místo v %';
-?>
diff --git a/interface/web/mail/lib/lang/cz_xmpp_domain.lng b/interface/web/mail/lib/lang/cz_xmpp_domain.lng
index 8f04fe8015..f6f00fe703 100644
--- a/interface/web/mail/lib/lang/cz_xmpp_domain.lng
+++ b/interface/web/mail/lib/lang/cz_xmpp_domain.lng
@@ -59,4 +59,3 @@ $wb['create_certificate_txt'] = 'Create certificate';
 $wb['delete_certificate_txt'] = 'Delete certificate';
 $wb['ssl_error_isemail'] = 'Please enter a valid email adress for generation of the SSL certificate';
 $wb['limit_xmppdomain_txt'] = 'The max. number of XMPP domains for your account is reached.';
-?>
diff --git a/interface/web/mail/lib/lang/cz_xmpp_domain_admin_list.lng b/interface/web/mail/lib/lang/cz_xmpp_domain_admin_list.lng
index 9a4885fa96..37049fa344 100644
--- a/interface/web/mail/lib/lang/cz_xmpp_domain_admin_list.lng
+++ b/interface/web/mail/lib/lang/cz_xmpp_domain_admin_list.lng
@@ -5,4 +5,3 @@ $wb['domain_txt'] = 'Doména';
 $wb['add_new_record_txt'] = 'Vytvořit doménu';
 $wb['active_txt'] = 'Aktivní';
 $wb['sys_groupid_txt'] = 'Klient';
-?>
diff --git a/interface/web/mail/lib/lang/cz_xmpp_domain_list.lng b/interface/web/mail/lib/lang/cz_xmpp_domain_list.lng
index c031c30849..a0724b860c 100644
--- a/interface/web/mail/lib/lang/cz_xmpp_domain_list.lng
+++ b/interface/web/mail/lib/lang/cz_xmpp_domain_list.lng
@@ -4,4 +4,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Doména';
 $wb['add_new_record_txt'] = 'Vytvořit doménu';
 $wb['active_txt'] = 'Aktivní';
-?>
diff --git a/interface/web/mail/lib/lang/cz_xmpp_user.lng b/interface/web/mail/lib/lang/cz_xmpp_user.lng
index eaa73b08a3..3e275851b6 100644
--- a/interface/web/mail/lib/lang/cz_xmpp_user.lng
+++ b/interface/web/mail/lib/lang/cz_xmpp_user.lng
@@ -12,4 +12,3 @@ $wb['password_mismatch_txt'] = 'Hesla se neshodují.';
 $wb['password_match_txt'] = 'Hesla se shodují.';
 $wb['no_domain_perm'] = 'Nemáte oprávnění pro tuto doménu.';
 $wb['limit_xmpp_user_txt'] = 'The max. number of xmpp accounts for your account is reached.';
-?>
diff --git a/interface/web/mail/lib/lang/cz_xmpp_user_list.lng b/interface/web/mail/lib/lang/cz_xmpp_user_list.lng
index f611f1c4ff..cee5a518ef 100644
--- a/interface/web/mail/lib/lang/cz_xmpp_user_list.lng
+++ b/interface/web/mail/lib/lang/cz_xmpp_user_list.lng
@@ -5,4 +5,3 @@ $wb['is_domain_admin_txt'] = 'Domain admin';
 $wb['is_muc_admin_txt'] = 'MUC admin';
 $wb['add_new_record_txt'] = 'Přidat uživatele';
 $wb['active_txt'] = 'Aktivní';
-?>
diff --git a/interface/web/mailuser/lib/lang/br.lng b/interface/web/mailuser/lib/lang/br.lng
index 64f9346808..bbf477c4ca 100644
--- a/interface/web/mailuser/lib/lang/br.lng
+++ b/interface/web/mailuser/lib/lang/br.lng
@@ -1,9 +1,8 @@
 <?php
-$wb['Email Account'] = 'Conta de e-mail';
+$wb['Email Account'] = 'Conta de email';
 $wb['Overview'] = 'Visão Geral';
 $wb['Password'] = 'Senha';
 $wb['Autoresponder'] = 'Auto-resposta';
 $wb['Send copy'] = 'Enviar cópia';
 $wb['Spamfilter'] = 'Filtro anti-spam';
-$wb['Email Filters'] = 'Filtros de e-mail';
-?>
+$wb['Email Filters'] = 'Filtros de email';
diff --git a/interface/web/mailuser/lib/lang/br_index.lng b/interface/web/mailuser/lib/lang/br_index.lng
index 9be2fbdb2a..99251ab3e7 100644
--- a/interface/web/mailuser/lib/lang/br_index.lng
+++ b/interface/web/mailuser/lib/lang/br_index.lng
@@ -1,12 +1,11 @@
 <?php
-$wb['page_head_txt'] = 'Configurações de conta de e-mail';
-$wb['page_desc_txt'] = 'Aqui você pode editar as configurações da conta de e-mail.';
-$wb['email_txt'] = 'Endereço de e-mail';
+$wb['page_head_txt'] = 'Configurações da conta de email';
+$wb['page_desc_txt'] = 'Aqui você pode editar as configurações da conta de email.';
+$wb['email_txt'] = 'Endereço de email';
 $wb['login_txt'] = 'Acesso';
-$wb['server_address_txt'] = 'Endereço do servidor de e-mails';
-$wb['cc_txt'] = 'Enviar cópia oculta (BCC) para';
-$wb['quota_txt'] = 'Cota da conta de e-mail';
+$wb['server_address_txt'] = 'Endereço do servidor de emails';
+$wb['cc_txt'] = 'Enviar cópia para (CC)';
+$wb['quota_txt'] = 'Cota da conta de email';
 $wb['unlimited_txt'] = 'Ilimitado';
 $wb['mb_txt'] = 'MB';
 $wb['none_txt'] = 'Nenhum';
-?>
diff --git a/interface/web/mailuser/lib/lang/br_mail_user_autoresponder.lng b/interface/web/mailuser/lib/lang/br_mail_user_autoresponder.lng
index 3783bbcb73..12c702b4c2 100644
--- a/interface/web/mailuser/lib/lang/br_mail_user_autoresponder.lng
+++ b/interface/web/mailuser/lib/lang/br_mail_user_autoresponder.lng
@@ -6,8 +6,7 @@ $wb['autoresponder_txt'] = 'Ativo';
 $wb['autoresponder_start_date_txt'] = 'Iniciar em';
 $wb['autoresponder_start_date_isfuture'] = 'O campo "Iniciar em" não pode ser menor que data atual.';
 $wb['autoresponder_end_date_txt'] = 'Terminar em';
-$wb['autoresponder_end_date_isgreater'] = 'End date must be later than start date.';
+$wb['autoresponder_end_date_isgreater'] = 'O campo "Terminar em" deve ser maior que a data "Iniciar em".';
 $wb['autoresponder_active'] = 'Habilitar auto-resposta';
 $wb['now_txt'] = 'Agora';
 $wb['autoresponder_subject_txt'] = 'Assunto';
-?>
diff --git a/interface/web/mailuser/lib/lang/br_mail_user_cc.lng b/interface/web/mailuser/lib/lang/br_mail_user_cc.lng
index 8008ed2618..4cd3e6d959 100644
--- a/interface/web/mailuser/lib/lang/br_mail_user_cc.lng
+++ b/interface/web/mailuser/lib/lang/br_mail_user_cc.lng
@@ -1,11 +1,10 @@
 <?php
-$wb['mailbox_cc_txt'] = 'Enviar cópia para endereço de e-mail';
+$wb['mailbox_cc_txt'] = 'Enviar cópia para endereço de email';
 $wb['cc_txt'] = 'Enviar cópia para';
-$wb['email_txt'] = 'e-Mail';
-$wb['cc_error_isemail'] = 'Endereço de e-mail inválido no campo "Enviar cópia para".';
-$wb['email_is_cc_error'] = 'Endereço de e-mail e "Enviar cópia para" não podem ser os mesmos.';
+$wb['email_txt'] = 'eMail';
+$wb['cc_error_isemail'] = 'Endereço de email inválido no campo "Enviar cópia para".';
+$wb['email_is_cc_error'] = 'Endereço de email e "Enviar cópia para" não podem ser os mesmos.';
 $wb['name_optional_txt'] = '(Opcional)';
-$wb['cc_note_txt'] = '(separar múltiplos endereços de e-mail com vírgulas)';
-$wb['forward_in_lda_txt'] = 'Copy during delivery';
-$wb['tooltip_forward_in_lda_txt'] = 'Controls if mail copy is forwarded before or during delivery to mailbox.';
-?>
+$wb['cc_note_txt'] = '(separar múltiplos endereços de email com vírgulas)';
+$wb['forward_in_lda_txt'] = 'Copiar durante a entrega';
+$wb['tooltip_forward_in_lda_txt'] = 'Controlar se a cópia será encaminhada antes ou durante a entrega para a conta de email.';
diff --git a/interface/web/mailuser/lib/lang/br_mail_user_filter.lng b/interface/web/mailuser/lib/lang/br_mail_user_filter.lng
index 88a7271391..45c74c5c44 100644
--- a/interface/web/mailuser/lib/lang/br_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/br_mail_user_filter.lng
@@ -3,12 +3,12 @@ $wb['rulename_txt'] = 'Nome';
 $wb['action_txt'] = 'Ação';
 $wb['target_txt'] = 'Pasta';
 $wb['active_txt'] = 'Ativo';
-$wb['rulename_error_empty'] = 'Nome está em branco.';
-$wb['searchterm_is_empty'] = 'Termo de pesquisa está em branco.';
+$wb['rulename_error_empty'] = 'Nome está vazio.';
+$wb['searchterm_is_empty'] = 'Termo de pesquisa está vazio.';
 $wb['source_txt'] = 'Origem';
 $wb['target_error_regex'] = 'O alvo pode conter apenas estes caracteres: "a-z", "0-9", "-", ".", "_", e "{espaço}".';
-$wb['limit_mailfilter_txt'] = 'O limite de filtros de e-mail para esta conta foi alcançado.';
-$wb['mailbox_filter_txt'] = 'Filtro de conta de e-mail';
+$wb['limit_mailfilter_txt'] = 'O limite de filtros de email para esta conta foi alcançado.';
+$wb['mailbox_filter_txt'] = 'Filtro da conta de email';
 $wb['subject_txt'] = 'Assunto';
 $wb['from_txt'] = 'De';
 $wb['to_txt'] = 'Para';
@@ -17,9 +17,9 @@ $wb['is_txt'] = 'é';
 $wb['begins_with_txt'] = 'Iniciando com';
 $wb['ends_with_txt'] = 'Finalizando com';
 $wb['move_to_txt'] = 'Mover para';
-$wb['regex_txt'] = 'Matches Regex';
+$wb['regex_txt'] = 'Combinar Regex';
 $wb['delete_txt'] = 'Remover';
-$wb['header_txt'] = 'Header';
-$wb['size_over_txt'] = 'Email size over (KB)';
-$wb['size_under_txt'] = 'Email size under (KB)';
-?>
+$wb['header_txt'] = 'Cabeçalho';
+$wb['size_over_txt'] = 'Tamanho do email acima do permitido (KB)';
+$wb['size_under_txt'] = 'Tamanho do email abaixo do permitido (KB)';
+$wb['list_id_txt'] = 'Lista de ID';
diff --git a/interface/web/mailuser/lib/lang/br_mail_user_filter_list.lng b/interface/web/mailuser/lib/lang/br_mail_user_filter_list.lng
index 5e13e8c303..bd5b28cf3b 100644
--- a/interface/web/mailuser/lib/lang/br_mail_user_filter_list.lng
+++ b/interface/web/mailuser/lib/lang/br_mail_user_filter_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Regras de filtros de e-mail';
+$wb['list_head_txt'] = 'Regras de filtros de email';
 $wb['rulename_txt'] = 'Nome';
 $wb['add_new_record_txt'] = 'Adicionar novo filtro';
 $wb['page_txt'] = 'Página';
 $wb['page_of_txt'] = 'de';
-$wb['delete_confirmation'] = 'Você tem certeza que deseja remover este filtro de e-mail?';
-?>
+$wb['delete_confirmation'] = 'Você tem certeza que deseja remover este filtro de email?';
diff --git a/interface/web/mailuser/lib/lang/br_mail_user_password.lng b/interface/web/mailuser/lib/lang/br_mail_user_password.lng
index 7a64df748a..174e9aa0ab 100644
--- a/interface/web/mailuser/lib/lang/br_mail_user_password.lng
+++ b/interface/web/mailuser/lib/lang/br_mail_user_password.lng
@@ -1,11 +1,10 @@
 <?php
-$wb['mailbox_password_txt'] = 'Senha da conta de e-mail';
+$wb['mailbox_password_txt'] = 'Senha da conta de email';
 $wb['password_txt'] = 'Senha';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
-$wb['email_txt'] = 'e-Mail';
+$wb['email_txt'] = 'eMail';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-$wb['password_click_to_set_txt'] = 'Clique para configurar';
-?>
+$wb['password_click_to_set_txt'] = 'Configurar';
diff --git a/interface/web/mailuser/lib/lang/br_mail_user_spamfilter.lng b/interface/web/mailuser/lib/lang/br_mail_user_spamfilter.lng
index 360d47d9cc..72c0cf69ef 100644
--- a/interface/web/mailuser/lib/lang/br_mail_user_spamfilter.lng
+++ b/interface/web/mailuser/lib/lang/br_mail_user_spamfilter.lng
@@ -1,7 +1,6 @@
 <?php
 $wb['mailbox_spamfilter_txt'] = 'Filtros anti-spam';
 $wb['spamfilter_txt'] = 'Filtro anti-spam';
-$wb['email_txt'] = 'e-Mail';
-$wb['inherit_policy'] = '- Inherit domain setting -';
+$wb['email_txt'] = 'eMail';
+$wb['inherit_policy'] = '- Herdar configuração do domínio -';
 $wb['policy_txt'] = 'Política';
-?>
diff --git a/interface/web/mailuser/lib/lang/cz.lng b/interface/web/mailuser/lib/lang/cz.lng
index 8b4b58bc42..d2a5a91c03 100644
--- a/interface/web/mailuser/lib/lang/cz.lng
+++ b/interface/web/mailuser/lib/lang/cz.lng
@@ -6,4 +6,3 @@ $wb['Autoresponder'] = 'Automatická odpověď';
 $wb['Send copy'] = 'Poslat kopii na e-mail';
 $wb['Spamfilter'] = 'Spamový filtr';
 $wb['Email Filters'] = 'E-mailové filtry';
-?>
diff --git a/interface/web/mailuser/lib/lang/cz_index.lng b/interface/web/mailuser/lib/lang/cz_index.lng
index 45af56ee8d..5e85fc5bef 100644
--- a/interface/web/mailuser/lib/lang/cz_index.lng
+++ b/interface/web/mailuser/lib/lang/cz_index.lng
@@ -9,4 +9,3 @@ $wb['quota_txt'] = 'Velikost poštovní schránky';
 $wb['unlimited_txt'] = 'Neomezený';
 $wb['mb_txt'] = 'MB';
 $wb['none_txt'] = 'Nenastaveno';
-?>
diff --git a/interface/web/mailuser/lib/lang/cz_mail_user_autoresponder.lng b/interface/web/mailuser/lib/lang/cz_mail_user_autoresponder.lng
index 20134a87b5..8ec7837e6b 100644
--- a/interface/web/mailuser/lib/lang/cz_mail_user_autoresponder.lng
+++ b/interface/web/mailuser/lib/lang/cz_mail_user_autoresponder.lng
@@ -6,8 +6,7 @@ $wb['autoresponder_txt'] = 'Aktivní';
 $wb['autoresponder_start_date_txt'] = 'Začít od';
 $wb['autoresponder_start_date_isfuture'] = 'Datum zahájení nesmí být v minulosti.';
 $wb['autoresponder_end_date_txt'] = 'Skončit';
-$wb['autoresponder_end_date_isgreater'] = 'End date must be later than start date.';
+$wb['autoresponder_end_date_isgreater'] = 'Datum ukončení musí být nastaven a musí být pozdější než datum zahájení.';
 $wb['autoresponder_active'] = 'Povolit automatický odpovídač';
 $wb['now_txt'] = 'Nyní';
 $wb['autoresponder_subject_txt'] = 'Předmět e-mailu';
-?>
diff --git a/interface/web/mailuser/lib/lang/cz_mail_user_cc.lng b/interface/web/mailuser/lib/lang/cz_mail_user_cc.lng
index 1f94bd024d..574b7fbec8 100644
--- a/interface/web/mailuser/lib/lang/cz_mail_user_cc.lng
+++ b/interface/web/mailuser/lib/lang/cz_mail_user_cc.lng
@@ -6,6 +6,5 @@ $wb['cc_error_isemail'] = 'Vyplněná e-mailová adresa neplatná';
 $wb['email_is_cc_error'] = 'Vyplněná e-mailová adresa a poslat kopii na e-mail adresu, nemůžou být stejné.';
 $wb['name_optional_txt'] = '(Volitelné)';
 $wb['cc_note_txt'] = '(Při posílání kopií na více e-mailových adres, oddělte čárkami.)';
-$wb['forward_in_lda_txt'] = 'Copy during delivery';
+$wb['forward_in_lda_txt'] = 'Provést kopii během doručování';
 $wb['tooltip_forward_in_lda_txt'] = 'Controls if mail copy is forwarded before or during delivery to mailbox.';
-?>
diff --git a/interface/web/mailuser/lib/lang/cz_mail_user_filter.lng b/interface/web/mailuser/lib/lang/cz_mail_user_filter.lng
index 341cf3674a..61982223fb 100644
--- a/interface/web/mailuser/lib/lang/cz_mail_user_filter.lng
+++ b/interface/web/mailuser/lib/lang/cz_mail_user_filter.lng
@@ -6,7 +6,7 @@ $wb['active_txt'] = 'Aktivní';
 $wb['rulename_error_empty'] = 'Název pravidla je prázdný.';
 $wb['searchterm_is_empty'] = 'Hledaný výraz je prázdný.';
 $wb['source_txt'] = 'Zdroj';
-$wb['target_error_regex'] = 'Cíl může obsahovat jen tyto znaky: a-z, 0-9, -, ., _, &, /, a {mezeru}';
+$wb['target_error_regex'] = 'Cíl může obsahovat jen tyto znaky: a-z, 0-9, -, ., _, a {mezeru}';
 $wb['limit_mailfilter_txt'] = 'Byl dosažen max. počet e-mailový filtrovacích pravidel.';
 $wb['subject_txt'] = 'Předmět';
 $wb['from_txt'] = 'Odesílatel';
@@ -16,10 +16,10 @@ $wb['is_txt'] = 'Je';
 $wb['begins_with_txt'] = 'Začíná na';
 $wb['ends_with_txt'] = 'Končí na';
 $wb['move_to_txt'] = 'Přesunout do';
-$wb['regex_txt'] = 'Matches Regex';
+$wb['regex_txt'] = 'Shoduje se s regulárním výrazem';
 $wb['delete_txt'] = 'Smazat';
-$wb['mailbox_filter_txt'] = 'Mailbox filter';
+$wb['mailbox_filter_txt'] = 'Filtr poštovní schránky';
 $wb['header_txt'] = 'Header';
 $wb['size_over_txt'] = 'Email size over (KB)';
 $wb['size_under_txt'] = 'Email size under (KB)';
-?>
+$wb['list_id_txt'] = 'List ID';
diff --git a/interface/web/mailuser/lib/lang/cz_mail_user_filter_list.lng b/interface/web/mailuser/lib/lang/cz_mail_user_filter_list.lng
index 546c148509..031daac60e 100644
--- a/interface/web/mailuser/lib/lang/cz_mail_user_filter_list.lng
+++ b/interface/web/mailuser/lib/lang/cz_mail_user_filter_list.lng
@@ -5,4 +5,3 @@ $wb['add_new_record_txt'] = 'Vytvořit pravidlo';
 $wb['page_txt'] = 'Stránka';
 $wb['page_of_txt'] = 'z';
 $wb['delete_confirmation'] = 'Opravdu chcete odstranit e-mail filter?';
-?>
diff --git a/interface/web/mailuser/lib/lang/cz_mail_user_password.lng b/interface/web/mailuser/lib/lang/cz_mail_user_password.lng
index 29f1d1d02f..a01f2f4fa6 100644
--- a/interface/web/mailuser/lib/lang/cz_mail_user_password.lng
+++ b/interface/web/mailuser/lib/lang/cz_mail_user_password.lng
@@ -8,4 +8,3 @@ $wb['repeat_password_txt'] = 'Opakujte heslo';
 $wb['password_mismatch_txt'] = 'Hesla se neshodují.';
 $wb['password_match_txt'] = 'Hesla se shodují.';
 $wb['password_click_to_set_txt'] = 'Pro nastavení klikni zde';
-?>
diff --git a/interface/web/mailuser/lib/lang/cz_mail_user_spamfilter.lng b/interface/web/mailuser/lib/lang/cz_mail_user_spamfilter.lng
index e6a50b96f8..35400eb4dd 100644
--- a/interface/web/mailuser/lib/lang/cz_mail_user_spamfilter.lng
+++ b/interface/web/mailuser/lib/lang/cz_mail_user_spamfilter.lng
@@ -2,6 +2,5 @@
 $wb['mailbox_spamfilter_txt'] = 'Spamový filtr';
 $wb['spamfilter_txt'] = 'Spamový filtr';
 $wb['email_txt'] = 'E-mail';
-$wb['inherit_policy'] = '- Inherit domain setting -';
+$wb['inherit_policy'] = '- Zdědit nastavení od domény -';
 $wb['policy_txt'] = 'Politika';
-?>
diff --git a/interface/web/monitor/lib/lang/br.lng b/interface/web/monitor/lib/lang/br.lng
index 470f1d84fd..b98bd980ed 100644
--- a/interface/web/monitor/lib/lang/br.lng
+++ b/interface/web/monitor/lib/lang/br.lng
@@ -5,18 +5,18 @@ $wb['System load 1 minute'] = 'Carga do sistema - 1 min';
 $wb['System load 5 minutes'] = 'Carga do sistema - 5 min';
 $wb['System load 15 minutes'] = 'Carga do sistema - 15 min';
 $wb['Server Load'] = 'Carga do Sistema';
-$wb['Disk usage'] = 'Uso do Disco';
-$wb['Memory usage'] = 'Uso da Memória';
+$wb['Disk usage'] = 'Exibir uso do disco';
+$wb['Memory usage'] = 'Exibir uso da memória';
 $wb['no_data_serverload_txt'] = 'Nenhum dado sobre o servidor disponível no momento. Por favor, verifique mais tarde.';
 $wb['no_data_memusage_txt'] = 'Nenhum dado sobre uso da memória disponível no momento. Por favor, verifique mais tarde.';
 $wb['no_data_diskusage_txt'] = 'Nenhum dado sobre o uso do disco disponível no momento. Por favor, verifique mais tarde.';
-$wb['no_data_database_size_txt'] = 'Nenhum dado sobre o uso do banco de dados disponível no momento. Por favor, verifique mais tarde.';
+$wb['no_data_database_size_txt'] = 'Nenhum dado sobre o uso do Banco de Dados disponível no momento. Por favor, verifique mais tarde.';
 $wb['no_data_cpuinfo_txt'] = 'Nenhum dado sobre a CPU disponível no momento. Por favor, verifique mais tarde.';
 $wb['no_data_services_txt'] = 'Nenhum dado sobre os serviços disponível no momento. Por favor, verifique mais tarde.';
 $wb['no_data_updates_txt'] = 'Nenhum dado sobre atualizações disponível no momento. Por favor, verifique mais tarde.';
 $wb['no_data_raid_txt'] = 'Nenhum dados sobre o RAID disponível no momento. Por favor, verifique mais tarde.';
 $wb['no_data_rkhunter_txt'] = 'Nenhum dado sobre o RKHunter disponível no momento. Por favor, verifique mais tarde.';
-$wb['no_data_mailq_txt'] = 'Nenhum dados sobre as filas de e-mail disponível no momento. Por favor, verifique mais tarde.';
+$wb['no_data_mailq_txt'] = 'Nenhum dados sobre as filas de email disponível no momento. Por favor, verifique mais tarde.';
 $wb['no_logdata_txt'] = 'Nenhum dado de log disponível no momento. Por favor, verifique mais tarde.';
 $wb['Monitoring'] = 'Monitorando';
 $wb['Server to Monitor'] = 'Servidor a monitorar';
@@ -32,27 +32,25 @@ $wb['Server State'] = 'Estado do Servidor';
 $wb['Update State'] = 'Exibir estado atual';
 $wb['RAID state'] = 'Exibir estado do RAID';
 $wb['Server load'] = 'Exibir carga do servidor';
-$wb['Disk usage'] = 'Exibir uso do disco';
-$wb['MySQL Database size'] = 'Exibir tamanho do banco de dados mysql';
-$wb['Memory usage'] = 'Exibir uso da memória';
+$wb['MySQL Database size'] = 'Exibir uso BDs MySQL';
 $wb['Services'] = 'Exibir serviços';
-$wb['Mail-Queue'] = 'Exibir fila de e-mails';
-$wb['Mail-Log'] = 'Exibir log de e-mails';
-$wb['Mail warn-Log'] = 'Exibir log de alertas de e-mail';
-$wb['Mail err-Log'] = 'Exibir log de erros de e-mail';
+$wb['Mail-Queue'] = 'Exibir fila de emails';
+$wb['Mail-Log'] = 'Exibir log de emails';
+$wb['Mail warn-Log'] = 'Exibir log de alertas de email';
+$wb['Mail err-Log'] = 'Exibir log de erros de email';
 $wb['System-Log'] = 'Exibir log do sistema';
 $wb['ISPC Cron-Log'] = 'Exibir log do cron';
-$wb['Freshclam-Log'] = 'Exibir log do freshclam';
-$wb['Let\'s Encrypt log'] = 'Let\'s Encrypt log';
-$wb['Clamav-Log'] = 'Exibir log do clamav';
+$wb['Freshclam-Log'] = 'Exibir log do Freshclam';
+$wb['Let's Encrypt log'] = 'Let\\'s Encrypt log';
+$wb['Clamav-Log'] = 'Exibir log do Clamav';
 $wb['ISPConfig-Log'] = 'Exibir log do ISPConfig';
-$wb['RKHunter-Log'] = 'Exibir log do rkhunter';
+$wb['RKHunter-Log'] = 'Exibir log do RKHunter';
 $wb['Jobqueue'] = 'Exibir fila de tarefas';
 $wb['Data Log History'] = 'Exibir histórico do log';
-$wb['fail2ban-Log'] = 'Exibir log do fail2ban';
-$wb['MongoDB-Log'] = 'Exibir log do mongodb';
-$wb['IPTables'] = 'Exibir regras de firewall';
-$wb['OpenVz VE BeanCounter'] = 'Exibir beancounter do openvz';
+$wb['fail2ban-Log'] = 'Exibir log do Fail2ban';
+$wb['MongoDB-Log'] = 'Exibir log do MongoDB';
+$wb['IPTables'] = 'Exibir regras de Firewall';
+$wb['OpenVz VE BeanCounter'] = 'Exibir parâmetros OpenVZ';
 $wb['monitor_general_serverstate_txt'] = 'Estado do servidor';
 $wb['monitor_general_systemstate_txt'] = 'Estado do sistema';
 $wb['monitor_diskusage_filesystem_txt'] = 'Arquivos do sistema';
@@ -66,16 +64,16 @@ $wb['monitor_database_name_txt'] = 'Banco de dados';
 $wb['monitor_database_size_txt'] = 'Tamanho';
 $wb['monitor_database_client_txt'] = 'Cliente';
 $wb['monitor_database_domain_txt'] = 'Domínio';
-$wb['monitor_logs_mail_txt'] = 'Log - e-Mails';
-$wb['monitor_logs_mailwarn_txt'] = 'Log - Alertas de e-mail';
-$wb['monitor_logs_mailerr_txt'] = 'Log - Erros de e-mail';
+$wb['monitor_logs_mail_txt'] = 'Log - eMails';
+$wb['monitor_logs_mailwarn_txt'] = 'Log - Alertas de email';
+$wb['monitor_logs_mailerr_txt'] = 'Log - Erros de email';
 $wb['monitor_logs_messages_txt'] = 'Log - Mensagens do sistema';
-$wb['monitor_logs_ispccron_txt'] = 'Log - Tarefas no cron';
-$wb['monitor_logs_letsencrypt_txt'] = 'Let\'s Encrypt - Log';
-$wb['monitor_logs_freshclam_txt'] = 'Log - freshclam';
-$wb['monitor_logs_clamav_txt'] = 'Log - clamav';
+$wb['monitor_logs_ispccron_txt'] = 'Log - Tarefas no Cron';
+$wb['monitor_logs_letsencrypt_txt'] = 'Log - Let\\'s Encrypt';
+$wb['monitor_logs_freshclam_txt'] = 'Log - Freshclam';
+$wb['monitor_logs_clamav_txt'] = 'Log - Clamav';
 $wb['monitor_logs_ispc_txt'] = 'Log - ISPConfig';
-$wb['monitor_nosupportedraid1_txt'] = 'No momento possuímos suporte para \'mdadm\'ou \'mpt-status\' para monitoramento do RAID.<br> Não encontramos nenhum dos dois neste servidor.<br><br> Isto significa que não podemos oferecer suporte ao seu RAID ainda.';
+$wb['monitor_nosupportedraid1_txt'] = 'No momento possuímos suporte para \\'mdadm\\'ou \\'mpt-status\\' para monitoramento do RAID.<br> Não encontramos nenhum dos dois neste servidor.<br><br> Isto significa que não podemos oferecer suporte ao seu RAID ainda.';
 $wb['monitor_norkhunter_txt'] = 'O RKHunter não está instalado, desta forma, não existe log';
 $wb['monitor_serverstate_server_txt'] = 'Servidor';
 $wb['monitor_serverstate_kernel_txt'] = 'Kernel';
@@ -87,8 +85,8 @@ $wb['monitor_serverstate_critical_txt'] = 'crítico';
 $wb['monitor_serverstate_error_txt'] = 'erro';
 $wb['monitor_serverstate_moreinfo_txt'] = 'Mais informações...';
 $wb['monitor_serverstate_more_txt'] = 'Mais...';
-$wb['monitor_serverstate_fclamok_txt'] = 'A proteção anti-vírus está ok';
-$wb['monitor_serverstate_fclamoutdated_txt'] = 'A proteção anti-vírus está desatualizada!';
+$wb['monitor_serverstate_fclamok_txt'] = 'A proteção antivírus está ok';
+$wb['monitor_serverstate_fclamoutdated_txt'] = 'A proteção antivírus está desatualizada!';
 $wb['monitor_serverstate_fclamunknown_txt'] = 'Freshclam: ???!';
 $wb['monitor_serverstate_hdok_txt'] = 'O uso do disco está ok';
 $wb['monitor_serverstate_hdgoingfull_txt'] = 'O uso do disco está moderado';
@@ -108,12 +106,12 @@ $wb['monitor_serverstate_loadhigh_txt'] = 'O servidor está sob carga alta';
 $wb['monitor_serverstate_loaghigher_txt'] = 'O servidor está sob carga muito alta';
 $wb['monitor_serverstate_loadhighest_txt'] = 'O servidor está sob carga crítica';
 $wb['monitor_serverstate_loadunknown_txt'] = 'Carga do Servidor: ???';
-$wb['monitor_serverstate_mailqok_txt'] = 'A fila de e-mails está ok';
-$wb['monitor_serverstate_mailqheavy_txt'] = 'A fila de e-mails está moderada';
-$wb['monitor_serverstate_mailqhigh_txt'] = 'A fila de e-mails está grande';
+$wb['monitor_serverstate_mailqok_txt'] = 'A fila de emails está ok';
+$wb['monitor_serverstate_mailqheavy_txt'] = 'A fila de emails está moderada';
+$wb['monitor_serverstate_mailqhigh_txt'] = 'A fila de emails está grande';
 $wb['monitor_serverstate_mailqhigher_txt'] = 'A fila de está muito grande';
-$wb['monitor_serverstate_mailqhighest_txt'] = 'A fila de e-mails está crítica';
-$wb['monitor_serverstate_mailqunknown_txt'] = 'Fila de e-mails: ???';
+$wb['monitor_serverstate_mailqhighest_txt'] = 'A fila de emails está crítica';
+$wb['monitor_serverstate_mailqunknown_txt'] = 'Fila de emails: ???';
 $wb['monitor_serverstate_raidok_txt'] = 'O RAID está ok';
 $wb['monitor_serverstate_raidresync_txt'] = 'O RAID está em modo RESYNC';
 $wb['monitor_serverstate_raidfault_txt'] = 'O RAID possui uma disco com falha. Substitua o mais rápido possível!';
@@ -142,29 +140,27 @@ $wb['monitor_services_smtp_txt'] = 'Servidor SMTP:';
 $wb['monitor_services_pop_txt'] = 'Servidor POP3:';
 $wb['monitor_services_imap_txt'] = 'Servidor IMAP:';
 $wb['monitor_services_mydns_txt'] = 'Servidor DNS:';
-$wb['monitor_services_mongodb_txt'] = 'Servidor MONGODB:';
-$wb['monitor_services_mysql_txt'] = 'Servidor MYSQL:';
+$wb['monitor_services_mongodb_txt'] = 'Servidor MongoDB:';
+$wb['monitor_services_mysql_txt'] = 'Servidor MySQL:';
 $wb['monitor_settings_datafromdate_txt'] = 'Dados de: ';
 $wb['monitor_settings_datetimeformat_txt'] = 'd-m-Y H:i';
 $wb['monitor_settings_refreshsq_txt'] = 'Sequência de atualização:';
 $wb['monitor_settings_server_txt'] = 'Servidor';
 $wb['monitor_title_cpuinfo_txt'] = 'Informações de CPU';
 $wb['monitor_title_updatestate_txt'] = 'Atualizar Estado';
-$wb['monitor_title_mailq_txt'] = 'Fila de e-mails';
+$wb['monitor_title_mailq_txt'] = 'Fila de emails';
 $wb['monitor_title_raidstate_txt'] = 'Estado do RAID';
-$wb['monitor_title_rkhunterlog_txt'] = 'Log do rkhunter';
-$wb['monitor_title_fail2ban_txt'] = 'Log do fail2ban';
-$wb['monitor_title_mongodb_txt'] = 'Log do mongodb';
+$wb['monitor_title_rkhunterlog_txt'] = 'Log - RKHunter';
+$wb['monitor_title_fail2ban_txt'] = 'Log - Fail2ban';
+$wb['monitor_title_mongodb_txt'] = 'Log - MongoDB';
 $wb['monitor_title_iptables_txt'] = 'Regras de Firewall';
-$wb['monitor_title_beancounter_txt'] = 'Beancounter openvz';
+$wb['monitor_title_beancounter_txt'] = 'Beancounter OpenVZ';
 $wb['monitor_updates_nosupport_txt'] = 'Sua distribuição não é suportada por este monitoramento';
-$wb['monitor_beancounter_nosupport_txt'] = 'Este servidor não é um openvz e não possui nenhuma informação do beancounter';
+$wb['monitor_beancounter_nosupport_txt'] = 'Este servidor não é OpenVZ e não possui nenhuma informação de beancounter';
 $wb['Monit'] = 'Exibir Monit';
 $wb['no_monit_url_defined_txt'] = 'Nenhuma URL do Monit definida.';
 $wb['no_permissions_to_view_monit_txt'] = 'Você não tem permissão para acessar o Monit.';
 $wb['Munin'] = 'Exibir Munin';
 $wb['no_munin_url_defined_txt'] = 'Nenhuma URL do Munin definida.';
 $wb['no_permissions_to_view_munin_txt'] = 'Você não tem permissão para acessar o Munin.';
-$wb['Database size'] = 'Database size';
-$wb['MySQL Database size'] = 'MySQL Database size';
-?>
+$wb['Database size'] = 'Banco de Dados em uso';
diff --git a/interface/web/monitor/lib/lang/br_datalog_list.lng b/interface/web/monitor/lib/lang/br_datalog_list.lng
index 8e044daeb7..a9f0f5faad 100644
--- a/interface/web/monitor/lib/lang/br_datalog_list.lng
+++ b/interface/web/monitor/lib/lang/br_datalog_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['dbtable_txt'] = 'Tabela do BD';
 $wb['action_txt'] = 'Ação';
 $wb['status_txt'] = 'Estado';
-?>
diff --git a/interface/web/monitor/lib/lang/br_dataloghistory_list.lng b/interface/web/monitor/lib/lang/br_dataloghistory_list.lng
index 0a02fda077..894670052f 100644
--- a/interface/web/monitor/lib/lang/br_dataloghistory_list.lng
+++ b/interface/web/monitor/lib/lang/br_dataloghistory_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['dbtable_txt'] = 'Tabela do BD';
 $wb['action_txt'] = 'Ação';
 $wb['status_txt'] = 'Estado';
-?>
diff --git a/interface/web/monitor/lib/lang/br_dataloghistory_undo.lng b/interface/web/monitor/lib/lang/br_dataloghistory_undo.lng
index be544e6119..618505f243 100644
--- a/interface/web/monitor/lib/lang/br_dataloghistory_undo.lng
+++ b/interface/web/monitor/lib/lang/br_dataloghistory_undo.lng
@@ -4,4 +4,3 @@ $wb['success_txt'] = 'O comando "Desfazer ação" foi realizado com sucesso';
 $wb['error_txt'] = 'Erro durante desfazer ação: O registro não existe mais';
 $wb['error_undelete_txt'] = 'Erro durante a remoção: Registro com ID primário ainda existe.';
 $wb['btn_cancel_txt'] = 'Voltar';
-?>
diff --git a/interface/web/monitor/lib/lang/br_dataloghistory_view.lng b/interface/web/monitor/lib/lang/br_dataloghistory_view.lng
index 8354693280..0dc57666b8 100644
--- a/interface/web/monitor/lib/lang/br_dataloghistory_view.lng
+++ b/interface/web/monitor/lib/lang/br_dataloghistory_view.lng
@@ -12,7 +12,7 @@ $wb['fields_txt'] = 'Campos';
 $wb['fields_inserted_txt'] = 'Campos cadastrados';
 $wb['fields_updated_txt'] = 'Atualizar campos';
 $wb['fields_deleted_txt'] = 'Remover campos';
-$wb['no_changes_txt'] = 'Nenhuma alteração (sincronizar)';
+$wb['no_changes_txt'] = 'Nenhuma modificação (sincronizar)';
 $wb['is_diff_txt'] = 'As diferenças são destacadas';
 $wb['is_diff_inserts_txt'] = 'Inserções';
 $wb['is_diff_deletes_txt'] = 'Remoções';
@@ -23,4 +23,4 @@ $wb['new_txt'] = 'Novo';
 $wb['btn_cancel_txt'] = 'Voltar';
 $wb['undo_txt'] = 'Desfazer ação';
 $wb['undo_confirmation_txt'] = 'Você realmente deseja desfazer esta ação?';
-?>
+$wb['username_txt'] = 'Usuário';
diff --git a/interface/web/monitor/lib/lang/br_syslog_list.lng b/interface/web/monitor/lib/lang/br_syslog_list.lng
index ca5a373564..18543c9ad3 100644
--- a/interface/web/monitor/lib/lang/br_syslog_list.lng
+++ b/interface/web/monitor/lib/lang/br_syslog_list.lng
@@ -4,4 +4,3 @@ $wb['tstamp_txt'] = 'Data/hora';
 $wb['server_id_txt'] = 'Servidor';
 $wb['loglevel_txt'] = 'Nível';
 $wb['message_txt'] = 'Mensagem';
-?>
diff --git a/interface/web/monitor/lib/lang/cz.lng b/interface/web/monitor/lib/lang/cz.lng
index 4d40cba455..bf7d12d3df 100644
--- a/interface/web/monitor/lib/lang/cz.lng
+++ b/interface/web/monitor/lib/lang/cz.lng
@@ -19,33 +19,31 @@ $wb['no_data_mailq_txt'] = 'Nejsou k dispozici žádná data o mailové frontě.
 $wb['no_logdata_txt'] = 'Nejsou k dispozici žádná data logu. Prosím zkuste to později znova.';
 $wb['Monitoring'] = 'Monitorování';
 $wb['Server to Monitor'] = 'Monitorovat server';
-$wb['Logfiles'] = 'Log soubory';
+$wb['Logfiles'] = 'Záznamy protokolů';
 $wb['Status of services'] = 'Stav služeb';
 $wb['No Refresh'] = 'Neobnovovat';
 $wb['minutes'] = 'minut';
-$wb['Overview'] = 'Zobrazit přehled';
+$wb['Overview'] = 'Přehled';
 $wb['System State (All Servers)'] = 'Stav systému (servery)';
 $wb['Hardware-Information'] = 'Informace o hardwaru';
-$wb['CPU info'] = 'Zobrazit informace o CPU';
+$wb['CPU info'] = 'Informace o procesoru';
 $wb['Server State'] = 'Stav serveru';
-$wb['Update State'] = 'Zobrazit stav aktualizací';
-$wb['RAID state'] = 'Zobrazit stav RAID polí';
-$wb['Server load'] = 'Zobrazit zatížení serveru';
-$wb['Disk usage'] = 'Zobrazit využití disku';
-$wb['Memory usage'] = 'Zobrazit využití paměti';
-$wb['Services'] = 'Zobrazit služby';
-$wb['Mail-Queue'] = 'Zobrazit e-mailovou frontu';
-$wb['Mail-Log'] = 'Zobrazit e-mailový log';
-$wb['Mail warn-Log'] = 'Zobrazit e-mailový log varování';
-$wb['Mail err-Log'] = 'Zobrazit e-mailový log chyb';
-$wb['System-Log'] = 'Zobrazit systémový log';
-$wb['ISPC Cron-Log'] = 'Zobrazit ISPConfig cron log';
-$wb['Freshclam-Log'] = 'Zobrazit Freshclam log';
-$wb['Let\'s Encrypt log'] = 'Let\'s Encrypt log';
-$wb['Clamav-Log'] = 'Zobrazit Clamav log';
-$wb['ISPConfig-Log'] = 'Zobrazit ISPConfig log';
-$wb['RKHunter-Log'] = 'Zobrazit RKHunter log';
-$wb['Jobqueue'] = 'Zobrazit frontu úloh';
+$wb['Update State'] = 'Stav aktualizace';
+$wb['RAID state'] = 'Stav pole RAID';
+$wb['Server load'] = 'Zátěž serveru';
+$wb['Services'] = 'Služby';
+$wb['Mail-Queue'] = 'Poštovní fronta';
+$wb['Mail-Log'] = 'Protokol pošty';
+$wb['Mail warn-Log'] = 'Pošta varovný protokol';
+$wb['Mail err-Log'] = 'Pošta chybový protokol';
+$wb['System-Log'] = 'Systémový protokol';
+$wb['ISPC Cron-Log'] = 'ISPC Cron protokol';
+$wb['Freshclam-Log'] = 'Freshclam protokol';
+$wb['Let's Encrypt log'] = 'Let\\'s Encrypt log';
+$wb['Clamav-Log'] = 'Clamav protokol';
+$wb['ISPConfig-Log'] = 'ISPConfig protokol';
+$wb['RKHunter-Log'] = 'RKHunter protokol';
+$wb['Jobqueue'] = 'Fronta úloh';
 $wb['monitor_general_serverstate_txt'] = 'Stav serveru';
 $wb['monitor_general_systemstate_txt'] = 'Stav systému';
 $wb['monitor_diskusage_filesystem_txt'] = 'Souborový systém';
@@ -55,15 +53,15 @@ $wb['monitor_diskusage_used_txt'] = 'Užito';
 $wb['monitor_diskusage_available_txt'] = 'Volné';
 $wb['monitor_diskusage_usage_txt'] = 'Užití%';
 $wb['monitor_diskusage_mounted_txt'] = 'Připojeno na';
-$wb['monitor_logs_mail_txt'] = 'E-mail - Log';
-$wb['monitor_logs_mailwarn_txt'] = 'E-mail - Varování - Log';
-$wb['monitor_logs_mailerr_txt'] = 'E-mail - Chyby - Log';
-$wb['monitor_logs_messages_txt'] = 'Systénové zprávy - Log';
-$wb['monitor_logs_ispccron_txt'] = 'ISPConfig cron - Log';
-$wb['monitor_logs_letsencrypt_txt'] = 'Let\'s Encrypt - Log';
-$wb['monitor_logs_freshclam_txt'] = 'Freshclam - Log';
-$wb['monitor_logs_clamav_txt'] = 'ClamAV - Log';
-$wb['monitor_logs_ispc_txt'] = 'ISPConfig - Log';
+$wb['monitor_logs_mail_txt'] = 'Protokol pošty';
+$wb['monitor_logs_mailwarn_txt'] = 'Pošta varovný protokol';
+$wb['monitor_logs_mailerr_txt'] = 'Pošta chybový protokol';
+$wb['monitor_logs_messages_txt'] = 'Systémové zprávy protokol';
+$wb['monitor_logs_ispccron_txt'] = 'ISPConfig cron protokol';
+$wb['monitor_logs_letsencrypt_txt'] = 'Let\\'s Encrypt protokol';
+$wb['monitor_logs_freshclam_txt'] = 'Freshclam protokol';
+$wb['monitor_logs_clamav_txt'] = 'ClamAV protokol';
+$wb['monitor_logs_ispc_txt'] = 'ISPConfig protokol';
 $wb['monitor_norkhunter_txt'] = 'RKHunter není nainstalován, proto zde nejsou žádna data';
 $wb['monitor_serverstate_server_txt'] = 'Server';
 $wb['monitor_serverstate_kernel_txt'] = 'Kernel';
@@ -96,12 +94,12 @@ $wb['monitor_serverstate_loadhigh_txt'] = 'Server vysoce zatížen';
 $wb['monitor_serverstate_loaghigher_txt'] = 'Server pod vyšším zatížením';
 $wb['monitor_serverstate_loadhighest_txt'] = 'Server pod nejvyšším zatížením';
 $wb['monitor_serverstate_loadunknown_txt'] = 'Zatížení serveru: ???';
-$wb['monitor_serverstate_mailqok_txt'] = 'Zatížení e-mailové fronty je vpořádku';
-$wb['monitor_serverstate_mailqheavy_txt'] = 'E-mailová fronta těžce zatížena';
-$wb['monitor_serverstate_mailqhigh_txt'] = 'E-mailová fronta vysoce zatížena';
-$wb['monitor_serverstate_mailqhigher_txt'] = 'E-mailová fronta je pod vyšším zatížením';
-$wb['monitor_serverstate_mailqhighest_txt'] = 'E-mailová fronta pod nejvyšším zatížením';
-$wb['monitor_serverstate_mailqunknown_txt'] = 'E-mailová fronta: ???';
+$wb['monitor_serverstate_mailqok_txt'] = 'Zatížení poštovní fronty je vpořádku';
+$wb['monitor_serverstate_mailqheavy_txt'] = 'Poštovní fronta těžce zatížena';
+$wb['monitor_serverstate_mailqhigh_txt'] = 'Poštovní fronta vysoce zatížena';
+$wb['monitor_serverstate_mailqhigher_txt'] = 'Poštovní fronta je pod vyšším zatížením';
+$wb['monitor_serverstate_mailqhighest_txt'] = 'Poštovní fronta pod nejvyšším zatížením';
+$wb['monitor_serverstate_mailqunknown_txt'] = 'Poštovní fronta: ???';
 $wb['monitor_serverstate_raidok_txt'] = 'RAID pole je vpořádku';
 $wb['monitor_serverstate_raidresync_txt'] = 'RAID pole je v RESYNC módu';
 $wb['monitor_serverstate_raidfault_txt'] = 'RAID pole má jeden POŠKOZENÝ disk. Vyměňte jej co nejdříve!';
@@ -110,10 +108,10 @@ $wb['monitor_serverstate_raidunknown_txt'] = 'Stav RAID pole: ???';
 $wb['monitor_serverstate_servicesonline_txt'] = 'Všechny požadované služby jsou online';
 $wb['monitor_serverstate_servicesoffline_txt'] = 'Jedna nebo více požadovaných služeb jsou offline';
 $wb['monitor_serverstate_servicesunknown_txt'] = 'Služby: ???';
-$wb['monitor_serverstate_syslogok_txt'] = 'Systémový log je vpořádku';
-$wb['monitor_serverstate_syslogwarning_txt'] = 'V systémovém logu jsou varování';
-$wb['monitor_serverstate_syslogerror_txt'] = 'V systémovém logu jsou chyby';
-$wb['monitor_serverstate_syslogunknown_txt'] = 'Systémový log: ???';
+$wb['monitor_serverstate_syslogok_txt'] = 'Systémový protokol je vpořádku';
+$wb['monitor_serverstate_syslogwarning_txt'] = 'V systémovém protokolu jsou varování';
+$wb['monitor_serverstate_syslogerror_txt'] = 'V systémovém protokolu jsou chyby';
+$wb['monitor_serverstate_syslogunknown_txt'] = 'Systémový protokol: ???';
 $wb['monitor_serverstate_updatesok_txt'] = 'Systém je aktuální.';
 $wb['monitor_serverstate_updatesneeded_txt'] = 'Jedna nebo více komponent potřebují zaktualizovat';
 $wb['monitor_serverstate_updatesunknown_txt'] = 'Systémová aktualizace: ???';
@@ -125,17 +123,17 @@ $wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
 $wb['monitor_services_pop_txt'] = 'POP3-Server:';
 $wb['monitor_services_imap_txt'] = 'IMAP-Server:';
 $wb['monitor_services_mydns_txt'] = 'DNS-Server:';
-$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
+$wb['monitor_services_mysql_txt'] = 'MySQL-Server:';
 $wb['monitor_settings_datafromdate_txt'] = 'Data z: ';
 $wb['monitor_settings_datetimeformat_txt'] = 'Y-d-m H:i';
 $wb['monitor_settings_refreshsq_txt'] = 'Obnovování:';
 $wb['monitor_settings_server_txt'] = 'Server';
-$wb['monitor_title_cpuinfo_txt'] = 'Informace o CPU';
+$wb['monitor_title_cpuinfo_txt'] = 'Informace o procesoru';
 $wb['monitor_title_updatestate_txt'] = 'Stav aktualizace';
-$wb['monitor_title_mailq_txt'] = 'E-mailová fronta';
+$wb['monitor_title_mailq_txt'] = 'Poštovní fronta';
 $wb['monitor_title_raidstate_txt'] = 'Stav pole RAID';
-$wb['monitor_title_rkhunterlog_txt'] = 'RKHunter log';
-$wb['monitor_title_fail2ban_txt'] = 'Fail2Ban log';
+$wb['monitor_title_rkhunterlog_txt'] = 'RKHunter protokol';
+$wb['monitor_title_fail2ban_txt'] = 'Fail2Ban protokol';
 $wb['monitor_updates_nosupport_txt'] = 'Vaše distribuce nepodporuje toto monitorování';
 $wb['monitor_nosupportedraid1_txt'] = 'V současné době, podporujeme nástroje mdadm nebo MPT-stav pro sledování sofwarových RAID polí.<br>Nemůžeme najít žádné z nich na serveru.<br><br>To znamená, že nemůžeme monitorovat váš RAID.';
 $wb['monitor_serverstate_beancounterok_txt'] = 'Soubor čítačů (limitů) je v pořádku';
@@ -145,25 +143,24 @@ $wb['monitor_serverstate_beancountercritical_txt'] = 'Existuje mnoho selhání 
 $wb['monitor_serverstate_beancountererror_txt'] = 'Existuje příliš mnoho selhání čítačů (limitů)';
 $wb['monitor_title_beancounter_txt'] = 'OpenVz VE čítače (limity)';
 $wb['monitor_beancounter_nosupport_txt'] = 'Tento server nemá nainstalován VE OpenVZ a proto nemá beancounter informace';
-$wb['monitor_title_iptables_txt'] = 'IPTables Pravidla';
-$wb['fail2ban-Log'] = 'Zobrazit Fail2Ban Log';
-$wb['IPTables'] = 'Zobrazit IPTables pravidla';
-$wb['OpenVz VE BeanCounter'] = 'Zobrazit OpenVz VE BeanCounter';
-$wb['Monit'] = 'Zobrazit Monit';
+$wb['monitor_title_iptables_txt'] = 'IPTables pravidla';
+$wb['fail2ban-Log'] = 'Fail2ban protokol';
+$wb['IPTables'] = 'IPTables';
+$wb['OpenVz VE BeanCounter'] = 'OpenVz VE BeanCounter';
+$wb['Monit'] = 'Monit';
 $wb['no_monit_url_defined_txt'] = 'Monit URL adresa není nastavena.';
 $wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
-$wb['Munin'] = 'Zobrazit Munin';
+$wb['Munin'] = 'Munin';
 $wb['no_munin_url_defined_txt'] = 'Munin URL adresa není nastavena.';
 $wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 $wb['no_data_database_size_txt'] = 'No data about the database usage available at the moment. Please check again later.';
-$wb['MongoDB-Log'] = 'MongoDB-Log';
+$wb['MongoDB-Log'] = 'MongoDB protokol';
 $wb['monitor_database_name_txt'] = 'Databáze';
 $wb['monitor_database_size_txt'] = 'Velikost';
 $wb['monitor_database_client_txt'] = 'Klient';
 $wb['monitor_database_domain_txt'] = 'Doména';
 $wb['monitor_services_mongodb_txt'] = 'MongoDB-Server:';
 $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
-$wb['Data Log History'] = 'Zobrazit historii datového logu';
-$wb['Database size'] = 'Database size';
-$wb['MySQL Database size'] = 'MySQL Database size';
-?>
+$wb['Data Log History'] = 'Protokol historie datového logu';
+$wb['Database size'] = 'Velikost databáze';
+$wb['MySQL Database size'] = 'Velikost databází MySQL';
diff --git a/interface/web/monitor/lib/lang/cz_datalog_list.lng b/interface/web/monitor/lib/lang/cz_datalog_list.lng
index c9e9a86555..20feba64d8 100644
--- a/interface/web/monitor/lib/lang/cz_datalog_list.lng
+++ b/interface/web/monitor/lib/lang/cz_datalog_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['dbtable_txt'] = 'DB tabulka';
 $wb['action_txt'] = 'Akce';
 $wb['status_txt'] = 'Stav';
-?>
diff --git a/interface/web/monitor/lib/lang/cz_dataloghistory_list.lng b/interface/web/monitor/lib/lang/cz_dataloghistory_list.lng
index ce89af1a88..c7600817bd 100644
--- a/interface/web/monitor/lib/lang/cz_dataloghistory_list.lng
+++ b/interface/web/monitor/lib/lang/cz_dataloghistory_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['dbtable_txt'] = 'DB Tabulka';
 $wb['action_txt'] = 'Akce';
 $wb['status_txt'] = 'Stav';
-?>
diff --git a/interface/web/monitor/lib/lang/cz_dataloghistory_undo.lng b/interface/web/monitor/lib/lang/cz_dataloghistory_undo.lng
index 0d25364ec1..133fd16548 100644
--- a/interface/web/monitor/lib/lang/cz_dataloghistory_undo.lng
+++ b/interface/web/monitor/lib/lang/cz_dataloghistory_undo.lng
@@ -4,4 +4,3 @@ $wb['success_txt'] = 'Undo successful';
 $wb['error_txt'] = 'Error during undo: Record does not exist anymore';
 $wb['error_undelete_txt'] = 'Error during undelete: Record with primary id already existing.';
 $wb['btn_cancel_txt'] = 'Zpět';
-?>
diff --git a/interface/web/monitor/lib/lang/cz_dataloghistory_view.lng b/interface/web/monitor/lib/lang/cz_dataloghistory_view.lng
index 1f20cf12d4..929971c9b9 100644
--- a/interface/web/monitor/lib/lang/cz_dataloghistory_view.lng
+++ b/interface/web/monitor/lib/lang/cz_dataloghistory_view.lng
@@ -2,7 +2,7 @@
 $wb['i'] = 'Vložit';
 $wb['u'] = 'Aktualizace';
 $wb['d'] = 'Odstranit';
-$wb['list_head_txt'] = 'Záznam historie datového logu';
+$wb['list_head_txt'] = 'Záznam historie datového protokolu';
 $wb['id_txt'] = 'ID';
 $wb['timestamp_txt'] = 'Časové razítko';
 $wb['table_txt'] = 'Tabulka';
@@ -23,4 +23,4 @@ $wb['new_txt'] = 'Nový';
 $wb['btn_cancel_txt'] = 'Zpět';
 $wb['undo_txt'] = 'Vrátit akci';
 $wb['undo_confirmation_txt'] = 'Opravdu chcete tuto akci vrátit zpět ?';
-?>
+$wb['username_txt'] = 'Username';
diff --git a/interface/web/monitor/lib/lang/cz_syslog_list.lng b/interface/web/monitor/lib/lang/cz_syslog_list.lng
index 990662552b..5d5ce8f8c1 100644
--- a/interface/web/monitor/lib/lang/cz_syslog_list.lng
+++ b/interface/web/monitor/lib/lang/cz_syslog_list.lng
@@ -1,7 +1,6 @@
 <?php
-$wb['list_head_txt'] = 'ISPConfig log';
+$wb['list_head_txt'] = 'ISPConfig protokol';
 $wb['tstamp_txt'] = 'Datum';
 $wb['server_id_txt'] = 'Server';
-$wb['loglevel_txt'] = 'Logovací úroveň';
+$wb['loglevel_txt'] = 'Úroveň protokolu';
 $wb['message_txt'] = 'Zpráva';
-?>
diff --git a/interface/web/sites/lib/lang/br.lng b/interface/web/sites/lib/lang/br.lng
index 8710dc1140..fccf1b33b6 100644
--- a/interface/web/sites/lib/lang/br.lng
+++ b/interface/web/sites/lib/lang/br.lng
@@ -4,20 +4,20 @@ $wb['Website'] = 'Site';
 $wb['Subdomain'] = 'Subdomínio';
 $wb['Aliasdomain'] = 'Alias de domínio';
 $wb['Database'] = 'Banco de dados';
-$wb['Database User'] = 'Usuários do banco de dados';
-$wb['Web Access'] = 'Acesso web';
-$wb['FTP-User'] = 'Usuários ftp';
-$wb['Webdav-User'] = 'Usuários webdav';
-$wb['Folder'] = 'Pastas protegidas';
-$wb['Folder users'] = 'Usuários de pastas protegidas';
+$wb['Database User'] = 'Usuários do Banco de Dados';
+$wb['Web Access'] = 'Acesso Web';
+$wb['FTP-User'] = 'Usuários FTP';
+$wb['Webdav-User'] = 'Usuários Webdav';
+$wb['Folder'] = 'Pastas Web';
+$wb['Folder users'] = 'Usuários de Pastas Web';
 $wb['Command Line'] = 'Linha de comando';
-$wb['Shell-User'] = 'Usuários do shell';
-$wb['Cron Jobs'] = 'Tarefas no cron';
+$wb['Shell-User'] = 'Usuários shell';
+$wb['Cron Jobs'] = 'Tarefas no Cron';
 $wb['Statistics'] = 'Estatísticas';
-$wb['Web traffic'] = 'Tráfego web';
-$wb['FTP traffic'] = 'Tráfego ftp';
+$wb['Web traffic'] = 'Tráfego Web';
+$wb['FTP traffic'] = 'Tráfego FTP';
 $wb['Website quota (Harddisk)'] = 'Cota de site (disco)';
-$wb['Database quota'] = 'Cota do banco de dados';
+$wb['Database quota'] = 'Cota do Banco de Dados';
 $wb['Backup Stats'] = 'Estatísticas de backups';
 $wb['Cron'] = 'Cron';
 $wb['Stats'] = 'Estatísticas';
@@ -35,4 +35,3 @@ $wb['Installed packages'] = 'Pacotes instalados';
 $wb['Update Packagelist'] = 'Atualizar lista de pacotes';
 $wb['Subdomain (Vhost)'] = 'Subdomínio (vhost)';
 $wb['error_proxy_requires_url'] = 'O tipo de redirecionamento "proxy" exige uma URL como caminho de redirecionamento.';
-?>
diff --git a/interface/web/sites/lib/lang/br_aps.lng b/interface/web/sites/lib/lang/br_aps.lng
index 744c215192..a6381c726b 100644
--- a/interface/web/sites/lib/lang/br_aps.lng
+++ b/interface/web/sites/lib/lang/br_aps.lng
@@ -18,9 +18,9 @@ $wb['license_txt'] = 'Licença';
 $wb['screenshots_txt'] = 'Captura de telas';
 $wb['changelog_txt'] = 'Mudanças Recentes';
 $wb['server_requirements_txt'] = 'Requisitos do Servidor';
-$wb['php_extensions_txt'] = 'Extensões php';
-$wb['php_settings_txt'] = 'Configurações php';
-$wb['supported_php_versions_txt'] = 'Versões do php suportadas';
+$wb['php_extensions_txt'] = 'Extensões PHP';
+$wb['php_settings_txt'] = 'Configurações PHP';
+$wb['supported_php_versions_txt'] = 'Versões PHP suportadas';
 $wb['database_txt'] = 'Banco de Dados';
 $wb['settings_txt'] = 'Configurações';
 $wb['install_package_txt'] = 'Instalar este pacote';
@@ -31,7 +31,7 @@ $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['acceptance_txt'] = 'Aceitar a licença';
 $wb['acceptance_text_txt'] = 'Sim, li e aceito os termos da licença.';
 $wb['install_language_txt'] = 'Idioma da interface';
-$wb['new_database_password_txt'] = 'Nova senha do banco de dados';
+$wb['new_database_password_txt'] = 'Nova senha do Banco de Dados';
 $wb['basic_settings_txt'] = 'Configurações básicas';
 $wb['package_settings_txt'] = 'Configurações de pacotes';
 $wb['error_main_domain'] = 'O domínio para a instalação é inválido.';
@@ -39,12 +39,12 @@ $wb['error_no_main_location'] = 'Não foi informado um caminho válido para a in
 $wb['error_inv_main_location'] = 'Local da pasta de instalação informado é inválido.';
 $wb['error_license_agreement'] = 'Para continuar é necessário aceitar os termos da licença.';
 $wb['error_no_database_pw'] = 'Não foi informado uma senha válida para o banco de dados.';
-$wb['error_short_database_pw'] = 'Por favor informe uma senha do banco de dados com maior complexidade.';
-$wb['error_no_value_for'] = 'O campo "%s" não pode estar está em branco.';
+$wb['error_short_database_pw'] = 'Por favor informe uma senha do Banco de Dados com maior complexidade.';
+$wb['error_no_value_for'] = 'O campo "%s" não pode estar vazio.';
 $wb['error_short_value_for'] = 'O campo "%s" requer um valor de entrada maior.';
 $wb['error_long_value_for'] = 'O campo "%s" requer um valor de entrada menor.';
 $wb['error_inv_value_for'] = 'O valor informado no campo "%s" é inválido.';
-$wb['error_inv_email_for'] = 'O e-mail informado no campo "%s" é inválido.';
+$wb['error_inv_email_for'] = 'O email informado no campo "%s" é inválido.';
 $wb['error_inv_domain_for'] = 'O domínio informado no campo "%s" é inválido.';
 $wb['error_inv_integer_for'] = 'O número informado no campo "%s" é inválido.';
 $wb['error_inv_float_for'] = 'O número de ponto flutuante informado no campo "%s" é inválido.';
@@ -60,4 +60,3 @@ $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
-?>
diff --git a/interface/web/sites/lib/lang/br_aps_instances_list.lng b/interface/web/sites/lib/lang/br_aps_instances_list.lng
index da5b80d68e..e28f81bba7 100644
--- a/interface/web/sites/lib/lang/br_aps_instances_list.lng
+++ b/interface/web/sites/lib/lang/br_aps_instances_list.lng
@@ -8,4 +8,3 @@ $wb['install_location_txt'] = 'Local da instalação';
 $wb['pkg_delete_confirmation'] = 'Deseja realmente remover esta instalação?';
 $wb['filter_txt'] = 'Pesquisar';
 $wb['delete_txt'] = 'Remover';
-?>
diff --git a/interface/web/sites/lib/lang/br_aps_packages_list.lng b/interface/web/sites/lib/lang/br_aps_packages_list.lng
index bbd0e1ad3d..b9ea2d4e9a 100644
--- a/interface/web/sites/lib/lang/br_aps_packages_list.lng
+++ b/interface/web/sites/lib/lang/br_aps_packages_list.lng
@@ -5,4 +5,3 @@ $wb['version_txt'] = 'Versão';
 $wb['category_txt'] = 'Categoria';
 $wb['status_txt'] = 'Desbloqueado';
 $wb['filter_txt'] = 'Pesquisar';
-?>
diff --git a/interface/web/sites/lib/lang/br_aps_update_packagelist.lng b/interface/web/sites/lib/lang/br_aps_update_packagelist.lng
index b81640384c..46d4c79d83 100644
--- a/interface/web/sites/lib/lang/br_aps_update_packagelist.lng
+++ b/interface/web/sites/lib/lang/br_aps_update_packagelist.lng
@@ -1,7 +1,6 @@
 <?php
 $wb['head_txt'] = 'Atualizar lista de pacotes';
-$wb['list_desc_txt'] = '';
+$wb['list_desc_txt'] = 'Descrição';
 $wb['btn_start_txt'] = 'Atualizar lista de pacotes';
 $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['legend_txt'] = 'Aqui é possível atualizar a lista de pacotes disponíveis. Por favor, observe que esta operação pode demorar vários minutos. Você poderá sair dessa página se quiser; o processo continuará a execução em segundo plano.';
-?>
diff --git a/interface/web/sites/lib/lang/br_backup_stats_list.lng b/interface/web/sites/lib/lang/br_backup_stats_list.lng
index 932ad5dba7..6437fa7748 100644
--- a/interface/web/sites/lib/lang/br_backup_stats_list.lng
+++ b/interface/web/sites/lib/lang/br_backup_stats_list.lng
@@ -7,4 +7,3 @@ $wb['backup_count_txt'] = 'Contador de backups';
 $wb['backup_server_txt'] = 'Servidor';
 $wb['backup_interval_txt'] = 'Intervalo entre backups';
 $wb['backup_size_txt'] = 'Tamanho do backup';
-?>
diff --git a/interface/web/sites/lib/lang/br_cron.lng b/interface/web/sites/lib/lang/br_cron.lng
index 3f62c0629f..19aa1e96dc 100644
--- a/interface/web/sites/lib/lang/br_cron.lng
+++ b/interface/web/sites/lib/lang/br_cron.lng
@@ -9,18 +9,18 @@ $wb['run_mday_txt'] = 'Dias do mês';
 $wb['run_month_txt'] = 'Meses';
 $wb['run_wday_txt'] = 'Dias da semana';
 $wb['command_txt'] = 'Comando a executar (comandos são executados através do sh, urls através do wget)';
-$wb['limit_cron_txt'] = 'O limite de tarefas no cron foi alcançado.';
-$wb['limit_cron_frequency_txt'] = 'O limite de execuções das tarefas no cron foi alcançado.';
+$wb['limit_cron_txt'] = 'O limite de tarefas no Cron foi alcançado.';
+$wb['limit_cron_frequency_txt'] = 'O limite de execuções das tarefas no Cron foi alcançado.';
 $wb['run_min_error_format'] = 'Formato inválido para minutos.';
 $wb['run_hour_error_format'] = 'Formato inválido para horas.';
 $wb['run_mday_error_format'] = 'Formato inválido para dias do mês.';
 $wb['run_month_error_format'] = 'Formato inválido para meses.';
 $wb['run_wday_error_format'] = 'Formato inválido para dias da semana.';
-$wb['command_error_format'] = 'Comando possui formato inválido. Por favor, observe que em alguns casos somente chamadas http/https são permitidas.';
+$wb['command_error_format'] = 'Comando possui formato inválido. Por favor, observe que em alguns casos somente chamadas HTTP/HTTPS são permitidas.';
 $wb['unknown_fieldtype_error'] = 'Um tipo de campo desconhecido foi utilizado.';
-$wb['server_id_error_empty'] = 'O servidor está em branco.';
+$wb['server_id_error_empty'] = 'O servidor está vazio.';
 $wb['command_hint_txt'] = 'ex.: /var/www/clients/clientX/webY/myscript.sh ou https://www.dominio.com.br/caminho/script.php, você pode utilizar a área reservada [web_root] para substituir /var/www/clients/clientX/webY/web.';
 $wb['log_output_txt'] = 'Gravar saída do log';
-$wb['limit_cron_url_txt'] = 'Somente URL no cron. Por favor insira uma URL iniciando com https:// como um comando no cron.';
-$wb['command_error_empty'] = 'Comando a executar está em branco.';
-?>
+$wb['limit_cron_url_txt'] = 'Somente URL no Cron. Por favor insira uma URL iniciando com https:// como um comando no Cron.';
+$wb['command_error_empty'] = 'Comando a executar está vazio.';
+$wb['Cron Job'] = 'Tarefas no Cron';
diff --git a/interface/web/sites/lib/lang/br_cron_list.lng b/interface/web/sites/lib/lang/br_cron_list.lng
index 31017512d3..a571329fdb 100644
--- a/interface/web/sites/lib/lang/br_cron_list.lng
+++ b/interface/web/sites/lib/lang/br_cron_list.lng
@@ -1,5 +1,5 @@
 <?php
-$wb['list_head_txt'] = 'Tarefas no cron';
+$wb['list_head_txt'] = 'Tarefas no Cron';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['run_min_txt'] = 'Minuto';
@@ -8,6 +8,5 @@ $wb['run_mday_txt'] = 'Dia do mês';
 $wb['run_month_txt'] = 'Mês';
 $wb['run_wday_txt'] = 'Dia da semana';
 $wb['command_txt'] = 'Comando';
-$wb['add_new_cron_txt'] = 'Adicionar nova tarefa no cron';
+$wb['add_new_cron_txt'] = 'Adicionar nova tarefa no Cron';
 $wb['parent_domain_id_txt'] = 'Site';
-?>
diff --git a/interface/web/sites/lib/lang/br_database.lng b/interface/web/sites/lib/lang/br_database.lng
index 2e5fcd72e5..7e872a31bb 100644
--- a/interface/web/sites/lib/lang/br_database.lng
+++ b/interface/web/sites/lib/lang/br_database.lng
@@ -1,33 +1,33 @@
 <?php
 $wb['server_id_txt'] = 'Servidor';
 $wb['type_txt'] = 'Tipo';
-$wb['database_name_txt'] = 'Nome do banco de dados';
-$wb['database_user_txt'] = 'Usuário do banco de dados';
+$wb['database_name_txt'] = 'Nome do Banco de Dados';
+$wb['database_user_txt'] = 'Usuário do Banco de Dados';
 $wb['database_ro_user_txt'] = 'Usuário somente leitura';
 $wb['optional_txt'] = 'opcional';
-$wb['database_password_txt'] = 'Senha do banco de dados';
+$wb['database_password_txt'] = 'Senha do Banco de Dados';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
-$wb['database_charset_txt'] = 'Charset do banco de dados';
+$wb['database_charset_txt'] = 'Charset do Banco de Dados';
 $wb['select_dbuser_txt'] = 'Selecionar usuário';
 $wb['no_dbuser_txt'] = 'Nenhum';
 $wb['remote_access_txt'] = 'Acesso Remoto';
-$wb['remote_ips_txt'] = 'Endereços IP para acesso remoto (separado por vírgula ou deixe em branco para <i>qualquer um</i>)';
+$wb['remote_ips_txt'] = 'Endereços IP para acesso remoto (separado por vírgula ou deixe vazio para <i>qualquer um</i>)';
 $wb['database_remote_error_ips'] = 'Ao menos um endereço IP informado é inválido.';
 $wb['client_txt'] = 'Cliente';
 $wb['active_txt'] = 'Ativo';
 $wb['database_client_differs_txt'] = 'O cliente do site pai e o banco de dados não coincidem.';
-$wb['database_name_error_empty'] = 'Nome do banco de dados está em branco.';
+$wb['database_name_error_empty'] = 'Nome do Banco de Dados está vazio.';
 $wb['database_name_error_unique'] = 'Já existe um banco de dados com este nome no servidor. Para ter um nome exclusivo, por exemplo, insira o domínio como prefixo do nome.';
-$wb['database_name_error_regex'] = 'Nome do banco de dados é inválido. O nome do banco de dados pode conter os seguintes caracteres: a-z, A-Z, 0-9 e underscore. Comprimento 2 - 64 caracteres.';
-$wb['database_user_error_empty'] = 'Usuário do banco de dados está em branco.';
-$wb['database_user_error_unique'] = 'Já existe um usuário de banco de dados com esse nome. Para ter um nome exclusivo, por exemplo, insira o domínio como prefixo do nome.';
-$wb['database_user_error_regex'] = 'Usuário do banco de dados é inválido. O nome do usuário pode conter os seguintes caracteres: a-z, A-Z, 0-9 e underscore. Comprimento: 2 a 16 caracteres.';
-$wb['limit_database_txt'] = 'O limite de banco de dados foi alcançado para esta conta.';
-$wb['database_name_change_txt'] = 'O nome do banco de dados não pode ser alterado.';
+$wb['database_name_error_regex'] = 'Nome do Banco de Dados é inválido. O nome do Banco de Dados pode conter os seguintes caracteres: a-z, A-Z, 0-9 e underscore. Comprimento 2 - 64 caracteres.';
+$wb['database_user_error_empty'] = 'Usuário do Banco de Dados está vazio.';
+$wb['database_user_error_unique'] = 'Já existe um usuário do Banco de Dados com esse nome. Para ter um nome exclusivo, por exemplo, insira o domínio como prefixo do nome.';
+$wb['database_user_error_regex'] = 'Usuário do Banco de Dados é inválido. O nome do usuário pode conter os seguintes caracteres: a-z, A-Z, 0-9 e underscore. Comprimento: 2 a 64 caracteres.';
+$wb['limit_database_txt'] = 'O limite do Banco de Dados foi alcançado para esta conta.';
+$wb['database_name_change_txt'] = 'O nome do Banco de Dados não pode ser modificado.';
 $wb['database_user_missing_txt'] = 'Por favor, selecione um usuário para este banco de dados.';
-$wb['database_charset_change_txt'] = 'O charset do banco de dados não pode ser alterado.';
-$wb['database_name_error_len'] = 'Nome do banco de dados - {db} - muito longo. O comprimento do nome do banco de dados, incluindo o prefixo, são 64 caracteres.';
-$wb['database_user_error_len'] = 'Nome do usuário do banco de dados - {user} - muito longo. O comprimento do nome do usuário, incluindo o prefixo, são 16 caracteres.';
+$wb['database_charset_change_txt'] = 'O charset do Banco de Dados não pode ser modificado.';
+$wb['database_name_error_len'] = 'Nome do Banco de Dados - {db} - muito longo. O comprimento do nome do Banco de Dados, incluindo o prefixo, são 64 caracteres.';
+$wb['database_user_error_len'] = 'Nome do usuário do Banco de Dados - {user} - muito longo. O comprimento do nome do usuário, incluindo o prefixo, são 16 caracteres.';
 $wb['parent_domain_id_txt'] = 'Site';
 $wb['database_site_error_empty'] = 'Selecione o site ao qual o banco de dados pertence.';
 $wb['select_site_txt'] = '-Selecionar Site-';
@@ -43,8 +43,7 @@ $wb['globalsearch_noresults_text_txt'] = 'Sem resultados.';
 $wb['globalsearch_noresults_limit_txt'] = '0 resultados';
 $wb['globalsearch_searchfield_watermark_txt'] = 'Pesquisar';
 $wb['globalsearch_suggestions_text_txt'] = 'Sugestões';
-$wb['limit_database_quota_txt'] = 'Cota do banco de dados';
-$wb['limit_database_quota_error_notint'] = 'O limite da cota do banco de dados deve ser um número.';
-$wb['limit_database_quota_free_txt'] = 'Limite da cota do banco de dados disponível';
-$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
-?>
+$wb['limit_database_quota_txt'] = 'Cota do Banco de Dados';
+$wb['limit_database_quota_error_notint'] = 'A cota do Banco de Dados deve ser um número.';
+$wb['limit_database_quota_free_txt'] = 'Cota do Banco de Dados disponível';
+$wb['limit_database_quota_not_0_txt'] = 'Database quota can not be 0';
diff --git a/interface/web/sites/lib/lang/br_database_admin_list.lng b/interface/web/sites/lib/lang/br_database_admin_list.lng
index eef9b6e3fa..1e8f4f303a 100644
--- a/interface/web/sites/lib/lang/br_database_admin_list.lng
+++ b/interface/web/sites/lib/lang/br_database_admin_list.lng
@@ -4,9 +4,8 @@ $wb['active_txt'] = 'Ativo';
 $wb['remote_access_txt'] = 'Acesso Remoto';
 $wb['type_txt'] = 'Tipo';
 $wb['server_id_txt'] = 'Servidor';
-$wb['database_user_txt'] = 'Usuário do banco de dados';
-$wb['database_name_txt'] = 'Nome do banco de dados';
+$wb['database_user_txt'] = 'Usuário do Banco de Dados';
+$wb['database_name_txt'] = 'Nome do Banco de Dados';
 $wb['add_new_record_txt'] = 'Adicionar novo banco de dados';
 $wb['sys_groupid_txt'] = 'Cliente';
 $wb['parent_domain_id_txt'] = 'Site';
-?>
diff --git a/interface/web/sites/lib/lang/br_database_list.lng b/interface/web/sites/lib/lang/br_database_list.lng
index b3d438e04b..c572421572 100644
--- a/interface/web/sites/lib/lang/br_database_list.lng
+++ b/interface/web/sites/lib/lang/br_database_list.lng
@@ -4,8 +4,7 @@ $wb['active_txt'] = 'Ativo';
 $wb['remote_access_txt'] = 'Acesso Remoto';
 $wb['type_txt'] = 'Tipo';
 $wb['server_id_txt'] = 'Servidor';
-$wb['database_user_txt'] = 'Usuário do banco de dados';
-$wb['database_name_txt'] = 'Nome do banco de dados';
-$wb['add_new_record_txt'] = 'Adicionar novo registro';
+$wb['database_user_txt'] = 'Usuário do Banco de Dados';
+$wb['database_name_txt'] = 'Nome do Banco de Dados';
+$wb['add_new_record_txt'] = 'Adicionar novo banco de dados';
 $wb['parent_domain_id_txt'] = 'Site';
-?>
diff --git a/interface/web/sites/lib/lang/br_database_quota_stats_list.lng b/interface/web/sites/lib/lang/br_database_quota_stats_list.lng
index 41fd305a3a..6cce7b59df 100644
--- a/interface/web/sites/lib/lang/br_database_quota_stats_list.lng
+++ b/interface/web/sites/lib/lang/br_database_quota_stats_list.lng
@@ -5,5 +5,4 @@ $wb['client_txt'] = 'Cliente';
 $wb['used_txt'] = 'Espaço Utilizado';
 $wb['quota_txt'] = 'Cota';
 $wb['percentage_txt'] = 'Espaço Utilizado em %';
-$wb['list_head_txt'] = 'Cota do banco de dados';
-?>
+$wb['list_head_txt'] = 'Cota do Banco de Dados';
diff --git a/interface/web/sites/lib/lang/br_database_user.lng b/interface/web/sites/lib/lang/br_database_user.lng
index 193dbc7406..6791f16cf0 100644
--- a/interface/web/sites/lib/lang/br_database_user.lng
+++ b/interface/web/sites/lib/lang/br_database_user.lng
@@ -1,13 +1,13 @@
 <?php
 $wb['database_user_txt'] = 'Usuário do banco de Dados';
-$wb['database_password_txt'] = 'Senha do banco de dados';
+$wb['database_password_txt'] = 'Senha do Banco de Dados';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
 $wb['client_txt'] = 'Cliente';
 $wb['active_txt'] = 'Ativo';
-$wb['database_user_error_empty'] = 'Usuário do banco de dados está em branco.';
-$wb['database_user_error_unique'] = 'Já existe este usuário no servidor. Para ter um nome exclusivo insira um prefixo como o domínio antes do nome.';
-$wb['database_user_error_regex'] = 'Nome do usuário de banco de dados inválido. O nome do usuário deve conter apenas os caracteres: a-z, A-Z, 0-9 e underscore. Comprimento: 2 - 64 caracteres.';
-$wb['database_user_error_len'] = 'Nome do usuário de banco de dados - {user} - muito longo. Comprimento permitido, incluindo o prefixo, não pode ultrapassr 16 caracteres.';
+$wb['database_user_error_empty'] = 'Usuário do Banco de Dados está vazio.';
+$wb['database_user_error_unique'] = 'Já existe este usuário no servidor. Para ter um nome exclusivo insira, por exemplo, um prefixo como o domínio antes do nome.';
+$wb['database_user_error_regex'] = 'Nome do usuário do Banco de Dados inválido. O nome do usuário deve conter apenas os caracteres: a-z, A-Z, 0-9 e underscore. Comprimento: 2 - 64 caracteres.';
+$wb['database_user_error_len'] = 'Nome do usuário do Banco de Dados - {user} - muito longo. Comprimento permitido, incluindo o prefixo, não pode ultrapassar 16 caracteres.';
 $wb['btn_save_txt'] = 'Salvar';
 $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['generate_password_txt'] = 'Gerar Senha';
@@ -20,6 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = 'Sem resultados.';
 $wb['globalsearch_noresults_limit_txt'] = '0 resultado(s)';
 $wb['globalsearch_searchfield_watermark_txt'] = 'Pesquisar';
 $wb['globalsearch_suggestions_text_txt'] = 'Sugestões';
-$wb['limit_database_user_txt'] = 'O limite de usuários do banco de dados para esta conta foi alcançado.';
-$wb['database_password_error_empty'] = 'Senha do banco de dados está em branco.';
-?>
+$wb['limit_database_user_txt'] = 'O limite de usuários do Banco de Dados para esta conta foi alcançado.';
+$wb['database_password_error_empty'] = 'Senha do Banco de Dados está vazio.';
diff --git a/interface/web/sites/lib/lang/br_database_user_admin_list.lng b/interface/web/sites/lib/lang/br_database_user_admin_list.lng
index bb21e97b1c..c258bb7828 100644
--- a/interface/web/sites/lib/lang/br_database_user_admin_list.lng
+++ b/interface/web/sites/lib/lang/br_database_user_admin_list.lng
@@ -1,6 +1,5 @@
 <?php
-$wb['list_head_txt'] = 'Usuário do banco de dados';
+$wb['list_head_txt'] = 'Usuário do Banco de Dados';
 $wb['database_user_txt'] = 'Nome do usuário';
 $wb['add_new_record_txt'] = 'Adicionar novo usuário';
 $wb['sys_groupid_txt'] = 'Cliente';
-?>
diff --git a/interface/web/sites/lib/lang/br_database_user_list.lng b/interface/web/sites/lib/lang/br_database_user_list.lng
index d2e4332fc7..8dd9edf943 100644
--- a/interface/web/sites/lib/lang/br_database_user_list.lng
+++ b/interface/web/sites/lib/lang/br_database_user_list.lng
@@ -1,5 +1,4 @@
 <?php
-$wb['list_head_txt'] = 'Usuário do banco de dados';
-$wb['database_user_txt'] = 'Usuário do banco de dados';
+$wb['list_head_txt'] = 'Usuário do Banco de Dados';
+$wb['database_user_txt'] = 'Usuário do Banco de Dados';
 $wb['add_new_record_txt'] = 'Adicionar novo usuário';
-?>
diff --git a/interface/web/sites/lib/lang/br_ftp_sites_stats_list.lng b/interface/web/sites/lib/lang/br_ftp_sites_stats_list.lng
index e4fabd5959..53582e1776 100644
--- a/interface/web/sites/lib/lang/br_ftp_sites_stats_list.lng
+++ b/interface/web/sites/lib/lang/br_ftp_sites_stats_list.lng
@@ -7,4 +7,3 @@ $wb['this_year_txt'] = 'Este ano';
 $wb['last_year_txt'] = 'Último ano';
 $wb['sum_txt'] = 'Soma (Download + Upload)';
 $wb['in_out_txt'] = 'DOWN/UP';
-?>
diff --git a/interface/web/sites/lib/lang/br_ftp_user.lng b/interface/web/sites/lib/lang/br_ftp_user.lng
index 370fe0f366..ba69d8c9d0 100644
--- a/interface/web/sites/lib/lang/br_ftp_user.lng
+++ b/interface/web/sites/lib/lang/br_ftp_user.lng
@@ -15,14 +15,13 @@ $wb['password_txt'] = 'Senha';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
 $wb['quota_size_txt'] = 'Cota do Disco';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_ftp_user_txt'] = 'O limite de usuários ftp para esta conta foi alcançado.';
-$wb['username_error_empty'] = 'Usuário está em branco.';
+$wb['limit_ftp_user_txt'] = 'O limite de usuários FTP para esta conta foi alcançado.';
+$wb['username_error_empty'] = 'Usuário está vazio.';
 $wb['username_error_unique'] = 'O nome do usuário deve ser exclusivo.';
 $wb['username_error_regex'] = 'O nome do usuário possui caracteres não permitidos.';
-$wb['quota_size_error_empty'] = 'Cota está em branco.';
-$wb['uid_error_empty'] = 'UID está em branco.';
-$wb['uid_error_empty'] = 'GID está em branco.';
-$wb['directory_error_empty'] = 'Diretório está em branco.';
+$wb['quota_size_error_empty'] = 'Cota está vazio.';
+$wb['uid_error_empty'] = 'GID está vazio.';
+$wb['directory_error_empty'] = 'Diretório está vazio.';
 $wb['directory_error_notinweb'] = 'Diretório não está dentro do diretório web.';
 $wb['parent_domain_id_error_empty'] = 'Nenhum site selecionado.';
 $wb['quota_size_error_regex'] = 'Cota: insira -1 para ilimitado ou um número > 0.';
@@ -33,4 +32,4 @@ $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
 $wb['expires_txt'] = 'Expirar em';
-?>
+$wb['FTP User'] = 'Usuário FTP';
diff --git a/interface/web/sites/lib/lang/br_ftp_user_list.lng b/interface/web/sites/lib/lang/br_ftp_user_list.lng
index 918d7f99f3..08ad9145a6 100644
--- a/interface/web/sites/lib/lang/br_ftp_user_list.lng
+++ b/interface/web/sites/lib/lang/br_ftp_user_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Usuário ftp';
+$wb['list_head_txt'] = 'Usuário FTP';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['parent_domain_id_txt'] = 'Site';
 $wb['username_txt'] = 'Usuário';
 $wb['add_new_record_txt'] = 'Adicionar novo usuário';
-?>
diff --git a/interface/web/sites/lib/lang/br_shell_user.lng b/interface/web/sites/lib/lang/br_shell_user.lng
index 8cd0520554..24d338dd2d 100644
--- a/interface/web/sites/lib/lang/br_shell_user.lng
+++ b/interface/web/sites/lib/lang/br_shell_user.lng
@@ -1,6 +1,6 @@
 <?php
-$wb['puser_txt'] = 'Usuário web';
-$wb['pgroup_txt'] = 'Grupo web';
+$wb['puser_txt'] = 'Usuário Web';
+$wb['pgroup_txt'] = 'Grupo Web';
 $wb['shell_txt'] = 'Shell';
 $wb['dir_txt'] = 'Diretório Base';
 $wb['server_id_txt'] = 'Servidor';
@@ -11,17 +11,17 @@ $wb['password_strength_txt'] = 'Dificuldade da senha';
 $wb['chroot_txt'] = 'Chroot Shell';
 $wb['quota_size_txt'] = 'Cota';
 $wb['active_txt'] = 'Ativo';
-$wb['username_error_empty'] = 'Nome do usuário está em branco.';
+$wb['username_error_empty'] = 'Nome do usuário está vazio.';
 $wb['username_error_unique'] = 'O nome do usuário deve ser exclusivo.';
 $wb['username_error_regex'] = 'O nome do usuário possui caracteres não permitidos.';
-$wb['quota_size_error_empty'] = 'Cota está em branco.';
-$wb['uid_error_empty'] = 'GID está em branco.';
-$wb['directory_error_empty'] = 'O diretório está em branco.';
+$wb['quota_size_error_empty'] = 'Cota está vazio.';
+$wb['uid_error_empty'] = 'GID está vazio.';
+$wb['directory_error_empty'] = 'O diretório está vazio.';
 $wb['limit_shell_user_txt'] = 'O limite de usuários foi alcançado.';
 $wb['parent_domain_id_error_empty'] = 'Nenhum site selecionado.';
 $wb['ssh_rsa_txt'] = 'Chave pública SSH-RSA (para acessos baseados em chave)';
-$wb['dir_dot_error'] = 'Não é permitido \'..\' no caminho.';
-$wb['dir_slashdot_error'] = 'Não é permitido \'./\' no caminho.';
+$wb['dir_dot_error'] = 'Não é permitido \\'..\\' no caminho.';
+$wb['dir_slashdot_error'] = 'Não é permitido \\'./\\' no caminho.';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
@@ -32,5 +32,5 @@ $wb['invalid_system_user_or_group_txt'] = 'Usuário ou grupo inválido.';
 $wb['directory_error_regex'] = 'Diretório inválido.';
 $wb['shell_error_regex'] = 'Shell inválido.';
 $wb['invalid_username_txt'] = 'Usuário inválido.';
-$wb['directory_error_notinweb'] = 'O diretório deve estar dentro do diretório web.';
-?>
+$wb['directory_error_notinweb'] = 'O diretório deve estar dentro do diretório root web.';
+$wb['Shell User'] = 'Usuário Shell';
diff --git a/interface/web/sites/lib/lang/br_shell_user_list.lng b/interface/web/sites/lib/lang/br_shell_user_list.lng
index 21bb3d4dfd..5b39fa7a36 100644
--- a/interface/web/sites/lib/lang/br_shell_user_list.lng
+++ b/interface/web/sites/lib/lang/br_shell_user_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Usuário do Shell';
+$wb['list_head_txt'] = 'Usuários Shell';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['parent_domain_id_txt'] = 'Site';
 $wb['username_txt'] = 'Usuário';
 $wb['add_new_record_txt'] = 'Adicionar novo usuário';
-?>
diff --git a/interface/web/sites/lib/lang/br_user_quota_stats_list.lng b/interface/web/sites/lib/lang/br_user_quota_stats_list.lng
index d979210483..4a0da883bd 100644
--- a/interface/web/sites/lib/lang/br_user_quota_stats_list.lng
+++ b/interface/web/sites/lib/lang/br_user_quota_stats_list.lng
@@ -1,9 +1,8 @@
 <?php
-$wb['list_head_txt'] = 'Cota do disco para site';
+$wb['list_head_txt'] = 'Cota do disco para sites';
 $wb['domain_txt'] = 'Domínio/Site';
 $wb['system_user_txt'] = 'Usuário Linux';
 $wb['used_txt'] = 'Espaço utilizado';
 $wb['hard_txt'] = 'Limite para bloqueio';
 $wb['soft_txt'] = 'Limite para alerta';
 $wb['files_txt'] = 'Arquivos simples';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_aliasdomain.lng b/interface/web/sites/lib/lang/br_web_aliasdomain.lng
index 0654ea4329..b85d467e72 100644
--- a/interface/web/sites/lib/lang/br_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/br_web_aliasdomain.lng
@@ -7,14 +7,14 @@ $wb['ssl_locality_txt'] = 'Cidade';
 $wb['ssl_organisation_txt'] = 'Empresa';
 $wb['ssl_organisation_unit_txt'] = 'Departamento';
 $wb['ssl_country_txt'] = 'País';
-$wb['ssl_key_txt'] = 'Chave';
-$wb['ssl_request_txt'] = 'Requisição';
-$wb['ssl_cert_txt'] = 'Certificado';
-$wb['ssl_bundle_txt'] = 'Agrupar';
-$wb['ssl_action_txt'] = 'Ação';
-$wb['ssl_domain_txt'] = 'Domínio';
+$wb['ssl_key_txt'] = 'Chave SSL';
+$wb['ssl_request_txt'] = 'Requisição SSL';
+$wb['ssl_cert_txt'] = 'Certificado SSL';
+$wb['ssl_bundle_txt'] = 'Agrupar SSL';
+$wb['ssl_action_txt'] = 'Ação SSL';
+$wb['ssl_domain_txt'] = 'Domínio SSL';
 $wb['server_id_txt'] = 'Servidor';
-$wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize o caractere barra(/).';
+$wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize o caractere  (barra).';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Pai';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
@@ -24,7 +24,7 @@ $wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
 $wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
-$wb['document_root_txt'] = 'Documentroot';
+$wb['document_root_txt'] = 'Document root';
 $wb['system_user_txt'] = 'Usuário Linux';
 $wb['system_group_txt'] = 'Grupo Linux';
 $wb['ip_address_txt'] = 'Endereço IPv4';
@@ -34,7 +34,7 @@ $wb['hd_quota_txt'] = 'Cota do Disco';
 $wb['traffic_quota_txt'] = 'Cota de Tráfego';
 $wb['cgi_txt'] = 'CGI';
 $wb['ssi_txt'] = 'SSI';
-$wb['errordocs_txt'] = 'Proprietário do Error-Documents';
+$wb['errordocs_txt'] = 'Proprietário do Error Documents';
 $wb['subdomain_txt'] = 'Subdomínio automático';
 $wb['ssl_txt'] = 'SSL';
 $wb['suexec_txt'] = 'SuEXEC';
@@ -43,19 +43,19 @@ $wb['client_txt'] = 'Cliente';
 $wb['limit_web_domain_txt'] = 'O limite de domínios de site para esta conta foi alcançado.';
 $wb['limit_web_aliasdomain_txt'] = 'O limite de alias de domínios para esta conta foi alcançado.';
 $wb['limit_web_subdomain_txt'] = 'O limite de subdomínios de site para esta conta foi alcançado.';
-$wb['apache_directives_txt'] = 'Diretivas do apache';
-$wb['domain_error_empty'] = 'O campo "Domínio" está em branco.';
+$wb['apache_directives_txt'] = 'Diretivas do Apache';
+$wb['domain_error_empty'] = 'O campo "Domínio" está vazio.';
 $wb['domain_error_unique'] = 'Já existe um site, subdomínio ou alias de domínio com este nome.';
 $wb['domain_error_regex'] = 'O campo "Domínio" é inválido.';
 $wb['domain_error_autosub'] = 'Já existe um subdomínio com estas configurações.';
-$wb['hd_quota_error_empty'] = 'Cota do disco é 0 ou está em branco.';
-$wb['traffic_quota_error_empty'] = 'Cota de tráfego está em branco.';
-$wb['error_ssl_state_empty'] = 'O campo "Estado" está em branco.';
-$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está em branco.';
-$wb['error_ssl_organisation_empty'] = 'O campo "Empresa" está em branco.';
-$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está em branco.';
-$wb['error_ssl_country_empty'] = 'O campo "País" está em branco.';
-$wb['error_ssl_cert_empty'] = 'O campo "Certificado" está em branco.';
+$wb['hd_quota_error_empty'] = 'Cota do disco é 0 ou está vazio.';
+$wb['traffic_quota_error_empty'] = 'Cota de tráfego está vazio.';
+$wb['error_ssl_state_empty'] = 'O campo "Estado" está vazio.';
+$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está vazio.';
+$wb['error_ssl_organisation_empty'] = 'O campo "Empresa" está vazio.';
+$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está vazio.';
+$wb['error_ssl_country_empty'] = 'O campo "País" está vazio.';
+$wb['error_ssl_cert_empty'] = 'O campo "Certificado SSL" está vazio.';
 $wb['client_group_id_txt'] = 'Cliente';
 $wb['stats_password_txt'] = 'Configurar senha para estatísticas web';
 $wb['allow_override_txt'] = 'Diretiva Apache AllowOverride';
@@ -67,12 +67,12 @@ $wb['ssl_organistaion_unit_error_regex'] = 'O campo "Departamento" é inválido.
 $wb['ssl_country_error_regex'] = 'O campo "País" é inválido. São caracteres válidos: "A-Z".';
 $wb['limit_traffic_quota_free_txt'] = 'Limite da cota de tráfego disponível';
 $wb['redirect_error_regex'] = 'Caminho de redirecionamento inválido. São redirecionamentos válidos, por exemplo, /teste/ ou https://www.dominio.com.br/teste/';
-$wb['php_open_basedir_txt'] = 'Diretório open_basedir do php';
-$wb['traffic_quota_exceeded_txt'] = 'O limite da cota de tráfego foi alcançado.';
+$wb['php_open_basedir_txt'] = 'Diretório open_basedir PHP';
+$wb['traffic_quota_exceeded_txt'] = 'A cota de tráfego foi alcançada.';
 $wb['ruby_txt'] = 'Ruby';
-$wb['stats_user_txt'] = 'Usuário de estatísticas web';
-$wb['stats_type_txt'] = 'Sistema de estatísticas web';
-$wb['custom_php_ini_txt'] = 'Configurações personalizadas do php.ini';
+$wb['stats_user_txt'] = 'Usuário de estatísticas Web';
+$wb['stats_type_txt'] = 'Sistema de estatísticas Web';
+$wb['custom_php_ini_txt'] = 'Configurações personalizadas PHP.ini';
 $wb['none_txt'] = 'Nenhum';
 $wb['disabled_txt'] = 'Desabilitado';
 $wb['no_redirect_txt'] = 'Sem redirecionamento';
@@ -84,36 +84,35 @@ $wb['nginx_directives_txt'] = 'Diretivas do nginx';
 $wb['seo_redirect_txt'] = 'Diretivas SEO';
 $wb['non_www_to_www_txt'] = 'non-www -&gt; www';
 $wb['www_to_non_www_txt'] = 'www -&gt; non-www';
-$wb['php_fpm_use_socket_txt'] = 'Usar socket para php-fpm';
-$wb['error_no_sni_txt'] = 'SNI para SSL não está habilitado neste servidor. Somente poderá ser habilitado um certificado para cada endereço IP.';
+$wb['php_fpm_use_socket_txt'] = 'Usar socket para PHP-FPM';
+$wb['error_no_sni_txt'] = 'SNI para SSL não está habilitado neste servidor. Poderá ser habilitado um certificado para cada endereço IP.';
 $wb['python_txt'] = 'Python';
 $wb['perl_txt'] = 'Perl';
 $wb['pm_max_children_txt'] = 'PHP-FPM pm.max_children';
 $wb['pm_start_servers_txt'] = 'PHP-FPM pm.start_servers';
 $wb['pm_min_spare_servers_txt'] = 'PHP-FPM pm.min_spare_servers';
 $wb['pm_max_spare_servers_txt'] = 'PHP-FPM pm.max_spare_servers';
-$wb['error_php_fpm_pm_settings_txt'] = 'Valores das configurações do php-fpm podem ser: pm.max_children &gt;= pm.max_spare_servers &gt;= pm.start_servers &gt;= pm.min_spare_servers &gt; 0';
+$wb['error_php_fpm_pm_settings_txt'] = 'Valores das configurações PHP-FPM podem ser: pm.max_children &gt;= pm.max_spare_servers &gt;= pm.start_servers &gt;= pm.min_spare_servers &gt; 0';
 $wb['pm_max_children_error_regex'] = 'PHP-FPM pm.max_children deve ter um valor inteiro positivo.';
 $wb['pm_start_servers_error_regex'] = 'PHP-FPM pm.start_servers deve ter um valor inteiro positivo.';
 $wb['pm_min_spare_servers_error_regex'] = 'PHP-FPM pm.min_spare_servers deve ter um valor inteiro positivo.';
 $wb['pm_max_spare_servers_error_regex'] = 'PHP-FPM pm.max_spare_servers deve ter um valor inteiro positivo.';
 $wb['hd_quota_error_regex'] = 'Cota do disco é inválida.';
 $wb['traffic_quota_error_regex'] = 'Cota de tráfego é inválida.';
-$wb['server_php_id_txt'] = 'Versão do php';
-$wb['pm_txt'] = 'Gerenciador de Processos do php-fpm';
+$wb['server_php_id_txt'] = 'Versão PHP';
+$wb['pm_txt'] = 'Gerenciador de Processos PHP-FPM';
 $wb['pm_process_idle_timeout_txt'] = 'PHP-FPM pm.process_idle_timeout';
 $wb['pm_max_requests_txt'] = 'PHP-FPM pm.max_requests';
 $wb['pm_process_idle_timeout_error_regex'] = 'PHP-FPM pm.process_idle_timeout deve ter um valor inteiro positivo.';
 $wb['pm_max_requests_error_regex'] = 'PHP-FPM pm.max_requests deve ter um valor >= 0.';
-$wb['pm_ondemand_hint_txt'] = 'Por favor, observe que é necessário uma versão do php >= 5.3.9 para utilizar o gerenciador de processos por demanda. Se for selecionado por demanda com uma versão inferior do php, o mesmo não iniciará mais!';
+$wb['pm_ondemand_hint_txt'] = 'Por favor, observe que é necessário uma versão PHP >= 5.3.9 para utilizar o gerenciador de processos por demanda. Se for selecionado, por demanda, uma versão inferior PHP, o mesmo não iniciará mais!';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-$wb['available_php_directive_snippets_txt'] = 'Diretivas de trecho de código do php disponíveis:';
-$wb['available_apache_directive_snippets_txt'] = 'Diretivas de trecho de código do apache disponíveis:';
-$wb['available_nginx_directive_snippets_txt'] = 'Diretivas de trecho de código do nginx disponíveis:';
+$wb['available_php_directive_snippets_txt'] = 'Diretivas de trecho de código PHP disponíveis:';
+$wb['available_apache_directive_snippets_txt'] = 'Diretivas de trecho de código Apache disponíveis:';
+$wb['available_nginx_directive_snippets_txt'] = 'Diretivas de trecho de código nginx disponíveis:';
 $wb['proxy_directives_txt'] = 'Diretivas do proxy';
-$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código do proxy disponíveis:';
+$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código proxy disponíveis:';
 $wb['Domain'] = 'Alias de Domínio';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_aliasdomain_list.lng b/interface/web/sites/lib/lang/br_web_aliasdomain_list.lng
index 770ec725e4..e337e1fb2e 100644
--- a/interface/web/sites/lib/lang/br_web_aliasdomain_list.lng
+++ b/interface/web/sites/lib/lang/br_web_aliasdomain_list.lng
@@ -5,10 +5,9 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['parent_domain_id_txt'] = 'Site';
 $wb['domain_txt'] = 'Alias de Domínio';
 $wb['add_new_record_txt'] = 'Adicionar novo alias de domínio';
-$wb['domain_error_empty'] = 'O domínio está em branco.';
+$wb['domain_error_empty'] = 'O domínio está vazio.';
 $wb['domain_error_unique'] = 'O domínio deve ser exclusivo.';
 $wb['domain_error_regex'] = 'O domínio é inválido.';
 $wb['no_redirect_txt'] = 'Sem redirecionamento';
 $wb['no_flag_txt'] = 'Sem marcas';
 $wb['none_txt'] = 'Nenhum';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_backup_list.lng b/interface/web/sites/lib/lang/br_web_backup_list.lng
index 521e689598..77580e3cc6 100644
--- a/interface/web/sites/lib/lang/br_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/br_web_backup_list.lng
@@ -18,22 +18,22 @@ $wb['delete_pending_txt'] = 'Já existe uma remoção de backup em andamento.';
 $wb['backup_type_mongodb'] = 'MongoDB';
 $wb['backup_type_mysql'] = 'MySQL';
 $wb['backup_type_web'] = 'Arquivos do site';
-$wb['backup_pending_txt'] = 'There is already a pending backup job.';
-$wb['error_txt'] = 'Error';
-$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
-$wb['backup_format_txt'] = 'Backup format';
-$wb['backup_format_unknown_txt'] = 'Unknown';
-$wb['backup_job_txt'] = 'Scheduler';
+$wb['backup_pending_txt'] = 'Já existe uma operação de backup em andamento.';
+$wb['error_txt'] = 'Erro';
+$wb['backup_info_txt'] = 'Uma operação de backup foi iniciada. Esta operação demora vários minutos para concluir.';
+$wb['backup_format_txt'] = 'Formato do backup';
+$wb['backup_format_unknown_txt'] = 'Desconhecido';
+$wb['backup_job_txt'] = 'Agendar';
 $wb['backup_job_manual_txt'] = 'Manual';
 $wb['backup_job_auto_txt'] = 'Auto';
-$wb['manual_backup_title_txt'] = 'Manual backup';
-$wb['make_backup_web_txt'] = 'Make backup of web files';
-$wb['make_backup_database_txt'] = 'Make backup of databases';
-$wb['make_backup_confirm_txt'] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
-$wb['yes_txt'] = 'Yes';
-$wb['no_txt'] = 'No';
-$wb['backup_is_encrypted_txt'] = 'Encrypted';
-$wb['backup_format_zip_txt'] = 'zip (deflate)';
+$wb['manual_backup_title_txt'] = 'Backup manual';
+$wb['make_backup_web_txt'] = 'Criar backup dos arquivos Web';
+$wb['make_backup_database_txt'] = 'Criar backup dos bancos de dados';
+$wb['make_backup_confirm_txt'] = 'Você está prestes a iniciar um processo de backup manual. Os backups manuais contam para o número total de cópias de backup permitidas: portanto, se o limite for excedido, os backups mais antigos podem ser excluídos automaticamente. Continuar?';
+$wb['yes_txt'] = 'Sim';
+$wb['no_txt'] = 'Não';
+$wb['backup_is_encrypted_txt'] = 'Criptografado';
+$wb['backup_format_zip_txt'] = 'zip (esvaziar)';
 $wb['backup_format_gzip_txt'] = 'gzip';
 $wb['backup_format_bzip2_txt'] = 'bzip2';
 $wb['backup_format_xz_txt'] = 'xz';
@@ -50,4 +50,3 @@ $wb['backup_format_tar_7z_lzma2_txt'] = 'tar + 7z (LZMA2)';
 $wb['backup_format_tar_7z_ppmd_txt'] = 'tar + 7z (PPMd)';
 $wb['backup_format_tar_7z_bzip2_txt'] = 'tar + 7z (BZip2)';
 $wb['backup_format_rar_txt'] = 'RAR';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_childdomain.lng b/interface/web/sites/lib/lang/br_web_childdomain.lng
index 982c25cbe3..f3fd244d5e 100644
--- a/interface/web/sites/lib/lang/br_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/br_web_childdomain.lng
@@ -4,10 +4,10 @@ $wb['ssl_locality_txt'] = 'Cidade';
 $wb['ssl_organisation_txt'] = 'Empresa';
 $wb['ssl_organisation_unit_txt'] = 'Departamento';
 $wb['ssl_country_txt'] = 'País';
-$wb['ssl_request_txt'] = 'Requisição';
-$wb['ssl_cert_txt'] = 'Certificado';
-$wb['ssl_bundle_txt'] = 'Agrupar';
-$wb['ssl_action_txt'] = 'Ação';
+$wb['ssl_request_txt'] = 'Requisição SSL';
+$wb['ssl_cert_txt'] = 'Certificado SSL';
+$wb['ssl_bundle_txt'] = 'Agrupar SSL';
+$wb['ssl_action_txt'] = 'Ação SSL';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['type_txt'] = 'Tipo';
@@ -19,7 +19,7 @@ $wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
 $wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
-$wb['document_root_txt'] = 'Documentroot';
+$wb['document_root_txt'] = 'Document root';
 $wb['system_user_txt'] = 'Usuário Linux';
 $wb['system_group_txt'] = 'Grupo Linux';
 $wb['ip_address_txt'] = 'Endereço IP';
@@ -36,7 +36,7 @@ $wb['limit_web_domain_txt'] = 'O limite de domínios de site para esta conta foi
 $wb['limit_web_aliasdomain_txt'] = 'O limite de alias de domínios para esta conta foi alcançado.';
 $wb['limit_web_subdomain_txt'] = 'O limite de subdomínios de site para esta conta foi alcançado.';
 $wb['apache_directives_txt'] = 'Diretivas do apache';
-$wb['domain_error_empty'] = 'O domínio está em branco.';
+$wb['domain_error_empty'] = 'O domínio está vazio.';
 $wb['domain_error_unique'] = 'Já existe um site, subdomínio ou alias de domínio com este nome.';
 $wb['domain_error_regex'] = 'O domínio é inválido.';
 $wb['domain_error_acme_invalid'] = 'Domínio genérico inválido não permitido.';
@@ -46,25 +46,25 @@ $wb['redirect_error_regex'] = 'Caminho de redirecionamento inválido. Redirecion
 $wb['no_redirect_txt'] = 'Sem redirecionamento';
 $wb['no_flag_txt'] = 'Sem marcas';
 $wb['proxy_directives_txt'] = 'Diretivas do proxy';
-$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código do proxy disponíveis:';
+$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código proxy disponíveis:';
 $wb['error_proxy_requires_url'] = 'O tipo de redirecionamento "proxy" exige uma URL como caminho de redirecionamento.';
 $wb['backup_interval_txt'] = 'Intervalo entre backups';
 $wb['backup_copies_txt'] = 'Número de cópias do backup';
 $wb['ssl_key_txt'] = 'Chave';
 $wb['ssl_domain_txt'] = 'Domínio';
-$wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize o caractere barra(/).';
+$wb['web_folder_error_regex'] = 'Pasta Web é inválida. Por favor não utilize o caractere  (barra).';
 $wb['ipv6_address_txt'] = 'Endereço IPv6';
-$wb['errordocs_txt'] = 'Proprietário do Error-Documents';
+$wb['errordocs_txt'] = 'Proprietário do Error Documents';
 $wb['subdomain_txt'] = 'Subdomínio automático';
 $wb['domain_error_autosub'] = 'Já existe um subdomínio com estas configurações.';
-$wb['hd_quota_error_empty'] = 'Cota do disco é 0 ou está em branco.';
-$wb['traffic_quota_error_empty'] = 'Cota de tráfego está em branco.';
-$wb['error_ssl_state_empty'] = 'O campo "Estado" está em branco.';
-$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está em branco.';
-$wb['error_ssl_organisation_empty'] = 'O campo "Empresa" está em branco.';
-$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está em branco.';
-$wb['error_ssl_country_empty'] = 'O campo "País" está em branco.';
-$wb['error_ssl_cert_empty'] = 'O campo "Certificado" está em branco.';
+$wb['hd_quota_error_empty'] = 'Cota do disco é 0 ou está vazio.';
+$wb['traffic_quota_error_empty'] = 'Cota de tráfego está vazio.';
+$wb['error_ssl_state_empty'] = 'O campo "Estado" está vazio.';
+$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está vazio.';
+$wb['error_ssl_organisation_empty'] = 'O campo "Empresa" está vazio.';
+$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está vazio.';
+$wb['error_ssl_country_empty'] = 'O campo "País" está vazio.';
+$wb['error_ssl_cert_empty'] = 'O campo "Certificado SSL" está vazio.';
 $wb['client_group_id_txt'] = 'Cliente';
 $wb['stats_password_txt'] = 'Configurar senha para estatísticas web';
 $wb['allow_override_txt'] = 'Diretiva Apache AllowOverride';
@@ -75,12 +75,12 @@ $wb['ssl_organisation_error_regex'] = 'O campo "Empresa" é inválido. Caractere
 $wb['ssl_organistaion_unit_error_regex'] = 'O campo "Departamento" é inválido. Caracteres válidos são: "a-z", "0-9", ".", "-", e "_".';
 $wb['ssl_country_error_regex'] = 'O campo "País" é inválido. Caracteres válidos são: "A-Z".';
 $wb['limit_traffic_quota_free_txt'] = 'Limite da cota de tráfego disponível';
-$wb['php_open_basedir_txt'] = 'Diretório open_basedir do php';
+$wb['php_open_basedir_txt'] = 'Diretório open_basedir PHP';
 $wb['traffic_quota_exceeded_txt'] = 'O limite da cota de tráfego foi alcançado.';
 $wb['ruby_txt'] = 'Ruby';
 $wb['stats_user_txt'] = 'Usuário de estatísticas web';
 $wb['stats_type_txt'] = 'Sistema de estatísticas web';
-$wb['custom_php_ini_txt'] = 'Configurações personalizadas do php.ini';
+$wb['custom_php_ini_txt'] = 'Configurações personalizadas PHP.ini';
 $wb['none_txt'] = 'Nenhum';
 $wb['disabled_txt'] = 'Desabilitado';
 $wb['save_certificate_txt'] = 'Salvar certificado';
@@ -90,35 +90,34 @@ $wb['nginx_directives_txt'] = 'Diretivas do nginx';
 $wb['seo_redirect_txt'] = 'Diretivas SEO';
 $wb['non_www_to_www_txt'] = 'non-www -&gt; www';
 $wb['www_to_non_www_txt'] = 'www -&gt; non-www';
-$wb['php_fpm_use_socket_txt'] = 'Usar socket para php-fpm';
-$wb['error_no_sni_txt'] = 'SNI para SSL não está habilitado neste servidor. Somente poderá ser habilitado um certificado para cada endereço IP.';
+$wb['php_fpm_use_socket_txt'] = 'Usar socket para PHP-FPM';
+$wb['error_no_sni_txt'] = 'SNI para SSL não está habilitado neste servidor. Poderá ser habilitado um certificado para cada endereço IP.';
 $wb['python_txt'] = 'Python';
 $wb['perl_txt'] = 'Perl';
 $wb['pm_max_children_txt'] = 'PHP-FPM pm.max_children';
 $wb['pm_start_servers_txt'] = 'PHP-FPM pm.start_servers';
 $wb['pm_min_spare_servers_txt'] = 'PHP-FPM pm.min_spare_servers';
 $wb['pm_max_spare_servers_txt'] = 'PHP-FPM pm.max_spare_servers';
-$wb['error_php_fpm_pm_settings_txt'] = 'Valores das configurações do php-fpm podem ser: pm.max_children &gt;= pm.max_spare_servers &gt;= pm.start_servers &gt;= pm.min_spare_servers &gt; 0';
+$wb['error_php_fpm_pm_settings_txt'] = 'Valores das configurações PHP-FPM podem ser: pm.max_children &gt;= pm.max_spare_servers &gt;= pm.start_servers &gt;= pm.min_spare_servers &gt; 0';
 $wb['pm_max_children_error_regex'] = 'PHP-FPM pm.max_children deve ter um valor inteiro positivo.';
 $wb['pm_start_servers_error_regex'] = 'PHP-FPM pm.start_servers deve ter um valor inteiro positivo.';
 $wb['pm_min_spare_servers_error_regex'] = 'PHP-FPM pm.min_spare_servers deve ter um valor inteiro positivo.';
 $wb['pm_max_spare_servers_error_regex'] = 'PHP-FPM pm.max_spare_servers deve ter um valor inteiro positivo.';
 $wb['hd_quota_error_regex'] = 'Cota do disco é inválida.';
 $wb['traffic_quota_error_regex'] = 'Cota de tráfego é inválida.';
-$wb['server_php_id_txt'] = 'Versão do php';
-$wb['pm_txt'] = 'Gerenciador de processos do php-fpm';
+$wb['server_php_id_txt'] = 'Versão PHP';
+$wb['pm_txt'] = 'Gerenciador de processos PHP-FPM';
 $wb['pm_process_idle_timeout_txt'] = 'PHP-FPM pm.process_idle_timeout';
 $wb['pm_max_requests_txt'] = 'PHP-FPM pm.max_requests';
 $wb['pm_process_idle_timeout_error_regex'] = 'PHP-FPM pm.process_idle_timeout deve ter um valor inteiro positivo.';
 $wb['pm_max_requests_error_regex'] = 'PHP-FPM pm.max_requests deve ter um valor >= 0.';
-$wb['pm_ondemand_hint_txt'] = 'Por favor, observe que é necessário uma versão do php >= 5.3.9 para utilizar o gerenciador de processos por demanda. Se for selecionado por demanda com uma versão inferior do php, o mesmo não iniciará mais!';
+$wb['pm_ondemand_hint_txt'] = 'Por favor, observe que é necessário uma versão PHP >= 5.3.9 para utilizar o gerenciador de processos por demanda. Se for selecionado, por demanda, uma versão inferior PHP, o mesmo não iniciará mais!';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-$wb['available_php_directive_snippets_txt'] = 'Diretivas de trecho de código do php disponíveis:';
-$wb['available_apache_directive_snippets_txt'] = 'Diretivas de trecho de código do apache disponíveis:';
-$wb['available_nginx_directive_snippets_txt'] = 'Diretivas de trecho de código do nginx disponíveis:';
+$wb['available_php_directive_snippets_txt'] = 'Diretivas de trecho de código PHP disponíveis:';
+$wb['available_apache_directive_snippets_txt'] = 'Diretivas de trecho de código do Apache disponíveis:';
+$wb['available_nginx_directive_snippets_txt'] = 'Diretivas de trecho de código nginx disponíveis:';
 $wb['Domain'] = 'Alias de domínio';
-$wb['ssl_letsencrypt_exclude_txt'] = 'Sem certificado Let \'s Encrypt';
-?>
+$wb['ssl_letsencrypt_exclude_txt'] = 'Sem certificado Let \\'s Encrypt';
diff --git a/interface/web/sites/lib/lang/br_web_childdomain_list.lng b/interface/web/sites/lib/lang/br_web_childdomain_list.lng
index 583ae2d360..8cff13d3b2 100644
--- a/interface/web/sites/lib/lang/br_web_childdomain_list.lng
+++ b/interface/web/sites/lib/lang/br_web_childdomain_list.lng
@@ -6,7 +6,7 @@ $wb['parent_domain_id_txt'] = 'Site';
 $wb['domain_txt'] = 'Subdomínio';
 $wb['add_new_subdomain_txt'] = 'Adicionar novo subdomínio';
 $wb['add_new_aliasdomain_txt'] = 'Adicionar novo alias de domínio';
-$wb['domain_error_empty'] = 'O domínio está em branco.';
+$wb['domain_error_empty'] = 'O domínio está vazio.';
 $wb['domain_error_unique'] = 'O domínio deve ser exclusivo.';
 $wb['domain_error_regex'] = 'O domínio é inválido.';
 $wb['domain_error_acme_invalid'] = 'Domínio genérico inválido não permitido.';
@@ -15,4 +15,3 @@ $wb['no_flag_txt'] = 'Sem marcas';
 $wb['none_txt'] = 'Nenhum';
 $wb['aliasdomain_list_head_txt'] = 'Alias de domínios';
 $wb['subdomain_list_head_txt'] = 'Subdomínios';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_directive_snippets.lng b/interface/web/sites/lib/lang/br_web_directive_snippets.lng
index aecdb3d5c9..66b23404f2 100644
--- a/interface/web/sites/lib/lang/br_web_directive_snippets.lng
+++ b/interface/web/sites/lib/lang/br_web_directive_snippets.lng
@@ -1,3 +1,2 @@
 <?php
 $wb['directive_snippets_id_txt'] = 'Configurações desejadas';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_domain.lng b/interface/web/sites/lib/lang/br_web_domain.lng
index 76b35cf533..c23b6b5684 100644
--- a/interface/web/sites/lib/lang/br_web_domain.lng
+++ b/interface/web/sites/lib/lang/br_web_domain.lng
@@ -6,15 +6,15 @@ $wb['ssl_locality_txt'] = 'Cidade';
 $wb['ssl_organisation_txt'] = 'Empresa';
 $wb['ssl_organisation_unit_txt'] = 'Departamento';
 $wb['ssl_country_txt'] = 'País';
-$wb['ssl_key_txt'] = 'Chave';
-$wb['ssl_request_txt'] = 'Requisição';
-$wb['ssl_cert_txt'] = 'Certificado';
-$wb['ssl_bundle_txt'] = 'Agrupar';
-$wb['ssl_action_txt'] = 'Ação';
-$wb['ssl_domain_txt'] = 'Domínio';
+$wb['ssl_key_txt'] = 'Chave SSL';
+$wb['ssl_request_txt'] = 'Requisição SSL';
+$wb['ssl_cert_txt'] = 'Certificado SSL';
+$wb['ssl_bundle_txt'] = 'Agrupar SSL';
+$wb['ssl_action_txt'] = 'Ação SSL';
+$wb['ssl_domain_txt'] = 'Domínio SSL';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
-$wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize o caractere barra(/).';
+$wb['web_folder_error_regex'] = 'Pasta Web é inválida. Por favor não utilize o caractere (barra).';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Pai';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
@@ -24,7 +24,7 @@ $wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
 $wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
-$wb['document_root_txt'] = 'Documentroot';
+$wb['document_root_txt'] = 'Document root';
 $wb['system_user_txt'] = 'Usuário Linux';
 $wb['system_group_txt'] = 'Grupo Linux';
 $wb['ip_address_txt'] = 'Endereço IPv4';
@@ -34,7 +34,7 @@ $wb['hd_quota_txt'] = 'Cota do Disco';
 $wb['traffic_quota_txt'] = 'Cota de Tráfego';
 $wb['cgi_txt'] = 'CGI';
 $wb['ssi_txt'] = 'SSI';
-$wb['errordocs_txt'] = 'Proprietário do Error-Documents';
+$wb['errordocs_txt'] = 'Proprietário do error documents';
 $wb['subdomain_txt'] = 'Subdomínio automático';
 $wb['ssl_txt'] = 'SSL';
 $wb['suexec_txt'] = 'SuEXEC';
@@ -43,35 +43,35 @@ $wb['client_txt'] = 'Cliente';
 $wb['limit_web_domain_txt'] = 'O limite de domínios de site para esta conta foi alcançado.';
 $wb['limit_web_aliasdomain_txt'] = 'O limite de alias de domínios para esta conta foi alcançado.';
 $wb['limit_web_subdomain_txt'] = 'O limite de subdomínios de site para esta conta foi alcançado.';
-$wb['apache_directives_txt'] = 'Diretivas do apache';
-$wb['domain_error_empty'] = 'O campo "Domínio" está em branco.';
+$wb['apache_directives_txt'] = 'Diretivas do Apache';
+$wb['domain_error_empty'] = 'O campo "Domínio" está vazio.';
 $wb['domain_error_unique'] = 'Já existe um site, subdomínio ou alias de domínio com este nome.';
 $wb['domain_error_regex'] = 'O campo "Domínio" é inválido.';
 $wb['domain_error_autosub'] = 'Já existe um subdomínio com estas configurações.';
-$wb['hd_quota_error_empty'] = 'Cota do disco é 0 ou está em branco.';
-$wb['traffic_quota_error_empty'] = 'Cota de tráfego está em branco.';
-$wb['error_ssl_state_empty'] = 'O campo "Estado" está em branco.';
-$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está em branco.';
-$wb['error_ssl_organisation_empty'] = 'o Campo "Empresa" está em branco.';
-$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está em branco.';
-$wb['error_ssl_country_empty'] = 'O campo "País" está em branco.';
-$wb['error_ssl_cert_empty'] = 'O campo "Certificado" está em branco.';
+$wb['hd_quota_error_empty'] = 'Cota do disco é 0 ou está vazio.';
+$wb['traffic_quota_error_empty'] = 'Cota de tráfego está vazio.';
+$wb['error_ssl_state_empty'] = 'O campo "Estado" está vazio.';
+$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está vazio.';
+$wb['error_ssl_organisation_empty'] = 'o Campo "Empresa" está vazio.';
+$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está vazio.';
+$wb['error_ssl_country_empty'] = 'O campo "País" está vazio.';
+$wb['error_ssl_cert_empty'] = 'O campo "Certificado" está vazio.';
 $wb['client_group_id_txt'] = 'Cliente';
 $wb['stats_password_txt'] = 'Configurar senha para estatísticas web';
 $wb['allow_override_txt'] = 'Diretiva Apache AllowOverride';
 $wb['limit_web_quota_free_txt'] = 'Limite da cota do disco disponível';
-$wb['ssl_locality_error_regex'] = 'O campo "Cidade" é inválido. São caracteres válidos: "a-z", "0-9", ".", "-", e "_".';
-$wb['ssl_organisation_error_regex'] = 'O campo "Empresa" é inválido. São caracteres válidos: "a-z", "0-9", ".", "-", e "_".';
-$wb['ssl_organistaion_unit_error_regex'] = 'O campo "Departamento" é inválido. São caracteres válidos: "a-z", "0-9", ".", "-", e "_".';
+$wb['ssl_locality_error_regex'] = 'O campo "Cidade" é inválido. São caracteres válidos: "a-z", "0-9", ".", "-" e "_".';
+$wb['ssl_organisation_error_regex'] = 'O campo "Empresa" é inválido. São caracteres válidos: "a-z", "0-9", ".", "-" e "_".';
+$wb['ssl_organistaion_unit_error_regex'] = 'O campo "Departamento" é inválido. São caracteres válidos: "a-z", "0-9", ".", "-" e "_".';
 $wb['ssl_country_error_regex'] = 'O campo "País" é inválido. São caracteres válidos: "A-Z".';
 $wb['limit_traffic_quota_free_txt'] = 'Limite da cota de tráfego disponível';
 $wb['redirect_error_regex'] = 'Caminho de redirecionamento inválido. Redirecionamentos válidos são, por ex.: /teste/ ou https://www.dominio.com.br/teste/';
-$wb['php_open_basedir_txt'] = 'Diretório open_basedir do php';
+$wb['php_open_basedir_txt'] = 'Diretório open_basedir PHP';
 $wb['traffic_quota_exceeded_txt'] = 'O limite da cota de tráfego foi alcançado.';
 $wb['ruby_txt'] = 'Ruby';
 $wb['stats_user_txt'] = 'Usuário de estatísticas web';
-$wb['stats_type_txt'] = 'Sistema de estatísticas web';
-$wb['custom_php_ini_txt'] = 'Configurações personalizadas do php.ini';
+$wb['stats_type_txt'] = 'Aplicação de estatísticas web';
+$wb['custom_php_ini_txt'] = 'Configurações personalizadas PHP.ini';
 $wb['none_txt'] = 'Nenhum';
 $wb['disabled_txt'] = 'Desabilitado';
 $wb['no_redirect_txt'] = 'Sem redirecionamento';
@@ -83,37 +83,37 @@ $wb['nginx_directives_txt'] = 'Diretivas do nginx';
 $wb['seo_redirect_txt'] = 'Diretivas SEO';
 $wb['non_www_to_www_txt'] = 'non-www -&gt; www';
 $wb['www_to_non_www_txt'] = 'www -&gt; non-www';
-$wb['php_fpm_use_socket_txt'] = 'Usar socket para php-fpm';
-$wb['error_no_sni_txt'] = 'SNI para SSL não está habilitado neste servidor. Somente poderá ser habilitado um certificado para cada endereço IP.';
+$wb['php_fpm_use_socket_txt'] = 'Usar socket PHP-FPM';
+$wb['error_no_sni_txt'] = 'SNI para SSL não está habilitado neste servidor. Poderá ser habilitado um certificado para cada endereço IP.';
 $wb['python_txt'] = 'Python';
 $wb['perl_txt'] = 'Perl';
 $wb['pm_max_children_txt'] = 'PHP-FPM pm.max_children';
 $wb['pm_start_servers_txt'] = 'PHP-FPM pm.start_servers';
 $wb['pm_min_spare_servers_txt'] = 'PHP-FPM pm.min_spare_servers';
 $wb['pm_max_spare_servers_txt'] = 'PHP-FPM pm.max_spare_servers';
-$wb['error_php_fpm_pm_settings_txt'] = 'Valores das configurações do php-fpm podem ser: pm.max_children &gt;= pm.max_spare_servers &gt;= pm.start_servers &gt;= pm.min_spare_servers &gt; 0';
+$wb['error_php_fpm_pm_settings_txt'] = 'Valores das configurações PHP-fpm podem ser: pm.max_children &gt;= pm.max_spare_servers &gt;= pm.start_servers &gt;= pm.min_spare_servers &gt; 0';
 $wb['pm_max_children_error_regex'] = 'PHP-FPM pm.max_children deve ter um valor inteiro positivo.';
 $wb['pm_start_servers_error_regex'] = 'PHP-FPM pm.start_servers deve ter um valor inteiro positivo.';
 $wb['pm_min_spare_servers_error_regex'] = 'PHP-FPM pm.min_spare_servers deve ter um valor inteiro positivo.';
 $wb['pm_max_spare_servers_error_regex'] = 'PHP-FPM pm.max_spare_servers deve ter um valor inteiro positivo.';
 $wb['hd_quota_error_regex'] = 'Cota do disco é inválida.';
 $wb['traffic_quota_error_regex'] = 'Cota de tráfego é inválida.';
-$wb['server_php_id_txt'] = 'Versão do php';
-$wb['pm_txt'] = 'Gerenciador de Processos do php-fpm';
+$wb['server_php_id_txt'] = 'Versão PHP';
+$wb['pm_txt'] = 'Gerenciador de Processos PHP-FPM';
 $wb['pm_process_idle_timeout_txt'] = 'PHP-FPM pm.process_idle_timeout';
 $wb['pm_max_requests_txt'] = 'PHP-FPM pm.max_requests';
 $wb['pm_process_idle_timeout_error_regex'] = 'PHP-FPM pm.process_idle_timeout deve ter um valor inteiro positivo.';
 $wb['pm_max_requests_error_regex'] = 'PHP-FPM pm.max_requests deve ter um valor >= 0.';
-$wb['pm_ondemand_hint_txt'] = 'Por favor, observe que é necessário uma versão do php >= 5.3.9 para utilizar o gerenciador de processos por demanda. Se for selecionado por demanda com uma versão inferior do php, o mesmo não iniciará mais!';
+$wb['pm_ondemand_hint_txt'] = 'Por favor, observe que é necessário uma versão PHP >= 5.3.9 para utilizar o gerenciador de processos por demanda. Se for selecionado, por demanda, uma versão inferior PHP, o mesmo não iniciará!';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-$wb['available_php_directive_snippets_txt'] = 'Diretivas de trecho de código do php disponíveis:';
-$wb['available_apache_directive_snippets_txt'] = 'Diretivas de trecho de código do apache disponíveis:';
-$wb['available_nginx_directive_snippets_txt'] = 'Diretivas de trecho de código do nginx disponíveis:';
+$wb['available_php_directive_snippets_txt'] = 'Diretivas de trecho de código PHP disponíveis:';
+$wb['available_apache_directive_snippets_txt'] = 'Diretivas de trecho de código Apache disponíveis:';
+$wb['available_nginx_directive_snippets_txt'] = 'Diretivas de trecho de código nginx disponíveis:';
 $wb['proxy_directives_txt'] = 'Diretivas do proxy';
-$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código do proxy disponíveis:';
+$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código proxy disponíveis:';
 $wb['no_server_error'] = 'Nenhum servidor selecionado.';
 $wb['no_backup_txt'] = 'Sem backup';
 $wb['daily_backup_txt'] = 'Diário';
@@ -124,17 +124,17 @@ $wb['invalid_rewrite_rules_txt'] = 'Regras de reescrita inválidas';
 $wb['allowed_rewrite_rule_directives_txt'] = 'Diretivas permitidas:';
 $wb['configuration_error_txt'] = 'ERRO DE CONFIGURAÇÃO';
 $wb['variables_txt'] = 'Variáveis';
-$wb['added_by_txt'] = 'Cadastrador por';
+$wb['added_by_txt'] = 'Cadastrado por';
 $wb['added_date_txt'] = 'Data do cadastro';
 $wb['backup_excludes_txt'] = 'Diretórios Excluídos';
 $wb['backup_excludes_note_txt'] = '(Separar múltiplos diretórios por vírgulas. Exemplo: web/cache/*, web/backup)';
 $wb['backup_excludes_error_regex'] = 'Os diretórios excluídos possuem caracteres inválidos.';
-$wb['invalid_custom_php_ini_settings_txt'] = 'Configurações do php.ini inválidas';
+$wb['invalid_custom_php_ini_settings_txt'] = 'Configurações PHP.ini inválidas';
 $wb['invalid_system_user_or_group_txt'] = 'Usuário ou grupo inválido.';
-$wb['apache_directive_blocked_error'] = 'Diretivas do apache bloqueadas pelas configurações de segurança:';
-$wb['http_port_txt'] = 'Porta http';
-$wb['https_port_txt'] = 'Porta https';
-$wb['http_port_error_regex'] = 'Porta http inválida.';
-$wb['https_port_error_regex'] = 'Porta https inválida.';
+$wb['apache_directive_blocked_error'] = 'Diretivas do Apache bloqueadas pelas configurações de segurança:';
+$wb['http_port_txt'] = 'Porta HTTP';
+$wb['https_port_txt'] = 'Porta HTTPS';
+$wb['http_port_error_regex'] = 'Porta HTTP inválida.';
+$wb['https_port_error_regex'] = 'Porta HTTPS inválida.';
 $wb['nginx_directive_blocked_error'] = 'Diretivas do nginx bloqueadas pelas configurações de segurança:';
-?>
+$wb['ssl_state_error_regex'] = 'O campo "Estado" é inválido. São caracteres válidos: "a-z", "0-9", ".", "-" e "_".';
diff --git a/interface/web/sites/lib/lang/br_web_domain_admin_list.lng b/interface/web/sites/lib/lang/br_web_domain_admin_list.lng
index 07129a4b07..12f7a276b5 100644
--- a/interface/web/sites/lib/lang/br_web_domain_admin_list.lng
+++ b/interface/web/sites/lib/lang/br_web_domain_admin_list.lng
@@ -6,4 +6,3 @@ $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['add_new_record_txt'] = 'Adicionar novo site';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_domain_list.lng b/interface/web/sites/lib/lang/br_web_domain_list.lng
index 34709bada3..2d86623bd7 100644
--- a/interface/web/sites/lib/lang/br_web_domain_list.lng
+++ b/interface/web/sites/lib/lang/br_web_domain_list.lng
@@ -5,4 +5,3 @@ $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['add_new_record_txt'] = 'Adicionar novo site';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_folder.lng b/interface/web/sites/lib/lang/br_web_folder.lng
index 193cb4636f..002ddbbf0a 100644
--- a/interface/web/sites/lib/lang/br_web_folder.lng
+++ b/interface/web/sites/lib/lang/br_web_folder.lng
@@ -5,4 +5,4 @@ $wb['path_txt'] = 'Caminho';
 $wb['active_txt'] = 'Ativo';
 $wb['path_error_regex'] = 'Caminho da pasta é inválido.';
 $wb['error_folder_already_protected_txt'] = 'Já existe esta pasta.';
-?>
+$wb['Web Folder'] = 'Pastas Web';
diff --git a/interface/web/sites/lib/lang/br_web_folder_list.lng b/interface/web/sites/lib/lang/br_web_folder_list.lng
index 3fd9731af9..7e2a4e5e6c 100644
--- a/interface/web/sites/lib/lang/br_web_folder_list.lng
+++ b/interface/web/sites/lib/lang/br_web_folder_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Pasta';
+$wb['list_head_txt'] = 'Pastas Web';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['parent_domain_id_txt'] = 'Site';
 $wb['path_txt'] = 'Caminho';
 $wb['add_new_record_txt'] = 'Adicionar nova pasta';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_folder_user.lng b/interface/web/sites/lib/lang/br_web_folder_user.lng
index 5dc0354fec..4b64a0190f 100644
--- a/interface/web/sites/lib/lang/br_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/br_web_folder_user.lng
@@ -1,5 +1,5 @@
 <?php
-$wb['web_folder_id_txt'] = 'Pasta';
+$wb['web_folder_id_txt'] = 'Pasta Web';
 $wb['username_txt'] = 'Usuário';
 $wb['password_txt'] = 'Senha';
 $wb['active_txt'] = 'Ativo';
@@ -11,4 +11,4 @@ $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
 $wb['no_folder_perm'] = 'Você não tem permissão para esta pasta.';
 $wb['error_user_exists_already_txt'] = 'Já existe um registro igual para este usuário.';
-?>
+$wb['Web folder user'] = 'Usuários de pasta Web';
diff --git a/interface/web/sites/lib/lang/br_web_folder_user_list.lng b/interface/web/sites/lib/lang/br_web_folder_user_list.lng
index 8ad8c48257..b212336aa8 100644
--- a/interface/web/sites/lib/lang/br_web_folder_user_list.lng
+++ b/interface/web/sites/lib/lang/br_web_folder_user_list.lng
@@ -1,7 +1,6 @@
 <?php
-$wb['list_head_txt'] = 'Usuário de Pasta';
+$wb['list_head_txt'] = 'Usuários de Pasta Web';
 $wb['active_txt'] = 'Ativo';
-$wb['web_folder_id_txt'] = 'Pasta';
+$wb['web_folder_id_txt'] = 'Usuários de Pasta Web';
 $wb['username_txt'] = 'Usuário';
 $wb['add_new_record_txt'] = 'Adicionar novo usuário';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_sites_stats_list.lng b/interface/web/sites/lib/lang/br_web_sites_stats_list.lng
index f29c016f48..382e75f68d 100644
--- a/interface/web/sites/lib/lang/br_web_sites_stats_list.lng
+++ b/interface/web/sites/lib/lang/br_web_sites_stats_list.lng
@@ -6,4 +6,3 @@ $wb['last_month_txt'] = 'Último mês';
 $wb['this_year_txt'] = 'Este ano';
 $wb['last_year_txt'] = 'Último ano';
 $wb['sum_txt'] = 'Soma';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_subdomain.lng b/interface/web/sites/lib/lang/br_web_subdomain.lng
index e8fca3e048..9cdc6e611e 100644
--- a/interface/web/sites/lib/lang/br_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/br_web_subdomain.lng
@@ -4,10 +4,10 @@ $wb['ssl_locality_txt'] = 'Cidade';
 $wb['ssl_organisation_txt'] = 'Empresa';
 $wb['ssl_organisation_unit_txt'] = 'Departamento';
 $wb['ssl_country_txt'] = 'País';
-$wb['ssl_request_txt'] = 'Requisição';
-$wb['ssl_cert_txt'] = 'Certificado';
-$wb['ssl_bundle_txt'] = 'Agrupar';
-$wb['ssl_action_txt'] = 'Ação';
+$wb['ssl_request_txt'] = 'Requisição SSL';
+$wb['ssl_cert_txt'] = 'Certificado SSL';
+$wb['ssl_bundle_txt'] = 'Agrupar SSL';
+$wb['ssl_action_txt'] = 'Ação SSL';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['type_txt'] = 'Tipo';
@@ -19,7 +19,7 @@ $wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
 $wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
-$wb['document_root_txt'] = 'Documentroot';
+$wb['document_root_txt'] = 'Document root';
 $wb['system_user_txt'] = 'Usuário Linux';
 $wb['system_group_txt'] = 'Grupo Linux';
 $wb['ip_address_txt'] = 'Endereço IP';
@@ -36,7 +36,7 @@ $wb['limit_web_domain_txt'] = 'O limite de domínios de site para esta conta foi
 $wb['limit_web_aliasdomain_txt'] = 'O limite de alias de domínios para esta conta foi alcançado.';
 $wb['limit_web_subdomain_txt'] = 'O limite de subdomínios de site para esta conta foi alcançado.';
 $wb['apache_directives_txt'] = 'Diretivas do apache';
-$wb['domain_error_empty'] = 'O domínio está em branco.';
+$wb['domain_error_empty'] = 'O domínio está vazio.';
 $wb['domain_error_unique'] = 'Já existe um site, subdomínio ou alias de domínio com este nome.';
 $wb['domain_error_regex'] = 'O domínio é inválido.';
 $wb['domain_error_wildcard'] = 'Curingas não são permitidos para subdomínios.';
@@ -45,10 +45,9 @@ $wb['redirect_error_regex'] = 'Caminho de redirecionamento inválido. Redirecion
 $wb['no_redirect_txt'] = 'Sem redirecionamento';
 $wb['no_flag_txt'] = 'Sem marcas';
 $wb['proxy_directives_txt'] = 'Diretivas do proxy';
-$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código do proxy disponíveis:';
+$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código proxy disponíveis:';
 $wb['error_proxy_requires_url'] = 'O tipo de redirecionamento "proxy" exige uma URL como caminho de redirecionamento.';
-$wb['http_port_txt'] = 'Porta http';
-$wb['https_port_txt'] = 'Porta https';
-$wb['http_port_error_regex'] = 'Porta http inválida.';
-$wb['https_port_error_regex'] = 'Porta https inválida.';
-?>
+$wb['http_port_txt'] = 'Porta HTTP';
+$wb['https_port_txt'] = 'Porta HTTPS';
+$wb['http_port_error_regex'] = 'Porta HTTP inválida.';
+$wb['https_port_error_regex'] = 'Porta HTTPS inválida.';
diff --git a/interface/web/sites/lib/lang/br_web_subdomain_list.lng b/interface/web/sites/lib/lang/br_web_subdomain_list.lng
index b39160cc0a..65ab6443f2 100644
--- a/interface/web/sites/lib/lang/br_web_subdomain_list.lng
+++ b/interface/web/sites/lib/lang/br_web_subdomain_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['parent_domain_id_txt'] = 'Site';
 $wb['domain_txt'] = 'Subdomínio';
 $wb['add_new_record_txt'] = 'Adicionar novo subdomínio';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_vhost_domain.lng b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
index aee7c8c6a0..e4680791f7 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
@@ -6,15 +6,15 @@ $wb['ssl_locality_txt'] = 'Cidade';
 $wb['ssl_organisation_txt'] = 'Empresa';
 $wb['ssl_organisation_unit_txt'] = 'Departamento';
 $wb['ssl_country_txt'] = 'País';
-$wb['ssl_key_txt'] = 'Chave';
-$wb['ssl_request_txt'] = 'Requisição';
-$wb['ssl_cert_txt'] = 'Certificado';
-$wb['ssl_bundle_txt'] = 'Agrupar';
-$wb['ssl_action_txt'] = 'Ação';
-$wb['ssl_domain_txt'] = 'Domínio';
+$wb['ssl_key_txt'] = 'Chave SSL';
+$wb['ssl_request_txt'] = 'Requisição SSL';
+$wb['ssl_cert_txt'] = 'Certificado SSL';
+$wb['ssl_bundle_txt'] = 'Agrupar SSL';
+$wb['ssl_action_txt'] = 'Ação SSL';
+$wb['ssl_domain_txt'] = 'Domínio SSL';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
-$wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize o caractere barra(/).';
+$wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize o caractere  (barra).';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Pai';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
@@ -24,7 +24,7 @@ $wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
 $wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
-$wb['document_root_txt'] = 'Document-root';
+$wb['document_root_txt'] = 'Document Root';
 $wb['system_user_txt'] = 'Usuário Linux';
 $wb['system_group_txt'] = 'Grupo Linux';
 $wb['ip_address_txt'] = 'Endereço IPv4';
@@ -34,31 +34,31 @@ $wb['hd_quota_txt'] = 'Cota do Disco';
 $wb['traffic_quota_txt'] = 'Cota de Tráfego';
 $wb['cgi_txt'] = 'CGI';
 $wb['ssi_txt'] = 'SSI';
-$wb['errordocs_txt'] = 'Proprietário do Error-Documents';
+$wb['errordocs_txt'] = 'Proprietário do Error Documents';
 $wb['subdomain_txt'] = 'Subdomínio automático';
 $wb['ssl_txt'] = 'SSL';
 $wb['suexec_txt'] = 'SuEXEC';
 $wb['php_txt'] = 'PHP';
 $wb['client_txt'] = 'Cliente';
 $wb['limit_web_domain_txt'] = 'O limite de domínios de site para esta conta foi alcançado.';
-$wb['limit_web_aliasdomain_txt'] = 'O limite de alias de domínios para esta conta foi alcançado.';
+$wb['limit_web_aliasdomain_txt'] = 'O limite de alias de domínios desite para esta conta foi alcançado.';
 $wb['limit_web_subdomain_txt'] = 'O limite de subdomínios de site para esta conta foi alcançado.';
 $wb['apache_directives_txt'] = 'Diretivas do apache';
-$wb['domain_error_empty'] = 'O campo "Domínio" está em branco.';
+$wb['domain_error_empty'] = 'O campo "Domínio" está vazio.';
 $wb['domain_error_unique'] = 'Já existe um site, subdomínio ou alias de domínio com este nome.';
 $wb['domain_error_regex'] = 'O campo "Domínio" é inválido.';
 $wb['domain_error_acme_invalid'] = 'Domínio genérico inválido não permitido.';
 $wb['domain_error_autosub'] = 'Já existe um subdomínio com estas configurações.';
-$wb['hd_quota_error_empty'] = 'Cota do disco é 0 ou está em branco.';
-$wb['traffic_quota_error_empty'] = 'Cota de tráfego está em branco.';
-$wb['error_ssl_state_empty'] = 'O campo "Estado" está em branco.';
-$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está em branco.';
-$wb['error_ssl_organisation_empty'] = 'O campo "Empresa" está em branco.';
-$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está em branco.';
-$wb['error_ssl_country_empty'] = 'O campo "País" está em branco.';
-$wb['error_ssl_cert_empty'] = 'O campo "Certificado" está em branco.';
+$wb['hd_quota_error_empty'] = 'Cota do disco é 0 ou está vazio.';
+$wb['traffic_quota_error_empty'] = 'Cota de tráfego está vazio.';
+$wb['error_ssl_state_empty'] = 'O campo "Estado" está vazio.';
+$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está vazio.';
+$wb['error_ssl_organisation_empty'] = 'O campo "Empresa" está vazio.';
+$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está vazio.';
+$wb['error_ssl_country_empty'] = 'O campo "País" está vazio.';
+$wb['error_ssl_cert_empty'] = 'O campo "Certificado SSL" está vazio.';
 $wb['client_group_id_txt'] = 'Cliente';
-$wb['stats_password_txt'] = 'Configurar senha para estatísticas web';
+$wb['stats_password_txt'] = 'Configurar senha para estatísticas Web';
 $wb['allow_override_txt'] = 'Diretiva Apache AllowOverride';
 $wb['limit_web_quota_free_txt'] = 'Limite da cota de disco disponível';
 $wb['ssl_state_error_regex'] = 'O campo "Estado" é inválido. São caracteres válidos: "a-z", "0-9", ".", "-", e "_".';
@@ -68,12 +68,12 @@ $wb['ssl_organistaion_unit_error_regex'] = 'O campo "Departamento" é inválido.
 $wb['ssl_country_error_regex'] = 'O campo "País" é inválido. São caracteres válidos: "A-Z".';
 $wb['limit_traffic_quota_free_txt'] = 'Limite da cota de tráfego disponível';
 $wb['redirect_error_regex'] = 'Caminho de redirecionamento inválido. Redirecionamentos válidos são, por ex.: /teste/ ou https://www.dominio.com.br/teste/';
-$wb['php_open_basedir_txt'] = 'Diretório open_basedir do php';
+$wb['php_open_basedir_txt'] = 'Diretório open_basedir PHP';
 $wb['traffic_quota_exceeded_txt'] = 'O limite da cota de tráfego foi alcançado.';
 $wb['ruby_txt'] = 'Ruby';
-$wb['stats_user_txt'] = 'Usuário de estatísticas web';
-$wb['stats_type_txt'] = 'Sistema de estatísticas web';
-$wb['custom_php_ini_txt'] = 'Configurações personalizadas do php.ini';
+$wb['stats_user_txt'] = 'Usuário de estatísticas Web';
+$wb['stats_type_txt'] = 'Sistema de estatísticas Web';
+$wb['custom_php_ini_txt'] = 'Configurações personalizadas PHP.ini';
 $wb['none_txt'] = 'Nenhum';
 $wb['disabled_txt'] = 'Desabilitado';
 $wb['no_redirect_txt'] = 'Sem redirecionamento';
@@ -85,40 +85,40 @@ $wb['nginx_directives_txt'] = 'Diretivas do nginx';
 $wb['seo_redirect_txt'] = 'Diretivas SEO';
 $wb['non_www_to_www_txt'] = 'non-www -&gt; www';
 $wb['www_to_non_www_txt'] = 'www -&gt; non-www';
-$wb['php_fpm_use_socket_txt'] = 'Usar socket para php-fpm';
-$wb['php_fpm_chroot_txt'] = 'Chroot php-fpm';
-$wb['error_no_sni_txt'] = 'SNI para SSL não está habilitado neste servidor. Somente poderá ser habilitado um certificado para cada endereço IP.';
+$wb['php_fpm_use_socket_txt'] = 'Usar socket para PHP-FPM';
+$wb['php_fpm_chroot_txt'] = 'Chroot PHP-FPM';
+$wb['error_no_sni_txt'] = 'SNI para SSL não está habilitado neste servidor. Poderá ser habilitado um certificado para cada endereço IP.';
 $wb['python_txt'] = 'Python';
 $wb['perl_txt'] = 'Perl';
 $wb['pm_max_children_txt'] = 'PHP-FPM pm.max_children';
 $wb['pm_start_servers_txt'] = 'PHP-FPM pm.start_servers';
 $wb['pm_min_spare_servers_txt'] = 'PHP-FPM pm.min_spare_servers';
 $wb['pm_max_spare_servers_txt'] = 'PHP-FPM pm.max_spare_servers';
-$wb['error_php_fpm_pm_settings_txt'] = 'Valores das configurações do php-fpm podem ser: pm.max_children &gt;= pm.max_spare_servers &gt;= pm.start_servers &gt;= pm.min_spare_servers &gt; 0';
+$wb['error_php_fpm_pm_settings_txt'] = 'Valores das configurações PHP-fpm podem ser: pm.max_children &gt;= pm.max_spare_servers &gt;= pm.start_servers &gt;= pm.min_spare_servers &gt; 0';
 $wb['pm_max_children_error_regex'] = 'PHP-FPM pm.max_children deve ter um valor inteiro positivo.';
 $wb['pm_start_servers_error_regex'] = 'PHP-FPM pm.start_servers deve ter um valor inteiro positivo.';
 $wb['pm_min_spare_servers_error_regex'] = 'PHP-FPM pm.min_spare_servers deve ter um valor inteiro positivo.';
 $wb['pm_max_spare_servers_error_regex'] = 'PHP-FPM pm.max_spare_servers deve ter um valor inteiro positivo.';
 $wb['hd_quota_error_regex'] = 'Cota do disco é inválida.';
 $wb['traffic_quota_error_regex'] = 'Cota de tráfego é inválida.';
-$wb['server_php_id_txt'] = 'Versão do php';
-$wb['server_php_id_invalid_txt'] = 'PHP Version is invalid.';
-$wb['server_php_id_default_hidden_warning_txt'] = 'PHP Version was set to "default" but that can no longer be selected. Choose your desired PHP Version and save your settings.';
-$wb['pm_txt'] = 'Gerenciador de Processos do php-fpm';
+$wb['server_php_id_txt'] = 'Versão PHP';
+$wb['server_php_id_invalid_txt'] = 'A versão PHP é inválida.';
+$wb['server_php_id_default_hidden_warning_txt'] = 'A versão PHP foi definida como "padrão", mas não pode mais ser selecionada. Escolha a versão PHP desejada e salve suas configurações.';
+$wb['pm_txt'] = 'Gerenciador de processos PHP-FPM';
 $wb['pm_process_idle_timeout_txt'] = 'PHP-FPM pm.process_idle_timeout';
 $wb['pm_max_requests_txt'] = 'PHP-FPM pm.max_requests';
 $wb['pm_process_idle_timeout_error_regex'] = 'PHP-FPM pm.process_idle_timeout deve ter um valor inteiro positivo.';
 $wb['pm_max_requests_error_regex'] = 'PHP-FPM pm.max_requests deve ter um valor >= 0.';
-$wb['pm_ondemand_hint_txt'] = 'Por favor, observe que é necessário uma versão do php >= 5.3.9 para utilizar o gerenciador de processos por demanda. Se for selecionado por demanda com uma versão inferior do php, o mesmo não iniciará mais!';
+$wb['pm_ondemand_hint_txt'] = 'Por favor, observe que é necessário uma versão PHP >= 5.3.9 para utilizar o gerenciador de processos por demanda. Se for selecionado, por demanda, uma versão inferior PHP, o mesmo não iniciará mais!';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-$wb['available_php_directive_snippets_txt'] = 'Diretivas de trecho de código do php disponíveis:';
-$wb['available_apache_directive_snippets_txt'] = 'Diretivas de trecho de código do apache disponíveis:';
-$wb['available_nginx_directive_snippets_txt'] = 'Diretivas de trecho de código do nginx disponíveis:';
+$wb['available_php_directive_snippets_txt'] = 'Diretivas de trecho de código PHP disponíveis:';
+$wb['available_apache_directive_snippets_txt'] = 'Diretivas de trecho de código do Apache disponíveis:';
+$wb['available_nginx_directive_snippets_txt'] = 'Diretivas de trecho de código nginx disponíveis:';
 $wb['proxy_directives_txt'] = 'Diretivas do proxy';
-$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código do proxy disponíveis:';
+$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código proxy disponíveis:';
 $wb['no_server_error'] = 'Nenhum servidor selecionado.';
 $wb['no_backup_txt'] = 'Sem backup';
 $wb['daily_backup_txt'] = 'Diário';
@@ -140,40 +140,35 @@ $wb['web_folder_invalid_txt'] = 'A pasta web é inválida, por favor selecione o
 $wb['web_folder_unique_txt'] = 'A pasta web é já está em uso, por favor selecione outra.';
 $wb['host_txt'] = 'Nome do host';
 $wb['domain_error_wildcard'] = 'Curingas não são permitidos para subdomínios.';
-$wb['variables_txt'] = 'Variáveis';
-$wb['backup_excludes_txt'] = 'Diretórios Excluídos';
-$wb['backup_excludes_note_txt'] = '(Separar múltiplos diretórios por vírgulas. Exemplo: web/cache/*, web/backup)';
-$wb['backup_excludes_error_regex'] = 'Os diretórios excluídos possuem caracteres inválidos.';
-$wb['subdomain_error_empty'] = 'O subdomínio está em branco ou possui caracteres inválidos.';
+$wb['subdomain_error_empty'] = 'O subdomínio está vazio ou possui caracteres inválidos.';
 $wb['btn_save_txt'] = 'Salvar';
 $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['load_client_data_txt'] = 'Carregar detalhes do cliente';
 $wb['load_my_data_txt'] = 'Carregar detalhes do contato';
 $wb['reset_client_data_txt'] = 'Limpar dados';
-$wb['document_root_txt'] = 'Document Root';
-$wb['ssl_letsencrypt_txt'] = 'Let\'s Encrypt SSL';
+$wb['ssl_letsencrypt_txt'] = 'Let\\'s Encrypt SSL';
 $wb['rewrite_to_https_txt'] = 'Reescrever HTTP para HTTPS';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
-$wb['directive_snippets_id_txt'] = 'Configurações do servidor web';
-$wb['http_port_txt'] = 'Porta http';
-$wb['https_port_txt'] = 'Porta https';
-$wb['http_port_error_regex'] = 'Porta http inválida.';
-$wb['https_port_error_regex'] = 'Porta https inválida.';
+$wb['directive_snippets_id_txt'] = 'Configurações do servidor Web';
+$wb['http_port_txt'] = 'Porta HTTP';
+$wb['https_port_txt'] = 'Porta HTTPS';
+$wb['http_port_error_regex'] = 'Porta HTTP inválida.';
+$wb['https_port_error_regex'] = 'Porta HTTPS inválida.';
 $wb['enable_pagespeed_txt'] = 'Habilitar PageSpeed';
 $wb['log_retention_txt'] = 'Tempo de retenção do log de arquivos';
 $wb['log_retention_error_regex'] = 'Tempo de retenção em dias (valores permitidos: mínimo 0, máximo 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Cota de disco não pode ser configurada para 0.';
-$wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
-$wb['backup_format_web_txt'] = 'Backup format for web files';
-$wb['backup_format_db_txt'] = 'Backup format for database';
-$wb['backup_missing_utils_txt'] = 'The following formats can not be used because they are not installed on the webserver: ';
-$wb['backup_compression_options_txt'] = 'Compression options';
-$wb['backup_encryption_note_txt'] = 'Encryption is only available for 7z, RAR, and zip (not secure).';
-$wb['backup_encryption_options_txt'] = 'Encryption options';
-$wb['backup_enable_encryption_txt'] = 'Enable encryption';
-$wb['backup_password_txt'] = 'Password';
-$wb['backup_format_default_txt'] = 'Default: zip (deflate) or tar (gzip)';
-$wb['backup_format_zip_txt'] = 'zip (deflate)';
+$wb['proxy_protocol_txt'] = 'Habilitar protocolo PROXY';
+$wb['backup_format_web_txt'] = 'Formato do backup para arquivos Web';
+$wb['backup_format_db_txt'] = 'Formato do backup para o banco de dados';
+$wb['backup_missing_utils_txt'] = 'Os seguintes formatos não podem ser usados porque não estão instalados no servidor: ';
+$wb['backup_compression_options_txt'] = 'Opções de compactação';
+$wb['backup_encryption_note_txt'] = 'Criptografia está disponível apenas para 7z, RAR, e zip (sem segurança).';
+$wb['backup_encryption_options_txt'] = 'Opçoes de criptgrafia';
+$wb['backup_enable_encryption_txt'] = 'Habilitar criptografia';
+$wb['backup_password_txt'] = 'Senha';
+$wb['backup_format_default_txt'] = 'Padrão: zip (esvaziar) ou tar (gzip)';
+$wb['backup_format_zip_txt'] = 'zip (esvaziar)';
 $wb['backup_format_gzip_txt'] = 'gzip';
 $wb['backup_format_bzip2_txt'] = 'bzip2';
 $wb['backup_format_xz_txt'] = 'xz';
@@ -190,19 +185,19 @@ $wb['backup_format_tar_7z_lzma_txt'] = 'tar + 7z (LZMA)';
 $wb['backup_format_tar_7z_lzma2_txt'] = 'tar + 7z (LZMA2)';
 $wb['backup_format_tar_7z_ppmd_txt'] = 'tar + 7z (PPMd)';
 $wb['backup_format_tar_7z_bzip2_txt'] = 'tar + 7z (BZip2)';
-$wb['dependent_domains_txt'] = 'Dependent sub- / aliasdomains';
-$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.';
-$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.';
-$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.';
-$wb['error_server_change_not_possible'] = 'The server cannot be changed.';
-$wb['jailkit_chroot_app_sections_txt'] = 'Seções de aplicações em chroot no jailkit';
-$wb['jailkit_chroot_app_programs_txt'] = 'Aplicações em chroot no jailkit';
-$wb['jailkit_chroot_app_sections_error_empty'] = 'Seções de aplicações no jailkit está em branco.';
-$wb['jailkit_chroot_app_programs_error_empty'] = 'Aplicações no jailkit está em branco.';
-$wb['jailkit_chroot_app_sections_error_regex'] = 'As seções de aplicações no jaikit são inválidas.';
-$wb['jailkit_chroot_app_programs_error_regex'] = 'As aplicações em chroot no jailkit são inválidas.';
-$wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroot app sections from Server Config';
-$wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
-$wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
-$wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
+$wb['dependent_domains_txt'] = 'Sudomínios e/ou alias de domínios dependentes';
+$wb['error_ipv4_change_forbidden'] = 'O IP não pode ser modificado. Por favor, contate o administrador se desejar modificar o endereço IPv4.';
+$wb['error_ipv6_change_forbidden'] = 'o IP não pode ser modificado. Por favor, contate o administrador se desejar modificar o endereço IPv6.';
+$wb['error_domain_change_forbidden'] = 'O domínio não pode ser modificado. Por favor, contate o administrador se desejar modificar o domínio.';
+$wb['error_server_change_not_possible'] = 'O servidor não pode ser modificado.';
+$wb['jailkit_chroot_app_sections_txt'] = 'Seções de aplicações em chroot no Jailkit';
+$wb['jailkit_chroot_app_programs_txt'] = 'Aplicações em chroot no Jailkit';
+$wb['jailkit_chroot_app_sections_error_empty'] = 'Seções de aplicações no Jailkit está vazio.';
+$wb['jailkit_chroot_app_programs_error_empty'] = 'Aplicações no Jailkit está vazio.';
+$wb['jailkit_chroot_app_sections_error_regex'] = 'As seções de aplicações no Jailkit são inválidas.';
+$wb['jailkit_chroot_app_programs_error_regex'] = 'As aplicações em chroot no Jailkit são inválidas.';
+$wb['tooltip_jailkit_chroot_app_sections_txt'] = 'Quando vazio, usa as seções do aplicativo em chroot Jailkit da configuração padrão do servidor';
+$wb['tooltip_jailkit_chroot_app_programs_txt'] = 'Quando vazio, usa aplicativos em chroot Jailkit da configuração padrão do servidor.';
+$wb['delete_unused_jailkit_txt'] = 'Remover chroot Jailkit sem uso';
+$wb['tooltip_delete_unused_jailkit_txt'] = 'Remover o ambiente chroot Jailkit quando não há usuários Shell ou tarefas do cron que o requeiram.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\\'s Encrypt certificates only. Remember to uncheck Let\\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/br_web_vhost_domain_admin_list.lng b/interface/web/sites/lib/lang/br_web_vhost_domain_admin_list.lng
index 3c0c7fd01e..0aee930b67 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_domain_admin_list.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_domain_admin_list.lng
@@ -11,4 +11,3 @@ $wb['add_new_aliasdomain_txt'] = 'Adicionar novo alias de domínio';
 $wb['domain_list_head_txt'] = 'Sites';
 $wb['aliasdomain_list_head_txt'] = 'Alias de domínio (vhost)';
 $wb['subdomain_list_head_txt'] = 'Subdomínios (vhost)';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_vhost_domain_list.lng b/interface/web/sites/lib/lang/br_web_vhost_domain_list.lng
index 8170afc2d3..08b7f213a1 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_domain_list.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_domain_list.lng
@@ -11,4 +11,3 @@ $wb['parent_domain_id_txt'] = 'Site';
 $wb['domain_list_head_txt'] = 'Sites';
 $wb['aliasdomain_list_head_txt'] = 'Alias de domínio (vhost)';
 $wb['subdomain_list_head_txt'] = 'Subdomínios (vhost)';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng
index 5d90aa1b25..3f1dc2d080 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng
@@ -1,8 +1,8 @@
 <?php
 $wb['parent_domain_id_txt'] = 'Site Pai';
-$wb['web_folder_txt'] = 'Pasta web';
-$wb['web_folder_invalid_txt'] = 'A pasta é escolhida é inválida, por favor escolha outra.';
-$wb['web_folder_unique_txt'] = 'A pasta web escolhida está em uso, por favor escolha outra.';
+$wb['web_folder_txt'] = 'Pasta Web';
+$wb['web_folder_invalid_txt'] = 'A pasta escolhida é inválida, por favor escolha outra.';
+$wb['web_folder_unique_txt'] = 'A pasta escolhida está em uso, por favor escolha outra.';
 $wb['backup_interval_txt'] = 'Intervalo entre backups';
 $wb['backup_copies_txt'] = 'Número de cópias do backup';
 $wb['ssl_state_txt'] = 'Estado';
@@ -10,18 +10,17 @@ $wb['ssl_locality_txt'] = 'Cidade';
 $wb['ssl_organisation_txt'] = 'Empresa';
 $wb['ssl_organisation_unit_txt'] = 'Departamento';
 $wb['ssl_country_txt'] = 'País';
-$wb['ssl_key_txt'] = 'Chave';
-$wb['ssl_request_txt'] = 'Requisição';
-$wb['ssl_cert_txt'] = 'Certificado';
-$wb['ssl_bundle_txt'] = 'Agrupar';
-$wb['ssl_action_txt'] = 'Ação';
+$wb['ssl_key_txt'] = 'Chave SSL';
+$wb['ssl_request_txt'] = 'Requisição SSL';
+$wb['ssl_cert_txt'] = 'Certificado SSL';
+$wb['ssl_bundle_txt'] = 'Agrupar SSL';
+$wb['ssl_action_txt'] = 'Ação SSL';
 $wb['ssl_domain_txt'] = 'Domínio';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['host_txt'] = 'Nome do host';
-$wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize o caractere barra(/).';
+$wb['web_folder_error_regex'] = 'Pasta Web é inválida. Por favor não utilize o caractere  (barra).';
 $wb['type_txt'] = 'Tipo';
-$wb['parent_domain_id_txt'] = 'Site Pai';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
 $wb['l_redirect_txt'] = 'L (Last redirect rule)';
@@ -29,7 +28,7 @@ $wb['r_l_redirect_txt'] = 'R,L (Temporary redirect + last rule)';
 $wb['r_301_l_redirect_txt'] = 'R=301,L (Permanent redirect + last rule)';
 $wb['redirect_path_txt'] = 'Caminho para o redirecionamento';
 $wb['active_txt'] = 'Ativo';
-$wb['document_root_txt'] = 'Documentroot';
+$wb['document_root_txt'] = 'Document root';
 $wb['system_user_txt'] = 'Usuário Linux';
 $wb['system_group_txt'] = 'Grupo Linux';
 $wb['ip_address_txt'] = 'Endereço IPv4';
@@ -39,28 +38,28 @@ $wb['hd_quota_txt'] = 'Cota de disco';
 $wb['traffic_quota_txt'] = 'Cota de tráfego';
 $wb['cgi_txt'] = 'CGI';
 $wb['ssi_txt'] = 'SSI';
-$wb['errordocs_txt'] = 'Proprietário do error-documents';
+$wb['errordocs_txt'] = 'Proprietário do Error Documents';
 $wb['subdomain_txt'] = 'Subdomínio automático';
 $wb['ssl_txt'] = 'SSL';
 $wb['suexec_txt'] = 'SuEXEC';
 $wb['php_txt'] = 'PHP';
 $wb['client_txt'] = 'Cliente';
 $wb['limit_web_domain_txt'] = 'O limite de domínios de site para esta conta foi alcançado.';
-$wb['limit_web_aliasdomain_txt'] = 'O limite de alias de domínios para esta conta foi alcançado.';
+$wb['limit_web_aliasdomain_txt'] = 'O limite de alias de domínios de site para esta conta foi alcançado.';
 $wb['limit_web_subdomain_txt'] = 'O limite de subdomínios de site para esta conta foi alcançado.';
-$wb['apache_directives_txt'] = 'Diretivas do apache';
-$wb['domain_error_empty'] = 'O campo "Domínio" está em branco.';
+$wb['apache_directives_txt'] = 'Diretivas do Apache';
+$wb['domain_error_empty'] = 'O campo "Domínio" está vazio.';
 $wb['domain_error_unique'] = 'Já existe um site, subdomínio ou alias de domínio com este nome.';
 $wb['domain_error_regex'] = 'O campo "Domínio" é inválido.';
 $wb['domain_error_wildcard'] = 'Curingas não são permitidos para subdomínios.';
-$wb['hd_quota_error_empty'] = 'Cota do disco é 0 ou está em branco.';
-$wb['traffic_quota_error_empty'] = 'Cota de tráfego está em branco.';
-$wb['error_ssl_state_empty'] = 'O campo "Estado" está em branco.';
-$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está em branco.';
-$wb['error_ssl_organisation_empty'] = 'O campo "Empresa" está em branco.';
-$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está em branco.';
-$wb['error_ssl_country_empty'] = 'O campo "País" está em branco.';
-$wb['error_ssl_cert_empty'] = 'O campo "Certificado" está em branco.';
+$wb['hd_quota_error_empty'] = 'Cota do disco é 0 ou está vazio.';
+$wb['traffic_quota_error_empty'] = 'Cota de tráfego está vazio.';
+$wb['error_ssl_state_empty'] = 'O campo "Estado" está vazio.';
+$wb['error_ssl_locality_empty'] = 'O campo "Cidade" está vazio.';
+$wb['error_ssl_organisation_empty'] = 'O campo "Empresa" está vazio.';
+$wb['error_ssl_organisation_unit_empty'] = 'O campo "Departamento" está vazio.';
+$wb['error_ssl_country_empty'] = 'O campo "País" está vazio.';
+$wb['error_ssl_cert_empty'] = 'O campo "Certificado SSL" está vazio.';
 $wb['client_group_id_txt'] = 'Cliente';
 $wb['stats_password_txt'] = 'Configurar senha para estatísticas web';
 $wb['allow_override_txt'] = 'Diretiva Apache AllowOverride';
@@ -72,12 +71,12 @@ $wb['ssl_organistaion_unit_error_regex'] = 'O campo "Departamento" é inválido.
 $wb['ssl_country_error_regex'] = 'O campo "País" é inválido. Caracteres válidos são: "A-Z".';
 $wb['limit_traffic_quota_free_txt'] = 'Limite da cota de tráfego disponível';
 $wb['redirect_error_regex'] = 'Caminho de redirecionamento inválido. Redirecionamentos válidos são, por ex.: /teste/ ou https://www.dominio.com.br/teste/';
-$wb['php_open_basedir_txt'] = 'Diretório open_basedir do php';
+$wb['php_open_basedir_txt'] = 'Diretório open_basedir PHP';
 $wb['traffic_quota_exceeded_txt'] = 'O limite da cota de tráfego foi alcançado.';
 $wb['ruby_txt'] = 'Ruby';
-$wb['stats_user_txt'] = 'Usuário de estatísticas web';
-$wb['stats_type_txt'] = 'Sistema de estatísticas web';
-$wb['custom_php_ini_txt'] = 'Configurações personalizadas do php.ini';
+$wb['stats_user_txt'] = 'Usuário de estatísticas Web';
+$wb['stats_type_txt'] = 'Sistema de estatísticas Web';
+$wb['custom_php_ini_txt'] = 'Configurações personalizadas PHP.ini';
 $wb['none_txt'] = 'Nenhum';
 $wb['disabled_txt'] = 'Desabilitado';
 $wb['no_redirect_txt'] = 'Sem redirecionamento';
@@ -89,37 +88,37 @@ $wb['nginx_directives_txt'] = 'Diretivas do nginx';
 $wb['seo_redirect_txt'] = 'Diretivas SEO';
 $wb['non_www_to_www_txt'] = 'non-www -&gt; www';
 $wb['www_to_non_www_txt'] = 'www -&gt; non-www';
-$wb['php_fpm_use_socket_txt'] = 'Usar socket para php-fpm';
-$wb['error_no_sni_txt'] = 'SNI para SSL não está habilitado neste servidor. Somente poderá ser habilitado um certificado para cada endereço IP.';
+$wb['php_fpm_use_socket_txt'] = 'Usar socket para PHP-FPM';
+$wb['error_no_sni_txt'] = 'SNI para SSL não está habilitado neste servidor. Poderá ser habilitado um certificado para cada endereço IP.';
 $wb['python_txt'] = 'Python';
 $wb['perl_txt'] = 'Perl';
 $wb['pm_max_children_txt'] = 'PHP-FPM pm.max_children';
 $wb['pm_start_servers_txt'] = 'PHP-FPM pm.start_servers';
 $wb['pm_min_spare_servers_txt'] = 'PHP-FPM pm.min_spare_servers';
 $wb['pm_max_spare_servers_txt'] = 'PHP-FPM pm.max_spare_servers';
-$wb['error_php_fpm_pm_settings_txt'] = 'Valores das configurações do php-fpm podem ser: pm.max_children &gt;= pm.max_spare_servers &gt;= pm.start_servers &gt;= pm.min_spare_servers &gt; 0';
+$wb['error_php_fpm_pm_settings_txt'] = 'Valores das configurações PHP-fpm podem ser: pm.max_children &gt;= pm.max_spare_servers &gt;= pm.start_servers &gt;= pm.min_spare_servers &gt; 0';
 $wb['pm_max_children_error_regex'] = 'PHP-FPM pm.max_children deve ter um valor inteiro positivo.';
 $wb['pm_start_servers_error_regex'] = 'PHP-FPM pm.start_servers deve ter um valor inteiro positivo.';
 $wb['pm_min_spare_servers_error_regex'] = 'PHP-FPM pm.min_spare_servers deve ter um valor inteiro positivo.';
 $wb['pm_max_spare_servers_error_regex'] = 'PHP-FPM pm.max_spare_servers deve ter um valor inteiro positivo.';
 $wb['hd_quota_error_regex'] = 'Cota do disco é inválida.';
 $wb['traffic_quota_error_regex'] = 'Cota de tráfego é inválida.';
-$wb['server_php_id_txt'] = 'Versão do php';
-$wb['pm_txt'] = 'Gerenciador de Processos do php-fpm';
+$wb['server_php_id_txt'] = 'Versão PHP';
+$wb['pm_txt'] = 'Gerenciador de Processos PHP-FPM';
 $wb['pm_process_idle_timeout_txt'] = 'PHP-FPM pm.process_idle_timeout';
 $wb['pm_max_requests_txt'] = 'PHP-FPM pm.max_requests';
 $wb['pm_process_idle_timeout_error_regex'] = 'PHP-FPM pm.process_idle_timeout deve ter um valor inteiro positivo.';
 $wb['pm_max_requests_error_regex'] = 'PHP-FPM pm.max_requests deve ter um valor >= 0.';
-$wb['pm_ondemand_hint_txt'] = 'Por favor, observe que é necessário uma versão do php >= 5.3.9 para utilizar o gerenciador de processos por demanda. Se for selecionado por demanda com uma versão inferior do php, o mesmo não iniciará mais!';
+$wb['pm_ondemand_hint_txt'] = 'Por favor, observe que é necessário uma versão PHP >= 5.3.9 para utilizar o gerenciador de processos por demanda. Se for selecionado, por demanda, uma versão inferior PHP, o mesmo não iniciará mais!';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-$wb['available_php_directive_snippets_txt'] = 'Diretivas de trecho de código do php disponíveis:';
-$wb['available_apache_directive_snippets_txt'] = 'Diretivas de trecho de código do apache disponíveis:';
-$wb['available_nginx_directive_snippets_txt'] = 'Diretivas de trecho de código do nginx disponíveis:';
+$wb['available_php_directive_snippets_txt'] = 'Diretivas de trecho de código PHP disponíveis:';
+$wb['available_apache_directive_snippets_txt'] = 'Diretivas de trecho de código do Apache disponíveis:';
+$wb['available_nginx_directive_snippets_txt'] = 'Diretivas de trecho de código nginx disponíveis:';
 $wb['proxy_directives_txt'] = 'Diretivas do proxy';
-$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código do proxy disponíveis:';
+$wb['available_proxy_directive_snippets_txt'] = 'Diretivas de trechos de código proxy disponíveis:';
 $wb['rewrite_rules_txt'] = 'Reescrever regras';
 $wb['invalid_rewrite_rules_txt'] = 'Regras de reescrita inválidas';
 $wb['allowed_rewrite_rule_directives_txt'] = 'Diretivas permitidas:';
@@ -128,9 +127,8 @@ $wb['variables_txt'] = 'Variáveis';
 $wb['backup_excludes_txt'] = 'Diretórios Excluídos';
 $wb['backup_excludes_note_txt'] = '(Separar múltiplos diretórios por vírgulas. Exemplo: web/cache/*, web/backup)';
 $wb['backup_excludes_error_regex'] = 'Os diretórios excluídos possuem caracteres inválidos.';
-$wb['subdomain_error_empty'] = 'O subdomínio está em branco ou possui caracteres inválidos.';
-$wb['http_port_txt'] = 'Porta http';
-$wb['https_port_txt'] = 'Porta https';
-$wb['http_port_error_regex'] = 'Porta http inválida.';
-$wb['https_port_error_regex'] = 'Porta https inválida.';
-?>
+$wb['subdomain_error_empty'] = 'O subdomínio está vazio ou possui caracteres inválidos.';
+$wb['http_port_txt'] = 'Porta HTTP';
+$wb['https_port_txt'] = 'Porta HTTPS';
+$wb['http_port_error_regex'] = 'Porta HTTP inválida.';
+$wb['https_port_error_regex'] = 'Porta HTTPS inválida.';
diff --git a/interface/web/sites/lib/lang/br_web_vhost_subdomain_list.lng b/interface/web/sites/lib/lang/br_web_vhost_subdomain_list.lng
index b39160cc0a..65ab6443f2 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_subdomain_list.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_subdomain_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['parent_domain_id_txt'] = 'Site';
 $wb['domain_txt'] = 'Subdomínio';
 $wb['add_new_record_txt'] = 'Adicionar novo subdomínio';
-?>
diff --git a/interface/web/sites/lib/lang/br_webdav_user.lng b/interface/web/sites/lib/lang/br_webdav_user.lng
index 485e3a7747..6b6174c44d 100644
--- a/interface/web/sites/lib/lang/br_webdav_user.lng
+++ b/interface/web/sites/lib/lang/br_webdav_user.lng
@@ -6,16 +6,16 @@ $wb['username_txt'] = 'Usuário';
 $wb['password_txt'] = 'Senha';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
 $wb['active_txt'] = 'Ativo';
-$wb['limit_webdav_user_txt'] = 'O limite de usuários webdav para esta conta foi alcançado.';
-$wb['username_error_empty'] = 'O nome do usuário está em branco.';
+$wb['limit_webdav_user_txt'] = 'O limite de usuários Webdav para esta conta foi alcançado.';
+$wb['username_error_empty'] = 'O nome do usuário está vazio.';
 $wb['username_error_unique'] = 'O nome do usuário deve ser exclusivo.';
 $wb['username_error_regex'] = 'O nome de usuário possui caracteres não permitidos.';
-$wb['directory_error_empty'] = 'O diretório está em branco.';
+$wb['directory_error_empty'] = 'O diretório está vazio.';
 $wb['parent_domain_id_error_empty'] = 'Nenhum site selecionado.';
-$wb['dir_dot_error'] = 'Não é permitido \'..\' no caminho.';
-$wb['dir_slashdot_error'] = 'Não é permitido \'./\' no caminho.';
+$wb['dir_dot_error'] = 'Não é permitido \\'..\\' no caminho.';
+$wb['dir_slashdot_error'] = 'Não é permitido \\'./\\' no caminho.';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-?>
+$wb['Webdav User'] = 'Usuário Webdav';
diff --git a/interface/web/sites/lib/lang/br_webdav_user_list.lng b/interface/web/sites/lib/lang/br_webdav_user_list.lng
index 4708f7283c..63a10a517c 100644
--- a/interface/web/sites/lib/lang/br_webdav_user_list.lng
+++ b/interface/web/sites/lib/lang/br_webdav_user_list.lng
@@ -1,8 +1,7 @@
 <?php
-$wb['list_head_txt'] = 'Usuário webdav';
+$wb['list_head_txt'] = 'Usuário Webdav';
 $wb['active_txt'] = 'Ativo';
 $wb['server_id_txt'] = 'Servidor';
 $wb['parent_domain_id_txt'] = 'Site';
 $wb['username_txt'] = 'Usuário';
 $wb['add_new_record_txt'] = 'Adicionar novo usuário';
-?>
diff --git a/interface/web/sites/lib/lang/cz.lng b/interface/web/sites/lib/lang/cz.lng
index 4c16438e34..755e644f8e 100644
--- a/interface/web/sites/lib/lang/cz.lng
+++ b/interface/web/sites/lib/lang/cz.lng
@@ -31,5 +31,4 @@ $wb['Available packages'] = 'Dostupné balíčky';
 $wb['Installed packages'] = 'Nainstalované balíčky';
 $wb['Update Packagelist'] = 'Aktualizace seznamu balíčků';
 $wb['Subdomain (Vhost)'] = 'Subdoména (Vhost)';
-$wb['error_proxy_requires_url'] = 'Redirect Type \\"proxy\\" requires a URL as the redirect path.';
-?>
+$wb['error_proxy_requires_url'] = 'Redirect Type \"proxy\" requires a URL as the redirect path.';
diff --git a/interface/web/sites/lib/lang/cz_aps.lng b/interface/web/sites/lib/lang/cz_aps.lng
index adf6ccf58e..e6b4f5d296 100644
--- a/interface/web/sites/lib/lang/cz_aps.lng
+++ b/interface/web/sites/lib/lang/cz_aps.lng
@@ -38,14 +38,14 @@ $wb['error_inv_main_location'] = 'The given install location folder is invalid.'
 $wb['error_license_agreement'] = 'In order to continue you have to accept the license agreement.';
 $wb['error_no_database_pw'] = 'You have provided no valid database password.';
 $wb['error_short_database_pw'] = 'Please choose a longer database password.';
-$wb['error_no_value_for'] = 'The field \\"%s\\" must not be empty.';
-$wb['error_short_value_for'] = 'The field \\"%s\\" requires a longer input value.';
-$wb['error_long_value_for'] = 'The field \\"%s\\" requires a shorter input value.';
-$wb['error_inv_value_for'] = 'You have entered an invalid value for the field \\"%s\\".';
-$wb['error_inv_email_for'] = 'You have entered an invalid mail address for the field \\"%s\\".';
-$wb['error_inv_domain_for'] = 'You have entered an invalid domain for the field \\"%s\\".';
-$wb['error_inv_integer_for'] = 'You have entered an invalid number for the field \\"%s\\".';
-$wb['error_inv_float_for'] = 'You have entered an invalid floating point number for the field \\"%s\\".';
+$wb['error_no_value_for'] = 'The field \"%s\" must not be empty.';
+$wb['error_short_value_for'] = 'The field \"%s\" requires a longer input value.';
+$wb['error_long_value_for'] = 'The field \"%s\" requires a shorter input value.';
+$wb['error_inv_value_for'] = 'You have entered an invalid value for the field \"%s\".';
+$wb['error_inv_email_for'] = 'You have entered an invalid mail address for the field \"%s\".';
+$wb['error_inv_domain_for'] = 'You have entered an invalid domain for the field \"%s\".';
+$wb['error_inv_integer_for'] = 'You have entered an invalid number for the field \"%s\".';
+$wb['error_inv_float_for'] = 'You have entered an invalid floating point number for the field \"%s\".';
 $wb['error_used_location'] = 'The installation path already contains a package installation.';
 $wb['installation_task_txt'] = 'Instalace plánované';
 $wb['installation_error_txt'] = 'Chyba instalace';
@@ -60,4 +60,3 @@ $wb['repeat_password_txt'] = 'Opakujte heslo';
 $wb['password_mismatch_txt'] = 'Hesla se neshodují.';
 $wb['password_match_txt'] = 'Hesla se shodují.';
 $wb['password_strength_txt'] = 'Bezpečnost hesla';
-?>
diff --git a/interface/web/sites/lib/lang/cz_aps_instances_list.lng b/interface/web/sites/lib/lang/cz_aps_instances_list.lng
index db4494af02..039194905e 100644
--- a/interface/web/sites/lib/lang/cz_aps_instances_list.lng
+++ b/interface/web/sites/lib/lang/cz_aps_instances_list.lng
@@ -8,4 +8,3 @@ $wb['install_location_txt'] = 'Umístění instalace';
 $wb['pkg_delete_confirmation'] = 'Opravdu chcete smazat tuto instalaci ?';
 $wb['filter_txt'] = 'Hledat';
 $wb['delete_txt'] = 'Smazat';
-?>
diff --git a/interface/web/sites/lib/lang/cz_aps_packages_list.lng b/interface/web/sites/lib/lang/cz_aps_packages_list.lng
index 52ef6ebcd9..96cbd4515d 100644
--- a/interface/web/sites/lib/lang/cz_aps_packages_list.lng
+++ b/interface/web/sites/lib/lang/cz_aps_packages_list.lng
@@ -5,4 +5,3 @@ $wb['version_txt'] = 'Verze';
 $wb['category_txt'] = 'Kategorie';
 $wb['status_txt'] = 'Odemčený';
 $wb['filter_txt'] = 'Hledat';
-?>
diff --git a/interface/web/sites/lib/lang/cz_aps_update_packagelist.lng b/interface/web/sites/lib/lang/cz_aps_update_packagelist.lng
index 8f4124b47e..22c7e362c9 100644
--- a/interface/web/sites/lib/lang/cz_aps_update_packagelist.lng
+++ b/interface/web/sites/lib/lang/cz_aps_update_packagelist.lng
@@ -4,4 +4,3 @@ $wb['list_desc_txt'] = '';
 $wb['btn_start_txt'] = 'Aktualizace seznamu balíčků';
 $wb['btn_cancel_txt'] = 'Zrušit';
 $wb['legend_txt'] = 'Zde si můžete aktualizovat seznam dostupných balíčků. Vezměte prosím na vědomí, že aktualizace může trvat až několik minut. Po spuštění aktualizace můžete následně opustit tuto sekci. Tento proces bude pokračovat na pozadí.';
-?>
diff --git a/interface/web/sites/lib/lang/cz_backup_stats_list.lng b/interface/web/sites/lib/lang/cz_backup_stats_list.lng
index 29a84fd015..be1ab59d33 100644
--- a/interface/web/sites/lib/lang/cz_backup_stats_list.lng
+++ b/interface/web/sites/lib/lang/cz_backup_stats_list.lng
@@ -1,10 +1,9 @@
 <?php
 $wb['list_head_txt'] = 'Statistiky zálohování';
-$wb['database_name_txt'] = '';
+$wb['database_name_txt'] = 'Název databáze';
 $wb['active_txt'] = 'Aktivní';
 $wb['domain_txt'] = 'Doména';
 $wb['backup_count_txt'] = 'Počet záloh';
 $wb['backup_server_txt'] = 'Server';
 $wb['backup_interval_txt'] = 'Interval / cnt.';
 $wb['backup_size_txt'] = 'Velikost zálohy';
-?>
diff --git a/interface/web/sites/lib/lang/cz_cron.lng b/interface/web/sites/lib/lang/cz_cron.lng
index 61666a1823..8588408041 100644
--- a/interface/web/sites/lib/lang/cz_cron.lng
+++ b/interface/web/sites/lib/lang/cz_cron.lng
@@ -19,8 +19,7 @@ $wb['run_wday_error_format'] = 'Chybný formát pro dny týdne.';
 $wb['command_error_format'] = 'Chybná formát příkazu. V případě URL je povoleno volání pouze http/https.';
 $wb['unknown_fieldtype_error'] = 'Bylo použito pole neznámého typu.';
 $wb['server_id_error_empty'] = 'ID serveru je prázdné.';
-$wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with https:// as cron command.';
+$wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with http:// as cron command.';
 $wb['command_error_empty'] = 'Command is empty.';
-$wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.';
+$wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or http://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.';
 $wb['log_output_txt'] = 'Log output';
-?>
diff --git a/interface/web/sites/lib/lang/cz_cron_list.lng b/interface/web/sites/lib/lang/cz_cron_list.lng
index 5fdc8352f0..7031a8a5aa 100644
--- a/interface/web/sites/lib/lang/cz_cron_list.lng
+++ b/interface/web/sites/lib/lang/cz_cron_list.lng
@@ -10,4 +10,3 @@ $wb['run_wday_txt'] = 'Dny týdne';
 $wb['command_txt'] = 'Příkaz';
 $wb['add_new_cron_txt'] = 'Vytvořit cron úlohu';
 $wb['parent_domain_id_txt'] = 'Webové stránky';
-?>
diff --git a/interface/web/sites/lib/lang/cz_database.lng b/interface/web/sites/lib/lang/cz_database.lng
index 931360d8ca..419fe42488 100644
--- a/interface/web/sites/lib/lang/cz_database.lng
+++ b/interface/web/sites/lib/lang/cz_database.lng
@@ -46,5 +46,4 @@ $wb['database_user_missing_txt'] = 'Prosím vyberte uživatele databáze pro tut
 $wb['limit_database_quota_txt'] = 'Kvóta databáze';
 $wb['limit_database_quota_error_notint'] = 'Limit databázové kvóty musí být číslo.';
 $wb['limit_database_quota_free_txt'] = 'Max. dostupná DB kvóta je ';
-$wb['limit_database_quota_not_0_txt']= 'Database quota can not be 0';
-?>
+$wb['limit_database_quota_not_0_txt'] = 'Database quota can not be 0';
diff --git a/interface/web/sites/lib/lang/cz_database_admin_list.lng b/interface/web/sites/lib/lang/cz_database_admin_list.lng
index 79f4bd8d47..8fcd003115 100644
--- a/interface/web/sites/lib/lang/cz_database_admin_list.lng
+++ b/interface/web/sites/lib/lang/cz_database_admin_list.lng
@@ -4,9 +4,8 @@ $wb['active_txt'] = 'Aktivní';
 $wb['remote_access_txt'] = 'Vzdálený přístup';
 $wb['server_id_txt'] = 'Server';
 $wb['database_user_txt'] = 'Uživatel databáze';
-$wb['database_name_txt'] = 'Jméno databáze';
+$wb['database_name_txt'] = 'Název databáze';
 $wb['add_new_record_txt'] = 'Vytvořit databázi';
 $wb['sys_groupid_txt'] = 'Klient';
 $wb['parent_domain_id_txt'] = 'Webové stránky';
 $wb['type_txt'] = 'Typ';
-?>
diff --git a/interface/web/sites/lib/lang/cz_database_list.lng b/interface/web/sites/lib/lang/cz_database_list.lng
index ca82f150d7..50b28995ba 100644
--- a/interface/web/sites/lib/lang/cz_database_list.lng
+++ b/interface/web/sites/lib/lang/cz_database_list.lng
@@ -8,4 +8,3 @@ $wb['database_name_txt'] = 'Název databáze';
 $wb['add_new_record_txt'] = 'Vytvořit databázi';
 $wb['parent_domain_id_txt'] = 'Webové stránky';
 $wb['type_txt'] = 'Typ';
-?>
diff --git a/interface/web/sites/lib/lang/cz_database_quota_stats_list.lng b/interface/web/sites/lib/lang/cz_database_quota_stats_list.lng
index 4195eaddc0..1a4fa07d19 100644
--- a/interface/web/sites/lib/lang/cz_database_quota_stats_list.lng
+++ b/interface/web/sites/lib/lang/cz_database_quota_stats_list.lng
@@ -6,4 +6,3 @@ $wb['used_txt'] = 'Využité místo';
 $wb['quota_txt'] = 'Kvóta';
 $wb['percentage_txt'] = 'Využito v %';
 $wb['list_head_txt'] = 'Kvóty databází';
-?>
diff --git a/interface/web/sites/lib/lang/cz_database_user.lng b/interface/web/sites/lib/lang/cz_database_user.lng
index 441b444714..629ed4607c 100644
--- a/interface/web/sites/lib/lang/cz_database_user.lng
+++ b/interface/web/sites/lib/lang/cz_database_user.lng
@@ -22,4 +22,3 @@ $wb['globalsearch_searchfield_watermark_txt'] = 'Hledat';
 $wb['globalsearch_suggestions_text_txt'] = 'Návrhy';
 $wb['limit_database_user_txt'] = 'Byl dosažen maximální počet uživatelů databáze.';
 $wb['database_password_error_empty'] = 'Databázové heslo je prázdné.';
-?>
diff --git a/interface/web/sites/lib/lang/cz_database_user_admin_list.lng b/interface/web/sites/lib/lang/cz_database_user_admin_list.lng
index 7a13c03697..3baa2873ed 100644
--- a/interface/web/sites/lib/lang/cz_database_user_admin_list.lng
+++ b/interface/web/sites/lib/lang/cz_database_user_admin_list.lng
@@ -3,4 +3,3 @@ $wb['list_head_txt'] = 'Uživatelé databáze';
 $wb['database_user_txt'] = 'Uživatel databáze';
 $wb['add_new_record_txt'] = 'Vytvořit uživatele databáze';
 $wb['sys_groupid_txt'] = 'Klient';
-?>
diff --git a/interface/web/sites/lib/lang/cz_database_user_list.lng b/interface/web/sites/lib/lang/cz_database_user_list.lng
index 1acb6ac4c1..24e0dcd8ea 100644
--- a/interface/web/sites/lib/lang/cz_database_user_list.lng
+++ b/interface/web/sites/lib/lang/cz_database_user_list.lng
@@ -2,4 +2,3 @@
 $wb['list_head_txt'] = 'Uživatelé databáze';
 $wb['database_user_txt'] = 'Uživatelé databáze';
 $wb['add_new_record_txt'] = 'Vytvořit uživatele databáze';
-?>
diff --git a/interface/web/sites/lib/lang/cz_ftp_sites_stats_list.lng b/interface/web/sites/lib/lang/cz_ftp_sites_stats_list.lng
index 632ba13d20..80503cd282 100644
--- a/interface/web/sites/lib/lang/cz_ftp_sites_stats_list.lng
+++ b/interface/web/sites/lib/lang/cz_ftp_sites_stats_list.lng
@@ -7,4 +7,3 @@ $wb['this_year_txt'] = 'Tento rok';
 $wb['sum_txt'] = 'Součet (Stažení + Odeslání)';
 $wb['in_out_txt'] = 'DL/UL';
 $wb['last_year_txt'] = 'Minulý rok';
-?>
diff --git a/interface/web/sites/lib/lang/cz_ftp_user.lng b/interface/web/sites/lib/lang/cz_ftp_user.lng
index 096a86ee66..821d8cc0ef 100644
--- a/interface/web/sites/lib/lang/cz_ftp_user.lng
+++ b/interface/web/sites/lib/lang/cz_ftp_user.lng
@@ -32,4 +32,3 @@ $wb['repeat_password_txt'] = 'Opakujte heslo';
 $wb['password_mismatch_txt'] = 'Hesla se neshodují.';
 $wb['password_match_txt'] = 'Hesla se shodují.';
 $wb['expires_txt'] = 'Vyprší v';
-?>
diff --git a/interface/web/sites/lib/lang/cz_ftp_user_list.lng b/interface/web/sites/lib/lang/cz_ftp_user_list.lng
index 2b052e29c9..8c70570c9d 100644
--- a/interface/web/sites/lib/lang/cz_ftp_user_list.lng
+++ b/interface/web/sites/lib/lang/cz_ftp_user_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['parent_domain_id_txt'] = 'Webové stránky';
 $wb['username_txt'] = 'Uživatelské jméno';
 $wb['add_new_record_txt'] = 'Vytvořit FTP uživatele';
-?>
diff --git a/interface/web/sites/lib/lang/cz_shell_user.lng b/interface/web/sites/lib/lang/cz_shell_user.lng
index eb66108057..c2512e1b40 100644
--- a/interface/web/sites/lib/lang/cz_shell_user.lng
+++ b/interface/web/sites/lib/lang/cz_shell_user.lng
@@ -33,4 +33,3 @@ $wb['directory_error_regex'] = 'Neplatný adresář';
 $wb['shell_error_regex'] = 'Invalid shell';
 $wb['invalid_username_txt'] = 'Invalid Username';
 $wb['directory_error_notinweb'] = 'The directory has to be inside the web root.';
-?>
diff --git a/interface/web/sites/lib/lang/cz_shell_user_list.lng b/interface/web/sites/lib/lang/cz_shell_user_list.lng
index f67bb99050..231dc43649 100644
--- a/interface/web/sites/lib/lang/cz_shell_user_list.lng
+++ b/interface/web/sites/lib/lang/cz_shell_user_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['parent_domain_id_txt'] = 'Stránka';
 $wb['username_txt'] = 'Uživatelské jméno';
 $wb['add_new_record_txt'] = 'Vytvořit shell uživatele';
-?>
diff --git a/interface/web/sites/lib/lang/cz_user_quota_stats_list.lng b/interface/web/sites/lib/lang/cz_user_quota_stats_list.lng
index 8e3a8ccd4b..0672310174 100644
--- a/interface/web/sites/lib/lang/cz_user_quota_stats_list.lng
+++ b/interface/web/sites/lib/lang/cz_user_quota_stats_list.lng
@@ -6,4 +6,3 @@ $wb['used_txt'] = 'Využité místo';
 $wb['hard_txt'] = 'Kvóta max. obsazení';
 $wb['soft_txt'] = 'Kvóta pro upozornění';
 $wb['files_txt'] = 'Jednotlivé soubory';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_aliasdomain.lng b/interface/web/sites/lib/lang/cz_web_aliasdomain.lng
index 633f0d9462..3f8a356da3 100644
--- a/interface/web/sites/lib/lang/cz_web_aliasdomain.lng
+++ b/interface/web/sites/lib/lang/cz_web_aliasdomain.lng
@@ -66,7 +66,7 @@ $wb['ssl_organisation_error_regex'] = 'Neplatný SSL řádek - Organizace. Platn
 $wb['ssl_organistaion_unit_error_regex'] = 'Invalid SSL Organisation Unit. Valid characters are: a-z, 0-9 and .,-_';
 $wb['ssl_country_error_regex'] = 'Invalid SSL Country. Valid characters are: A-Z';
 $wb['limit_traffic_quota_free_txt'] = 'Max. available Traffic Quota';
-$wb['redirect_error_regex'] = 'Invalid redirect path. Valid redirects are for example: /test/ or https://www.domain.tld/test/';
+$wb['redirect_error_regex'] = 'Invalid redirect path. Valid redirects are for example: /test/ or http://www.domain.tld/test/';
 $wb['php_open_basedir_txt'] = 'PHP open_basedir';
 $wb['traffic_quota_exceeded_txt'] = 'Traffic quota exceeded';
 $wb['ruby_txt'] = 'Ruby';
@@ -99,7 +99,7 @@ $wb['pm_min_spare_servers_error_regex'] = 'PHP-FPM pm.min_spare_servers must be
 $wb['pm_max_spare_servers_error_regex'] = 'PHP-FPM pm.max_spare_servers must be a positive integer value.';
 $wb['hd_quota_error_regex'] = 'Harddisk quota is invalid.';
 $wb['traffic_quota_error_regex'] = 'Traffic quota is invalid.';
-$wb['server_php_id_txt'] = 'PHP Verze';
+$wb['server_php_id_txt'] = 'Výběr PHP verze';
 $wb['pm_txt'] = 'PHP-FPM Process Manager';
 $wb['pm_process_idle_timeout_txt'] = 'PHP-FPM pm.process_idle_timeout';
 $wb['pm_max_requests_txt'] = 'PHP-FPM pm.max_requests';
@@ -116,4 +116,3 @@ $wb['available_nginx_directive_snippets_txt'] = 'Available nginx Directive Snipp
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['Domain'] = 'Přezdívky domén webové stránky';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_aliasdomain_list.lng b/interface/web/sites/lib/lang/cz_web_aliasdomain_list.lng
index ba7f2b39d7..03ce20bced 100644
--- a/interface/web/sites/lib/lang/cz_web_aliasdomain_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_aliasdomain_list.lng
@@ -11,4 +11,3 @@ $wb['domain_error_regex'] = 'Doménové jméno je chybné.';
 $wb['no_redirect_txt'] = 'Žádné přesměrování';
 $wb['no_flag_txt'] = 'Žádný příznak';
 $wb['none_txt'] = 'Žádná';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_backup_list.lng b/interface/web/sites/lib/lang/cz_web_backup_list.lng
index 9932fe63de..e6f80dac09 100644
--- a/interface/web/sites/lib/lang/cz_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_backup_list.lng
@@ -1,7 +1,7 @@
 <?php
 $wb['list_head_txt'] = 'Dostupné zálohy';
 $wb['date_txt'] = 'Datum';
-$wb['backup_type_txt'] = 'Verze';
+$wb['backup_type_txt'] = 'Typ';
 $wb['filename_txt'] = 'Záloha souborů';
 $wb['restore_backup_txt'] = 'Obnovit zálohu';
 $wb['download_backup_txt'] = 'Stažení zálohy';
@@ -20,19 +20,19 @@ $wb['delete_pending_txt'] = 'Již existuje čekající úloha pro odstranění z
 $wb['backup_type_mongodb'] = 'MongoDB Database';
 $wb['backup_pending_txt'] = 'There is already a pending backup job.';
 $wb['error_txt'] = 'Error';
-$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
-$wb['backup_format_txt'] = 'Backup format';
-$wb['backup_format_unknown_txt'] = 'Unknown';
-$wb['backup_job_txt'] = 'Scheduler';
-$wb['backup_job_manual_txt'] = 'Manual';
-$wb['backup_job_auto_txt'] = 'Auto';
-$wb['manual_backup_title_txt'] = 'Manual backup';
-$wb['make_backup_web_txt'] = 'Make backup of web files';
-$wb['make_backup_database_txt'] = 'Make backup of databases';
-$wb['make_backup_confirm_txt'] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
-$wb['yes_txt'] = 'Yes';
-$wb['no_txt'] = 'No';
-$wb['backup_is_encrypted_txt'] = 'Encrypted';
+$wb['backup_info_txt'] = 'Byl zahájen proces zálohování. Dokončení této akce může trvat několik minut.';
+$wb['backup_format_txt'] = 'Formát zálohy';
+$wb['backup_format_unknown_txt'] = 'Neznámý';
+$wb['backup_job_txt'] = 'Plánovač';
+$wb['backup_job_manual_txt'] = 'Ruční';
+$wb['backup_job_auto_txt'] = 'Automatický';
+$wb['manual_backup_title_txt'] = 'Ruční zálohování';
+$wb['make_backup_web_txt'] = 'Vytvořit zálohu webových souborů';
+$wb['make_backup_database_txt'] = 'Vytvořit zálohu databází';
+$wb['make_backup_confirm_txt'] = 'Chystáte se zahájit proces ručního zálohování. Ruční zálohy se započítávají do celkového počtu povolených záložních kopií: proto pokud bude limit překročen, mohou být nejstarší zálohy automaticky odstraněny. Pokračovat ?';
+$wb['yes_txt'] = 'Ano';
+$wb['no_txt'] = 'Ne';
+$wb['backup_is_encrypted_txt'] = 'Šifrované';
 $wb['backup_format_zip_txt'] = 'zip (deflate)';
 $wb['backup_format_gzip_txt'] = 'gzip';
 $wb['backup_format_bzip2_txt'] = 'bzip2';
@@ -50,4 +50,3 @@ $wb['backup_format_tar_7z_lzma2_txt'] = 'tar + 7z (LZMA2)';
 $wb['backup_format_tar_7z_ppmd_txt'] = 'tar + 7z (PPMd)';
 $wb['backup_format_tar_7z_bzip2_txt'] = 'tar + 7z (BZip2)';
 $wb['backup_format_rar_txt'] = 'RAR';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_childdomain.lng b/interface/web/sites/lib/lang/cz_web_childdomain.lng
index e00f0facfd..ca36d8c6c8 100644
--- a/interface/web/sites/lib/lang/cz_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/cz_web_childdomain.lng
@@ -47,13 +47,13 @@ $wb['domain_error_empty'] = 'Doména je prázdná.';
 $wb['domain_error_unique'] = 'Webová stránka nebo sub / alias doména s tímto doménovým jménem již existuje.';
 $wb['domain_error_regex'] = 'Neplatné doménové jméno.';
 $wb['host_txt'] = 'Host';
-$wb['redirect_error_regex'] = 'Neplatná cesta přesměrování. Platné přesměrování je například: /test/ nebo https://www.domain.tld/test/';
+$wb['redirect_error_regex'] = 'Neplatná cesta přesměrování. Platné přesměrování je například: /test/ nebo http://www.domain.tld/test/';
 $wb['no_redirect_txt'] = 'Žádné přesměrování';
 $wb['no_flag_txt'] = 'Žádný příznak';
 $wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
-$wb['error_proxy_requires_url'] = 'Redirect Type \\"proxy\\" requires a URL as the redirect path.';
+$wb['error_proxy_requires_url'] = 'Redirect Type \"proxy\" requires a URL as the redirect path.';
 $wb['ipv6_address_txt'] = 'IPv6 adresa';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['hd_quota_error_empty'] = 'Harddisk quota is 0 or empty.';
@@ -104,7 +104,7 @@ $wb['pm_min_spare_servers_error_regex'] = 'PHP-FPM pm.min_spare_servers must be
 $wb['pm_max_spare_servers_error_regex'] = 'PHP-FPM pm.max_spare_servers must be a positive integer value.';
 $wb['hd_quota_error_regex'] = 'Harddisk quota is invalid.';
 $wb['traffic_quota_error_regex'] = 'Traffic quota is invalid.';
-$wb['server_php_id_txt'] = 'PHP Verze';
+$wb['server_php_id_txt'] = 'Výběr PHP verze';
 $wb['pm_txt'] = 'PHP-FPM Process Manager';
 $wb['pm_process_idle_timeout_txt'] = 'PHP-FPM pm.process_idle_timeout';
 $wb['pm_max_requests_txt'] = 'PHP-FPM pm.max_requests';
@@ -120,5 +120,4 @@ $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Sni
 $wb['available_nginx_directive_snippets_txt'] = 'Available nginx Directive Snippets:';
 $wb['Domain'] = 'Přezdívky domén webové stránky';
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
-$wb['ssl_letsencrypt_exclude_txt'] = 'Don\'t add to Let\'s Encrypt certificate';
-?>
+$wb['ssl_letsencrypt_exclude_txt'] = 'Don\\'t add to Let\\'s Encrypt certificate';
diff --git a/interface/web/sites/lib/lang/cz_web_childdomain_list.lng b/interface/web/sites/lib/lang/cz_web_childdomain_list.lng
index c7411d0482..0b81a0bb96 100644
--- a/interface/web/sites/lib/lang/cz_web_childdomain_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_childdomain_list.lng
@@ -15,4 +15,3 @@ $wb['add_new_aliasdomain_txt'] = 'Vytvořit přezdívku domény';
 $wb['aliasdomain_list_head_txt'] = 'Přezdívky domén';
 $wb['subdomain_list_head_txt'] = 'Subdomény';
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_directive_snippets.lng b/interface/web/sites/lib/lang/cz_web_directive_snippets.lng
index d2590e53cf..e305a9e3bf 100644
--- a/interface/web/sites/lib/lang/cz_web_directive_snippets.lng
+++ b/interface/web/sites/lib/lang/cz_web_directive_snippets.lng
@@ -1,3 +1,2 @@
 <?php
 $wb['directive_snippets_id_txt'] = 'Desired configuration';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_domain.lng b/interface/web/sites/lib/lang/cz_web_domain.lng
index 5ae091394c..4cb84e59e2 100644
--- a/interface/web/sites/lib/lang/cz_web_domain.lng
+++ b/interface/web/sites/lib/lang/cz_web_domain.lng
@@ -58,7 +58,7 @@ $wb['ssl_organisation_error_regex'] = 'Neplatný SSL řádek - Organizace. Platn
 $wb['ssl_organistaion_unit_error_regex'] = 'Neplatná SSL organizační jednotka. Platné znaky jsou: a-z, 0-9 a .,-_';
 $wb['ssl_country_error_regex'] = 'Neplatná SSL země. Platné znaky jsou: A-Z';
 $wb['limit_traffic_quota_free_txt'] = 'Max. dostupná přenosová kvóta';
-$wb['redirect_error_regex'] = 'Neplatná cesta přesměrování. Platné přesměrování je například: /test/ nebo https://www.domain.tld/test/';
+$wb['redirect_error_regex'] = 'Neplatná cesta přesměrování. Platné přesměrování je například: /test/ nebo http://www.domain.tld/test/';
 $wb['php_open_basedir_txt'] = 'PHP open_basedir';
 $wb['traffic_quota_exceeded_txt'] = 'Přenosová kvóta překročena';
 $wb['backup_interval_txt'] = 'Interval zálohování';
@@ -69,7 +69,7 @@ $wb['stats_user_txt'] = 'Webové statistiky - uživatelské jméno';
 $wb['stats_type_txt'] = 'Webové statistiky - výběr aplikace';
 $wb['custom_php_ini_txt'] = 'Vlastní nastavení php.ini';
 $wb['none_txt'] = 'Žádná';
-$wb['disabled_txt'] = 'Zakázáno';
+$wb['disabled_txt'] = 'Vypnuto';
 $wb['no_redirect_txt'] = 'Žádné přesměrování';
 $wb['no_flag_txt'] = 'Žádný příznak';
 $wb['save_certificate_txt'] = 'Uložit certifikát';
@@ -138,4 +138,3 @@ $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
 $wb['nginx_directive_blocked_error'] = 'Nginx directive blocked by security settings:';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_domain_admin_list.lng b/interface/web/sites/lib/lang/cz_web_domain_admin_list.lng
index 33a836ae56..75461c6ddb 100644
--- a/interface/web/sites/lib/lang/cz_web_domain_admin_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_domain_admin_list.lng
@@ -6,4 +6,3 @@ $wb['active_txt'] = 'Aktivní';
 $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Doména';
 $wb['add_new_record_txt'] = 'Vytvořit webovou stránku';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_domain_list.lng b/interface/web/sites/lib/lang/cz_web_domain_list.lng
index 86968d01d3..a08087f0f6 100644
--- a/interface/web/sites/lib/lang/cz_web_domain_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_domain_list.lng
@@ -5,4 +5,3 @@ $wb['active_txt'] = 'Aktivní';
 $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Doména';
 $wb['add_new_record_txt'] = 'Vytvořit webovou stránku';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_folder.lng b/interface/web/sites/lib/lang/cz_web_folder.lng
index 69310b5558..e6b08da29d 100644
--- a/interface/web/sites/lib/lang/cz_web_folder.lng
+++ b/interface/web/sites/lib/lang/cz_web_folder.lng
@@ -5,4 +5,3 @@ $wb['path_txt'] = 'Cesta';
 $wb['active_txt'] = 'Aktivní';
 $wb['path_error_regex'] = 'Neplatná cesta ke složce.';
 $wb['error_folder_already_protected_txt'] = 'Záznam pro tuto složku již existuje';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_folder_list.lng b/interface/web/sites/lib/lang/cz_web_folder_list.lng
index 216a483451..89a8b4cbc1 100644
--- a/interface/web/sites/lib/lang/cz_web_folder_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_folder_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['parent_domain_id_txt'] = 'Webové stránky';
 $wb['path_txt'] = 'Cesta';
 $wb['add_new_record_txt'] = 'Vytvořit složku';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_folder_user.lng b/interface/web/sites/lib/lang/cz_web_folder_user.lng
index 87592043f5..3b68c3ef0b 100644
--- a/interface/web/sites/lib/lang/cz_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/cz_web_folder_user.lng
@@ -11,4 +11,3 @@ $wb['password_mismatch_txt'] = 'Hesla se neshodují.';
 $wb['password_match_txt'] = 'Hesla se shodují.';
 $wb['no_folder_perm'] = 'Nemáte oprávnění pro tuto složku.';
 $wb['error_user_exists_already_txt'] = 'Záznam pro tohoto uživatele již existuje .';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_folder_user_list.lng b/interface/web/sites/lib/lang/cz_web_folder_user_list.lng
index ee38e93c2f..b3c23bff70 100644
--- a/interface/web/sites/lib/lang/cz_web_folder_user_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_folder_user_list.lng
@@ -4,4 +4,3 @@ $wb['active_txt'] = 'Aktivní';
 $wb['web_folder_id_txt'] = 'Složka';
 $wb['username_txt'] = 'Uživatelské jméno';
 $wb['add_new_record_txt'] = 'Vytvořit uživatele složky';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_sites_stats_list.lng b/interface/web/sites/lib/lang/cz_web_sites_stats_list.lng
index ed93596824..7f1812ba34 100644
--- a/interface/web/sites/lib/lang/cz_web_sites_stats_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_sites_stats_list.lng
@@ -6,4 +6,3 @@ $wb['last_month_txt'] = 'Minulý měsíc';
 $wb['this_year_txt'] = 'Tento rok';
 $wb['last_year_txt'] = 'Minulý rok';
 $wb['sum_txt'] = 'Součet';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_subdomain.lng b/interface/web/sites/lib/lang/cz_web_subdomain.lng
index 1bea3aa5da..ab15296b38 100644
--- a/interface/web/sites/lib/lang/cz_web_subdomain.lng
+++ b/interface/web/sites/lib/lang/cz_web_subdomain.lng
@@ -40,15 +40,14 @@ $wb['domain_error_empty'] = 'Doména je prázdná.';
 $wb['domain_error_unique'] = 'Webová stránka nebo sub / alias doména s tímto doménovým jménem již existuje.';
 $wb['domain_error_regex'] = 'Neplatné doménové jméno.';
 $wb['host_txt'] = 'Host';
-$wb['redirect_error_regex'] = 'Neplatná cesta přesměrování. Platné přesměrování je například: /test/ nebo https://www.domain.tld/test/';
+$wb['redirect_error_regex'] = 'Neplatná cesta přesměrování. Platné přesměrování je například: /test/ nebo http://www.domain.tld/test/';
 $wb['no_redirect_txt'] = 'Žádné přesměrování';
 $wb['no_flag_txt'] = 'Žádný příznak';
 $wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
-$wb['error_proxy_requires_url'] = 'Redirect Type \\"proxy\\" requires a URL as the redirect path.';
+$wb['error_proxy_requires_url'] = 'Redirect Type \"proxy\" requires a URL as the redirect path.';
 $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_subdomain_list.lng b/interface/web/sites/lib/lang/cz_web_subdomain_list.lng
index 7e5774ad11..c4792b502c 100644
--- a/interface/web/sites/lib/lang/cz_web_subdomain_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_subdomain_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['parent_domain_id_txt'] = 'Webové stránky';
 $wb['domain_txt'] = 'Subdoména';
 $wb['add_new_record_txt'] = 'Vytvořit subdoménu';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
index 27884f2357..1d11586868 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
@@ -65,7 +65,7 @@ $wb['ssl_organisation_error_regex'] = 'Neplatný SSL řádek - Organizace. Platn
 $wb['ssl_organistaion_unit_error_regex'] = 'Neplatná SSL organizační jednotka. Platné znaky jsou: a-z, 0-9 a .,-_';
 $wb['ssl_country_error_regex'] = 'Neplatná SSL země. Platné znaky jsou: A-Z';
 $wb['limit_traffic_quota_free_txt'] = 'Max. dostupná přenosová kvóta';
-$wb['redirect_error_regex'] = 'Neplatná cesta přesměrování. Platné přesměrování je například: /test/ nebo https://www.domain.tld/test/';
+$wb['redirect_error_regex'] = 'Neplatná cesta přesměrování. Platné přesměrování je například: /test/ nebo http://www.domain.tld/test/';
 $wb['php_open_basedir_txt'] = 'PHP open_basedir';
 $wb['traffic_quota_exceeded_txt'] = 'Přenosová kvóta překročena';
 $wb['errordocs_txt'] = 'Vlastní Error (chybové) dokumenty';
@@ -74,7 +74,7 @@ $wb['stats_user_txt'] = 'Webové statistiky - uživatelské jméno';
 $wb['stats_type_txt'] = 'Webové statistiky - výběr aplikace';
 $wb['custom_php_ini_txt'] = 'Vlastní nastavení php.ini';
 $wb['none_txt'] = 'Žádná';
-$wb['disabled_txt'] = 'Zakázáno';
+$wb['disabled_txt'] = 'Vypnuto';
 $wb['no_redirect_txt'] = 'Žádné přesměrování';
 $wb['no_flag_txt'] = 'Žádný příznak';
 $wb['save_certificate_txt'] = 'Uložit certifikát';
@@ -105,7 +105,7 @@ $wb['ssl_key_txt'] = 'SSL klíč';
 $wb['perl_txt'] = 'Perl';
 $wb['server_php_id_txt'] = 'Výběr PHP verze';
 $wb['server_php_id_invalid_txt'] = 'PHP Version is invalid.';
-$wb['server_php_id_default_hidden_warning_txt'] = 'PHP Version was set to "default" but that can no longer be selected. Choose your desired PHP Version and save your settings.';
+$wb['server_php_id_default_hidden_warning_txt'] = 'PHP Version was set to \"default\" but that can no longer be selected. Choose your desired PHP Version and save your settings.';
 $wb['pm_txt'] = 'PHP-FPM Process Manager';
 $wb['pm_process_idle_timeout_txt'] = 'PHP-FPM pm.process_idle_timeout';
 $wb['pm_max_requests_txt'] = 'PHP-FPM pm.max_requests';
@@ -145,7 +145,7 @@ $wb['btn_cancel_txt'] = 'Zrušit';
 $wb['load_client_data_txt'] = 'Nahrát údaje z podrobností registrovaného klienta';
 $wb['load_my_data_txt'] = 'Load my contact details';
 $wb['reset_client_data_txt'] = 'Obnovit údaje (resetovat)';
-$wb['ssl_letsencrypt_txt'] = 'Let\'s Encrypt SSL';
+$wb['ssl_letsencrypt_txt'] = 'Let\\'s Encrypt SSL';
 $wb['rewrite_to_https_txt'] = 'Přesměrovat HTTP na HTTPS';
 $wb['password_strength_txt'] = 'Síla hesla';
 $wb['directive_snippets_id_txt'] = 'Výběr configurace webového serveru';
@@ -154,19 +154,19 @@ $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
 $wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
-$wb['log_retention_txt'] = 'Logfiles retention time';
+$wb['log_retention_txt'] = 'Max. staří rotace logů ve dnech';
 $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
-$wb['backup_format_web_txt'] = 'Backup format for web files';
-$wb['backup_format_db_txt'] = 'Backup format for database';
-$wb['backup_missing_utils_txt'] = 'The following formats can not be used because they are not installed on the webserver: ';
-$wb['backup_compression_options_txt'] = 'Compression options';
-$wb['backup_encryption_note_txt'] = 'Encryption is only available for 7z, RAR, and zip (not secure).';
-$wb['backup_encryption_options_txt'] = 'Encryption options';
-$wb['backup_enable_encryption_txt'] = 'Enable encryption';
-$wb['backup_password_txt'] = 'Password';
+$wb['backup_format_web_txt'] = 'Formát zálohy pro webové soubory';
+$wb['backup_format_db_txt'] = 'Formát zálohy pro databázi ';
+$wb['backup_missing_utils_txt'] = 'Následující formáty nelze použít, protože nejsou nainstalovány na webovém serveru: ';
+$wb['backup_compression_options_txt'] = 'Možnosti komprese';
+$wb['backup_encryption_note_txt'] = 'Šifrování je k dispozici pouze pro 7z, RAR a zip (není zabezpečené). ';
+$wb['backup_encryption_options_txt'] = 'Možnosti šifrování';
+$wb['backup_enable_encryption_txt'] = 'Povolit šifrování';
+$wb['backup_password_txt'] = 'Heslo';
 $wb['backup_format_default_txt'] = 'Default: zip (deflate) or tar (gzip)';
 $wb['backup_format_zip_txt'] = 'zip (deflate)';
 $wb['backup_format_gzip_txt'] = 'gzip';
@@ -190,8 +190,8 @@ $wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact y
 $wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.';
 $wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.';
 $wb['error_server_change_not_possible'] = 'The server cannot be changed.';
-$wb['jailkit_chroot_app_sections_txt'] = 'Jailkit chroot app sekce';
-$wb['jailkit_chroot_app_programs_txt'] = 'Jailkit chrootované aplikace';
+$wb['jailkit_chroot_app_sections_txt'] = 'Jailkit chroot app sections';
+$wb['jailkit_chroot_app_programs_txt'] = 'Jailkit chrooted applications';
 $wb['jailkit_chroot_app_sections_error_empty'] = 'Jailkit chroot app sections is empty.';
 $wb['jailkit_chroot_app_programs_error_empty'] = 'Jailkit chrooted applications is empty.';
 $wb['jailkit_chroot_app_sections_error_regex'] = 'Invalid jaikit chroot sections.';
@@ -200,4 +200,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\\'s Encrypt certificates only. Remember to uncheck Let\\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_domain_admin_list.lng b/interface/web/sites/lib/lang/cz_web_vhost_domain_admin_list.lng
index 679aadc30a..3a1e216760 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_domain_admin_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_domain_admin_list.lng
@@ -11,4 +11,3 @@ $wb['add_new_aliasdomain_txt'] = 'Přidat přezdívku domény';
 $wb['domain_list_head_txt'] = 'Webové stránky';
 $wb['aliasdomain_list_head_txt'] = 'Přezdívky domén (Vhost)';
 $wb['subdomain_list_head_txt'] = 'Subdomény (Vhost)';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_domain_list.lng b/interface/web/sites/lib/lang/cz_web_vhost_domain_list.lng
index 1c7d6eab6a..6df7d2e03b 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_domain_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_domain_list.lng
@@ -11,4 +11,3 @@ $wb['add_new_aliasdomain_txt'] = 'Přidat přezdívku domény';
 $wb['domain_list_head_txt'] = 'Webové stránky';
 $wb['aliasdomain_list_head_txt'] = 'Přezdívky domén (Vhost)';
 $wb['subdomain_list_head_txt'] = 'Subdomény (Vhost)';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng
index 7a2374d6dd..705a49f240 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng
@@ -70,7 +70,7 @@ $wb['ssl_organisation_error_regex'] = 'Neplatný SSL řádek - Organizace. Platn
 $wb['ssl_organistaion_unit_error_regex'] = 'Invalid SSL Organisation Unit. Valid characters are: a-z, 0-9 and .,-_';
 $wb['ssl_country_error_regex'] = 'Invalid SSL Country. Valid characters are: A-Z';
 $wb['limit_traffic_quota_free_txt'] = 'Max. available Traffic Quota';
-$wb['redirect_error_regex'] = 'Invalid redirect path. Valid redirects are for example: /test/ or https://www.domain.tld/test/';
+$wb['redirect_error_regex'] = 'Invalid redirect path. Valid redirects are for example: /test/ or http://www.domain.tld/test/';
 $wb['php_open_basedir_txt'] = 'PHP open_basedir';
 $wb['traffic_quota_exceeded_txt'] = 'Traffik kvóta překročena';
 $wb['ruby_txt'] = 'Ruby';
@@ -132,4 +132,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_subdomain_list.lng b/interface/web/sites/lib/lang/cz_web_vhost_subdomain_list.lng
index 6fe2d6930d..8518dc3343 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_subdomain_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_subdomain_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['parent_domain_id_txt'] = 'Webové stránky';
 $wb['domain_txt'] = 'Subdoména';
 $wb['add_new_record_txt'] = 'Vytvořit poddoménu';
-?>
diff --git a/interface/web/sites/lib/lang/cz_webdav_user.lng b/interface/web/sites/lib/lang/cz_webdav_user.lng
index 659cf3e8cc..de91a9ecab 100644
--- a/interface/web/sites/lib/lang/cz_webdav_user.lng
+++ b/interface/web/sites/lib/lang/cz_webdav_user.lng
@@ -18,4 +18,3 @@ $wb['generate_password_txt'] = 'Generovat heslo';
 $wb['repeat_password_txt'] = 'Opakujte heslo';
 $wb['password_mismatch_txt'] = 'Hesla se neshodují.';
 $wb['password_match_txt'] = 'Hesla se shodují.';
-?>
diff --git a/interface/web/sites/lib/lang/cz_webdav_user_list.lng b/interface/web/sites/lib/lang/cz_webdav_user_list.lng
index c424df16c6..283fd92e3d 100644
--- a/interface/web/sites/lib/lang/cz_webdav_user_list.lng
+++ b/interface/web/sites/lib/lang/cz_webdav_user_list.lng
@@ -5,4 +5,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['parent_domain_id_txt'] = 'Webové stránky';
 $wb['username_txt'] = 'Uživatelské jméno';
 $wb['add_new_record_txt'] = 'Vytvořit WebDAV uživatele';
-?>
diff --git a/interface/web/strengthmeter/lib/lang/br_strengthmeter.lng b/interface/web/strengthmeter/lib/lang/br_strengthmeter.lng
index 2b2fb51f9a..10bd6b1f8d 100644
--- a/interface/web/strengthmeter/lib/lang/br_strengthmeter.lng
+++ b/interface/web/strengthmeter/lib/lang/br_strengthmeter.lng
@@ -5,4 +5,3 @@ $wb['password_strength_2_txt'] = 'Razoável';
 $wb['password_strength_3_txt'] = 'Boa';
 $wb['password_strength_4_txt'] = 'Forte';
 $wb['password_strength_5_txt'] = 'Muito forte';
-?>
diff --git a/interface/web/strengthmeter/lib/lang/cz_strengthmeter.lng b/interface/web/strengthmeter/lib/lang/cz_strengthmeter.lng
index cff29d541a..a12df7e795 100644
--- a/interface/web/strengthmeter/lib/lang/cz_strengthmeter.lng
+++ b/interface/web/strengthmeter/lib/lang/cz_strengthmeter.lng
@@ -5,4 +5,3 @@ $wb['password_strength_2_txt'] = 'Podprůměrné';
 $wb['password_strength_3_txt'] = 'Dobré';
 $wb['password_strength_4_txt'] = 'Silné';
 $wb['password_strength_5_txt'] = 'Velmi silné';
-?>
diff --git a/interface/web/tools/lib/lang/br.lng b/interface/web/tools/lib/lang/br.lng
index 1c11472165..e11ae84c03 100644
--- a/interface/web/tools/lib/lang/br.lng
+++ b/interface/web/tools/lib/lang/br.lng
@@ -4,10 +4,9 @@ $wb['Settings'] = 'Configurações';
 $wb['ISPConfig Tools'] = 'Ferramentas';
 $wb['Interface'] = 'Interface';
 $wb['Password and Language'] = 'Senha e Idioma';
-$wb['ispconfig_tools_note'] = 'Este módulo permite alterar a senha e idioma e iniciar a sincronização de registros dns.';
+$wb['ispconfig_tools_note'] = 'Este módulo permite modificar a senha e idioma e iniciar a sincronização de registros DNS.';
 $wb['Sync Tools'] = 'Sincronização';
 $wb['Resync'] = 'Sincronizar';
 $wb['Import'] = 'Importar';
-$wb['ISPConfig 3 mail'] = 'e-Mails do ISPConfig';
+$wb['ISPConfig 3 mail'] = 'eMails do ISPConfig';
 $wb['PDNS Tupa'] = 'PowerDNS';
-?>
diff --git a/interface/web/tools/lib/lang/br_import_ispconfig.lng b/interface/web/tools/lib/lang/br_import_ispconfig.lng
index d77242b483..48a6742e81 100644
--- a/interface/web/tools/lib/lang/br_import_ispconfig.lng
+++ b/interface/web/tools/lib/lang/br_import_ispconfig.lng
@@ -1,23 +1,23 @@
 <?php
-$wb['head_txt'] = 'Importar configuração de e-mail do ISPConfig 3';
+$wb['head_txt'] = 'Importar configuração de email do ISPConfig 3';
 $wb['legend_txt'] = 'Detalhes da conexão remota do servidor';
-$wb['legend2_txt'] = 'Importar domínio de e-mail';
+$wb['legend2_txt'] = 'Importar domínio de email';
 $wb['resync_sites_txt'] = 'Sincronizar sites';
-$wb['resync_ftp_txt'] = 'Sincronizar usuários ftp';
-$wb['resync_shell_txt'] = 'Sincronizar usuários do shell';
-$wb['resync_cron_txt'] = 'Sincronizar tarefas no cron';
-$wb['resync_db_txt'] = 'Sincronizar configurações do cliente de banco de dados';
-$wb['resync_mailbox_txt'] = 'Sincronizar contas de e-mail';
-$wb['resync_dns_txt'] = 'Sincronizar registros dns';
+$wb['resync_ftp_txt'] = 'Sincronizar usuários FTP';
+$wb['resync_shell_txt'] = 'Sincronizar usuários Shell';
+$wb['resync_cron_txt'] = 'Sincronizar tarefas no Cron';
+$wb['resync_db_txt'] = 'Sincronizar configurações do cliente do Banco de Dados';
+$wb['resync_mailbox_txt'] = 'Sincronizar contas de email';
+$wb['resync_dns_txt'] = 'Sincronizar registros DNS';
 $wb['btn_start_txt'] = 'Iniciar importação';
 $wb['btn_connect_txt'] = 'Conectar ao servidor remoto';
 $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['client_group_id_txt'] = 'Cliente local';
-$wb['mail_domain_txt'] = 'Domínio de e-mail remoto';
-$wb['import_mailbox_txt'] = 'Importar contas de e-mail';
+$wb['mail_domain_txt'] = 'Domínio de email remoto';
+$wb['import_mailbox_txt'] = 'Importar contas de email';
 $wb['import_aliasdomain_txt'] = 'Importar alias de domínios';
-$wb['import_alias_txt'] = 'Importar alias de e-mail';
-$wb['import_forward_txt'] = 'Importar encaminhamentos de e-mail';
-$wb['import_user_filter_txt'] = 'Importar filtros de e-mail';
+$wb['import_alias_txt'] = 'Importar alias de email';
+$wb['import_forward_txt'] = 'Importar encaminhamentos de email';
+$wb['import_user_filter_txt'] = 'Importar filtros de email';
 $wb['import_spamfilter_txt'] = 'Importar filtros anti-spam';
-?>
+$wb['local_server_txt'] = 'Servidor de emails local';
diff --git a/interface/web/tools/lib/lang/br_import_vpopmail.lng b/interface/web/tools/lib/lang/br_import_vpopmail.lng
index c18b0b6810..627f457124 100644
--- a/interface/web/tools/lib/lang/br_import_vpopmail.lng
+++ b/interface/web/tools/lib/lang/br_import_vpopmail.lng
@@ -1,8 +1,6 @@
 <?php
-$wb['head_txt'] = 'Importar configurações de e-mail do vpopmail';
-$wb['legend_txt'] = 'Detalhes da conexão remota do servidor de banco de dados';
+$wb['head_txt'] = 'Importar configurações de email do vpopmail';
+$wb['legend_txt'] = 'Detalhes da conexão remota do servidor do Banco de Dados';
 $wb['btn_start_txt'] = 'Iniciar Importação';
 $wb['btn_connect_txt'] = 'Conectar ao servidor remoto';
 $wb['btn_cancel_txt'] = 'Cancelar';
-
-?>
diff --git a/interface/web/tools/lib/lang/br_index.lng b/interface/web/tools/lib/lang/br_index.lng
index bbb7085209..326c2c74f0 100644
--- a/interface/web/tools/lib/lang/br_index.lng
+++ b/interface/web/tools/lib/lang/br_index.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['page_head_txt'] = 'Ferramentas do ISPConfig';
-$wb['page_desc_txt'] = 'Alterar configurações de usuário';
-?>
+$wb['page_desc_txt'] = 'Modificar configurações de usuário';
diff --git a/interface/web/tools/lib/lang/br_interface.lng b/interface/web/tools/lib/lang/br_interface.lng
new file mode 100644
index 0000000000..74cdfe5287
--- /dev/null
+++ b/interface/web/tools/lib/lang/br_interface.lng
@@ -0,0 +1,10 @@
+<?php
+$wb['interface_head_txt'] = 'Configurações da Interface';
+$wb['interface_desc_txt'] = 'Modificar a interface';
+$wb['language_txt'] = 'Idioma';
+$wb['startmodule_txt'] = 'Módulo Inicial';
+$wb['app_theme_txt'] = 'Tema';
+$wb['startmodule_empty'] = 'Módulo inicial está vazio.';
+$wb['startmodule_regex'] = 'Caracteres inválidos no módulo inicial.';
+$wb['app_theme_empty'] = 'Tema está vazio.';
+$wb['app_theme_regex'] = 'Caracteres inválidos no tema.';
diff --git a/interface/web/tools/lib/lang/br_resync.lng b/interface/web/tools/lib/lang/br_resync.lng
index 160a35dd0c..7c00f1e1d6 100644
--- a/interface/web/tools/lib/lang/br_resync.lng
+++ b/interface/web/tools/lib/lang/br_resync.lng
@@ -4,38 +4,38 @@ $wb['legend_txt'] = 'Sincronização';
 $wb['resync_all_txt'] = 'Todos os serviços';
 $wb['resync_sites_txt'] = 'Sites';
 $wb['resync_ftp_txt'] = 'Contas FTP';
-$wb['resync_webdav_txt'] = 'Usuários webdav';
-$wb['resync_shell_txt'] = 'Usuários do shell';
-$wb['resync_cron_txt'] = 'Tarefas no cron';
-$wb['resync_db_txt'] = 'Configurações do banco de dados de clientes';
-$wb['resync_mailbox_txt'] = 'Contas de e-mail';
-$wb['resync_mail_txt'] = 'Domínios de e-mail';
-$wb['resync_mailfilter_txt'] = 'Filtros de e-mail';
-$wb['resync_mailinglist_txt'] = 'Listas de e-mail';
+$wb['resync_webdav_txt'] = 'Usuários Webdav';
+$wb['resync_shell_txt'] = 'Usuários Shell';
+$wb['resync_cron_txt'] = 'Tarefas no Cron';
+$wb['resync_db_txt'] = 'Configurações do Banco de Dados de clientes';
+$wb['resync_mailbox_txt'] = 'Contas de email';
+$wb['resync_mail_txt'] = 'Domínios de email';
+$wb['resync_mailfilter_txt'] = 'Filtros de email';
+$wb['resync_mailinglist_txt'] = 'Listas de email';
 $wb['resync_dns_txt'] = 'Registros dns';
 $wb['resync_vserver_txt'] = 'Máquinas virtuais';
 $wb['resync_client_txt'] = 'Clientes e revendas';
 $wb['all_active_txt'] = 'Todos os servidores ativos';
-$wb['all_active_mail_txt'] = 'Todos os servidores de e-mail ativos';
-$wb['all_active_web_txt'] = 'Todos os servidores web ativos';
-$wb['all_active_dns_txt'] = 'Todos os servidores dns ativos';
-$wb['all_active_file_txt'] = 'Todos os servidores ftp ativos';
-$wb['all_active_db_txt'] = 'Todos os servidores de banco de dados ativos';
+$wb['all_active_mail_txt'] = 'Todos os servidores de email ativos';
+$wb['all_active_web_txt'] = 'Todos os servidores Web ativos';
+$wb['all_active_dns_txt'] = 'Todos os servidores DNS ativos';
+$wb['all_active_file_txt'] = 'Todos os servidores FTP ativos';
+$wb['all_active_db_txt'] = 'Todos os servidores do Banco de Dados ativos';
 $wb['all_active_vserver_txt'] = 'Todos as máquinas virtuais ativas';
 $wb['do_sites_txt'] = 'Sites sincronizados.';
-$wb['do_ftp_txt'] = 'Usuários ftp sincronizados.';
-$wb['do_webdav_txt'] = 'Usuários webdav sincronizados.';
-$wb['do_shell_txt'] = 'Usuários do shell sincronizados.';
-$wb['do_cron_txt'] = 'Tarefas no cron sincronizadas.';
-$wb['do_db_user_txt'] = 'Usuários do banco de dados sincronizados.';
+$wb['do_ftp_txt'] = 'Usuários FTP sincronizados.';
+$wb['do_webdav_txt'] = 'Usuários Webdav sincronizados.';
+$wb['do_shell_txt'] = 'Usuários Shell sincronizados.';
+$wb['do_cron_txt'] = 'Tarefas no Cron sincronizadas.';
+$wb['do_db_user_txt'] = 'Usuários do Banco de Dados sincronizados.';
 $wb['do_db_txt'] = 'Banco de dados sincronizados.';
 $wb['do_mail_txt'] = 'Domínios de e-mal sincronizados.';
-$wb['do_mailbox_txt'] = 'Contas de e-mail sincronizadas.';
-$wb['do_mail_alias_txt'] = 'Alias de domínios de e-mail sincronizados.';
-$wb['do_mail_access_txt'] = 'Acessos de e-mail sincronizados.';
-$wb['do_mail_contentfilter_txt'] = 'Filtros de conteúdo de e-mail sincronizados.';
-$wb['do_mail_userfilter_txt'] = 'Filtros de e-mail sincronizados.';
-$wb['do_mailinglist_txt'] = 'Listas de e-mail sincronizadas.';
+$wb['do_mailbox_txt'] = 'Contas de email sincronizadas.';
+$wb['do_mail_alias_txt'] = 'Alias de domínios de email sincronizados.';
+$wb['do_mail_access_txt'] = 'Acessos de email sincronizados.';
+$wb['do_mail_contentfilter_txt'] = 'Filtros de conteúdo de email sincronizados.';
+$wb['do_mail_userfilter_txt'] = 'Filtros de email sincronizados.';
+$wb['do_mailinglist_txt'] = 'Listas de email sincronizadas.';
 $wb['do_dns_txt'] = 'Zonas DNS sincronizadas.';
 $wb['do_vserver_txt'] = 'Máquinas virtuais sincronizados.';
 $wb['do_clients_txt'] = 'Clientes e revendas sincronizados.';
@@ -46,8 +46,7 @@ $wb['do_mail_spamfilter_policy_txt'] = 'Sincronizar políticas anti-spam';
 $wb['do_mail_spamfilter_txt'] = 'Políticas anti-spam sincronizadas.';
 $wb['do_mailget_txt'] = 'Contas de busca sincronizadas.';
 $wb['resync_mailget_txt'] = 'Sincronizar contas de busca.';
-$wb['resync_mailtransport_txt'] = 'Sincronizar transportes de e-mail';
-$wb['resync_mailrelay_txt'] = 'Sincronizar retransmissão de e-mail';
-$wb['do_mailtransport_txt'] = 'Transportes de e-mail sincronizados.';
-$wb['do_mailrelay_txt'] = 'Retransmissões de e-mail sincronizados.';
-?>
+$wb['resync_mailtransport_txt'] = 'Sincronizar transportes de email';
+$wb['resync_mailrelay_txt'] = 'Sincronizar retransmissão de email';
+$wb['do_mailtransport_txt'] = 'Transportes de email sincronizados.';
+$wb['do_mailrelay_txt'] = 'Retransmissões de email sincronizados.';
diff --git a/interface/web/tools/lib/lang/br_tpl_default.lng b/interface/web/tools/lib/lang/br_tpl_default.lng
index 30ae32b17a..4a67327027 100644
--- a/interface/web/tools/lib/lang/br_tpl_default.lng
+++ b/interface/web/tools/lib/lang/br_tpl_default.lng
@@ -1,7 +1,6 @@
 <?php
 $wb['list_head_txt'] = 'Configuração padrão de temas';
-$wb['list_desc_txt'] = 'Alterar opções específicas do tema padrão';
+$wb['list_desc_txt'] = 'Modificar opções específicas do tema padrão';
 $wb['no_settings_txt'] = 'Não existe configurações para o tema padrão.';
 $wb['btn_start_txt'] = 'Salvar';
 $wb['btn_cancel_txt'] = 'Voltar';
-?>
diff --git a/interface/web/tools/lib/lang/br_usersettings.lng b/interface/web/tools/lib/lang/br_usersettings.lng
index e254e81a4f..8e6829a8c0 100644
--- a/interface/web/tools/lib/lang/br_usersettings.lng
+++ b/interface/web/tools/lib/lang/br_usersettings.lng
@@ -9,7 +9,9 @@ $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
 $wb['password_match_txt'] = 'As senhas coincidem.';
-$wb['language_txt'] = 'Idioma';
 $wb['startmodule_txt'] = 'Módulo Inicial';
 $wb['app_theme_txt'] = 'Tema';
-?>
+$wb['startmodule_empty'] = 'Módulo inicial está vazio.';
+$wb['startmodule_regex'] = 'Caracteres inválidos no módulo inicial.';
+$wb['app_theme_empty'] = 'Tema está vazio.';
+$wb['app_theme_regex'] = 'Caracteres inválidos no tema.';
diff --git a/interface/web/tools/lib/lang/cz.lng b/interface/web/tools/lib/lang/cz.lng
index 66bcaf49ae..05dbaa6856 100644
--- a/interface/web/tools/lib/lang/cz.lng
+++ b/interface/web/tools/lib/lang/cz.lng
@@ -10,4 +10,3 @@ $wb['Import'] = 'Importovat';
 $wb['ISPConfig 3 mail'] = 'ISPConfig 3 vzdalený e-mail server';
 $wb['PDNS Tupa'] = 'PowerDNS Tupa';
 $wb['Interface'] = 'Rozhraní';
-?>
diff --git a/interface/web/tools/lib/lang/cz_import_ispconfig.lng b/interface/web/tools/lib/lang/cz_import_ispconfig.lng
index 8ebf71795c..dc91ff36f5 100644
--- a/interface/web/tools/lib/lang/cz_import_ispconfig.lng
+++ b/interface/web/tools/lib/lang/cz_import_ispconfig.lng
@@ -20,4 +20,4 @@ $wb['import_alias_txt'] = 'Importovat e-mailový alias';
 $wb['import_forward_txt'] = 'Import forward';
 $wb['import_user_filter_txt'] = 'Importovat uživatelský filter';
 $wb['import_spamfilter_txt'] = 'Importovat spamový filter';
-?>
+$wb['local_server_txt'] = 'Local Mail Server';
diff --git a/interface/web/tools/lib/lang/cz_import_vpopmail.lng b/interface/web/tools/lib/lang/cz_import_vpopmail.lng
index c9a9cb32c4..08fe89ceb7 100644
--- a/interface/web/tools/lib/lang/cz_import_vpopmail.lng
+++ b/interface/web/tools/lib/lang/cz_import_vpopmail.lng
@@ -1,7 +1,6 @@
 <?php
 $wb['head_txt'] = 'Import email configuration from Vpopmail';
 $wb['legend_txt'] = 'Remote database server connection details';
-$wb['btn_start_txt'] = 'Start Import';
-$wb['btn_connect_txt'] = 'Connect to remote server';
+$wb['btn_start_txt'] = 'Spusťit import';
+$wb['btn_connect_txt'] = 'Připojit se ke vzdálenému serveru';
 $wb['btn_cancel_txt'] = 'Zrušit';
-?>
diff --git a/interface/web/tools/lib/lang/cz_index.lng b/interface/web/tools/lib/lang/cz_index.lng
index 5ebf1ec341..cf50cefe20 100644
--- a/interface/web/tools/lib/lang/cz_index.lng
+++ b/interface/web/tools/lib/lang/cz_index.lng
@@ -1,4 +1,3 @@
 <?php
 $wb['page_head_txt'] = 'ISPConfig nástroje';
 $wb['page_desc_txt'] = 'Změna uživatelského nastavení';
-?>
diff --git a/interface/web/tools/lib/lang/cz_interface.lng b/interface/web/tools/lib/lang/cz_interface.lng
new file mode 100644
index 0000000000..a3f8040fda
--- /dev/null
+++ b/interface/web/tools/lib/lang/cz_interface.lng
@@ -0,0 +1,10 @@
+<?php
+$wb['interface_head_txt'] = 'Nastavení rozhraní';
+$wb['interface_desc_txt'] = 'Možnost úpravy rozhraní';
+$wb['language_txt'] = 'Jazyk';
+$wb['startmodule_txt'] = 'Výchozí modul po přihlášení';
+$wb['app_theme_txt'] = 'Výchozí grafické téma';
+$wb['startmodule_empty'] = 'Startmodule empty.';
+$wb['startmodule_regex'] = 'Invalid chars in Startmodule.';
+$wb['app_theme_empty'] = 'App theme empty.';
+$wb['app_theme_regex'] = 'Invalid chars in App theme.';
diff --git a/interface/web/tools/lib/lang/cz_resync.lng b/interface/web/tools/lib/lang/cz_resync.lng
index b881c7d01a..6886312b0c 100644
--- a/interface/web/tools/lib/lang/cz_resync.lng
+++ b/interface/web/tools/lib/lang/cz_resync.lng
@@ -50,4 +50,3 @@ $wb['resync_mailtransport_txt'] = 'E-Mail Transport';
 $wb['resync_mailrelay_txt'] = 'E-Mail Relay';
 $wb['do_mailtransport_txt'] = 'Resynced Mailtransport';
 $wb['do_mailrelay_txt'] = 'Resynced Mailrelay';
-?>
diff --git a/interface/web/tools/lib/lang/cz_tpl_default.lng b/interface/web/tools/lib/lang/cz_tpl_default.lng
index 0bc79e972f..f640de5344 100644
--- a/interface/web/tools/lib/lang/cz_tpl_default.lng
+++ b/interface/web/tools/lib/lang/cz_tpl_default.lng
@@ -4,4 +4,3 @@ $wb['list_desc_txt'] = 'Upravit výchozí téma - specifické volby';
 $wb['no_settings_txt'] = 'Nejsou žádné nastavení pro výchozí motiv.';
 $wb['btn_start_txt'] = 'Uložit';
 $wb['btn_cancel_txt'] = 'Zrušit';
-?>
diff --git a/interface/web/tools/lib/lang/cz_usersettings.lng b/interface/web/tools/lib/lang/cz_usersettings.lng
index f447299e08..3805d25b3a 100644
--- a/interface/web/tools/lib/lang/cz_usersettings.lng
+++ b/interface/web/tools/lib/lang/cz_usersettings.lng
@@ -9,7 +9,9 @@ $wb['repeat_password_txt'] = 'Opakujte heslo';
 $wb['password_mismatch_txt'] = 'Hesla se neshodují.';
 $wb['password_match_txt'] = 'Hesla se shodují.';
 $wb['password_txt'] = 'Heslo';
-$wb['language_txt'] = 'Jazyk';
-$wb['startmodule_txt'] = 'Výchozí modul po přihlášení';
-$wb['app_theme_txt'] = 'Výchozí grafické téma';
-?>
+$wb['startmodule_txt'] = 'Úvodní modul';
+$wb['app_theme_txt'] = 'Design';
+$wb['startmodule_empty'] = 'Startmodule empty.';
+$wb['startmodule_regex'] = 'Invalid chars in Startmodule.';
+$wb['app_theme_empty'] = 'App theme empty.';
+$wb['app_theme_regex'] = 'Invalid chars in App theme.';
diff --git a/interface/web/vm/lib/lang/br.lng b/interface/web/vm/lib/lang/br.lng
index ae59107a78..b15b943239 100644
--- a/interface/web/vm/lib/lang/br.lng
+++ b/interface/web/vm/lib/lang/br.lng
@@ -4,4 +4,3 @@ $wb['OS Templates'] = 'Gabaritos de SO';
 $wb['VM Templates'] = 'Gabaritos de VM';
 $wb['IP addresses'] = 'Endereço IP';
 $wb['OpenVZ'] = 'OpenVZ';
-?>
diff --git a/interface/web/vm/lib/lang/br_openvz_action.lng b/interface/web/vm/lib/lang/br_openvz_action.lng
index cc191c14e9..483cacd5c3 100644
--- a/interface/web/vm/lib/lang/br_openvz_action.lng
+++ b/interface/web/vm/lib/lang/br_openvz_action.lng
@@ -13,4 +13,3 @@ $wb['restart_exec_txt'] = 'O comando "Reiniciar" foi enviando para o virtualizad
 $wb['ostemplate_name_error'] = 'O gabarito de sistema operacional contém caracteres não permitidos.';
 $wb['ostemplate_name_unique_error'] = 'Já existe um gabarito de sistema operacional com o mesmo nome.';
 $wb['ostemplate_exec_txt'] = 'O comando "Adicionar gabarito de SO" foi enviado para o virtualizador. Aguarde alguns instantes para o gabarito ser adicionado.';
-?>
diff --git a/interface/web/vm/lib/lang/br_openvz_ip.lng b/interface/web/vm/lib/lang/br_openvz_ip.lng
index 612c391c94..7766dfc442 100644
--- a/interface/web/vm/lib/lang/br_openvz_ip.lng
+++ b/interface/web/vm/lib/lang/br_openvz_ip.lng
@@ -6,4 +6,3 @@ $wb['reserved_txt'] = 'Reservado';
 $wb['ip_error_wrong'] = 'Por favor, insira um endereço IPv4 válido.';
 $wb['ip_error_unique'] = 'O endereço IP já existe.';
 $wb['IP address'] = 'Endereço IP';
-?>
diff --git a/interface/web/vm/lib/lang/br_openvz_ip_list.lng b/interface/web/vm/lib/lang/br_openvz_ip_list.lng
index f9a9f33622..052347d9e2 100644
--- a/interface/web/vm/lib/lang/br_openvz_ip_list.lng
+++ b/interface/web/vm/lib/lang/br_openvz_ip_list.lng
@@ -4,4 +4,3 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['vm_id_txt'] = 'VM';
 $wb['ip_address_txt'] = 'Endereço IP';
 $wb['reserved_txt'] = 'Reservado';
-?>
diff --git a/interface/web/vm/lib/lang/br_openvz_ostemplate.lng b/interface/web/vm/lib/lang/br_openvz_ostemplate.lng
index ea76c915b7..ce91a34b96 100644
--- a/interface/web/vm/lib/lang/br_openvz_ostemplate.lng
+++ b/interface/web/vm/lib/lang/br_openvz_ostemplate.lng
@@ -5,7 +5,6 @@ $wb['server_id_txt'] = 'Virtualizador';
 $wb['allservers_txt'] = 'Disponível em todos os servidores';
 $wb['active_txt'] = 'Ativo';
 $wb['description_txt'] = 'Descrição';
-$wb['template_name_error_empty'] = 'Nome do gabarito está em branco.';
-$wb['template_file_error_empty'] = 'Nome do arquivo está em branco.';
+$wb['template_name_error_empty'] = 'Nome do gabarito está vazio.';
+$wb['template_file_error_empty'] = 'Nome do arquivo está vazio.';
 $wb['Template'] = 'Gabarito';
-?>
diff --git a/interface/web/vm/lib/lang/br_openvz_ostemplate_list.lng b/interface/web/vm/lib/lang/br_openvz_ostemplate_list.lng
index 9e60baf179..b2042b1709 100644
--- a/interface/web/vm/lib/lang/br_openvz_ostemplate_list.lng
+++ b/interface/web/vm/lib/lang/br_openvz_ostemplate_list.lng
@@ -5,4 +5,3 @@ $wb['template_name_txt'] = 'Nome do gabarito';
 $wb['server_id_txt'] = 'Virtualizador';
 $wb['allservers_txt'] = 'Disponível em todos os servidores';
 $wb['ostemplate_id_txt'] = 'ID';
-?>
diff --git a/interface/web/vm/lib/lang/br_openvz_template.lng b/interface/web/vm/lib/lang/br_openvz_template.lng
index 23d4c9b6af..a35c4c418d 100644
--- a/interface/web/vm/lib/lang/br_openvz_template.lng
+++ b/interface/web/vm/lib/lang/br_openvz_template.lng
@@ -1,28 +1,28 @@
 <?php
 $wb['numproc_txt'] = 'Número de Processadores';
-$wb['numtcpsock_txt'] = 'Número de sockets tcp';
-$wb['numothersock_txt'] = '(numothersock)';
+$wb['numtcpsock_txt'] = 'Número de sockets TCP';
+$wb['numothersock_txt'] = 'Número de outros sockets';
 $wb['vmguarpages_txt'] = 'Páginas de guarda da vm (vmguardpages)';
 $wb['kmemsize_txt'] = 'Tamanho da memória (Kmemsize)';
-$wb['tcpsndbuf_txt'] = 'Buffers tcp de envio (tcpsndbuf)';
-$wb['tcprcvbuf_txt'] = 'Buffers tcp de recepção (tcprcvbuf)';
+$wb['tcpsndbuf_txt'] = 'Buffers TCP de envio (tcpsndbuf)';
+$wb['tcprcvbuf_txt'] = 'Buffers TCP de recepção (tcprcvbuf)';
 $wb['othersockbuf_txt'] = 'Outros buffers (othersockbuf)';
-$wb['dgramrcvbuf_txt'] = 'Buffers datagrama de envio (dgramrcvbuf)';
-$wb['oomguarpages_txt'] = '(oomguarpages)';
-$wb['privvmpages_txt'] = 'Tamanho da memória alocada para aplicações, em páginas (privvmpages)';
-$wb['lockedpages_txt'] = 'Páginas bloqueadas (lockedpages)';
-$wb['shmpages_txt'] = '(Shmpages)';
-$wb['physpages_txt'] = '(Physpages)';
+$wb['dgramrcvbuf_txt'] = 'Buffers de protocolos datagrama de envio (dgramrcvbuf)';
+$wb['oomguarpages_txt'] = 'Paginação de guarda para falta de memória (oomguarpages)';
+$wb['privvmpages_txt'] = 'Paginação da memória alocada para aplicações (privvmpages)';
+$wb['lockedpages_txt'] = 'Bloqueio do paginação da memória (lockedpages)';
+$wb['shmpages_txt'] = 'Memória compartilhada (Shmpages)';
+$wb['physpages_txt'] = 'Paginação física da memória (Physpages)';
 $wb['numfile_txt'] = 'Número de arquivos';
 $wb['avnumproc_txt'] = 'Média de processadores';
 $wb['numflock_txt'] = 'Número de arquivos bloqueados (numflock)';
 $wb['numpty_txt'] = 'Número de PTY (numpty)';
-$wb['numsiginfo_txt'] = 'Número de siginfo (informações de geração de sinal)';
+$wb['numsiginfo_txt'] = 'Número de informações para geração de sinal (siginfo)';
 $wb['dcachesize_txt'] = 'Tamanho do cache (dcachesize)';
 $wb['numiptent_txt'] = 'Número de endereços IP (numiptent)';
-$wb['swappages_txt'] = 'Páginas de troca (swappages)';
+$wb['swappages_txt'] = 'Páginação de troca (swappages)';
 $wb['hostname_txt'] = 'Nome do host';
-$wb['nameserver_txt'] = 'Servidor(es) dns';
+$wb['nameserver_txt'] = 'Servidor(es) DNS';
 $wb['nameserver_desc_txt'] = '(separado por espaço)';
 $wb['capability_txt'] = 'Capacidade';
 $wb['template_name_txt'] = 'Nome do gabarito';
@@ -36,62 +36,61 @@ $wb['io_priority_txt'] = 'Prioridade de E/S';
 $wb['active_txt'] = 'Ativo';
 $wb['description_txt'] = 'Descrição';
 $wb['numproc_desc_txt'] = 'Número de processos e threads.';
-$wb['numtcpsock_desc_txt'] = 'Número de sockets tcp.';
+$wb['numtcpsock_desc_txt'] = 'Número de sockets TCP.';
 $wb['numothersock_desc_txt'] = 'Número de outros sockets.';
-$wb['vmguarpages_desc_txt'] = 'Garantia de alocação de memória, em páginas.';
+$wb['vmguarpages_desc_txt'] = 'Garantia de alocação de paginação da memória.';
 $wb['kmemsize_desc_txt'] = 'Tamanho da memória do kernel não cambiável, alocada para processos neste contêiner.';
-$wb['tcpsndbuf_desc_txt'] = 'Tamanho de buffers de envio tcp.';
-$wb['tcprcvbuf_desc_txt'] = 'Tamanho de buffers de recepção tcp.';
-$wb['othersockbuf_desc_txt'] = 'Tamanho de buffers de socket de domínio unix, udp e outros buffers de envio de protocolos de datagrama.';
-$wb['dgramrcvbuf_desc_txt'] = 'Tamanho de buffers de recepção udp e outros protocolos de datagrama.';
-$wb['oomguarpages_desc_txt'] = 'Quantidade garantida de memória para o caso da memória estar "com excesso de reserva" (garantia de eliminação de falta de memória), em páginas.';
-$wb['privvmpages_desc_txt'] = 'Limite de alocação de memória, em páginas.';
-$wb['lockedpages_desc_txt'] = 'Páginas de processos que não podem ser trocadas (páginas bloqueadas por mlock(2)).';
-$wb['shmpages_desc_txt'] = 'Tamanho da memória compartilhada (ISPC, mapeamentos anônimos compartilhados e objetos tmpfs), em páginas.';
-$wb['physpages_desc_txt'] = 'Número total de páginas RAM usadas pelos processos';
+$wb['tcpsndbuf_desc_txt'] = 'Tamanho dos buffers de envio TCP.';
+$wb['tcprcvbuf_desc_txt'] = 'Tamanho dos buffers de recepção TCP.';
+$wb['othersockbuf_desc_txt'] = 'Tamanho de buffers de socket de domínio UNIX, udp e outros buffers de envio de protocolos datagrama.';
+$wb['dgramrcvbuf_desc_txt'] = 'Tamanho de buffers de recepção udp e outros protocolos datagrama.';
+$wb['oomguarpages_desc_txt'] = 'Tamanho da garantia de paginação da memória para o caso da mesma estar "com excesso de reserva" (garantia de eliminação de falta de memória).';
+$wb['privvmpages_desc_txt'] = 'Limite de alocação de paginação da memória.';
+$wb['lockedpages_desc_txt'] = 'Páginação de processos que não podem ser trocados (páginas bloqueadas por mlock(2)).';
+$wb['shmpages_desc_txt'] = 'Tamanho da paginação de memória compartilhada (ISPC, mapeamentos anônimos compartilhados e objetos tmpfs).';
+$wb['physpages_desc_txt'] = 'Número total de páginação da memória (RAM) usadas pelos processos';
 $wb['numfile_desc_txt'] = 'Número de arquivos abertos.';
 $wb['numflock_desc_txt'] = 'Número de arquivos bloqueados.';
 $wb['numpty_desc_txt'] = 'Número de pseudo-terminais (tty).';
 $wb['numsiginfo_desc_txt'] = 'Número de estruturas siginfo.';
 $wb['dcachesize_desc_txt'] = 'Tamanho de estruturas dentry e inode bloqueadas na memória.';
 $wb['numiptent_desc_txt'] = 'Número total de entradas NETFILTER (filtragem de pacotes IP).';
-$wb['swappages_desc_txt'] = 'Quantidade de espaço de troca a ser exibido no contêiner.';
-$wb['create_dns_txt'] = 'Adicionar dns para o nome do host';
-$wb['template_name_error_empty'] = 'O nome do gabarito está em branco.';
-$wb['diskspace_error_empty'] = 'O tamanho do disco está em branco.';
-$wb['ram_error_empty'] = 'RAM (garantida) está em branco.';
-$wb['ram_burst_error_empty'] = 'RAM (rajada) está em branco.';
-$wb['cpu_units_error_empty'] = 'Número de cores da CPU está em branco.';
-$wb['cpu_num_error_empty'] = 'Número de CPU está em branco.';
-$wb['cpu_limit_error_empty'] = 'Limite da CPU está em branco.';
-$wb['io_priority_error_empty'] = 'Prioridade de E/S está em branco.';
-$wb['template_nameserver_error_empty'] = 'Servidor(es) dns está em branco.';
-$wb['numproc_error_empty'] = 'Número de processadores está em branco.';
-$wb['numtcpsock_error_empty'] = 'Número de sockets tcp está em branco.';
-$wb['numothersock_error_empty'] = 'Número de outros sockets está em branco.';
-$wb['vmguarpages_error_empty'] = 'Página de guarda da vm está em branco.';
-$wb['kmemsize_error_empty'] = 'Kmemsize está em branco.';
-$wb['tcpsndbuf_error_empty'] = 'Tamanho de buffers de envio tcp está em branco.';
-$wb['tcprcvbuf_error_empty'] = 'Tamanho de buffers de recepção está em branco.';
-$wb['othersockbuf_error_empty'] = 'Tamanho de outros buffers de socket está em branco.';
-$wb['dgramrcvbuf_error_empty'] = 'Tamanho de buffers de recepção udp e outros protocolos de datagrama está em branco.';
-$wb['oomguarpages_error_empty'] = 'Oomguarpages está em branco.';
-$wb['privvmpages_error_empty'] = 'Tamanho da memória alocada para aplicações, em páginas, está em branco.';
-$wb['lockedpages_error_empty'] = 'Lockedpages está em branco.';
-$wb['shmpages_error_empty'] = 'Shmpages está em branco.';
-$wb['physpages_error_empty'] = 'Physpages está em branco.';
-$wb['numfile_error_empty'] = 'Número de arquivos está em branco.';
-$wb['avnumproc_error_empty'] = 'Média de processadores está em branco.';
-$wb['numflock_error_empty'] = 'Número de arquivos bloqueados está em branco.';
-$wb['numpty_error_empty'] = 'Número de pseudo-terminais está em branco.';
-$wb['numsiginfo_error_empty'] = 'Número de informações siginfo está em branco.';
-$wb['dcachesize_error_empty'] = 'Tamanho do cache está em branco.';
-$wb['numiptent_error_empty'] = 'Número de entradas NETFILTER está em branco.';
-$wb['swappages_error_empty'] = 'Páginas de troca está em branco.';
+$wb['swappages_desc_txt'] = 'Quantidade de memória de troca a ser exibido no contêiner.';
+$wb['create_dns_txt'] = 'Adicionar DNS para o nome do host';
+$wb['template_name_error_empty'] = 'O nome do gabarito está vazio.';
+$wb['diskspace_error_empty'] = 'O tamanho do disco está vazio.';
+$wb['ram_error_empty'] = 'RAM (garantida) está vazio.';
+$wb['ram_burst_error_empty'] = 'RAM (rajada) está vazio.';
+$wb['cpu_units_error_empty'] = 'Número de cores da CPU está vazio.';
+$wb['cpu_num_error_empty'] = 'Número de CPU está vazio.';
+$wb['cpu_limit_error_empty'] = 'Limite da CPU está vazio.';
+$wb['io_priority_error_empty'] = 'Prioridade de E/S está vazio.';
+$wb['template_nameserver_error_empty'] = 'Servidor(es) DNS está vazio.';
+$wb['numproc_error_empty'] = 'Número de processadores está vazio.';
+$wb['numtcpsock_error_empty'] = 'Número de sockets tcp está vazio.';
+$wb['numothersock_error_empty'] = 'Número de outros sockets está vazio.';
+$wb['vmguarpages_error_empty'] = 'Página de guarda da VM está vazio.';
+$wb['kmemsize_error_empty'] = 'Tamanho da memória (kmemsize) está vazio.';
+$wb['tcpsndbuf_error_empty'] = 'Tamanho de buffers de envio TCP está vazio.';
+$wb['tcprcvbuf_error_empty'] = 'Tamanho de buffers de recepção TCP está vazio.';
+$wb['othersockbuf_error_empty'] = 'Tamanho de outros buffers de socket está vazio.';
+$wb['dgramrcvbuf_error_empty'] = 'Tamanho de buffers de recepção UDP e outros protocolos datagrama está vazio.';
+$wb['oomguarpages_error_empty'] = 'Tamanho da paginação de falta de memória (oomguarpages) está vazio.';
+$wb['privvmpages_error_empty'] = 'Tamanho da paginação de memória alocada para aplicações está vazio.';
+$wb['lockedpages_error_empty'] = 'Bloqueio de paginação da memória (lockedpages) está vazio.';
+$wb['shmpages_error_empty'] = 'Compartilhamento de memória (shmpages) está vazio.';
+$wb['physpages_error_empty'] = 'Paginação física da memória (physpages) está vazio.';
+$wb['numfile_error_empty'] = 'Número de arquivos está vazio.';
+$wb['avnumproc_error_empty'] = 'Média de processadores está vazio.';
+$wb['numflock_error_empty'] = 'Número de arquivos bloqueados está vazio.';
+$wb['numpty_error_empty'] = 'Número de pseudo-terminais está vazio.';
+$wb['numsiginfo_error_empty'] = 'Número de informações siginfo está vazio.';
+$wb['dcachesize_error_empty'] = 'Tamanho do cache está vazio.';
+$wb['numiptent_error_empty'] = 'Número de entradas NETFILTER está vazio.';
+$wb['swappages_error_empty'] = 'Páginas de troca está vazio.';
 $wb['Template'] = 'Gabarito';
 $wb['Advanced'] = 'Avançado';
 $wb['features_txt'] = 'Recursos';
 $wb['iptables_txt'] = 'Firewall (iptables)';
 $wb['custom_txt'] = 'Configurações personalizadas';
 $wb['custom_error'] = 'Não permitido nas configurações personalizadas: ';
-?>
diff --git a/interface/web/vm/lib/lang/br_openvz_template_list.lng b/interface/web/vm/lib/lang/br_openvz_template_list.lng
index 00d1b648d8..e79af3ddde 100644
--- a/interface/web/vm/lib/lang/br_openvz_template_list.lng
+++ b/interface/web/vm/lib/lang/br_openvz_template_list.lng
@@ -2,4 +2,3 @@
 $wb['list_head_txt'] = 'Gabarito de máquina virtual';
 $wb['active_txt'] = 'Ativo';
 $wb['template_name_txt'] = 'Nome do gabarito';
-?>
diff --git a/interface/web/vm/lib/lang/br_openvz_vm.lng b/interface/web/vm/lib/lang/br_openvz_vm.lng
index a8176e7688..3f53e8aa51 100644
--- a/interface/web/vm/lib/lang/br_openvz_vm.lng
+++ b/interface/web/vm/lib/lang/br_openvz_vm.lng
@@ -3,10 +3,10 @@ $wb['diskspace_txt'] = 'Espaço no disco';
 $wb['ram_txt'] = 'RAM (garantida)';
 $wb['ram_burst_txt'] = 'RAM (rajada)';
 $wb['cpu_units_txt'] = 'Número de cores da CPU';
-$wb['cpu_num_txt'] = 'Número de CPU';
-$wb['cpu_limit_txt'] = 'Limite de CPU (%)';
+$wb['cpu_num_txt'] = 'Número de CPUs';
+$wb['cpu_limit_txt'] = 'Limite de CPU %';
 $wb['io_priority_txt'] = 'prioridade de E/S';
-$wb['nameserver_txt'] = 'Servidor(es) dns';
+$wb['nameserver_txt'] = 'Servidor(es) DNS';
 $wb['nameserver_desc_txt'] = '(separados por espaço)';
 $wb['capability_txt'] = 'Capacidade';
 $wb['server_id_txt'] = 'Virtualizador';
@@ -20,21 +20,21 @@ $wb['active_txt'] = 'Ativo';
 $wb['description_txt'] = 'Descrição';
 $wb['client_group_id_txt'] = 'Cliente';
 $wb['veid_txt'] = 'VEID';
-$wb['create_dns_txt'] = 'Adicionar dns para a máquina virtual';
+$wb['create_dns_txt'] = 'Adicionar DNS para a máquina virtual';
 $wb['active_until_date_txt'] = 'Ativo até a data';
-$wb['ip_address_error_empty'] = 'Endereço IP está em branco.';
-$wb['hostname_error_empty'] = 'Nome do host está em branco.';
-$wb['vm_password_error_empty'] = 'Senha da máquina virtual está em branco.';
-$wb['veid_error_empty'] = 'VEID está em branco.';
+$wb['ip_address_error_empty'] = 'Endereço IP está vazio.';
+$wb['hostname_error_empty'] = 'Nome do host está vazio.';
+$wb['vm_password_error_empty'] = 'Senha da máquina virtual está vazio.';
+$wb['veid_error_empty'] = 'VEID está vazio.';
 $wb['veid_error_unique'] = 'VEID já existe.';
-$wb['diskspace_error_empty'] = 'Espaço do disco está em branco.';
-$wb['ram_error_empty'] = 'RAM (garantida) está em branco.';
-$wb['ram_burst_error_empty'] = 'RAM (rajada) está em branco.';
-$wb['cpu_units_error_empty'] = 'Número de cores da CPU está em branco.';
-$wb['cpu_num_error_empty'] = 'Número de CPU está em branco.';
-$wb['cpu_limit_error_empty'] = 'Limite de CPU está em branco.';
-$wb['io_priority_error_empty'] = 'Prioridade de E/S está em branco.';
-$wb['template_nameserver_error_empty'] = 'Servidor(es) dns está em branco.';
+$wb['diskspace_error_empty'] = 'Espaço do disco está vazio.';
+$wb['ram_error_empty'] = 'RAM (garantida) está vazio.';
+$wb['ram_burst_error_empty'] = 'RAM (rajada) está vazio.';
+$wb['cpu_units_error_empty'] = 'Número de cores da CPU está vazio.';
+$wb['cpu_num_error_empty'] = 'Número de CPU está vazio.';
+$wb['cpu_limit_error_empty'] = 'Limite de CPU está vazio.';
+$wb['io_priority_error_empty'] = 'Prioridade de E/S está vazio.';
+$wb['template_nameserver_error_empty'] = 'Servidor(es) DNS está vazio.';
 $wb['Virtual server'] = 'Máquina Virtual';
 $wb['Advanced'] = 'Avançado';
 $wb['Additional IP'] = 'Endereço IP adicional';
@@ -43,4 +43,3 @@ $wb['iptables_txt'] = 'Firewall';
 $wb['custom_txt'] = 'Configurações personalizadas';
 $wb['bootorder_txt'] = 'Ordem da prioridade do boot';
 $wb['bootorder_error_notpositive'] = 'São permitidos apenas números inteiros, > 0, na ordem da prioridade do boot.';
-?>
diff --git a/interface/web/vm/lib/lang/br_openvz_vm_list.lng b/interface/web/vm/lib/lang/br_openvz_vm_list.lng
index c907c710ea..bfa7a237fe 100644
--- a/interface/web/vm/lib/lang/br_openvz_vm_list.lng
+++ b/interface/web/vm/lib/lang/br_openvz_vm_list.lng
@@ -7,4 +7,3 @@ $wb['template_id_txt'] = 'Gabarito';
 $wb['hostname_txt'] = 'Nome do host';
 $wb['ip_address_txt'] = 'Endereço IP';
 $wb['veid_txt'] = 'VEID';
-?>
diff --git a/interface/web/vm/lib/lang/cz.lng b/interface/web/vm/lib/lang/cz.lng
index 556a593564..c022410577 100644
--- a/interface/web/vm/lib/lang/cz.lng
+++ b/interface/web/vm/lib/lang/cz.lng
@@ -4,4 +4,3 @@ $wb['OS Templates'] = 'OS Å ablony';
 $wb['VM Templates'] = 'VM Å ablony';
 $wb['IP addresses'] = 'IP adresy';
 $wb['OpenVZ'] = 'OpenVZ';
-?>
diff --git a/interface/web/vm/lib/lang/cz_openvz_action.lng b/interface/web/vm/lib/lang/cz_openvz_action.lng
index 3e2e3e0b84..9ce1df618b 100644
--- a/interface/web/vm/lib/lang/cz_openvz_action.lng
+++ b/interface/web/vm/lib/lang/cz_openvz_action.lng
@@ -13,4 +13,3 @@ $wb['restart_exec_txt'] = 'Restart command has been sent to the VM host server.
 $wb['ostemplate_name_error'] = 'The OSTemplate name conatains unallowed characters.';
 $wb['ostemplate_name_unique_error'] = 'There is already a OSTemplate with that name.';
 $wb['ostemplate_exec_txt'] = 'The command to create a OSTemplate has been sent to the host server. It will take several minutes until the OSTemplate has been created.';
-?>
diff --git a/interface/web/vm/lib/lang/cz_openvz_ip.lng b/interface/web/vm/lib/lang/cz_openvz_ip.lng
index e749c28648..9aa104dfff 100644
--- a/interface/web/vm/lib/lang/cz_openvz_ip.lng
+++ b/interface/web/vm/lib/lang/cz_openvz_ip.lng
@@ -6,4 +6,3 @@ $wb['reserved_txt'] = 'Rezervováno';
 $wb['ip_error_wrong'] = 'Please fill in a valid IPv4 address.';
 $wb['ip_error_unique'] = 'This IP address does already exist.';
 $wb['IP address'] = 'IP adresa';
-?>
diff --git a/interface/web/vm/lib/lang/cz_openvz_ip_list.lng b/interface/web/vm/lib/lang/cz_openvz_ip_list.lng
index 7778c6d8c7..53a6d1c573 100644
--- a/interface/web/vm/lib/lang/cz_openvz_ip_list.lng
+++ b/interface/web/vm/lib/lang/cz_openvz_ip_list.lng
@@ -4,4 +4,3 @@ $wb['server_id_txt'] = 'Server';
 $wb['ip_address_txt'] = 'IP adresa';
 $wb['reserved_txt'] = 'Rezervováno';
 $wb['vm_id_txt'] = 'VM';
-?>
diff --git a/interface/web/vm/lib/lang/cz_openvz_ostemplate.lng b/interface/web/vm/lib/lang/cz_openvz_ostemplate.lng
index 72838a20de..7e710cd0f5 100644
--- a/interface/web/vm/lib/lang/cz_openvz_ostemplate.lng
+++ b/interface/web/vm/lib/lang/cz_openvz_ostemplate.lng
@@ -8,4 +8,3 @@ $wb['description_txt'] = 'Popis';
 $wb['template_name_error_empty'] = 'Template name is empty.';
 $wb['template_file_error_empty'] = 'Template filename is empty.';
 $wb['Template'] = 'Å ablona';
-?>
diff --git a/interface/web/vm/lib/lang/cz_openvz_ostemplate_list.lng b/interface/web/vm/lib/lang/cz_openvz_ostemplate_list.lng
index 7705a4d18f..eeebd61bbd 100644
--- a/interface/web/vm/lib/lang/cz_openvz_ostemplate_list.lng
+++ b/interface/web/vm/lib/lang/cz_openvz_ostemplate_list.lng
@@ -5,4 +5,3 @@ $wb['template_name_txt'] = 'Název šablony';
 $wb['server_id_txt'] = 'Server';
 $wb['allservers_txt'] = 'Exists on all servers';
 $wb['ostemplate_id_txt'] = 'ID';
-?>
diff --git a/interface/web/vm/lib/lang/cz_openvz_template.lng b/interface/web/vm/lib/lang/cz_openvz_template.lng
index e54a2a9dbb..9509a672d8 100644
--- a/interface/web/vm/lib/lang/cz_openvz_template.lng
+++ b/interface/web/vm/lib/lang/cz_openvz_template.lng
@@ -94,4 +94,3 @@ $wb['iptables_txt'] = 'IP Tables';
 $wb['custom_txt'] = 'Custom settings';
 $wb['custom_error'] = 'Not allowed in Custom settings: ';
 $wb['hostname_txt'] = 'Název hostitele';
-?>
diff --git a/interface/web/vm/lib/lang/cz_openvz_template_list.lng b/interface/web/vm/lib/lang/cz_openvz_template_list.lng
index 89c11ef5d1..a20ce561d4 100644
--- a/interface/web/vm/lib/lang/cz_openvz_template_list.lng
+++ b/interface/web/vm/lib/lang/cz_openvz_template_list.lng
@@ -2,4 +2,3 @@
 $wb['list_head_txt'] = 'OpenVZ Virtual Machine Template';
 $wb['active_txt'] = 'Aktivní';
 $wb['template_name_txt'] = 'Název šablony';
-?>
diff --git a/interface/web/vm/lib/lang/cz_openvz_vm.lng b/interface/web/vm/lib/lang/cz_openvz_vm.lng
index 7c610fbe04..98665e9879 100644
--- a/interface/web/vm/lib/lang/cz_openvz_vm.lng
+++ b/interface/web/vm/lib/lang/cz_openvz_vm.lng
@@ -42,4 +42,3 @@ $wb['bootorder_txt'] = 'Boot order priority';
 $wb['bootorder_error_notpositive'] = 'Only positive integers are allowed for Boot order priority';
 $wb['hostname_txt'] = 'Název hostitele';
 $wb['hostname_error_empty'] = 'Název hostitele je prázdný';
-?>
diff --git a/interface/web/vm/lib/lang/cz_openvz_vm_list.lng b/interface/web/vm/lib/lang/cz_openvz_vm_list.lng
index c402181601..be9fa9faae 100644
--- a/interface/web/vm/lib/lang/cz_openvz_vm_list.lng
+++ b/interface/web/vm/lib/lang/cz_openvz_vm_list.lng
@@ -7,4 +7,3 @@ $wb['template_id_txt'] = 'Å ablona';
 $wb['ip_address_txt'] = 'IP adresa';
 $wb['veid_txt'] = 'VEID';
 $wb['hostname_txt'] = 'Název hostitele';
-?>
-- 
GitLab


From 74edc5c94d1f40681aac1a267ca8f671917c2c4d Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 19 Nov 2020 09:49:14 +0100
Subject: [PATCH 138/441] - fixed syntax

---
 interface/web/admin/lib/lang/br_remote_action.lng    | 4 ++--
 interface/web/admin/lib/lang/br_server_config.lng    | 2 +-
 interface/web/admin/lib/lang/br_system_config.lng    | 2 +-
 interface/web/admin/lib/lang/cz_system_config.lng    | 4 ++--
 interface/web/client/lib/lang/br_client.lng          | 2 +-
 interface/web/client/lib/lang/br_client_template.lng | 2 +-
 interface/web/client/lib/lang/br_reseller.lng        | 2 +-
 interface/web/dns/lib/lang/br_dns_dmarc.lng          | 8 ++++----
 interface/web/dns/lib/lang/cz_dns_dmarc.lng          | 6 +++---
 interface/web/help/lib/lang/cz_support_message.lng   | 8 ++++----
 interface/web/mail/lib/lang/br_mail_user.lng         | 2 +-
 interface/web/mail/lib/lang/cz_mail_user.lng         | 2 +-
 interface/web/monitor/lib/lang/br.lng                | 6 +++---
 interface/web/monitor/lib/lang/cz.lng                | 4 ++--
 interface/web/sites/lib/lang/br_shell_user.lng       | 4 ++--
 interface/web/sites/lib/lang/br_web_childdomain.lng  | 2 +-
 interface/web/sites/lib/lang/br_web_vhost_domain.lng | 4 ++--
 interface/web/sites/lib/lang/br_webdav_user.lng      | 4 ++--
 interface/web/sites/lib/lang/cz_web_childdomain.lng  | 2 +-
 interface/web/sites/lib/lang/cz_web_vhost_domain.lng | 4 ++--
 20 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/interface/web/admin/lib/lang/br_remote_action.lng b/interface/web/admin/lib/lang/br_remote_action.lng
index d851202bca..5c88861814 100644
--- a/interface/web/admin/lib/lang/br_remote_action.lng
+++ b/interface/web/admin/lib/lang/br_remote_action.lng
@@ -2,10 +2,10 @@
 $wb['select_server_txt'] = 'Selecionar servidor';
 $wb['btn_do_txt'] = 'Executar ação';
 $wb['do_osupdate_caption'] = 'Atualizar sistema operacional no servidor remoto';
-$wb['do_osupdate_desc'] = 'Esta ação fará o comando \\'aptitude -y upgrade\\' no servidor selecionado.<br><br><strong>UTILIZE POR SUA CONTA E RISCO!</strong>';
+$wb['do_osupdate_desc'] = 'Esta ação fará o comando \'aptitude -y upgrade\' no servidor selecionado.<br><br><strong>UTILIZE POR SUA CONTA E RISCO!</strong>';
 $wb['do_ispcupdate_caption'] = 'Atualizar ISPConfig 3 - Atualizar o servidor remoto';
 $wb['do_ispcupdate_desc'] = 'Esta ação atualizará o ISPConfig3 no servidor selecionado.<br><br><strong>UTILIZE POR SUA CONTA E RISCO!</strong>';
 $wb['action_scheduled'] = 'A ação foi agendada.';
 $wb['select_all_server'] = 'Todos os servidores';
 $wb['ispconfig_update_title'] = 'Instruções de atualização do ISPConfig';
-$wb['ispconfig_update_text'] = 'Acesse com o usuário root no shell do servidor e execute o comando<br /><br /> <strong>ispconfig_update.sh</strong><br /><br />para iniciar a atualização do ISPConfig.<br /><br /><a href=\\'https://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-update-ispconfig-3/\\' target=\\'_blank\\'>Clique aqui para instruções detalhadas</a>';
+$wb['ispconfig_update_text'] = 'Acesse com o usuário root no shell do servidor e execute o comando<br /><br /> <strong>ispconfig_update.sh</strong><br /><br />para iniciar a atualização do ISPConfig.<br /><br /><a href=\'https://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-update-ispconfig-3/\' target=\'_blank\'>Clique aqui para instruções detalhadas</a>';
diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng
index 3e507bb5c4..0e8d43ca8e 100644
--- a/interface/web/admin/lib/lang/br_server_config.lng
+++ b/interface/web/admin/lib/lang/br_server_config.lng
@@ -300,7 +300,7 @@ $wb['xmpp_port_pastebin_txt'] = 'Pastebin';
 $wb['xmpp_port_bosh_txt'] = 'BOSH';
 $wb['disable_bind_log_txt'] = 'Desabilitar mensagens de alerta do Bind9';
 $wb['apps_vhost_enabled_txt'] = 'Habilitar apps-vhost';
-$wb['skip_le_check_txt'] = 'Ignorar verificação do Let\\'s Encrypt';
+$wb['skip_le_check_txt'] = 'Ignorar verificação do Let\'s Encrypt';
 $wb['migration_mode_txt'] = 'Modo migração de servidor';
 $wb['nginx_enable_pagespeed_txt'] = 'Tornar pagespeed disponível';
 $wb['logging_txt'] = 'Gravar logs de acesso e erros de sites';
diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng
index 0d3e473496..58ffca080b 100644
--- a/interface/web/admin/lib/lang/br_system_config.lng
+++ b/interface/web/admin/lib/lang/br_system_config.lng
@@ -52,7 +52,7 @@ $wb['phpmyadmin_url_error_regex'] = 'URL PHPMyAdmin inválida.';
 $wb['use_combobox_txt'] = 'Usar combobox jQuery UI';
 $wb['use_loadindicator_txt'] = 'Usar indicador de carga';
 $wb['f5_to_reload_js_txt'] = 'Se você modificar esta configuração, talvez será necessário pressionar F5 no seu navegador para recarregar as bibliotecas do JavaScript ou esvaziar o cache.';
-$wb['client_username_web_check_disabled_txt'] = 'Desabilitar verificação da palavra reservada \\'web\\' para o nome de usuário (não recomendado!).';
+$wb['client_username_web_check_disabled_txt'] = 'Desabilitar verificação da palavra reservada \'web\' para o nome de usuário (não recomendado!).';
 $wb['backups_include_into_web_quota_txt'] = 'Incluir arquivos de backup na cota do site.';
 $wb['webmail_url_error_regex'] = 'URL do Webmail é inválida.';
 $wb['phpmyadmin_url_note_txt'] = 'Área reservada:';
diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng
index e6d62968f2..7db312097c 100644
--- a/interface/web/admin/lib/lang/cz_system_config.lng
+++ b/interface/web/admin/lib/lang/cz_system_config.lng
@@ -29,7 +29,7 @@ $wb['enable_custom_login_txt'] = 'Povolit vlastní přihlašovací jméno u e-ma
 $wb['mailmailinglist_link_txt'] = 'Ikonový odkaz na aplikaci E-mailových konferencí seznamu e-mailových konferencí';
 $wb['mailmailinglist_url_txt'] = 'E-mailové konference URL';
 $wb['maintenance_mode_txt'] = 'Režim údržby';
-$wb['maintenance_mode_exclude_ips_txt'] = 'Exclude IP\\'s from maintenance';
+$wb['maintenance_mode_exclude_ips_txt'] = 'Exclude IP\'s from maintenance';
 $wb['maintenance_mode_exclude_ips_error_isip'] = 'One or more invalid IP addresses in maintenance mode exclude list. Must be a list of comma-separated IPv4 and/or IPv6 addresses.';
 $wb['smtp_enabled_txt'] = 'Použít (zvolit) SMTP server pro zasílání systémových mailů';
 $wb['smtp_host_txt'] = 'SMTP host';
@@ -47,7 +47,7 @@ $wb['phpmyadmin_url_error_regex'] = 'phpmyadmin neplatné URL';
 $wb['use_combobox_txt'] = 'Použití jQuery UI Combobox';
 $wb['use_loadindicator_txt'] = 'Použití indikátoru zatížení';
 $wb['f5_to_reload_js_txt'] = 'Pokud vypnete tuto volbu, zřejmě budete muset používat klávesu F5, aby internetový prohlížeč znovu načetl JavaScript knihovny nebo budete muset ručně vyprázdňovat mezipaměť (cache) vašeho internetového prohlížeče.';
-$wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \\'web\\'.';
+$wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Ukázat kartu automatická odpověď v podrobnostech u poštovní schránky';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Ukázat kartu poštovní filtry v podrobnostech u poštovní schránky';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Ukázat kartu vlastní pravidla v podrobnostech u poštovní schránky';
diff --git a/interface/web/client/lib/lang/br_client.lng b/interface/web/client/lib/lang/br_client.lng
index 81b9872248..2f9d3c2056 100644
--- a/interface/web/client/lib/lang/br_client.lng
+++ b/interface/web/client/lib/lang/br_client.lng
@@ -109,7 +109,7 @@ $wb['force_suexec_txt'] = 'Forçar SuEXEC';
 $wb['limit_hterror_txt'] = 'Diretório custom error docs disponível';
 $wb['limit_wildcard_txt'] = 'Curingas de subdomínio disponível';
 $wb['limit_ssl_txt'] = 'SSL disponível';
-$wb['limit_ssl_letsencrypt_txt'] = 'Let\\'s Encrypt disponível';
+$wb['limit_ssl_letsencrypt_txt'] = 'Let\'s Encrypt disponível';
 $wb['limit_client_error'] = 'O limite de clientes foi alcançado.';
 $wb['limit_web_quota_txt'] = 'Cota de site';
 $wb['limit_traffic_quota_txt'] = 'Cota de tráfego';
diff --git a/interface/web/client/lib/lang/br_client_template.lng b/interface/web/client/lib/lang/br_client_template.lng
index 8f3d14c5c9..bfafbeb823 100644
--- a/interface/web/client/lib/lang/br_client_template.lng
+++ b/interface/web/client/lib/lang/br_client_template.lng
@@ -85,7 +85,7 @@ $wb['force_suexec_txt'] = 'Forçar SuEXEC';
 $wb['limit_hterror_txt'] = 'Diretório custom error docs disponível';
 $wb['limit_wildcard_txt'] = 'Curingas de sub-domínio disponível';
 $wb['limit_ssl_txt'] = 'SSL disponível';
-$wb['limit_ssl_letsencrypt_txt'] = '"Let\\'s" Encrypt disponível';
+$wb['limit_ssl_letsencrypt_txt'] = '"Let\'s" Encrypt disponível';
 $wb['web_limits_txt'] = 'Limites de site';
 $wb['email_limits_txt'] = 'Limites de emails';
 $wb['database_limits_txt'] = 'Limites do Banco de Dados';
diff --git a/interface/web/client/lib/lang/br_reseller.lng b/interface/web/client/lib/lang/br_reseller.lng
index 7e32b85938..08941ffd88 100644
--- a/interface/web/client/lib/lang/br_reseller.lng
+++ b/interface/web/client/lib/lang/br_reseller.lng
@@ -108,7 +108,7 @@ $wb['force_suexec_txt'] = 'Forçar SuEXEC';
 $wb['limit_hterror_txt'] = 'Custom error docs disponível';
 $wb['limit_wildcard_txt'] = 'Curingas de subdomínios disponível';
 $wb['limit_ssl_txt'] = 'SSL disponível';
-$wb['limit_ssl_letsencrypt_txt'] = 'Let\\'s Encrypt disponível';
+$wb['limit_ssl_letsencrypt_txt'] = 'Let\'s Encrypt disponível';
 $wb['limit_client_error'] = 'O limite de clientes para esta conta foi alcançado.';
 $wb['limit_client_error_positive_or_unlimited'] = 'O número de clientes deve ser > 0 ou -1 (ilimitado)';
 $wb['limit_web_quota_txt'] = 'Cota web';
diff --git a/interface/web/dns/lib/lang/br_dns_dmarc.lng b/interface/web/dns/lib/lang/br_dns_dmarc.lng
index d45457e00c..55b16b9fb4 100644
--- a/interface/web/dns/lib/lang/br_dns_dmarc.lng
+++ b/interface/web/dns/lib/lang/br_dns_dmarc.lng
@@ -11,16 +11,16 @@ $wb['dmarc_rua_note_txt'] = 'Endereços de email para receber relatórios dos IS
 $wb['dmarc_ruf_txt'] = 'Endereço para relatório de dados forense';
 $wb['dmarc_ruf_note_txt'] = 'Endereços de email para receber mensagens simples sobre falhas DMARC para este domínio (separado por espaço).';
 $wb['dmarc_fo_txt'] = 'Opções de relatório forense';
-$wb['dmarc_fo0_txt'] = 'Gerar relatório se todos os mecanismos de autenticação falharem em produzir um resultado \\'pass\\' do DMARC.';
+$wb['dmarc_fo0_txt'] = 'Gerar relatório se todos os mecanismos de autenticação falharem em produzir um resultado \'pass\' do DMARC.';
 $wb['dmarc_fo1_txt'] = 'Gerar relatório se qualquer mecanismo falhar.';
 $wb['dmarc_fod_txt'] = 'Gerar relatório se a assinatura DKIM falhar na verificação.';
 $wb['dmarc_fos_txt'] = 'Gerar relatório se a consulta SPF falhar.';
 $wb['dmarc_adkim_txt'] = 'Alinhamento do identificador DKIM';
-$wb['dmarc_adkim_note_txt'] = '\\'strict\\' requer combinação exata entre DKIM do domínio e oremetente do email';
+$wb['dmarc_adkim_note_txt'] = '\'strict\' requer combinação exata entre DKIM do domínio e oremetente do email';
 $wb['dmarc_adkim_r_txt'] = 'relaxed';
 $wb['dmarc_adkim_s_txt'] = 'strict';
 $wb['dmarc_aspf_txt'] = 'Alinhamento do identificador SPF';
-$wb['dmarc_aspf_note_txt'] = '\\'strict\\' requer combinação exata o SPF do domínio e oremetente do email';
+$wb['dmarc_aspf_note_txt'] = '\'strict\' requer combinação exata o SPF do domínio e oremetente do email';
 $wb['dmarc_aspf_r_txt'] = 'relaxed';
 $wb['dmarc_aspf_s_txt'] = 'strict';
 $wb['dmarc_rf_txt'] = 'Formato do Relatório';
@@ -37,7 +37,7 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarentena';
 $wb['dmarc_sp_reject_txt'] = 'rejeitar';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Ativo';
-$wb['dmarc_policy_error_txt'] = 'A política \\'nenhuma\\' é permitida apenas para emails sem assinatura DKIM.';
+$wb['dmarc_policy_error_txt'] = 'A política \'nenhuma\' é permitida apenas para emails sem assinatura DKIM.';
 $wb['dmarc_no_dkim_txt'] = 'Nenhum registro DKIM ativo.';
 $wb['dmarc_no_spf_txt'] = 'Nenhum registro SPF ativo.';
 $wb['dmarc_more_spf_txt'] = 'Existe mais de um registro SPF ativo';
diff --git a/interface/web/dns/lib/lang/cz_dns_dmarc.lng b/interface/web/dns/lib/lang/cz_dns_dmarc.lng
index 8e11e14d81..026ff60cee 100644
--- a/interface/web/dns/lib/lang/cz_dns_dmarc.lng
+++ b/interface/web/dns/lib/lang/cz_dns_dmarc.lng
@@ -16,11 +16,11 @@ $wb['dmarc_fo1_txt'] = 'Zaslat zprávu, pokud jakýkoli z autentizačních mecha
 $wb['dmarc_fod_txt'] = 'Zaslat zprávu, pokud selže ověření podpisu DKIM.';
 $wb['dmarc_fos_txt'] = 'Zaslat zprávu, pokud SPF selhal.';
 $wb['dmarc_adkim_txt'] = 'Režim porovnávání domény pro DKIM';
-$wb['dmarc_adkim_note_txt'] = '\\'strict\\' vyžaduje přesnou shodu mezi DKIM doménou a e-maily od';
+$wb['dmarc_adkim_note_txt'] = '\'strict\' vyžaduje přesnou shodu mezi DKIM doménou a e-maily od';
 $wb['dmarc_adkim_r_txt'] = 'relaxed';
 $wb['dmarc_adkim_s_txt'] = 'strict';
 $wb['dmarc_aspf_txt'] = 'Režim porovnávání domény pro SPF';
-$wb['dmarc_aspf_note_txt'] = '\\'strict\\' vyžaduje přesnou shodu mezi SPF doménou a e-maily od';
+$wb['dmarc_aspf_note_txt'] = '\'strict\' vyžaduje přesnou shodu mezi SPF doménou a e-maily od';
 $wb['dmarc_aspf_r_txt'] = 'relaxed';
 $wb['dmarc_aspf_s_txt'] = 'strict';
 $wb['dmarc_rf_txt'] = 'Formát hlášení';
@@ -37,7 +37,7 @@ $wb['dmarc_sp_quarantine_txt'] = 'karanténa';
 $wb['dmarc_sp_reject_txt'] = 'odmítnout';
 $wb['ttl_txt'] = 'TTL';
 $wb['active_txt'] = 'Aktivní';
-$wb['dmarc_policy_error_txt'] = 'Only policy \\'none\\' is allowed without DKIM-signed emails.';
+$wb['dmarc_policy_error_txt'] = 'Only policy \'none\' is allowed without DKIM-signed emails.';
 $wb['dmarc_no_dkim_txt'] = 'Není aktivní žádný DKIM záznam.';
 $wb['dmarc_no_spf_txt'] = 'Není aktivní žádný SPF záznam.';
 $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record';
diff --git a/interface/web/help/lib/lang/cz_support_message.lng b/interface/web/help/lib/lang/cz_support_message.lng
index f3d319f851..17c15e8d9c 100644
--- a/interface/web/help/lib/lang/cz_support_message.lng
+++ b/interface/web/help/lib/lang/cz_support_message.lng
@@ -7,9 +7,9 @@ $wb['tstamp_txt'] = 'Časové razítko';
 $wb['reply_txt'] = 'Odpovědět';
 $wb['date_txt'] = 'Datum';
 $wb['support_request_subject_txt'] = 'Žádost o podporu';
-$wb['support_request_txt'] = 'You have got a support request. Please don\\'t reply to this email, but process the support request inside ISPConfig.';
-$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\\'t reply to this email, but process the message inside ISPConfig.';
-$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\\'t reply to this email.';
-$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\\'t reply to this email.';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
 $wb['recipient_or_sender_email_address_not_valid_txt'] = 'Zprávu nelze odeslat, protože e-mailová adresa příjemce a/nebo odesílatele není platná.';
 $wb['subject_is_empty'] = 'Předmět nemůže být prázdný.';
diff --git a/interface/web/mail/lib/lang/br_mail_user.lng b/interface/web/mail/lib/lang/br_mail_user.lng
index 23ff000c22..578b606cda 100644
--- a/interface/web/mail/lib/lang/br_mail_user.lng
+++ b/interface/web/mail/lib/lang/br_mail_user.lng
@@ -33,7 +33,7 @@ $wb['limit_mailquota_txt'] = 'O limite de tamanho para as contas de emails foi a
 $wb['disablesmtp_txt'] = 'Desabilitar SMTP (envio)';
 $wb['tooltip_disablesmtp_txt'] = 'Desabilitar o envio de email desta conta.';
 $wb['disabledeliver_txt'] = 'Desabilitar entrega (local)';
-$wb['tooltip_disabledeliver_txt'] = 'Desabilita a entrega na caixa de entrada e o processamento por filtros de correio e scripts de filtragem. O email é encaminhado para o endereço \\'Enviar cópia para \\'.';
+$wb['tooltip_disabledeliver_txt'] = 'Desabilita a entrega na caixa de entrada e o processamento por filtros de correio e scripts de filtragem. O email é encaminhado para o endereço \'Enviar cópia para \'.';
 $wb['disableimap_txt'] = 'Desabilitar IMAP';
 $wb['disablepop3_txt'] = 'Desabilitar POP3';
 $wb['duplicate_alias_or_forward_txt'] = 'Já existe um alias ou encaminhamento para este endereço de email.';
diff --git a/interface/web/mail/lib/lang/cz_mail_user.lng b/interface/web/mail/lib/lang/cz_mail_user.lng
index 34d81d517a..022e672387 100644
--- a/interface/web/mail/lib/lang/cz_mail_user.lng
+++ b/interface/web/mail/lib/lang/cz_mail_user.lng
@@ -57,7 +57,7 @@ $wb['email_error_isascii'] = 'Please do not use special unicode characters for y
 $wb['cc_note_txt'] = '(Při posílání kopií na více e-mailových adres, oddělte čárkami.)';
 $wb['tooltip_disablesmtp_txt'] = 'Disables mail submission from this mail account.';
 $wb['disabledeliver_txt'] = 'Zakázat (místní) doručování';
-$wb['tooltip_disabledeliver_txt'] = 'Disables delivery to INBOX, and processing by mail filters and sieve scripts.  Mail forwards to \\'Send copy to\\' address.';
+$wb['tooltip_disabledeliver_txt'] = 'Disables delivery to INBOX, and processing by mail filters and sieve scripts.  Mail forwards to \'Send copy to\' address.';
 $wb['autoresponder_start_date_is_required'] = 'Start date must be set when Autoresponder is enabled.';
 $wb['greylisting_txt'] = 'Povolit greylisting';
 $wb['sender_cc_txt'] = 'Odeslat odchozí kopii na';
diff --git a/interface/web/monitor/lib/lang/br.lng b/interface/web/monitor/lib/lang/br.lng
index b98bd980ed..4139cd4143 100644
--- a/interface/web/monitor/lib/lang/br.lng
+++ b/interface/web/monitor/lib/lang/br.lng
@@ -41,7 +41,7 @@ $wb['Mail err-Log'] = 'Exibir log de erros de email';
 $wb['System-Log'] = 'Exibir log do sistema';
 $wb['ISPC Cron-Log'] = 'Exibir log do cron';
 $wb['Freshclam-Log'] = 'Exibir log do Freshclam';
-$wb['Let's Encrypt log'] = 'Let\\'s Encrypt log';
+$wb['Let's Encrypt log'] = 'Let\'s Encrypt log';
 $wb['Clamav-Log'] = 'Exibir log do Clamav';
 $wb['ISPConfig-Log'] = 'Exibir log do ISPConfig';
 $wb['RKHunter-Log'] = 'Exibir log do RKHunter';
@@ -69,11 +69,11 @@ $wb['monitor_logs_mailwarn_txt'] = 'Log - Alertas de email';
 $wb['monitor_logs_mailerr_txt'] = 'Log - Erros de email';
 $wb['monitor_logs_messages_txt'] = 'Log - Mensagens do sistema';
 $wb['monitor_logs_ispccron_txt'] = 'Log - Tarefas no Cron';
-$wb['monitor_logs_letsencrypt_txt'] = 'Log - Let\\'s Encrypt';
+$wb['monitor_logs_letsencrypt_txt'] = 'Log - Let\'s Encrypt';
 $wb['monitor_logs_freshclam_txt'] = 'Log - Freshclam';
 $wb['monitor_logs_clamav_txt'] = 'Log - Clamav';
 $wb['monitor_logs_ispc_txt'] = 'Log - ISPConfig';
-$wb['monitor_nosupportedraid1_txt'] = 'No momento possuímos suporte para \\'mdadm\\'ou \\'mpt-status\\' para monitoramento do RAID.<br> Não encontramos nenhum dos dois neste servidor.<br><br> Isto significa que não podemos oferecer suporte ao seu RAID ainda.';
+$wb['monitor_nosupportedraid1_txt'] = 'No momento possuímos suporte para \'mdadm\'ou \'mpt-status\' para monitoramento do RAID.<br> Não encontramos nenhum dos dois neste servidor.<br><br> Isto significa que não podemos oferecer suporte ao seu RAID ainda.';
 $wb['monitor_norkhunter_txt'] = 'O RKHunter não está instalado, desta forma, não existe log';
 $wb['monitor_serverstate_server_txt'] = 'Servidor';
 $wb['monitor_serverstate_kernel_txt'] = 'Kernel';
diff --git a/interface/web/monitor/lib/lang/cz.lng b/interface/web/monitor/lib/lang/cz.lng
index bf7d12d3df..79e85185f5 100644
--- a/interface/web/monitor/lib/lang/cz.lng
+++ b/interface/web/monitor/lib/lang/cz.lng
@@ -39,7 +39,7 @@ $wb['Mail err-Log'] = 'Pošta chybový protokol';
 $wb['System-Log'] = 'Systémový protokol';
 $wb['ISPC Cron-Log'] = 'ISPC Cron protokol';
 $wb['Freshclam-Log'] = 'Freshclam protokol';
-$wb['Let's Encrypt log'] = 'Let\\'s Encrypt log';
+$wb['Let's Encrypt log'] = 'Let\'s Encrypt log';
 $wb['Clamav-Log'] = 'Clamav protokol';
 $wb['ISPConfig-Log'] = 'ISPConfig protokol';
 $wb['RKHunter-Log'] = 'RKHunter protokol';
@@ -58,7 +58,7 @@ $wb['monitor_logs_mailwarn_txt'] = 'Pošta varovný protokol';
 $wb['monitor_logs_mailerr_txt'] = 'Pošta chybový protokol';
 $wb['monitor_logs_messages_txt'] = 'Systémové zprávy protokol';
 $wb['monitor_logs_ispccron_txt'] = 'ISPConfig cron protokol';
-$wb['monitor_logs_letsencrypt_txt'] = 'Let\\'s Encrypt protokol';
+$wb['monitor_logs_letsencrypt_txt'] = 'Let\'s Encrypt protokol';
 $wb['monitor_logs_freshclam_txt'] = 'Freshclam protokol';
 $wb['monitor_logs_clamav_txt'] = 'ClamAV protokol';
 $wb['monitor_logs_ispc_txt'] = 'ISPConfig protokol';
diff --git a/interface/web/sites/lib/lang/br_shell_user.lng b/interface/web/sites/lib/lang/br_shell_user.lng
index 24d338dd2d..37c221a1b9 100644
--- a/interface/web/sites/lib/lang/br_shell_user.lng
+++ b/interface/web/sites/lib/lang/br_shell_user.lng
@@ -20,8 +20,8 @@ $wb['directory_error_empty'] = 'O diretório está vazio.';
 $wb['limit_shell_user_txt'] = 'O limite de usuários foi alcançado.';
 $wb['parent_domain_id_error_empty'] = 'Nenhum site selecionado.';
 $wb['ssh_rsa_txt'] = 'Chave pública SSH-RSA (para acessos baseados em chave)';
-$wb['dir_dot_error'] = 'Não é permitido \\'..\\' no caminho.';
-$wb['dir_slashdot_error'] = 'Não é permitido \\'./\\' no caminho.';
+$wb['dir_dot_error'] = 'Não é permitido \'..\' no caminho.';
+$wb['dir_slashdot_error'] = 'Não é permitido \'./\' no caminho.';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
diff --git a/interface/web/sites/lib/lang/br_web_childdomain.lng b/interface/web/sites/lib/lang/br_web_childdomain.lng
index f3fd244d5e..03d2b9bac1 100644
--- a/interface/web/sites/lib/lang/br_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/br_web_childdomain.lng
@@ -120,4 +120,4 @@ $wb['available_php_directive_snippets_txt'] = 'Diretivas de trecho de código PH
 $wb['available_apache_directive_snippets_txt'] = 'Diretivas de trecho de código do Apache disponíveis:';
 $wb['available_nginx_directive_snippets_txt'] = 'Diretivas de trecho de código nginx disponíveis:';
 $wb['Domain'] = 'Alias de domínio';
-$wb['ssl_letsencrypt_exclude_txt'] = 'Sem certificado Let \\'s Encrypt';
+$wb['ssl_letsencrypt_exclude_txt'] = 'Sem certificado Let \'s Encrypt';
diff --git a/interface/web/sites/lib/lang/br_web_vhost_domain.lng b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
index e4680791f7..e9795a9942 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
@@ -146,7 +146,7 @@ $wb['btn_cancel_txt'] = 'Cancelar';
 $wb['load_client_data_txt'] = 'Carregar detalhes do cliente';
 $wb['load_my_data_txt'] = 'Carregar detalhes do contato';
 $wb['reset_client_data_txt'] = 'Limpar dados';
-$wb['ssl_letsencrypt_txt'] = 'Let\\'s Encrypt SSL';
+$wb['ssl_letsencrypt_txt'] = 'Let\'s Encrypt SSL';
 $wb['rewrite_to_https_txt'] = 'Reescrever HTTP para HTTPS';
 $wb['password_strength_txt'] = 'Dificuldade da senha';
 $wb['directive_snippets_id_txt'] = 'Configurações do servidor Web';
@@ -200,4 +200,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'Quando vazio, usa as seções
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'Quando vazio, usa aplicativos em chroot Jailkit da configuração padrão do servidor.';
 $wb['delete_unused_jailkit_txt'] = 'Remover chroot Jailkit sem uso';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Remover o ambiente chroot Jailkit quando não há usuários Shell ou tarefas do cron que o requeiram.';
-$wb['ssl_options_not_for_le_txt'] = 'You have Let\\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\\'s Encrypt certificates only. Remember to uncheck Let\\'s Encrypt on the main tab if you want to switch to a different certificate.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
diff --git a/interface/web/sites/lib/lang/br_webdav_user.lng b/interface/web/sites/lib/lang/br_webdav_user.lng
index 6b6174c44d..6a72c13470 100644
--- a/interface/web/sites/lib/lang/br_webdav_user.lng
+++ b/interface/web/sites/lib/lang/br_webdav_user.lng
@@ -12,8 +12,8 @@ $wb['username_error_unique'] = 'O nome do usuário deve ser exclusivo.';
 $wb['username_error_regex'] = 'O nome de usuário possui caracteres não permitidos.';
 $wb['directory_error_empty'] = 'O diretório está vazio.';
 $wb['parent_domain_id_error_empty'] = 'Nenhum site selecionado.';
-$wb['dir_dot_error'] = 'Não é permitido \\'..\\' no caminho.';
-$wb['dir_slashdot_error'] = 'Não é permitido \\'./\\' no caminho.';
+$wb['dir_dot_error'] = 'Não é permitido \'..\' no caminho.';
+$wb['dir_slashdot_error'] = 'Não é permitido \'./\' no caminho.';
 $wb['generate_password_txt'] = 'Gerar Senha';
 $wb['repeat_password_txt'] = 'Repetir Senha';
 $wb['password_mismatch_txt'] = 'As senhas não coincidem.';
diff --git a/interface/web/sites/lib/lang/cz_web_childdomain.lng b/interface/web/sites/lib/lang/cz_web_childdomain.lng
index ca36d8c6c8..1ccefed3cc 100644
--- a/interface/web/sites/lib/lang/cz_web_childdomain.lng
+++ b/interface/web/sites/lib/lang/cz_web_childdomain.lng
@@ -120,4 +120,4 @@ $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Sni
 $wb['available_nginx_directive_snippets_txt'] = 'Available nginx Directive Snippets:';
 $wb['Domain'] = 'Přezdívky domén webové stránky';
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
-$wb['ssl_letsencrypt_exclude_txt'] = 'Don\\'t add to Let\\'s Encrypt certificate';
+$wb['ssl_letsencrypt_exclude_txt'] = 'Don\'t add to Let\'s Encrypt certificate';
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
index 1d11586868..021176aa13 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
@@ -145,7 +145,7 @@ $wb['btn_cancel_txt'] = 'Zrušit';
 $wb['load_client_data_txt'] = 'Nahrát údaje z podrobností registrovaného klienta';
 $wb['load_my_data_txt'] = 'Load my contact details';
 $wb['reset_client_data_txt'] = 'Obnovit údaje (resetovat)';
-$wb['ssl_letsencrypt_txt'] = 'Let\\'s Encrypt SSL';
+$wb['ssl_letsencrypt_txt'] = 'Let\'s Encrypt SSL';
 $wb['rewrite_to_https_txt'] = 'Přesměrovat HTTP na HTTPS';
 $wb['password_strength_txt'] = 'Síla hesla';
 $wb['directive_snippets_id_txt'] = 'Výběr configurace webového serveru';
@@ -200,4 +200,4 @@ $wb['tooltip_jailkit_chroot_app_sections_txt'] = 'When empty, uses Jailkit chroo
 $wb['tooltip_jailkit_chroot_app_programs_txt'] = 'When empty, uses Jailkit chroot applications from Server Config';
 $wb['delete_unused_jailkit_txt'] = 'Delete unused jailkit chroot';
 $wb['tooltip_delete_unused_jailkit_txt'] = 'Delete the jailkit chroot environment when there are no shell users or cron jobs which require it.';
-$wb['ssl_options_not_for_le_txt'] = 'You have Let\\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\\'s Encrypt certificates only. Remember to uncheck Let\\'s Encrypt on the main tab if you want to switch to a different certificate.';
+$wb['ssl_options_not_for_le_txt'] = 'You have Let\'s Encrypt certificates enabled for this website. Please be aware that all options on this page apply to non-Let\'s Encrypt certificates only. Remember to uncheck Let\'s Encrypt on the main tab if you want to switch to a different certificate.';
-- 
GitLab


From 09dd6fd54b64e9bda6abdeddca50b66d914f13d7 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 19 Nov 2020 09:53:39 +0100
Subject: [PATCH 139/441] - syntax fix

---
 interface/web/monitor/lib/lang/br.lng | 2 +-
 interface/web/monitor/lib/lang/cz.lng | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/monitor/lib/lang/br.lng b/interface/web/monitor/lib/lang/br.lng
index 4139cd4143..1ddfbb5fe3 100644
--- a/interface/web/monitor/lib/lang/br.lng
+++ b/interface/web/monitor/lib/lang/br.lng
@@ -41,7 +41,7 @@ $wb['Mail err-Log'] = 'Exibir log de erros de email';
 $wb['System-Log'] = 'Exibir log do sistema';
 $wb['ISPC Cron-Log'] = 'Exibir log do cron';
 $wb['Freshclam-Log'] = 'Exibir log do Freshclam';
-$wb['Let's Encrypt log'] = 'Let\'s Encrypt log';
+$wb['Let\'s Encrypt log'] = 'Let\'s Encrypt log';
 $wb['Clamav-Log'] = 'Exibir log do Clamav';
 $wb['ISPConfig-Log'] = 'Exibir log do ISPConfig';
 $wb['RKHunter-Log'] = 'Exibir log do RKHunter';
diff --git a/interface/web/monitor/lib/lang/cz.lng b/interface/web/monitor/lib/lang/cz.lng
index 79e85185f5..1310d3a05f 100644
--- a/interface/web/monitor/lib/lang/cz.lng
+++ b/interface/web/monitor/lib/lang/cz.lng
@@ -39,7 +39,7 @@ $wb['Mail err-Log'] = 'Pošta chybový protokol';
 $wb['System-Log'] = 'Systémový protokol';
 $wb['ISPC Cron-Log'] = 'ISPC Cron protokol';
 $wb['Freshclam-Log'] = 'Freshclam protokol';
-$wb['Let's Encrypt log'] = 'Let\'s Encrypt log';
+$wb['Let\'s Encrypt log'] = 'Let\'s Encrypt log';
 $wb['Clamav-Log'] = 'Clamav protokol';
 $wb['ISPConfig-Log'] = 'ISPConfig protokol';
 $wb['RKHunter-Log'] = 'RKHunter protokol';
-- 
GitLab


From 04b60934c34f57144e9d2ecb8f7f58992ff53a22 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 20 Nov 2020 08:31:31 +0100
Subject: [PATCH 140/441] - don't use ALTER IGNORE

---
 .../sql/incremental/upd_dev_collection.sql    | 28 +++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index bd408870a4..3a27e5dd32 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -2,22 +2,22 @@
 -- we need those to fix some installations failing in 0089 and 0090
 ALTER TABLE `web_domain` ROW_FORMAT=DYNAMIC;
 ALTER TABLE `mail_user` ROW_FORMAT=DYNAMIC;
-ALTER IGNORE TABLE `web_domain` ADD COLUMN `proxy_protocol` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `log_retention`;
-ALTER IGNORE TABLE `web_domain` ADD  `backup_format_web` VARCHAR( 255 ) NOT NULL default 'default' AFTER `backup_copies`;
-ALTER IGNORE TABLE `web_domain` ADD  `backup_format_db` VARCHAR( 255 ) NOT NULL default 'gzip' AFTER `backup_format_web`;
-ALTER IGNORE TABLE `web_domain` ADD  `backup_encrypt` enum('n','y') NOT NULL DEFAULT 'n' AFTER `backup_format_db`;
-ALTER IGNORE TABLE `web_domain` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `backup_encrypt`;
-ALTER IGNORE TABLE `web_backup` ADD  `backup_format` VARCHAR( 64 ) NOT NULL DEFAULT '' AFTER `backup_mode`;
-ALTER IGNORE TABLE `web_backup` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `filesize`;
-ALTER IGNORE TABLE `web_domain` ALTER pm SET DEFAULT 'ondemand';
-ALTER IGNORE TABLE `web_domain` DROP COLUMN `enable_spdy`;
-ALTER IGNORE TABLE `web_domain` ADD `folder_directive_snippets` TEXT NULL AFTER `https_port`;
-ALTER IGNORE TABLE `web_domain` ADD `server_php_id` INT(11) UNSIGNED NOT NULL DEFAULT 0;
-ALTER IGNORE TABLE `web_domain` CHANGE `apache_directives` `apache_directives` mediumtext NULL DEFAULT NULL;
-ALTER IGNORE TABLE `web_domain` CHANGE `nginx_directives` `nginx_directives` mediumtext NULL DEFAULT NULL;
+ALTER TABLE `web_domain` ADD COLUMN `proxy_protocol` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `log_retention`;
+ALTER TABLE `web_domain` ADD  `backup_format_web` VARCHAR( 255 ) NOT NULL default 'default' AFTER `backup_copies`;
+ALTER TABLE `web_domain` ADD  `backup_format_db` VARCHAR( 255 ) NOT NULL default 'gzip' AFTER `backup_format_web`;
+ALTER TABLE `web_domain` ADD  `backup_encrypt` enum('n','y') NOT NULL DEFAULT 'n' AFTER `backup_format_db`;
+ALTER TABLE `web_domain` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `backup_encrypt`;
+ALTER TABLE `web_backup` ADD  `backup_format` VARCHAR( 64 ) NOT NULL DEFAULT '' AFTER `backup_mode`;
+ALTER TABLE `web_backup` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `filesize`;
+ALTER TABLE `web_domain` ALTER pm SET DEFAULT 'ondemand';
+ALTER TABLE `web_domain` DROP COLUMN `enable_spdy`;
+ALTER TABLE `web_domain` ADD `folder_directive_snippets` TEXT NULL AFTER `https_port`;
+ALTER TABLE `web_domain` ADD `server_php_id` INT(11) UNSIGNED NOT NULL DEFAULT 0;
+ALTER TABLE `web_domain` CHANGE `apache_directives` `apache_directives` mediumtext NULL DEFAULT NULL;
+ALTER TABLE `web_domain` CHANGE `nginx_directives` `nginx_directives` mediumtext NULL DEFAULT NULL;
 UPDATE `web_domain` as w LEFT JOIN sys_group as g ON (g.groupid = w.sys_groupid) INNER JOIN `server_php` as p ON (w.fastcgi_php_version = CONCAT(p.name, ':', p.php_fastcgi_binary, ':', p.php_fastcgi_ini_dir) AND p.server_id IN (0, w.server_id) AND p.client_id IN (0, g.client_id)) SET w.server_php_id = p.server_php_id, w.fastcgi_php_version = '' WHERE w.server_php_id = 0;
 UPDATE `web_domain` as w LEFT JOIN sys_group as g ON (g.groupid = w.sys_groupid) INNER JOIN `server_php` as p ON (w.fastcgi_php_version = CONCAT(p.name, ':', p.php_fpm_init_script, ':', p.php_fpm_ini_dir, ':', p.php_fpm_pool_dir) AND p.server_id IN (0, w.server_id) AND p.client_id IN (0, g.client_id)) SET w.server_php_id = p.server_php_id, w.fastcgi_php_version = '' WHERE w.server_php_id = 0;
-ALTER IGNORE TABLE `mail_user` ADD `forward_in_lda` enum('n','y') NOT NULL default 'n' AFTER `cc`;
+ALTER TABLE `mail_user` ADD `forward_in_lda` enum('n','y') NOT NULL default 'n' AFTER `cc`;
 -- end of fixes
 
 -- drop old php column because new installations don't have them (fails in multi-server)
-- 
GitLab


From 4a4c572c8177908c80a12b254dea717b6447ca5a Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 20 Nov 2020 08:33:37 +0100
Subject: [PATCH 141/441] - made some statements silent in update

---
 install/lib/update.lib.php                    | 18 +++++++--------
 install/sql/incremental/upd_0091.sql          | 20 +++++++++++++++++
 .../sql/incremental/upd_dev_collection.sql    | 22 -------------------
 3 files changed, 29 insertions(+), 31 deletions(-)
 create mode 100644 install/sql/incremental/upd_0091.sql

diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index 6d67472fdd..33b89786a6 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -185,9 +185,9 @@ function updateDbAndIni() {
 			else $next_db_version = intval($current_db_version + 1);
 			$sql_patch_filename = realpath(dirname(__FILE__).'/../').'/sql/incremental/upd_'.str_pad($next_db_version, 4, '0', STR_PAD_LEFT).'.sql';
 			$php_patch_filename = realpath(dirname(__FILE__).'/../').'/patches/upd_'.str_pad($next_db_version, 4, '0', STR_PAD_LEFT).'.php';
-			
+
 			// comma separated list of version numbers were a update has to be done silently
-			$silent_update_versions = 'dev_collection,75';
+			$silent_update_versions = 'dev_collection,75,91';
 
 			if(is_file($sql_patch_filename)) {
 
@@ -214,14 +214,14 @@ function updateDbAndIni() {
 				} else {
 					$cmd = "mysql --default-character-set=".escapeshellarg($conf['mysql']['charset'])." --force -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -P ".escapeshellarg($conf['mysql']['port'])." ".escapeshellarg($conf['mysql']['database'])." < ".$sql_patch_filename;
 				}
-				
+
 				if(in_array($next_db_version,explode(',',$silent_update_versions))) {
 					$cmd .= ' > /dev/null 2> /dev/null';
 				} else {
 					$cmd .= ' >> /var/log/ispconfig_install.log 2>> /var/log/ispconfig_install.log';
 				}
 				system($cmd);
-				
+
 				swriteln($inst->lng('Loading SQL patch file').': '.$sql_patch_filename);
 
 				//* Exec onAfterSQL function
@@ -231,7 +231,7 @@ function updateDbAndIni() {
 
 				if($dev_patch == false) $current_db_version = $next_db_version;
 				else $found = false;
-				
+
 				if(isset($php_patch)) unset($php_patch);
 			} elseif($dev_patch == false) {
 				$dev_patch = true;
@@ -416,7 +416,7 @@ function updateDbAndIni() {
 
 function setDefaultServers(){
 	global $inst, $conf;
-	
+
 	// clients
 	$clients = $inst->db->queryAllRecords("SELECT * FROM ".$conf["mysql"]["database"].".client");
 	if(is_array($clients) && !empty($clients)){
@@ -431,7 +431,7 @@ function setDefaultServers(){
 			if(trim($client['db_servers']) == '') $inst->db->query("UPDATE ?? SET db_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_dbserver']), $client['client_id']);
 		}
 	}
-	
+
 }
 
 
@@ -442,13 +442,13 @@ function setDefaultServers(){
  */
 function check_service_config_state($servicename, $detected_value) {
 	global $current_svc_config, $inst, $conf;
-	
+
 	if ($current_svc_config[$servicename] == 1) $current_state = 1;
 	else $current_state = 0;
 
 	if ($detected_value) $detected_value = 1;
 	else $detected_value = 0;
-	
+
 	if ($detected_value != $current_state) {
 		$answer = $inst->simple_query('Service \''.$servicename.'\' '.($detected_value ? 'has been' : 'has not been').' detected ('.($current_state ? 'strongly recommended, currently enabled' : 'currently disabled').') do you want to '.($detected_value ? 'enable and configure' : 'disable').' it? ', array('yes', 'no'), ($current_state ? 'yes' : 'no'), 'svc_detect_change_'.$servicename);
 		if ($answer == 'yes') return $detected_value;
diff --git a/install/sql/incremental/upd_0091.sql b/install/sql/incremental/upd_0091.sql
new file mode 100644
index 0000000000..0ff81ac591
--- /dev/null
+++ b/install/sql/incremental/upd_0091.sql
@@ -0,0 +1,20 @@
+-- we need those to fix some installations failing in 0089 and 0090
+ALTER TABLE `web_domain` ROW_FORMAT=DYNAMIC;
+ALTER TABLE `mail_user` ROW_FORMAT=DYNAMIC;
+ALTER TABLE `web_domain` ADD COLUMN `proxy_protocol` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `log_retention`;
+ALTER TABLE `web_domain` ADD  `backup_format_web` VARCHAR( 255 ) NOT NULL default 'default' AFTER `backup_copies`;
+ALTER TABLE `web_domain` ADD  `backup_format_db` VARCHAR( 255 ) NOT NULL default 'gzip' AFTER `backup_format_web`;
+ALTER TABLE `web_domain` ADD  `backup_encrypt` enum('n','y') NOT NULL DEFAULT 'n' AFTER `backup_format_db`;
+ALTER TABLE `web_domain` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `backup_encrypt`;
+ALTER TABLE `web_backup` ADD  `backup_format` VARCHAR( 64 ) NOT NULL DEFAULT '' AFTER `backup_mode`;
+ALTER TABLE `web_backup` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `filesize`;
+ALTER TABLE `web_domain` ALTER pm SET DEFAULT 'ondemand';
+ALTER TABLE `web_domain` DROP COLUMN `enable_spdy`;
+ALTER TABLE `web_domain` ADD `folder_directive_snippets` TEXT NULL AFTER `https_port`;
+ALTER TABLE `web_domain` ADD `server_php_id` INT(11) UNSIGNED NOT NULL DEFAULT 0;
+ALTER TABLE `web_domain` CHANGE `apache_directives` `apache_directives` mediumtext NULL DEFAULT NULL;
+ALTER TABLE `web_domain` CHANGE `nginx_directives` `nginx_directives` mediumtext NULL DEFAULT NULL;
+UPDATE `web_domain` as w LEFT JOIN sys_group as g ON (g.groupid = w.sys_groupid) INNER JOIN `server_php` as p ON (w.fastcgi_php_version = CONCAT(p.name, ':', p.php_fastcgi_binary, ':', p.php_fastcgi_ini_dir) AND p.server_id IN (0, w.server_id) AND p.client_id IN (0, g.client_id)) SET w.server_php_id = p.server_php_id, w.fastcgi_php_version = '' WHERE w.server_php_id = 0;
+UPDATE `web_domain` as w LEFT JOIN sys_group as g ON (g.groupid = w.sys_groupid) INNER JOIN `server_php` as p ON (w.fastcgi_php_version = CONCAT(p.name, ':', p.php_fpm_init_script, ':', p.php_fpm_ini_dir, ':', p.php_fpm_pool_dir) AND p.server_id IN (0, w.server_id) AND p.client_id IN (0, g.client_id)) SET w.server_php_id = p.server_php_id, w.fastcgi_php_version = '' WHERE w.server_php_id = 0;
+ALTER TABLE `mail_user` ADD `forward_in_lda` enum('n','y') NOT NULL default 'n' AFTER `cc`;
+-- end of fixes
\ No newline at end of file
diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 3a27e5dd32..beea2623b3 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1,24 +1,2 @@
-
--- we need those to fix some installations failing in 0089 and 0090
-ALTER TABLE `web_domain` ROW_FORMAT=DYNAMIC;
-ALTER TABLE `mail_user` ROW_FORMAT=DYNAMIC;
-ALTER TABLE `web_domain` ADD COLUMN `proxy_protocol` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `log_retention`;
-ALTER TABLE `web_domain` ADD  `backup_format_web` VARCHAR( 255 ) NOT NULL default 'default' AFTER `backup_copies`;
-ALTER TABLE `web_domain` ADD  `backup_format_db` VARCHAR( 255 ) NOT NULL default 'gzip' AFTER `backup_format_web`;
-ALTER TABLE `web_domain` ADD  `backup_encrypt` enum('n','y') NOT NULL DEFAULT 'n' AFTER `backup_format_db`;
-ALTER TABLE `web_domain` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `backup_encrypt`;
-ALTER TABLE `web_backup` ADD  `backup_format` VARCHAR( 64 ) NOT NULL DEFAULT '' AFTER `backup_mode`;
-ALTER TABLE `web_backup` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `filesize`;
-ALTER TABLE `web_domain` ALTER pm SET DEFAULT 'ondemand';
-ALTER TABLE `web_domain` DROP COLUMN `enable_spdy`;
-ALTER TABLE `web_domain` ADD `folder_directive_snippets` TEXT NULL AFTER `https_port`;
-ALTER TABLE `web_domain` ADD `server_php_id` INT(11) UNSIGNED NOT NULL DEFAULT 0;
-ALTER TABLE `web_domain` CHANGE `apache_directives` `apache_directives` mediumtext NULL DEFAULT NULL;
-ALTER TABLE `web_domain` CHANGE `nginx_directives` `nginx_directives` mediumtext NULL DEFAULT NULL;
-UPDATE `web_domain` as w LEFT JOIN sys_group as g ON (g.groupid = w.sys_groupid) INNER JOIN `server_php` as p ON (w.fastcgi_php_version = CONCAT(p.name, ':', p.php_fastcgi_binary, ':', p.php_fastcgi_ini_dir) AND p.server_id IN (0, w.server_id) AND p.client_id IN (0, g.client_id)) SET w.server_php_id = p.server_php_id, w.fastcgi_php_version = '' WHERE w.server_php_id = 0;
-UPDATE `web_domain` as w LEFT JOIN sys_group as g ON (g.groupid = w.sys_groupid) INNER JOIN `server_php` as p ON (w.fastcgi_php_version = CONCAT(p.name, ':', p.php_fpm_init_script, ':', p.php_fpm_ini_dir, ':', p.php_fpm_pool_dir) AND p.server_id IN (0, w.server_id) AND p.client_id IN (0, g.client_id)) SET w.server_php_id = p.server_php_id, w.fastcgi_php_version = '' WHERE w.server_php_id = 0;
-ALTER TABLE `mail_user` ADD `forward_in_lda` enum('n','y') NOT NULL default 'n' AFTER `cc`;
--- end of fixes
-
 -- drop old php column because new installations don't have them (fails in multi-server)
 ALTER TABLE `web_domain` DROP COLUMN `fastcgi_php_version`;
-- 
GitLab


From fd1704a76c5851452ee9b8531f053df706e1ef0a Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 23 Nov 2020 17:25:06 -0700
Subject: [PATCH 142/441] jailkit: update jail if /bin/bash does not function

---
 .../classes/cron.d/600-jailkit_maintenance.inc.php  | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php b/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
index 771bf0e71b..547b7caa1a 100644
--- a/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
+++ b/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
@@ -69,7 +69,7 @@ class cronjob_jailkit_maintenance extends cronjob {
 		// limit the number of jails we update at one time according to time of day
 		$num_jails_to_update = (date('H') < 6) ? 25 : 3;
 
-		$sql = "SELECT domain_id, domain, document_root, php_fpm_chroot, jailkit_chroot_app_sections, jailkit_chroot_app_programs, delete_unused_jailkit, last_jailkit_hash FROM web_domain WHERE type = 'vhost' AND (last_jailkit_update IS NULL OR last_jailkit_update < (NOW() - INTERVAL 24 HOUR)) AND server_id = ? ORDER by last_jailkit_update LIMIT ?";
+		$sql = "SELECT domain_id, domain, document_root, system_user, system_group, php_fpm_chroot, jailkit_chroot_app_sections, jailkit_chroot_app_programs, delete_unused_jailkit, last_jailkit_hash FROM web_domain WHERE type = 'vhost' AND (last_jailkit_update IS NULL OR last_jailkit_update < (NOW() - INTERVAL 24 HOUR)) AND server_id = ? ORDER by last_jailkit_update LIMIT ?";
 		$records = $app->db->queryAllRecords($sql, $conf['server_id'], $num_jails_to_update);
 
 		foreach($records as $rec) {
@@ -111,6 +111,17 @@ class cronjob_jailkit_maintenance extends cronjob {
 				sort($last_updated, SORT_STRING);
 				$update_hash = hash('md5', implode(' ', $last_updated));
 
+				if (is_file( $rec['document_root']."/bin/bash" )) {
+					# test that /bin/bash functions in the jail
+print "chroot --userspec ".$rec['system_user'].":".$rec['system_group']." ".$rec['document_root']." /bin/bash -c true 2>/dev/null\n";
+					if (! $app->system->exec_safe("chroot --userspec ?:? ? /bin/bash -c true 2>/dev/null", $rec['system_user'], $rec['system_group'], $rec['document_root'])) {
+print "/bin/bash test failed, forcing update\n";
+						$options[] = 'force';
+						# bogus hash will not match, triggering an update
+						$update_hash = 'force_update'.time();
+					}
+				}
+
 				if ($update_hash != $rec['last_jailkit_hash']) {
 					$app->system->web_folder_protection($rec['document_root'], false);
 					$app->system->update_jailkit_chroot($rec['document_root'], $sections, $programs, $options);
-- 
GitLab


From 9f43b350e0f124354f9aab57cbe092da6ae051bc Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 24 Nov 2020 10:28:39 +0100
Subject: [PATCH 143/441] Merge ssh user security enhancement

---
 interface/lib/classes/functions.inc.php       | 78 +++++++++++++------
 interface/lib/classes/tform_base.inc.php      |  5 +-
 interface/web/sites/form/shell_user.tform.php |  6 ++
 server/lib/classes/functions.inc.php          | 32 +++++++-
 server/lib/classes/system.inc.php             | 36 +++++++++
 .../shelluser_base_plugin.inc.php             | 24 ++++++
 .../shelluser_jailkit_plugin.inc.php          | 28 +++++++
 7 files changed, 181 insertions(+), 28 deletions(-)

diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index 03e331f0f1..4d4c011fb5 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -61,7 +61,7 @@ class functions {
 		if(is_string($to) && strpos($to, ',') !== false) {
 				$to = preg_split('/\s*,\s*/', $to);
 		}
-		
+
 		$app->ispcmail->send($to);
 		$app->ispcmail->finish();
 
@@ -234,7 +234,7 @@ class functions {
 				if(preg_match($regex, $result['ip'])) $ips[] = $result['ip'];
 			}
 		}
-		
+
 		$results = $app->db->queryAllRecords("SELECT remote_ips FROM web_database WHERE remote_ips != ''");
 		if(!empty($results) && is_array($results)){
 			foreach($results as $result){
@@ -290,6 +290,34 @@ class functions {
 		return round(pow(1024, $base-floor($base)), $precision).$suffixes[floor($base)];
 	}
 
+
+	/**
+	 * Normalize a path and strip duplicate slashes from it
+	 *
+	 * This will also remove all /../ from the path, reducing the preceding path elements
+	 *
+	 * @param string $path
+	 * @return string
+	 */
+	public function normalize_path($path) {
+		$path = preg_replace('~[/]{2,}~', '/', $path);
+		$parts = explode('/', $path);
+		$return_parts = array();
+
+		foreach($parts as $current_part) {
+			if($current_part === '..') {
+				if(!empty($return_parts) && end($return_parts) !== '') {
+					array_pop($return_parts);
+				}
+			} else {
+				$return_parts[] = $current_part;
+			}
+		}
+
+		return implode('/', $return_parts);
+	}
+
+
 	/** IDN converter wrapper.
 	 * all converter classes should be placed in ISPC_CLASS_PATH.'/idn/'
 	 */
@@ -370,42 +398,42 @@ class functions {
 
 	public function is_allowed_user($username, $restrict_names = false) {
 		global $app;
-		
+
 		$name_blacklist = array('root','ispconfig','vmail','getmail');
 		if(in_array($username,$name_blacklist)) return false;
-		
+
 		if(preg_match('/^[a-zA-Z0-9\.\-_]{1,32}$/', $username) == false) return false;
-		
+
 		if($restrict_names == true && preg_match('/^web\d+$/', $username) == false) return false;
-		
+
 		return true;
 	}
-	
+
 	public function is_allowed_group($groupname, $restrict_names = false) {
 		global $app;
-		
+
 		$name_blacklist = array('root','ispconfig','vmail','getmail');
 		if(in_array($groupname,$name_blacklist)) return false;
-		
+
 		if(preg_match('/^[a-zA-Z0-9\.\-_]{1,32}$/', $groupname) == false) return false;
-		
+
 		if($restrict_names == true && preg_match('/^client\d+$/', $groupname) == false) return false;
-		
+
 		return true;
 	}
-	
+
 	public function getimagesizefromstring($string){
 		if (!function_exists('getimagesizefromstring')) {
 			$uri = 'data://application/octet-stream;base64,' . base64_encode($string);
 			return getimagesize($uri);
 		} else {
 			return getimagesizefromstring($string);
-		}		
+		}
 	}
-	
+
 	public function password($minLength = 10, $special = false){
 		global $app;
-	
+
 		$iteration = 0;
 		$password = "";
 		$maxLength = $minLength + 5;
@@ -430,7 +458,7 @@ class functions {
 	public function getRandomInt($min, $max){
 		return floor((mt_rand() / mt_getrandmax()) * ($max - $min + 1)) + $min;
 	}
-	
+
 	public function generate_customer_no(){
 		global $app;
 		// generate customer no.
@@ -438,13 +466,13 @@ class functions {
 		while($app->db->queryOneRecord("SELECT client_id FROM client WHERE customer_no = ?", $customer_no)) {
 			$customer_no = mt_rand(100000, 999999);
 		}
-		
+
 		return $customer_no;
 	}
-	
+
 	public function generate_ssh_key($client_id, $username = ''){
 		global $app;
-		
+
 		// generate the SSH key pair for the client
 		$id_rsa_file = '/tmp/'.uniqid('',true);
 		$id_rsa_pub_file = $id_rsa_file.'.pub';
@@ -458,7 +486,7 @@ class functions {
 			$app->log("Failed to create SSH keypair for ".$username, LOGLEVEL_WARN);
 		}
 	}
-	
+
 	public function htmlentities($value) {
 		global $conf;
 
@@ -474,10 +502,10 @@ class functions {
 		} else {
 			$out = htmlentities($value, ENT_QUOTES, $conf["html_content_encoding"]);
 		}
-		
+
 		return $out;
 	}
-	
+
 	// Function to check paths before we use it as include. Use with absolute paths only.
 	public function check_include_path($path) {
 		if(strpos($path,'//') !== false) die('Include path seems to be an URL: '.$this->htmlentities($path));
@@ -488,7 +516,7 @@ class functions {
 		if(substr($path,0,strlen(ISPC_ROOT_PATH)) != ISPC_ROOT_PATH) die('Path '.$this->htmlentities($path).' is outside of ISPConfig installation directory.');
 		return $path;
 	}
-	
+
 	// Function to check language strings
 	public function check_language($language) {
 		global $app;
@@ -496,10 +524,10 @@ class functions {
 			 return $language;
 		} else {
 			$app->log('Wrong language string: '.$this->htmlentities($language),1);
-			return 'en';	
+			return 'en';
 		}
 	}
-	
+
 }
 
 ?>
diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php
index 91a855872c..72ddb4b6ae 100644
--- a/interface/lib/classes/tform_base.inc.php
+++ b/interface/lib/classes/tform_base.inc.php
@@ -399,7 +399,7 @@ class tform_base {
 				$tmp_key = $limit_parts[2];
 				$allowed = $allowed = explode(',',$tmp_conf[$tmp_key]);
 			}
-			
+
 			if($formtype == 'CHECKBOX') {
 				if(strstr($limit,'force_')) {
 					// Force the checkbox field to be ticked and enabled
@@ -958,6 +958,9 @@ class tform_base {
 				case 'STRIPNL':
 					$returnval = str_replace(array("\n","\r"),'', $returnval);
 					break;
+				case 'NORMALIZEPATH':
+					$returnval = $app->functions->normalize_path($returnval);
+					break;
 				default:
 					$this->errorMessage .= "Unknown Filter: ".$filter['type'];
 					break;
diff --git a/interface/web/sites/form/shell_user.tform.php b/interface/web/sites/form/shell_user.tform.php
index f4e83a1b57..523a03687a 100644
--- a/interface/web/sites/form/shell_user.tform.php
+++ b/interface/web/sites/form/shell_user.tform.php
@@ -232,6 +232,12 @@ if($_SESSION["s"]["user"]["typ"] == 'admin') {
 			'dir' => array (
 				'datatype' => 'VARCHAR',
 				'formtype' => 'TEXT',
+				'filters' => array(
+										0 => array (
+														'event' => 'SAVE',
+														'type' => 'NORMALIZEPATH'
+										)
+				),
 				'validators' => array ( 0 => array ( 	'type' => 'NOTEMPTY',
 														'errmsg'=> 'directory_error_empty'),
 										1 => array ( 	'type' => 'REGEX',
diff --git a/server/lib/classes/functions.inc.php b/server/lib/classes/functions.inc.php
index 5da1f3d713..5296c3012b 100644
--- a/server/lib/classes/functions.inc.php
+++ b/server/lib/classes/functions.inc.php
@@ -356,6 +356,34 @@ class functions {
 		}
 	}
 
+
+	/**
+	 * Normalize a path and strip duplicate slashes from it
+	 *
+	 * This will also remove all /../ from the path, reducing the preceding path elements
+	 *
+	 * @param string $path
+	 * @return string
+	 */
+	public function normalize_path($path) {
+		$path = preg_replace('~[/]{2,}~', '/', $path);
+		$parts = explode('/', $path);
+		$return_parts = array();
+
+		foreach($parts as $current_part) {
+			if($current_part === '..') {
+				if(!empty($return_parts) && end($return_parts) !== '') {
+					array_pop($return_parts);
+				}
+			} else {
+				$return_parts[] = $current_part;
+			}
+		}
+
+		return implode('/', $return_parts);
+	}
+
+
 	/** IDN converter wrapper.
 	 * all converter classes should be placed in ISPC_CLASS_PATH.'/idn/'
 	 */
@@ -435,10 +463,10 @@ class functions {
 		}
 		return implode("\n", $domains);
 	}
-	
+
 	public function generate_ssh_key($client_id, $username = ''){
 		global $app;
-		
+
 		// generate the SSH key pair for the client
 		$id_rsa_file = '/tmp/'.uniqid('',true);
 		$id_rsa_pub_file = $id_rsa_file.'.pub';
diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 131d10f244..a26707b0ae 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2300,6 +2300,36 @@ class system{
 		return true;
 	}
 
+	public function is_allowed_path($path) {
+		global $app;
+
+		$path = $app->functions->normalize_path($path);
+		if(file_exists($path)) {
+			$path = realpath($path);
+		}
+
+		$blacklisted_paths_regex = array(
+			'@^/$@',
+			'@^/proc(/.*)?$@',
+			'@^/sys(/.*)?$@',
+			'@^/etc(/.*)?$@',
+			'@^/dev(/.*)?$@',
+			'@^/tmp(/.*)?$@',
+			'@^/run(/.*)?$@',
+			'@^/boot(/.*)?$@',
+			'@^/root(/.*)?$@',
+			'@^/var(/?|/backups?(/.*)?)?$@',
+		);
+
+		foreach($blacklisted_paths_regex as $regex) {
+			if(preg_match($regex, $path)) {
+				return false;
+			}
+		}
+
+		return true;
+	}
+
 	public function last_exec_out() {
 		return $this->_last_exec_out;
 	}
@@ -2350,6 +2380,8 @@ class system{
 	}
 
 	public function create_jailkit_user($username, $home_dir, $user_home_dir, $shell = '/bin/bash', $p_user = null, $p_user_home_dir = null) {
+		global $app;
+
 		// Disallow operating on root directory
 		if(realpath($home_dir) == '/') {
 			$app->log("create_jailkit_user: invalid home_dir: $home_dir", LOGLEVEL_WARN);
@@ -2379,6 +2411,8 @@ class system{
 	}
 
 	public function create_jailkit_chroot($home_dir, $app_sections = array(), $options = array()) {
+		global $app;
+
 		// Disallow operating on root directory
 		if(realpath($home_dir) == '/') {
 			$app->log("create_jailkit_chroot: invalid home_dir: $home_dir", LOGLEVEL_WARN);
@@ -2450,6 +2484,8 @@ class system{
 	}
 
 	public function create_jailkit_programs($home_dir, $programs = array(), $options = array()) {
+		global $app;
+
 		// Disallow operating on root directory
 		if(realpath($home_dir) == '/') {
 			$app->log("create_jailkit_programs: invalid home_dir: $home_dir", LOGLEVEL_WARN);
diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php
index 71653cf5c2..f9a316d90e 100755
--- a/server/plugins-available/shelluser_base_plugin.inc.php
+++ b/server/plugins-available/shelluser_base_plugin.inc.php
@@ -96,6 +96,14 @@ class shelluser_base_plugin {
 			return false;
 		}
 
+		if(is_file($data['new']['dir']) || is_link($data['new']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['new']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOGLEVEL_WARN);
+			return false;
+		}
+
 		if($data['new']['active'] != 'y' || $data['new']['chroot'] == "jailkit") $data['new']['shell'] = '/bin/false';
 
 		if($app->system->is_user($data['new']['puser'])) {
@@ -207,6 +215,14 @@ class shelluser_base_plugin {
 			return false;
 		}
 
+		if(is_file($data['new']['dir']) || is_link($data['new']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['new']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOGLEVEL_WARN);
+			return false;
+		}
+
 		if($data['new']['active'] != 'y') $data['new']['shell'] = '/bin/false';
 
 		if($app->system->is_user($data['new']['puser'])) {
@@ -304,6 +320,14 @@ class shelluser_base_plugin {
 			return false;
 		}
 
+		if(is_file($data['old']['dir']) || is_link($data['old']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['old']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['old']['dir'], LOGLEVEL_WARN);
+			return false;
+		}
+
 		if($app->system->is_user($data['old']['username'])) {
 			// Get the UID of the user
 			$userid = intval($app->system->getuid($data['old']['username']));
diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php
index 3f8d94d2a7..dbc3d8041b 100755
--- a/server/plugins-available/shelluser_jailkit_plugin.inc.php
+++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php
@@ -89,6 +89,15 @@ class shelluser_jailkit_plugin {
 			return false;
 		}
 
+		if(is_file($data['new']['dir']) || is_link($data['new']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['new']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOGLEVEL_WARN);
+			return false;
+		}
+
+
 		if($app->system->is_user($data['new']['puser'])) {
 			// Get the UID of the parent user
 			$uid = intval($app->system->getuid($data['new']['puser']));
@@ -170,6 +179,14 @@ class shelluser_jailkit_plugin {
 			return false;
 		}
 
+		if(is_file($data['new']['dir']) || is_link($data['new']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['new']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['new']['dir'], LOGLEVEL_WARN);
+			return false;
+		}
+
 		if($app->system->is_user($data['new']['puser'])) {
 			$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']);
 
@@ -241,6 +258,14 @@ class shelluser_jailkit_plugin {
 			return false;
 		}
 
+		if(is_file($data['old']['dir']) || is_link($data['old']['dir'])) {
+			$app->log('Shell user dir must not be existing file or symlink.', LOGLEVEL_WARN);
+			return false;
+		} elseif(!$app->system->is_allowed_path($data['old']['dir'])) {
+			$app->log('Shell user dir is not an allowed path: ' . $data['old']['dir'], LOGLEVEL_WARN);
+			return false;
+		}
+
 		if ($data['old']['chroot'] == "jailkit")
 		{
 			$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['old']['parent_domain_id']);
@@ -518,6 +543,9 @@ class shelluser_jailkit_plugin {
 		}
 		//* Get the keys
 		$existing_keys = file($sshkeys, FILE_IGNORE_NEW_LINES);
+		if(!$existing_keys) {
+			$existing_keys = array();
+		}
 		$new_keys = explode("\n", $sshrsa);
 		$old_keys = explode("\n", $this->data['old']['ssh_rsa']);
 
-- 
GitLab


From acfb1ace2b5ab9cd0e614e01651380d66bc68837 Mon Sep 17 00:00:00 2001
From: Daniel Jagszent <daniel@jagszent.de>
Date: Tue, 24 Nov 2020 16:41:18 +0100
Subject: [PATCH 144/441] nginx vhost: exclude let's encrypt from rewrites

---
 server/conf/nginx_vhost.conf.master           | 12 ++++++------
 server/plugins-available/nginx_plugin.inc.php |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index 57dffe1369..7011bfc3ea 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -46,29 +46,29 @@ server {
 <tmpl_if name='ssl_enabled'>
 <tmpl_if name='rewrite_to_https' op='==' value='y'>
         if ($scheme != "https") {
-            rewrite ^ https://$http_host$request_uri? permanent;
+            rewrite ^(?!/\.well-known/acme-challenge)/ https://$http_host$request_uri? permanent;
         }
 </tmpl_if>
 </tmpl_if>
 <tmpl_if name='seo_redirect_enabled'>
         if ($http_host <tmpl_var name='seo_redirect_operator'> "<tmpl_var name='seo_redirect_origin_domain'>") {
-            rewrite ^ $scheme://<tmpl_var name='seo_redirect_target_domain'>$request_uri? permanent;
+            rewrite ^(?!/\.well-known/acme-challenge)/ $scheme://<tmpl_var name='seo_redirect_target_domain'>$request_uri? permanent;
         }
 </tmpl_if>
 <tmpl_loop name="alias_seo_redirects">
         if ($http_host <tmpl_var name='alias_seo_redirect_operator'> "<tmpl_var name='alias_seo_redirect_origin_domain'>") {
-            rewrite ^ $scheme://<tmpl_var name='alias_seo_redirect_target_domain'>$request_uri? permanent;
+            rewrite ^(?!/\.well-known/acme-challenge)/ $scheme://<tmpl_var name='alias_seo_redirect_target_domain'>$request_uri? permanent;
         }
 </tmpl_loop>
 <tmpl_loop name="local_redirects">
         if ($http_host <tmpl_var name='local_redirect_operator'> "<tmpl_var name='local_redirect_origin_domain'>") {
-            rewrite ^<tmpl_var name='local_redirect_exclude'>(.*)$ <tmpl_var name='local_redirect_target'>$2 <tmpl_var name='local_redirect_type'>;
+            rewrite ^<tmpl_var name='local_redirect_exclude'>(.*)$ <tmpl_var name='local_redirect_target'>$1 <tmpl_var name='local_redirect_type'>;
         }
 </tmpl_loop>
 
 <tmpl_loop name="own_redirects">
 <tmpl_if name='use_rewrite'>
-        <tmpl_if name='exclude_own_hostname'>if ($http_host != "<tmpl_var name='exclude_own_hostname'>") { </tmpl_if>rewrite ^<tmpl_var name='rewrite_exclude'>(.*)$ <tmpl_var name='rewrite_target'>$2 <tmpl_var name='rewrite_type'>;<tmpl_if name='exclude_own_hostname'> }</tmpl_if>
+        <tmpl_if name='exclude_own_hostname'>if ($http_host != "<tmpl_var name='exclude_own_hostname'>") { </tmpl_if>rewrite ^<tmpl_var name='rewrite_exclude'>(.*)$ <tmpl_var name='rewrite_target'>$1 <tmpl_var name='rewrite_type'>;<tmpl_if name='exclude_own_hostname'> }</tmpl_if>
 </tmpl_if>
 <tmpl_if name='use_proxy'>
         location / {
@@ -364,7 +364,7 @@ server {
 <tmpl_if name='alias_seo_redirects2'>
 <tmpl_loop name="alias_seo_redirects2">
         if ($http_host <tmpl_var name='alias_seo_redirect_operator'> "<tmpl_var name='alias_seo_redirect_origin_domain'>") {
-            rewrite ^ $scheme://<tmpl_var name='alias_seo_redirect_target_domain'>$request_uri? permanent;
+            rewrite ^(?!/\.well-known/acme-challenge)/ $scheme://<tmpl_var name='alias_seo_redirect_target_domain'>$request_uri? permanent;
         }
 </tmpl_loop>
 </tmpl_if>
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 59cc56bf08..1fd2e536da 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1484,7 +1484,7 @@ class nginx_plugin {
 						}
 					} else {
 						// external URL
-						$rewrite_exclude = '(.?)/';
+						$rewrite_exclude = '(?!\.well-known/acme-challenge)/';
 						if($data['new']['redirect_type'] == 'proxy'){
 							$vhost_data['use_proxy'] = 'y';
 							$rewrite_subdir = $tmp_redirect_path_parts['path'];
@@ -1536,7 +1536,7 @@ class nginx_plugin {
 						}
 					} else {
 						// external URL
-						$rewrite_exclude = '(.?)/';
+						$rewrite_exclude = '(?!\.well-known/acme-challenge)/';
 						if($data['new']['redirect_type'] == 'proxy'){
 							$vhost_data['use_proxy'] = 'y';
 							$rewrite_subdir = $tmp_redirect_path_parts['path'];
@@ -1586,7 +1586,7 @@ class nginx_plugin {
 						}
 					} else {
 						// external URL
-						$rewrite_exclude = '(.?)/';
+						$rewrite_exclude = '(?!\.well-known/acme-challenge)/';
 						if($data['new']['redirect_type'] == 'proxy'){
 							$vhost_data['use_proxy'] = 'y';
 							$rewrite_subdir = $tmp_redirect_path_parts['path'];
-- 
GitLab


From 971427f312beae9e102b444c89b760f22f96518c Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 24 Nov 2020 15:52:11 -0700
Subject: [PATCH 145/441] account for alternate login names in active domain
 checks

---
 install/tpl/debian6_dovecot-sql.conf.master           | 2 +-
 install/tpl/debian_dovecot-sql.conf.master            | 2 +-
 install/tpl/fedora_dovecot-sql.conf.master            | 2 +-
 install/tpl/mysql-virtual_forwardings.cf.master       | 2 +-
 install/tpl/mysql-virtual_sender_login_maps.cf.master | 3 +++
 install/tpl/opensuse_dovecot-sql.conf.master          | 2 +-
 6 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/install/tpl/debian6_dovecot-sql.conf.master b/install/tpl/debian6_dovecot-sql.conf.master
index 72f286eace..32a25c995d 100644
--- a/install/tpl/debian6_dovecot-sql.conf.master
+++ b/install/tpl/debian6_dovecot-sql.conf.master
@@ -14,7 +14,7 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se
 default_pass_scheme = CRYPT
 
 # password-query with prefetch
-password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'y' AND server_id = {server_id})
+password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id})
 
 user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
 
diff --git a/install/tpl/debian_dovecot-sql.conf.master b/install/tpl/debian_dovecot-sql.conf.master
index 4cbe22f1b9..f067d6ba10 100644
--- a/install/tpl/debian_dovecot-sql.conf.master
+++ b/install/tpl/debian_dovecot-sql.conf.master
@@ -121,7 +121,7 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se
 default_pass_scheme = CRYPT
 
 # password-query with prefetch
-password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'y' AND server_id = {server_id})
+password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id})
 
 user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
 
diff --git a/install/tpl/fedora_dovecot-sql.conf.master b/install/tpl/fedora_dovecot-sql.conf.master
index 00ef4faf25..bac4c9d13d 100644
--- a/install/tpl/fedora_dovecot-sql.conf.master
+++ b/install/tpl/fedora_dovecot-sql.conf.master
@@ -134,7 +134,7 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se
 default_pass_scheme = CRYPT
 
 # password-query with prefetch
-password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'y' AND server_id = {server_id})
+password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id})
 
 user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
 
diff --git a/install/tpl/mysql-virtual_forwardings.cf.master b/install/tpl/mysql-virtual_forwardings.cf.master
index 468691b16d..8607735c93 100644
--- a/install/tpl/mysql-virtual_forwardings.cf.master
+++ b/install/tpl/mysql-virtual_forwardings.cf.master
@@ -7,5 +7,5 @@ query = SELECT s.destination AS target FROM mail_forwarding AS s
         UNION
         SELECT s.destination AS target FROM mail_forwarding AS s
             WHERE s.source = '@%d' AND s.type = 'catchall' AND s.active = 'y' AND s.server_id = {server_id}
-            AND NOT EXISTS (SELECT email FROM mail_user WHERE (email = '%s' OR email = {address_without_extension}) AND server_id = {server_id})
+            AND NOT EXISTS (SELECT email FROM mail_user WHERE (email = '%s' OR email = {address_without_extension}) AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id}) AND server_id = {server_id})
             AND NOT EXISTS (SELECT source FROM mail_forwarding WHERE (source = '%s' OR source = {address_without_extension}) AND active = 'y' AND server_id = {server_id})
diff --git a/install/tpl/mysql-virtual_sender_login_maps.cf.master b/install/tpl/mysql-virtual_sender_login_maps.cf.master
index 165bee1231..d2a70015f5 100644
--- a/install/tpl/mysql-virtual_sender_login_maps.cf.master
+++ b/install/tpl/mysql-virtual_sender_login_maps.cf.master
@@ -6,3 +6,6 @@ query = SELECT destination FROM mail_forwarding WHERE source = '%s' AND active =
         UNION
         SELECT email FROM mail_user WHERE email = '%s' AND disablesmtp = 'n' AND server_id = {server_id}
            AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
+        UNION
+        SELECT login FROM mail_user WHERE email = '%s' AND disablesmtp = 'n' AND server_id = {server_id}
+           AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX(email, '@', -1) AND active = 'y' AND server_id = {server_id})
diff --git a/install/tpl/opensuse_dovecot-sql.conf.master b/install/tpl/opensuse_dovecot-sql.conf.master
index 00ef4faf25..bac4c9d13d 100644
--- a/install/tpl/opensuse_dovecot-sql.conf.master
+++ b/install/tpl/opensuse_dovecot-sql.conf.master
@@ -134,7 +134,7 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se
 default_pass_scheme = CRYPT
 
 # password-query with prefetch
-password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'y' AND server_id = {server_id})
+password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id})
 
 user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
 
-- 
GitLab


From 2bc1d845cc2032c6349cd4b4153baee4fea7fd20 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Fri, 27 Nov 2020 10:17:02 +0100
Subject: [PATCH 146/441] Preserve indentation from mailq output using <pre>.

---
 interface/lib/classes/tools_monitor.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/lib/classes/tools_monitor.inc.php b/interface/lib/classes/tools_monitor.inc.php
index d57b9b7a3f..9104017468 100644
--- a/interface/lib/classes/tools_monitor.inc.php
+++ b/interface/lib/classes/tools_monitor.inc.php
@@ -568,7 +568,7 @@ class tools_monitor {
 
 		if(isset($record['data'])) {
 			$data = unserialize($record['data']);
-			$html = nl2br($data['output']);
+                       $html = '<pre>' . htmlspecialchars($data['output']) . '</pre>';
 		} else {
 			$html = '<p>'.$app->lng("no_data_mailq_txt").'</p>';
 		}
-- 
GitLab


From 39ecfdac7c6fcd0b5b7ac5b1fe8acd38640cb644 Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pdreissen@notes-it.nl>
Date: Fri, 27 Nov 2020 12:57:28 +0100
Subject: [PATCH 147/441] Fixes backup path #5936

---
 server/plugins-available/backup_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/backup_plugin.inc.php b/server/plugins-available/backup_plugin.inc.php
index ffbc5a6b79..a92165ba6d 100644
--- a/server/plugins-available/backup_plugin.inc.php
+++ b/server/plugins-available/backup_plugin.inc.php
@@ -73,7 +73,7 @@ class backup_plugin {
 			$app->uses('ini_parser,file,getconf,system');
 			$app->load("backup");
 
-			$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $backup['parent_domain_id']);
+			$web = $app->dbmaster->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $backup['parent_domain_id']);
 			$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
 			$backup_dir = trim($server_config['backup_dir']);
 			if($backup_dir == '') return;
-- 
GitLab


From 99690800bd3ded0549f7868ea7b223989f853c59 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 27 Nov 2020 11:36:57 -0700
Subject: [PATCH 148/441] header names should be lowercase for comparison

---
 server/lib/classes/monitor_tools.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index dbe702d0dd..95f68db2bf 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -845,11 +845,11 @@ class monitor_tools {
 					$mailSubject = trim($parts[1]);
 					continue;
 				}
-				if(strtolower($parts[0]) == 'From') {
+				if(strtolower($parts[0]) == 'from') {
 					$mailFrom = trim($parts[1]);
 					continue;
 				}
-				if(strtolower($parts[0]) == 'Cc') {
+				if(strtolower($parts[0]) == 'cc') {
 					if (! in_array(trim($parts[1]), $recipients)) {
 						$recipients[] = trim($parts[1]);
 					}
-- 
GitLab


From 583392eff9d2e0293f16f3eccf7dd91b6f4e1b0e Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Fri, 27 Nov 2020 22:39:10 +0100
Subject: [PATCH 149/441] Base support for Fedora 33

---
 .gitignore                                    |   1 +
 install/dist/conf/fedora33.conf.php           | 229 ++++++++++++++++++
 install/dist/lib/fedora33.lib.php             |  40 +++
 install/lib/install.lib.php                   |   6 +
 server/lib/classes/monitor_tools.inc.php      |   5 +
 .../remoteaction_core_module.inc.php          |   2 +
 6 files changed, 283 insertions(+)
 create mode 100644 install/dist/conf/fedora33.conf.php
 create mode 100644 install/dist/lib/fedora33.lib.php

diff --git a/.gitignore b/.gitignore
index 32f43c2430..81d5108cae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 .DS_Store
+.idea
 /nbproject/private/
 .phplint-cache
 *.swp
diff --git a/install/dist/conf/fedora33.conf.php b/install/dist/conf/fedora33.conf.php
new file mode 100644
index 0000000000..54013ed6de
--- /dev/null
+++ b/install/dist/conf/fedora33.conf.php
@@ -0,0 +1,229 @@
+<?php
+
+/*
+Copyright (c) 2007, Till Brehm, projektfarm Gmbh
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+//***  Fedora 9 default settings
+
+//* Main
+$conf['language'] = 'en';
+$conf['distname'] = 'fedora33';
+$conf['hostname'] = 'server1.domain.tld'; // Full hostname
+$conf['ispconfig_install_dir'] = '/usr/local/ispconfig';
+$conf['ispconfig_config_dir'] = '/usr/local/ispconfig';
+$conf['ispconfig_log_priority'] = 2;  // 0 = Debug, 1 = Warning, 2 = Error
+$conf['ispconfig_log_dir'] = '/var/log/ispconfig';
+$conf['server_id'] = 1;
+$conf['init_scripts'] = '/etc/init.d';
+$conf['runlevel'] = '/etc';
+$conf['shells'] = '/etc/shells';
+$conf['pam'] = '/etc/pam.d';
+
+//* Services provided by this server, this selection will be overridden by the expert mode
+$conf['services']['mail'] = true;
+$conf['services']['web'] = true;
+$conf['services']['dns'] = true;
+$conf['services']['file'] = true;
+$conf['services']['db'] = true;
+$conf['services']['vserver'] = true;
+$conf['services']['proxy'] = false;
+$conf['services']['firewall'] = false;
+
+//* MySQL
+$conf['mysql']['installed'] = false; // will be detected automatically during installation
+$conf['mysql']['init_script'] = 'mariadb';
+$conf['mysql']['host'] = 'localhost';
+$conf['mysql']['ip'] = '127.0.0.1';
+$conf['mysql']['port'] = '3306';
+$conf['mysql']['database'] = 'dbispconfig';
+$conf['mysql']['admin_user'] = 'root';
+$conf['mysql']['admin_password'] = '';
+$conf['mysql']['charset'] = 'utf8';
+$conf['mysql']['ispconfig_user'] = 'ispconfig';
+$conf['mysql']['ispconfig_password'] = md5(uniqid(rand()));
+$conf['mysql']['master_slave_setup'] = 'n';
+$conf['mysql']['master_host'] = '';
+$conf['mysql']['master_database'] = 'dbispconfig';
+$conf['mysql']['master_admin_user'] = 'root';
+$conf['mysql']['master_admin_password'] = '';
+$conf['mysql']['master_ispconfig_user'] = '';
+$conf['mysql']['master_ispconfig_password'] = md5(uniqid(rand()));
+
+//* Apache
+$conf['apache']['installed'] = false; // will be detected automatically during installation
+$conf['apache']['user'] = 'apache';
+$conf['apache']['group'] = 'apache';
+$conf['apache']['init_script'] = 'httpd';
+$conf['apache']['version'] = '2.4';
+$conf['apache']['vhost_conf_dir'] = '/etc/httpd/conf/sites-available';
+$conf['apache']['vhost_conf_enabled_dir'] = '/etc/httpd/conf/sites-enabled';
+$conf['apache']['vhost_port'] = '8080';
+$conf['apache']['php_ini_path_apache'] = '/etc/php.ini';
+$conf['apache']['php_ini_path_cgi'] = '/etc/php.ini';
+
+//* Website base settings
+$conf['web']['website_basedir'] = '/var/www';
+$conf['web']['website_path'] = '/var/www/clients/client[client_id]/web[website_id]';
+$conf['web']['website_symlinks'] = '/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/';
+
+//* Apps base settings
+$conf['web']['apps_vhost_ip'] = '_default_';
+$conf['web']['apps_vhost_port'] = '8081';
+$conf['web']['apps_vhost_servername'] = '';
+$conf['web']['apps_vhost_user'] = 'ispapps';
+$conf['web']['apps_vhost_group'] = 'ispapps';
+
+//* AWStats settings
+$conf['awstats']['pl'] = '/usr/share/awstats/wwwroot/cgi-bin/awstats.pl';
+
+//* Fastcgi
+$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
+$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
+$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
+
+//* Postfix
+$conf['postfix']['installed'] = false; // will be detected automatically during installation
+$conf['postfix']['config_dir'] = '/etc/postfix';
+$conf['postfix']['init_script'] = 'postfix';
+$conf['postfix']['user'] = 'postfix';
+$conf['postfix']['group'] = 'postfix';
+$conf['postfix']['vmail_userid'] = '5000';
+$conf['postfix']['vmail_username'] = 'vmail';
+$conf['postfix']['vmail_groupid'] = '5000';
+$conf['postfix']['vmail_groupname'] = 'vmail';
+$conf['postfix']['vmail_mailbox_base'] = '/var/vmail';
+
+//* Mailman
+$conf['mailman']['installed'] = false; // will be detected automatically during installation
+$conf['mailman']['config_dir'] = '/etc/mailman';
+$conf['mailman']['init_script'] = 'mailman';
+
+//* Getmail
+$conf['getmail']['installed'] = false; // will be detected automatically during installation
+$conf['getmail']['config_dir'] = '/etc/getmail';
+$conf['getmail']['program'] = '/usr/bin/getmail';
+
+//* Courier
+$conf['courier']['installed'] = false; // will be detected automatically during installation
+$conf['courier']['config_dir'] = '/etc/authlib';
+$conf['courier']['courier-authdaemon'] = 'courier-authlib';
+$conf['courier']['courier-imap'] = 'courier-imap';
+$conf['courier']['courier-imap-ssl'] = '';
+$conf['courier']['courier-pop'] = '';
+$conf['courier']['courier-pop-ssl'] = '';
+
+//* Dovecot
+$conf['dovecot']['installed'] = false; // will be detected automatically during installation
+$conf['dovecot']['config_dir'] = '/etc/dovecot';
+$conf['dovecot']['init_script'] = 'dovecot';
+
+//* SASL
+$conf['saslauthd']['installed'] = false; // will be detected automatically during installation
+$conf['saslauthd']['config'] = '/etc/sysconfig/saslauthd';
+$conf['saslauthd']['init_script'] = 'saslauthd';
+
+//* Amavisd
+$conf['amavis']['installed'] = false; // will be detected automatically during installation
+$conf['amavis']['config_dir'] = '/etc/amavisd';
+$conf['amavis']['init_script'] = 'amavisd';
+
+//* Rspamd
+$conf['rspamd']['installed'] = false; // will be detected automatically during installation
+$conf['rspamd']['config_dir'] = '/etc/rspamd';
+$conf['rspamd']['init_script'] = 'rspamd';
+
+//* ClamAV
+$conf['clamav']['installed'] = false; // will be detected automatically during installation
+$conf['clamav']['init_script'] = 'clamd@amavisd';
+
+//* Pureftpd
+$conf['pureftpd']['installed'] = false; // will be detected automatically during installation
+$conf['pureftpd']['config_dir'] = '/etc/pure-ftpd';
+$conf['pureftpd']['init_script'] = 'pure-ftpd';
+
+//* MyDNS
+$conf['mydns']['installed'] = false; // will be detected automatically during installation
+$conf['mydns']['config_dir'] = '/etc';
+$conf['mydns']['init_script'] = 'mydns';
+
+//* PowerDNS
+$conf['powerdns']['installed'] = false; // will be detected automatically during installation
+$conf['powerdns']['database'] = 'powerdns';
+$conf["powerdns"]["config_dir"] = '/etc/powerdns/pdns.d';
+$conf['powerdns']['init_script'] = 'pdns';
+
+//* BIND DNS Server
+$conf['bind']['installed'] = false; // will be detected automatically during installation
+$conf['bind']['bind_user'] = 'named';
+$conf['bind']['bind_group'] = 'named';
+$conf['bind']['bind_zonefiles_dir'] = '/var/named';
+$conf['bind']['named_conf_path'] = '/etc/named.conf';
+$conf['bind']['named_conf_local_path'] = '/etc/named.conf.local';
+$conf['bind']['init_script'] = 'named';
+
+//* Jailkit
+$conf['jailkit']['installed'] = false; // will be detected automatically during installation
+$conf['jailkit']['config_dir'] = '/etc/jailkit';
+$conf['jailkit']['jk_init'] = 'jk_init.ini';
+$conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini';
+$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /bin/basename /usr/bin/dirname /usr/bin/nano';
+$conf['jailkit']['jailkit_chroot_cron_programs'] = '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php';
+
+//* Squid
+$conf['squid']['installed'] = false; // will be detected automatically during installation
+$conf['squid']['config_dir'] = '/etc/squid';
+$conf['squid']['init_script'] = 'squid';
+
+//* Nginx
+$conf['nginx']['installed'] = false; // will be detected automatically during installation
+$conf['nginx']['user'] = 'nginx';
+$conf['nginx']['group'] = 'nginx';
+$conf['nginx']['config_dir'] = '/etc/nginx';
+$conf['nginx']['vhost_conf_dir'] = '/etc/nginx/sites-available';
+$conf['nginx']['vhost_conf_enabled_dir'] = '/etc/nginx/sites-enabled';
+$conf['nginx']['init_script'] = 'nginx';
+$conf['nginx']['vhost_port'] = '8080';
+$conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket';
+$conf['nginx']['php_fpm_init_script'] = 'php-fpm';
+$conf['nginx']['php_fpm_ini_path'] = '/etc/php.ini';
+$conf['nginx']['php_fpm_pool_dir'] = '/etc/php-fpm.d';
+$conf['nginx']['php_fpm_start_port'] = 9010;
+$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php-fpm';
+
+//* vlogger
+$conf['vlogger']['config_dir'] = '/etc';
+
+//* cron
+$conf['cron']['init_script'] = 'crond';
+$conf['cron']['crontab_dir'] = '/etc/cron.d';
+$conf['cron']['wget'] = '/usr/bin/wget';
+
+//* OpenVZ
+$conf['openvz']['installed'] = false;
+
+?>
diff --git a/install/dist/lib/fedora33.lib.php b/install/dist/lib/fedora33.lib.php
new file mode 100644
index 0000000000..3dcd7494d3
--- /dev/null
+++ b/install/dist/lib/fedora33.lib.php
@@ -0,0 +1,40 @@
+<?php
+
+/*
+Copyright (c) 2014, Till Brehm, ISPConfig UG
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+require_once realpath(dirname(__FILE__)) . '/centos_base.lib.php';
+
+class installer extends installer_centos {
+
+	protected $clamav_socket = '/var/run/clamd.amavisd/clamd.sock';
+	
+	// everything else is inherited from installer_centos class
+}
+
+?>
diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index 2ed873d9ba..b59c8ede6b 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -308,6 +308,12 @@ function get_distname() {
 			$distid = 'fedora9';
 			$distbaseid = 'fedora';
 			swriteln("Operating System: Fedora 11 or compatible\n");
+		}  elseif(stristr($content, 'Fedora release 33 (Thirty Three)')) {
+			$distname = 'Fedora';
+			$distver = '33';
+			$distid = 'fedora33';
+			$distbaseid = 'fedora';
+			swriteln("Operating System: Fedora 33 or compatible\n");
 		} elseif(stristr($content, 'CentOS release 5.2 (Final)')) {
 			$distname = 'CentOS';
 			$distver = '5.2';
diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index dbe702d0dd..ed5a2fe040 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -290,6 +290,11 @@ class monitor_tools {
 			$distver = '11';
 			$distid = 'fedora9';
 			$distbaseid = 'fedora';
+		} elseif(stristr($content, 'Fedora release 33 (Thirty Three)')) {
+			$distname = 'Fedora';
+			$distver = '33';
+			$distid = 'fedora33';
+			$distbaseid = 'fedora';
 		} elseif(stristr($content, 'CentOS release 5.2 (Final)')) {
 			$distname = 'CentOS';
 			$distver = '5.2';
diff --git a/server/mods-available/remoteaction_core_module.inc.php b/server/mods-available/remoteaction_core_module.inc.php
index ef6e07e95e..bdaba5cb06 100644
--- a/server/mods-available/remoteaction_core_module.inc.php
+++ b/server/mods-available/remoteaction_core_module.inc.php
@@ -179,6 +179,8 @@ class remoteaction_core_module {
 		//TODO : change this when distribution information has been integrated into server record
 		if(file_exists('/etc/gentoo-release')) {
 			exec("glsa-check -f --nocolor affected");
+		}elseif(file_exists('/etc/redhat-release')) {
+			exec("dnf -y update");
 		}
 		else {
 			exec("apt-get update");
-- 
GitLab


From 804a0a33501c62cca7330b31b30c8b7144fcd9a6 Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Sat, 28 Nov 2020 21:49:15 +0100
Subject: [PATCH 150/441] Base support for Fedora 32

---
 install/dist/conf/fedora32.conf.php      | 229 +++++++++++++++++++++++
 install/dist/conf/fedora33.conf.php      |   2 +-
 install/dist/lib/fedora32.lib.php        |  40 ++++
 install/lib/install.lib.php              |   8 +-
 server/lib/classes/monitor_tools.inc.php |   5 +
 5 files changed, 282 insertions(+), 2 deletions(-)
 create mode 100644 install/dist/conf/fedora32.conf.php
 create mode 100644 install/dist/lib/fedora32.lib.php

diff --git a/install/dist/conf/fedora32.conf.php b/install/dist/conf/fedora32.conf.php
new file mode 100644
index 0000000000..76c45e5352
--- /dev/null
+++ b/install/dist/conf/fedora32.conf.php
@@ -0,0 +1,229 @@
+<?php
+
+/*
+Copyright (c) 2007, Till Brehm, projektfarm Gmbh
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+//***  Fedora 32 default settings
+
+//* Main
+$conf['language'] = 'en';
+$conf['distname'] = 'fedora32';
+$conf['hostname'] = 'server1.domain.tld'; // Full hostname
+$conf['ispconfig_install_dir'] = '/usr/local/ispconfig';
+$conf['ispconfig_config_dir'] = '/usr/local/ispconfig';
+$conf['ispconfig_log_priority'] = 2;  // 0 = Debug, 1 = Warning, 2 = Error
+$conf['ispconfig_log_dir'] = '/var/log/ispconfig';
+$conf['server_id'] = 1;
+$conf['init_scripts'] = '/etc/init.d';
+$conf['runlevel'] = '/etc';
+$conf['shells'] = '/etc/shells';
+$conf['pam'] = '/etc/pam.d';
+
+//* Services provided by this server, this selection will be overridden by the expert mode
+$conf['services']['mail'] = true;
+$conf['services']['web'] = true;
+$conf['services']['dns'] = true;
+$conf['services']['file'] = true;
+$conf['services']['db'] = true;
+$conf['services']['vserver'] = true;
+$conf['services']['proxy'] = false;
+$conf['services']['firewall'] = false;
+
+//* MySQL
+$conf['mysql']['installed'] = false; // will be detected automatically during installation
+$conf['mysql']['init_script'] = 'mariadb';
+$conf['mysql']['host'] = 'localhost';
+$conf['mysql']['ip'] = '127.0.0.1';
+$conf['mysql']['port'] = '3306';
+$conf['mysql']['database'] = 'dbispconfig';
+$conf['mysql']['admin_user'] = 'root';
+$conf['mysql']['admin_password'] = '';
+$conf['mysql']['charset'] = 'utf8';
+$conf['mysql']['ispconfig_user'] = 'ispconfig';
+$conf['mysql']['ispconfig_password'] = md5(uniqid(rand()));
+$conf['mysql']['master_slave_setup'] = 'n';
+$conf['mysql']['master_host'] = '';
+$conf['mysql']['master_database'] = 'dbispconfig';
+$conf['mysql']['master_admin_user'] = 'root';
+$conf['mysql']['master_admin_password'] = '';
+$conf['mysql']['master_ispconfig_user'] = '';
+$conf['mysql']['master_ispconfig_password'] = md5(uniqid(rand()));
+
+//* Apache
+$conf['apache']['installed'] = false; // will be detected automatically during installation
+$conf['apache']['user'] = 'apache';
+$conf['apache']['group'] = 'apache';
+$conf['apache']['init_script'] = 'httpd';
+$conf['apache']['version'] = '2.4';
+$conf['apache']['vhost_conf_dir'] = '/etc/httpd/conf/sites-available';
+$conf['apache']['vhost_conf_enabled_dir'] = '/etc/httpd/conf/sites-enabled';
+$conf['apache']['vhost_port'] = '8080';
+$conf['apache']['php_ini_path_apache'] = '/etc/php.ini';
+$conf['apache']['php_ini_path_cgi'] = '/etc/php.ini';
+
+//* Website base settings
+$conf['web']['website_basedir'] = '/var/www';
+$conf['web']['website_path'] = '/var/www/clients/client[client_id]/web[website_id]';
+$conf['web']['website_symlinks'] = '/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/';
+
+//* Apps base settings
+$conf['web']['apps_vhost_ip'] = '_default_';
+$conf['web']['apps_vhost_port'] = '8081';
+$conf['web']['apps_vhost_servername'] = '';
+$conf['web']['apps_vhost_user'] = 'ispapps';
+$conf['web']['apps_vhost_group'] = 'ispapps';
+
+//* AWStats settings
+$conf['awstats']['pl'] = '/usr/share/awstats/wwwroot/cgi-bin/awstats.pl';
+
+//* Fastcgi
+$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
+$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
+$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
+
+//* Postfix
+$conf['postfix']['installed'] = false; // will be detected automatically during installation
+$conf['postfix']['config_dir'] = '/etc/postfix';
+$conf['postfix']['init_script'] = 'postfix';
+$conf['postfix']['user'] = 'postfix';
+$conf['postfix']['group'] = 'postfix';
+$conf['postfix']['vmail_userid'] = '5000';
+$conf['postfix']['vmail_username'] = 'vmail';
+$conf['postfix']['vmail_groupid'] = '5000';
+$conf['postfix']['vmail_groupname'] = 'vmail';
+$conf['postfix']['vmail_mailbox_base'] = '/var/vmail';
+
+//* Mailman
+$conf['mailman']['installed'] = false; // will be detected automatically during installation
+$conf['mailman']['config_dir'] = '/etc/mailman';
+$conf['mailman']['init_script'] = 'mailman';
+
+//* Getmail
+$conf['getmail']['installed'] = false; // will be detected automatically during installation
+$conf['getmail']['config_dir'] = '/etc/getmail';
+$conf['getmail']['program'] = '/usr/bin/getmail';
+
+//* Courier
+$conf['courier']['installed'] = false; // will be detected automatically during installation
+$conf['courier']['config_dir'] = '/etc/authlib';
+$conf['courier']['courier-authdaemon'] = 'courier-authlib';
+$conf['courier']['courier-imap'] = 'courier-imap';
+$conf['courier']['courier-imap-ssl'] = '';
+$conf['courier']['courier-pop'] = '';
+$conf['courier']['courier-pop-ssl'] = '';
+
+//* Dovecot
+$conf['dovecot']['installed'] = false; // will be detected automatically during installation
+$conf['dovecot']['config_dir'] = '/etc/dovecot';
+$conf['dovecot']['init_script'] = 'dovecot';
+
+//* SASL
+$conf['saslauthd']['installed'] = false; // will be detected automatically during installation
+$conf['saslauthd']['config'] = '/etc/sysconfig/saslauthd';
+$conf['saslauthd']['init_script'] = 'saslauthd';
+
+//* Amavisd
+$conf['amavis']['installed'] = false; // will be detected automatically during installation
+$conf['amavis']['config_dir'] = '/etc/amavisd';
+$conf['amavis']['init_script'] = 'amavisd';
+
+//* Rspamd
+$conf['rspamd']['installed'] = false; // will be detected automatically during installation
+$conf['rspamd']['config_dir'] = '/etc/rspamd';
+$conf['rspamd']['init_script'] = 'rspamd';
+
+//* ClamAV
+$conf['clamav']['installed'] = false; // will be detected automatically during installation
+$conf['clamav']['init_script'] = 'clamd@amavisd';
+
+//* Pureftpd
+$conf['pureftpd']['installed'] = false; // will be detected automatically during installation
+$conf['pureftpd']['config_dir'] = '/etc/pure-ftpd';
+$conf['pureftpd']['init_script'] = 'pure-ftpd';
+
+//* MyDNS
+$conf['mydns']['installed'] = false; // will be detected automatically during installation
+$conf['mydns']['config_dir'] = '/etc';
+$conf['mydns']['init_script'] = 'mydns';
+
+//* PowerDNS
+$conf['powerdns']['installed'] = false; // will be detected automatically during installation
+$conf['powerdns']['database'] = 'powerdns';
+$conf["powerdns"]["config_dir"] = '/etc/powerdns/pdns.d';
+$conf['powerdns']['init_script'] = 'pdns';
+
+//* BIND DNS Server
+$conf['bind']['installed'] = false; // will be detected automatically during installation
+$conf['bind']['bind_user'] = 'named';
+$conf['bind']['bind_group'] = 'named';
+$conf['bind']['bind_zonefiles_dir'] = '/var/named';
+$conf['bind']['named_conf_path'] = '/etc/named.conf';
+$conf['bind']['named_conf_local_path'] = '/etc/named.conf.local';
+$conf['bind']['init_script'] = 'named';
+
+//* Jailkit
+$conf['jailkit']['installed'] = false; // will be detected automatically during installation
+$conf['jailkit']['config_dir'] = '/etc/jailkit';
+$conf['jailkit']['jk_init'] = 'jk_init.ini';
+$conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini';
+$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /bin/basename /usr/bin/dirname /usr/bin/nano';
+$conf['jailkit']['jailkit_chroot_cron_programs'] = '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php';
+
+//* Squid
+$conf['squid']['installed'] = false; // will be detected automatically during installation
+$conf['squid']['config_dir'] = '/etc/squid';
+$conf['squid']['init_script'] = 'squid';
+
+//* Nginx
+$conf['nginx']['installed'] = false; // will be detected automatically during installation
+$conf['nginx']['user'] = 'nginx';
+$conf['nginx']['group'] = 'nginx';
+$conf['nginx']['config_dir'] = '/etc/nginx';
+$conf['nginx']['vhost_conf_dir'] = '/etc/nginx/sites-available';
+$conf['nginx']['vhost_conf_enabled_dir'] = '/etc/nginx/sites-enabled';
+$conf['nginx']['init_script'] = 'nginx';
+$conf['nginx']['vhost_port'] = '8080';
+$conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket';
+$conf['nginx']['php_fpm_init_script'] = 'php-fpm';
+$conf['nginx']['php_fpm_ini_path'] = '/etc/php.ini';
+$conf['nginx']['php_fpm_pool_dir'] = '/etc/php-fpm.d';
+$conf['nginx']['php_fpm_start_port'] = 9010;
+$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php-fpm';
+
+//* vlogger
+$conf['vlogger']['config_dir'] = '/etc';
+
+//* cron
+$conf['cron']['init_script'] = 'crond';
+$conf['cron']['crontab_dir'] = '/etc/cron.d';
+$conf['cron']['wget'] = '/usr/bin/wget';
+
+//* OpenVZ
+$conf['openvz']['installed'] = false;
+
+?>
diff --git a/install/dist/conf/fedora33.conf.php b/install/dist/conf/fedora33.conf.php
index 54013ed6de..5fe00b92fe 100644
--- a/install/dist/conf/fedora33.conf.php
+++ b/install/dist/conf/fedora33.conf.php
@@ -28,7 +28,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-//***  Fedora 9 default settings
+//***  Fedora 33 default settings
 
 //* Main
 $conf['language'] = 'en';
diff --git a/install/dist/lib/fedora32.lib.php b/install/dist/lib/fedora32.lib.php
new file mode 100644
index 0000000000..3dcd7494d3
--- /dev/null
+++ b/install/dist/lib/fedora32.lib.php
@@ -0,0 +1,40 @@
+<?php
+
+/*
+Copyright (c) 2014, Till Brehm, ISPConfig UG
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+require_once realpath(dirname(__FILE__)) . '/centos_base.lib.php';
+
+class installer extends installer_centos {
+
+	protected $clamav_socket = '/var/run/clamd.amavisd/clamd.sock';
+	
+	// everything else is inherited from installer_centos class
+}
+
+?>
diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index b59c8ede6b..3d77443372 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -308,7 +308,13 @@ function get_distname() {
 			$distid = 'fedora9';
 			$distbaseid = 'fedora';
 			swriteln("Operating System: Fedora 11 or compatible\n");
-		}  elseif(stristr($content, 'Fedora release 33 (Thirty Three)')) {
+		} elseif(stristr($content, 'Fedora release 32 (Thirty Two)')) {
+			$distname = 'Fedora';
+			$distver = '32';
+			$distid = 'fedora32';
+			$distbaseid = 'fedora';
+			swriteln("Operating System: Fedora 32 or compatible\n");
+		} elseif(stristr($content, 'Fedora release 33 (Thirty Three)')) {
 			$distname = 'Fedora';
 			$distver = '33';
 			$distid = 'fedora33';
diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index ed5a2fe040..b50fd5afb8 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -290,6 +290,11 @@ class monitor_tools {
 			$distver = '11';
 			$distid = 'fedora9';
 			$distbaseid = 'fedora';
+		} elseif(stristr($content, 'Fedora release 32 (Thirty Two)')) {
+			$distname = 'Fedora';
+			$distver = '32';
+			$distid = 'fedora32';
+			$distbaseid = 'fedora';
 		} elseif(stristr($content, 'Fedora release 33 (Thirty Three)')) {
 			$distname = 'Fedora';
 			$distver = '33';
-- 
GitLab


From 26893d7077a99eb91ccaaf1f56b3a5d88765e463 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Fri, 3 Jan 2020 12:40:55 +0100
Subject: [PATCH 151/441] Allow searching on the mailbox login field

---
 interface/web/mail/form/mail_user.tform.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/interface/web/mail/form/mail_user.tform.php b/interface/web/mail/form/mail_user.tform.php
index 85e310648b..982d79474d 100644
--- a/interface/web/mail/form/mail_user.tform.php
+++ b/interface/web/mail/form/mail_user.tform.php
@@ -122,7 +122,8 @@ $form["tabs"]['mailuser'] = array(
 			'default' => '',
 			'value'   => '',
 			'width'   => '30',
-			'maxlength' => '255'
+			'maxlength' => '255',
+			'searchable' => 2
 		),
 		'password' => array (
 			'datatype' => 'VARCHAR',
-- 
GitLab


From 874733d530c7472f286bd1c69c0462f7bc7bf71b Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Sun, 5 Jan 2020 21:05:07 +0100
Subject: [PATCH 152/441] In search show the full result count instead of
 capped at 10.

---
 interface/web/dashboard/ajax_get_json.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/interface/web/dashboard/ajax_get_json.php b/interface/web/dashboard/ajax_get_json.php
index 32fc8912e0..ddedf0c39c 100644
--- a/interface/web/dashboard/ajax_get_json.php
+++ b/interface/web/dashboard/ajax_get_json.php
@@ -194,8 +194,13 @@ function _search($module, $section, $additional_sql = '', $params = ''){
 		if(is_array($results) && !empty($results)){
 			$lng_file = '../'.$module.'/lib/lang/'.$_SESSION['s']['language'].'_'.$section.'.lng';
 			if(is_file($lng_file)) include $lng_file;
+
+			// Get the real result count, without LIMIT.
+			$sql_real_rows = preg_replace(array('/\*/', "/ LIMIT.*$/"), array('COUNT(*) as c', ''), $sql);
+			$result_count = $app->db->queryOneRecord($sql_real_rows, $db_table);
+
 			$result_array['cheader'] = array('title' => $category_title,
-				'total' => count($results),
+				'total' => $result_count['c'],
 				'limit' => count($results)
 			);
 			foreach($results as $result){
-- 
GitLab


From 548933382cd5941c09b932514e35b8c75b59669b Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Sun, 29 Nov 2020 00:02:42 +0100
Subject: [PATCH 153/441] Add journalctl support for log_messages

---
 server/lib/classes/monitor_tools.inc.php | 39 ++++++++++++++++--------
 1 file changed, 27 insertions(+), 12 deletions(-)

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index dbe702d0dd..c3d01c919b 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -493,6 +493,7 @@ class monitor_tools {
 
 		$dist = '';
 		$logfile = '';
+		$journalmatch = '';
 
 		if (@is_file('/etc/debian_version')) {
 			$dist = 'debian';
@@ -542,7 +543,7 @@ class monitor_tools {
 			if ($dist == 'debian') {
 				$logfile = '/var/log/syslog';
 			} elseif ($dist == 'redhat') {
-				$logfile = '/var/log/messages';
+				$journalmatch = ' ';
 			} elseif ($dist == 'suse') {
 				$logfile = '/var/log/messages';
 			} elseif ($dist == 'gentoo') {
@@ -643,27 +644,41 @@ class monitor_tools {
 			if (stristr($logfile, ';') or substr($logfile, 0, 9) != '/var/log/' or stristr($logfile, '..')) {
 				$log = 'Logfile path error.';
 			} else {
-				$log = '';
 				if (is_readable($logfile)) {
-					$fd = popen('tail -n 100 ' . escapeshellarg($logfile), 'r');
-					if ($fd) {
-						while (!feof($fd)) {
-							$log .= fgets($fd, 4096);
-							$n++;
-							if ($n > 1000)
-								break;
-						}
-						fclose($fd);
-					}
+					$log = $this->_getOutputFromExecCommand('tail -n 100 ' . escapeshellarg($logfile));
 				} else {
 					$log = 'Unable to read ' . $logfile;
 				}
 			}
+		}else{
+			if($journalmatch != ''){
+				$log = $this->_getOutputFromExecCommand('journalctl -n 100 --no-pager ' . escapeshellcmd($journalmatch));
+			}else{
+				$log = 'Unable to read ' . $logfile;
+			}
+
 		}
 
 		return $log;
 	}
 
+	private function _getOutputFromExecCommand ($command) {
+		$log = '';
+		echo $command;
+		$fd = popen($command, 'r');
+		if ($fd) {
+			$n = 0;
+			while (!feof($fd)) {
+				$log .= fgets($fd, 4096);
+				$n++;
+				if ($n > 1000)
+					break;
+			}
+			fclose($fd);
+		}
+		return $log;
+	}
+
 	private function _checkTcp($host, $port) {
 		/* Try to open a connection */
 		$fp = @fsockopen($host, $port, $errno, $errstr, 2);
-- 
GitLab


From 59dfac20a0f6f2353e73875cc84905055e334151 Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Sun, 29 Nov 2020 00:10:47 +0100
Subject: [PATCH 154/441] Add journalctl support for log_messages

---
 server/lib/classes/monitor_tools.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index c3d01c919b..d74b35ab79 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -654,7 +654,7 @@ class monitor_tools {
 			if($journalmatch != ''){
 				$log = $this->_getOutputFromExecCommand('journalctl -n 100 --no-pager ' . escapeshellcmd($journalmatch));
 			}else{
-				$log = 'Unable to read ' . $logfile;
+				$log = 'Unable to read logfile';
 			}
 
 		}
-- 
GitLab


From aed098cd45b575936d95bc2a0dda351a367bf589 Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Sun, 29 Nov 2020 00:11:34 +0100
Subject: [PATCH 155/441] Add journalctl support for log_messages

---
 server/lib/classes/monitor_tools.inc.php | 1 -
 1 file changed, 1 deletion(-)

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index d74b35ab79..3783452aac 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -664,7 +664,6 @@ class monitor_tools {
 
 	private function _getOutputFromExecCommand ($command) {
 		$log = '';
-		echo $command;
 		$fd = popen($command, 'r');
 		if ($fd) {
 			$n = 0;
-- 
GitLab


From fa53b6070f47fc539362101af134d38ec95cf665 Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Sun, 29 Nov 2020 21:59:43 +0100
Subject: [PATCH 156/441] Fix php_fpm_socket_dir and cgi_socket

---
 install/dist/conf/fedora32.conf.php | 4 ++--
 install/dist/conf/fedora33.conf.php | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/install/dist/conf/fedora32.conf.php b/install/dist/conf/fedora32.conf.php
index 76c45e5352..6701bb8729 100644
--- a/install/dist/conf/fedora32.conf.php
+++ b/install/dist/conf/fedora32.conf.php
@@ -208,12 +208,12 @@ $conf['nginx']['vhost_conf_dir'] = '/etc/nginx/sites-available';
 $conf['nginx']['vhost_conf_enabled_dir'] = '/etc/nginx/sites-enabled';
 $conf['nginx']['init_script'] = 'nginx';
 $conf['nginx']['vhost_port'] = '8080';
-$conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket';
+$conf['nginx']['cgi_socket'] = '/run/fcgiwrap.sock';
 $conf['nginx']['php_fpm_init_script'] = 'php-fpm';
 $conf['nginx']['php_fpm_ini_path'] = '/etc/php.ini';
 $conf['nginx']['php_fpm_pool_dir'] = '/etc/php-fpm.d';
 $conf['nginx']['php_fpm_start_port'] = 9010;
-$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php-fpm';
+$conf['nginx']['php_fpm_socket_dir'] = '/run/php-fpm';
 
 //* vlogger
 $conf['vlogger']['config_dir'] = '/etc';
diff --git a/install/dist/conf/fedora33.conf.php b/install/dist/conf/fedora33.conf.php
index 5fe00b92fe..873376fa2c 100644
--- a/install/dist/conf/fedora33.conf.php
+++ b/install/dist/conf/fedora33.conf.php
@@ -208,12 +208,12 @@ $conf['nginx']['vhost_conf_dir'] = '/etc/nginx/sites-available';
 $conf['nginx']['vhost_conf_enabled_dir'] = '/etc/nginx/sites-enabled';
 $conf['nginx']['init_script'] = 'nginx';
 $conf['nginx']['vhost_port'] = '8080';
-$conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket';
+$conf['nginx']['cgi_socket'] = '/run/fcgiwrap.sock';
 $conf['nginx']['php_fpm_init_script'] = 'php-fpm';
 $conf['nginx']['php_fpm_ini_path'] = '/etc/php.ini';
 $conf['nginx']['php_fpm_pool_dir'] = '/etc/php-fpm.d';
 $conf['nginx']['php_fpm_start_port'] = 9010;
-$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php-fpm';
+$conf['nginx']['php_fpm_socket_dir'] = '/run/php-fpm';
 
 //* vlogger
 $conf['vlogger']['config_dir'] = '/etc';
-- 
GitLab


From 3aaf95636725a0b946ff27f6c344135e104660d5 Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Mon, 30 Nov 2020 21:00:23 +0100
Subject: [PATCH 157/441] Server php adding custom fpm_socket_dir

---
 .../sql/incremental/upd_dev_collection.sql    |  3 ++
 install/sql/ispconfig3.sql                    |  1 +
 interface/web/admin/form/server_php.tform.php | 14 ++++++++
 .../admin/templates/server_php_fpm_edit.htm   |  3 ++
 .../plugins-available/apache2_plugin.inc.php  | 34 +++++++++---------
 server/plugins-available/nginx_plugin.inc.php | 35 ++++++++++---------
 6 files changed, 58 insertions(+), 32 deletions(-)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index beea2623b3..f72e1eb05f 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1,2 +1,5 @@
 -- drop old php column because new installations don't have them (fails in multi-server)
 ALTER TABLE `web_domain` DROP COLUMN `fastcgi_php_version`;
+
+-- add php_fpm_pool_dir column to server_php
+ALTER TABLE `server_php` ADD `php_fpm_socket_dir` varchar(255) DEFAULT NULL AFTER `php_fpm_pool_dir`;
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 7753071f71..b4267f0d74 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -1426,6 +1426,7 @@ CREATE TABLE `server_php` (
   `php_fpm_init_script` varchar(255) DEFAULT NULL,
   `php_fpm_ini_dir` varchar(255) DEFAULT NULL,
   `php_fpm_pool_dir` varchar(255) DEFAULT NULL,
+  `php_fpm_socket_dir` varchar(255) DEFAULT NULL,
   `active` enum('n','y') NOT NULL DEFAULT 'y',
   PRIMARY KEY (`server_php_id`)
 ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
diff --git a/interface/web/admin/form/server_php.tform.php b/interface/web/admin/form/server_php.tform.php
index 6d443e8d50..59eb7b4a6f 100644
--- a/interface/web/admin/form/server_php.tform.php
+++ b/interface/web/admin/form/server_php.tform.php
@@ -229,6 +229,20 @@ $form["tabs"]['php_fpm'] = array(
 			'width' => '40',
 			'maxlength' => '255'
 		),
+		'php_fpm_socket_dir' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'filters'   => array(
+					0 => array( 'event' => 'SAVE',
+					'type' => 'STRIPTAGS'),
+					1 => array( 'event' => 'SAVE',
+					'type' => 'STRIPNL')
+			),
+			'default' => '',
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255'
+		),
 		//#################################
 		// END Datatable fields
 		//#################################
diff --git a/interface/web/admin/templates/server_php_fpm_edit.htm b/interface/web/admin/templates/server_php_fpm_edit.htm
index 372b3702fc..5e4cae9ac5 100644
--- a/interface/web/admin/templates/server_php_fpm_edit.htm
+++ b/interface/web/admin/templates/server_php_fpm_edit.htm
@@ -7,6 +7,9 @@
             <div class="form-group">
                 <label for="php_fpm_pool_dir" class="col-sm-3 control-label">{tmpl_var name='php_fpm_pool_dir_txt'}</label>
                 <div class="col-sm-9"><input type="text" name="php_fpm_pool_dir" id="php_fpm_pool_dir" value="{tmpl_var name='php_fpm_pool_dir'}" class="form-control" /></div></div>
+            <div class="form-group">
+                <label for="php_fpm_socket_dir" class="col-sm-3 control-label">{tmpl_var name='php_fpm_socket_dir'}</label>
+                <div class="col-sm-9"><input type="text" name="php_fpm_socket_dir" id="php_fpm_socket_dir" value="{tmpl_var name='php_fpm_socket_dir'}" class="form-control" /></div></div>
         
             
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index cc4bea9f60..26cd14fd36 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -1667,31 +1667,30 @@ class apache2_plugin {
 		 * PHP-FPM
 		 */
 		// Support for multiple PHP versions
+		$default_php_fpm = true;
 		if($data['new']['php'] == 'php-fpm'){
 			if($data['new']['server_php_id'] != 0){
-				$default_php_fpm = false;
 				$tmp_php = $app->db->queryOneRecord('SELECT * FROM server_php WHERE server_php_id = ?', $data['new']['server_php_id']);
 				if($tmp_php) {
+					$default_php_fpm = false;
 					$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 					$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 					$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
+					$custom_php_fpm_socket_dir = $tmp_php['custom_php_fpm_socket_dir'];
 					if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 				}
-			} else {
-				$default_php_fpm = true;
 			}
 		} else {
 			if($data['old']['server_php_id'] != 0 && ($data['old']['php'] == 'php-fpm' || $data['old']['php'] == 'hhvm')){
-				$default_php_fpm = false;
 				$tmp_php = $app->db->queryOneRecord('SELECT * FROM server_php WHERE server_php_id = ?', $data['old']['server_php_id']);
 				if($tmp_php) {
+					$default_php_fpm = false;
 					$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 					$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 					$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
+					$custom_php_fpm_socket_dir = $tmp_php['custom_php_fpm_socket_dir'];
 					if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 				}
-			} else {
-				$default_php_fpm = true;
 			}
 		}
 
@@ -1704,7 +1703,12 @@ class apache2_plugin {
 
 		if(substr($pool_dir, -1) != '/') $pool_dir .= '/';
 		$pool_name = 'web'.$data['new']['domain_id'];
-		$socket_dir = $web_config['php_fpm_socket_dir'];
+
+		if (!$default_php_fpm && !empty($custom_php_fpm_socket_dir)) {
+			$socket_dir = $custom_php_fpm_socket_dir;
+		} else {
+			$socket_dir = $web_config['php_fpm_socket_dir'];
+		}
 		if(substr($socket_dir, -1) != '/') $socket_dir .= '/';
 
 		if($data['new']['php_fpm_use_socket'] == 'y'){
@@ -3303,31 +3307,29 @@ class apache2_plugin {
 		$pool_dir = trim($pool_dir);
 		//$reload = false;
 
+		$default_php_fpm = true;
+
 		if($data['new']['php'] == 'php-fpm'){
 			if($data['new']['server_php_id'] != 0){
-				$default_php_fpm = false;
 				$tmp_php = $app->db->queryOneRecord('SELECT * FROM server_php WHERE server_php_id = ?', $data['new']['server_php_id']);
 				if($tmp_php) {
+					$default_php_fpm = false;
 					$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 					$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 					$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
 					if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 				}
-			} else {
-				$default_php_fpm = true;
 			}
 		} else {
 			if($data['old']['server_php_id'] != 0 && $data['old']['php'] == 'php-fpm'){
-				$default_php_fpm = false;
 				$tmp_php = $app->db->queryOneRecord('SELECT * FROM server_php WHERE server_php_id = ?', $data['old']['server_php_id']);
 				if($tmp_php) {
+					$default_php_fpm = false;
 					$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 					$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 					$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
 					if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 				}
-			} else {
-				$default_php_fpm = true;
 			}
 		}
 
@@ -3525,17 +3527,17 @@ class apache2_plugin {
 
 		$php_fpm_reload_mode = ($web_config['php_fpm_reload_mode'] == 'reload')?'reload':'restart';
 
+		$default_php_fpm = true;
+
 		if($data['old']['server_php_id'] != 0 && $data['old']['php'] == 'php-fpm'){
-			$default_php_fpm = false;
 			$tmp_php = $app->db->queryOneRecord('SELECT * FROM server_php WHERE server_php_id = ?', $data['old']['server_php_id']);
 			if($tmp_php) {
+				$default_php_fpm = false;
 				$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 				$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 				$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
 				if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 			}
-		} else {
-			$default_php_fpm = true;
 		}
 
 		if($default_php_fpm){
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 59cc56bf08..c62022f122 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1084,31 +1084,31 @@ class nginx_plugin {
 		}
 		if($data['new']['ip_address'] == '*' && $data['new']['ipv6_address'] == '') $tpl->setVar('ipv6_wildcard', 1);
 
+		$default_php_fpm = true;
+
 		if($data['new']['php'] == 'php-fpm' || $data['new']['php'] == 'hhvm'){
 			if($data['new']['server_php_id'] != 0){
-				$default_php_fpm = false;
 				$tmp_php = $app->db->queryOneRecord('SELECT * FROM server_php WHERE server_php_id = ?', $data['new']['server_php_id']);
 				if($tmp_php) {
+					$default_php_fpm = false;
 					$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 					$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 					$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
+					$custom_php_fpm_socket_dir = $tmp_php['custom_php_fpm_socket_dir'];
 					if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 				}
-			} else {
-				$default_php_fpm = true;
 			}
 		} else {
 			if($data['old']['server_php_id'] != 0 && $data['old']['php'] != 'no'){
-				$default_php_fpm = false;
 				$tmp_php = $app->db->queryOneRecord('SELECT * FROM server_php WHERE server_php_id = ?', $data['old']['server_php_id']);
 				if($tmp_php) {
+					$default_php_fpm = false;
 					$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 					$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 					$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
+					$custom_php_fpm_socket_dir = $tmp_php['custom_php_fpm_socket_dir'];
 					if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 				}
-			} else {
-				$default_php_fpm = true;
 			}
 		}
 
@@ -1120,7 +1120,12 @@ class nginx_plugin {
 		$pool_dir = trim($pool_dir);
 		if(substr($pool_dir, -1) != '/') $pool_dir .= '/';
 		$pool_name = 'web'.$data['new']['domain_id'];
-		$socket_dir = $web_config['php_fpm_socket_dir'];
+
+		if (!$default_php_fpm && !empty($custom_php_fpm_socket_dir)) {
+			$socket_dir = $custom_php_fpm_socket_dir;
+		} else {
+			$socket_dir = $web_config['php_fpm_socket_dir'];
+		}
 		if(substr($socket_dir, -1) != '/') $socket_dir .= '/';
 
 		if($data['new']['php_fpm_use_socket'] == 'y'){
@@ -2876,31 +2881,29 @@ class nginx_plugin {
 		$rh_releasefiles = array('/etc/centos-release', '/etc/redhat-release');
 
 		// HHVM => PHP-FPM-Fallback
+		$default_php_fpm = true;
+
 		if($data['new']['php'] == 'php-fpm' || $data['new']['php'] == 'hhvm'){
 			if($data['new']['server_php_id'] != 0){
-				$default_php_fpm = false;
 				$tmp_php = $app->db->queryOneRecord('SELECT * FROM server_php WHERE server_php_id = ?', $data['new']['server_php_id']);
 				if($tmp_php) {
+					$default_php_fpm = false;
 					$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 					$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 					$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
 					if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 				}
-			} else {
-				$default_php_fpm = true;
 			}
 		} else {
 			if($data['old']['server_php_id'] != 0 && $data['old']['php'] != 'no'){
-				$default_php_fpm = false;
 				$tmp_php = $app->db->queryOneRecord('SELECT * FROM server_php WHERE server_php_id = ?', $data['old']['server_php_id']);
 				if($tmp_php) {
+					$default_php_fpm = false;
 					$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 					$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 					$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
 					if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 				}
-			} else {
-				$default_php_fpm = true;
 			}
 		}
 
@@ -3102,17 +3105,17 @@ class nginx_plugin {
 	private function php_fpm_pool_delete ($data, $web_config) {
 		global $app, $conf;
 
+		$default_php_fpm = true;
+
 		if($data['old']['server_php_id'] != 0 && $data['old']['php'] != 'no'){
-			$default_php_fpm = false;
 			$tmp_php = $app->db->queryOneRecord('SELECT * FROM server_php WHERE server_php_id = ?', $data['old']['server_php_id']);
 			if($tmp_php) {
+				$default_php_fpm = false;
 				$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 				$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 				$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
 				if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 			}
-		} else {
-			$default_php_fpm = true;
 		}
 
 		if($default_php_fpm){
-- 
GitLab


From 32aeff8727b65d7e0d1e42fcfb6715b406f8f834 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 30 Nov 2020 13:58:18 -0700
Subject: [PATCH 158/441] set warn*recip in spamfilter_policy defaults

---
 install/sql/ispconfig3.sql | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 7753071f71..07ca7b8642 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -2541,12 +2541,12 @@ INSERT INTO `software_repo` (`software_repo_id`, `sys_userid`, `sys_groupid`, `s
 --
 
 INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(1, 1, 0, 'riud', 'riud', 'r', 'Non-paying', 'N', 'N', 'N', 'N', 'Y', 'Y', 'Y', 'N', 'Y', '', '', '', '', '', '', 3, 7, 10, 0, 0, '', '', '', '', 'N', 'N', 'N', '', '', '', '', '', '', '', 0, '', 'n', 6.00, 8.00, 'rewrite_subject', 12.00);
-INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(2, 1, 0, 'riud', 'riud', 'r', 'Uncensored', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, NULL, NULL, NULL, NULL, NULL, 3, 999, 999, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'n', 999.00, 999.00, 'rewrite_subject', 999.00);
-INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(3, 1, 0, 'riud', 'riud', 'r', 'Wants all spam', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, 3, 999, 999, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'n', 999.00, 999.00, 'rewrite_subject', 999.00);
-INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(4, 1, 0, 'riud', 'riud', 'r', 'Wants viruses', 'Y', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, 3, 6.9, 6.9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'y', 4.00, 6.00, 'rewrite_subject', 10.00);
-INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(5, 1, 0, 'riud', 'riud', 'r', 'Normal', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', '', '', '', '', '', '', 1, 4.5, 50, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '***SPAM***', NULL, NULL, 'y', 4.00, 6.00, 'rewrite_subject', 10.00);
-INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(6, 1, 0, 'riud', 'riud', 'r', 'Trigger happy', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, 3, 5, 5, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'y', 2.00, 4.00, 'rewrite_subject', 8.00);
-INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(7, 1, 0, 'riud', 'riud', 'r', 'Permissive', 'N', 'N', 'N', 'Y', 'N', 'N', 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, 3, 10, 20, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'n', 7.00, 10.00, 'rewrite_subject', 20.00);
+INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(2, 1, 0, 'riud', 'riud', 'r', 'Uncensored', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, NULL, NULL, NULL, NULL, NULL, 3, 999, 999, NULL, NULL, NULL, NULL, NULL, NULL, 'N', 'N', 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'n', 999.00, 999.00, 'rewrite_subject', 999.00);
+INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(3, 1, 0, 'riud', 'riud', 'r', 'Wants all spam', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, 3, 999, 999, NULL, NULL, NULL, NULL, NULL, NULL, 'N', 'N', 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'n', 999.00, 999.00, 'rewrite_subject', 999.00);
+INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(4, 1, 0, 'riud', 'riud', 'r', 'Wants viruses', 'Y', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, 3, 6.9, 6.9, NULL, NULL, NULL, NULL, NULL, NULL, 'N', 'N', 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'y', 4.00, 6.00, 'rewrite_subject', 10.00);
+INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(5, 1, 0, 'riud', 'riud', 'r', 'Normal', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', '', '', '', '', '', '', 1, 4.5, 50, 0, 0, NULL, NULL, NULL, NULL, 'N', 'N', 'N', NULL, NULL, NULL, NULL, NULL, '', '***SPAM***', NULL, NULL, 'y', 4.00, 6.00, 'rewrite_subject', 10.00);
+INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(6, 1, 0, 'riud', 'riud', 'r', 'Trigger happy', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, 3, 5, 5, NULL, NULL, NULL, NULL, NULL, NULL, 'N', 'N', 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'y', 2.00, 4.00, 'rewrite_subject', 8.00);
+INSERT INTO `spamfilter_policy` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `policy_name`, `virus_lover`, `spam_lover`, `banned_files_lover`, `bad_header_lover`, `bypass_virus_checks`, `bypass_spam_checks`, `bypass_banned_checks`, `bypass_header_checks`, `spam_modifies_subj`, `virus_quarantine_to`, `spam_quarantine_to`, `banned_quarantine_to`, `bad_header_quarantine_to`, `clean_quarantine_to`, `other_quarantine_to`, `spam_tag_level`, `spam_tag2_level`, `spam_kill_level`, `spam_dsn_cutoff_level`, `spam_quarantine_cutoff_level`, `addr_extension_virus`, `addr_extension_spam`, `addr_extension_banned`, `addr_extension_bad_header`, `warnvirusrecip`, `warnbannedrecip`, `warnbadhrecip`, `newvirus_admin`, `virus_admin`, `banned_admin`, `bad_header_admin`, `spam_admin`, `spam_subject_tag`, `spam_subject_tag2`, `message_size_limit`, `banned_rulenames`, `rspamd_greylisting`, `rspamd_spam_greylisting_level`, `rspamd_spam_tag_level`, `rspamd_spam_tag_method`, `rspamd_spam_kill_level`) VALUES(7, 1, 0, 'riud', 'riud', 'r', 'Permissive', 'N', 'N', 'N', 'Y', 'N', 'N', 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, 3, 10, 20, NULL, NULL, NULL, NULL, NULL, NULL, 'N', 'N', 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'n', 7.00, 10.00, 'rewrite_subject', 20.00);
 
 -- --------------------------------------------------------
 
-- 
GitLab


From 8dc9804c2b2ad47745aea60c39c5ba328549265b Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pdreissen@notes-it.nl>
Date: Sun, 6 Dec 2020 11:29:21 +0100
Subject: [PATCH 159/441] Missed commit on dashboard enhancements /
 progressbars

---
 interface/web/mail/user_quota_stats.php | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/interface/web/mail/user_quota_stats.php b/interface/web/mail/user_quota_stats.php
index 9699acafda..e907bdfb74 100644
--- a/interface/web/mail/user_quota_stats.php
+++ b/interface/web/mail/user_quota_stats.php
@@ -60,16 +60,10 @@ class list_action extends listform_actions {
 			$rec['percentage_sort'] = round(100 * $rec['used'] / $rec['quota']);
 			$rec['quota'] = round($rec['quota'] / 1048576, 4).' MB';
 		}
-
-
+		$rec['progressbar'] = $rec['percentage_sort'] > 100 ? 100 : $rec['percentage_sort'];
+		
 		$rec['used_sort'] = $rec['used'];
-/*
-		if($rec['used'] < 1544000) {
-			$rec['used'] = round($rec['used'] / 1024, 4).' KB';
-		} else {
-			$rec['used'] = round($rec['used'] / 1048576, 4).' MB';
-		}
-*/
+
 		$rec['used']=$app->functions->formatBytes($rec['used']);
 		if ($rec['used'] == 'NAN') $rec['used']='0 KB';
 
-- 
GitLab


From 3d008eeeeade5d2755cbe01386129fc4635fe807 Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pdreissen@notes-it.nl>
Date: Sun, 6 Dec 2020 15:58:04 +0100
Subject: [PATCH 160/441] fixes #5954, fixes type, cleanup, fixes no
 progressbar when unlimited quota

---
 .../web/mail/templates/user_quota_stats_list.htm      |  6 +++---
 .../themes/default/assets/stylesheets/ispconfig.css   | 11 +++++++++++
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/interface/web/mail/templates/user_quota_stats_list.htm b/interface/web/mail/templates/user_quota_stats_list.htm
index 58a374eabd..9341c3ef03 100644
--- a/interface/web/mail/templates/user_quota_stats_list.htm
+++ b/interface/web/mail/templates/user_quota_stats_list.htm
@@ -58,11 +58,11 @@
                     <td><a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var
                             name="quota"}</a></td>
                     <td colspan="2">
-                        {tmpl_if name="progressbar" op="!=" value="-1"}<div class="progress" style="height: 20px">
+                        {tmpl_if name="quota" op="!=" value="0"}<div class="progress" style="height: 20px">
                             <div class='progress-bar-striped progress-bar-{tmpl_if name="percentage_sort" op="<" value="50"}success{tmpl_elseif name="percentage_sort" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}'
-                                role="progressbar" style="width: {tmpl_var name=" progressbar"}%;"
+                                role="progressbar" style="width: {tmpl_var name="progressbar"}%;"
                                 aria-valuenow="{tmpl_var name=" percentage"}" aria-valuemin="0" aria-valuemax="100">
-                                {tmpl_var name="percentage"}</div>
+                                <span>{tmpl_var name="percentage"}</span</div>
                         </div>{/tmpl_if}
                     </td>
 
diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css
index d3b3506642..9c72186885 100644
--- a/interface/web/themes/default/assets/stylesheets/ispconfig.css
+++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css
@@ -284,11 +284,22 @@ body {
   height: 20px;
   background-color: #ababab;
   font-weight: bold;
+  position: relative;
 }
 
 .progress-bar-danger, .progress-bar-warning, .progress-bar-success {
     text-align: center;
     color: white;
+    display: list-item;
+}
+
+.progress span {
+  position: absolute;
+  left: 0;
+  width: 100%;
+  text-align: center;
+  z-index: 2;
+  color: white;
 }
 
 p.fieldset-legend {
-- 
GitLab


From f0d34f9e4f702e3f125c83864100cc08aba08375 Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pdreissen@notes-it.nl>
Date: Sun, 6 Dec 2020 21:24:44 +0100
Subject: [PATCH 161/441] other progressbars center values

---
 interface/web/dashboard/dashlets/templates/mailquota.htm    | 4 ++--
 interface/web/dashboard/dashlets/templates/quota.htm        | 2 +-
 interface/web/sites/templates/database_quota_stats_list.htm | 2 +-
 interface/web/sites/templates/user_quota_stats_list.htm     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm
index 91349d2af4..d80c619fee 100644
--- a/interface/web/dashboard/dashlets/templates/mailquota.htm
+++ b/interface/web/dashboard/dashlets/templates/mailquota.htm
@@ -18,7 +18,7 @@
 			  <td>{tmpl_var name='quota'}</td>
 			  {tmpl_if name="quota" op="!=" value="unlimited"}<td>
 			  <div class='progress'>
-				  <div class='progress-bar-striped progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width:{tmpl_var name="used_percentage"}%'>{tmpl_var name="used_percentage"}%
+				  <div class='progress-bar-striped progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width:{tmpl_var name="used_percentage"}%'><span>{tmpl_var name="used_percentage"}%</span>
 				  <span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'}</span>
 				  </div>
 			  </div>
@@ -27,4 +27,4 @@
 	  </tmpl_loop>
 	  </tbody>
 	</table>
-  </div>
\ No newline at end of file
+  </div>
diff --git a/interface/web/dashboard/dashlets/templates/quota.htm b/interface/web/dashboard/dashlets/templates/quota.htm
index 48435149b4..fe006c2087 100644
--- a/interface/web/dashboard/dashlets/templates/quota.htm
+++ b/interface/web/dashboard/dashlets/templates/quota.htm
@@ -21,7 +21,7 @@
 							<div class='progress-bar-striped progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}'
 								role='progressbar' aria-valuemin='0' aria-valuemax='100'
 								aria-valuenow='{tmpl_var name="used_percentage"}'
-								style='width:{tmpl_var name="used_percentage"}%'>{tmpl_var name="used_percentage"}%
+								style='width:{tmpl_var name="used_percentage"}%'><span>{tmpl_var name="used_percentage"}%</span>
 								<span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var
 									name='soft'}</span>
 							</div>
diff --git a/interface/web/sites/templates/database_quota_stats_list.htm b/interface/web/sites/templates/database_quota_stats_list.htm
index 9982e6e601..28f4bbd11d 100644
--- a/interface/web/sites/templates/database_quota_stats_list.htm
+++ b/interface/web/sites/templates/database_quota_stats_list.htm
@@ -37,7 +37,7 @@
 							<td><a href="#" data-load-content="sites/database_edit.php?id={tmpl_var name='id'}">{tmpl_var name="used"}</a></td>
 							<td><a href="#" data-load-content="sites/database_edit.php?id={tmpl_var name='id'}">{tmpl_var name="quota"}</a></td>
 							<td colspan="2">{tmpl_if name="progressbar" op="!=" value="-1"}<div class="progress" style="height: 20px">
-								<div class='progress-bar-striped progress-bar-{tmpl_if name="percentage" op="<" value="50"}success{tmpl_elseif name="percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role="progressbar" style="width: {tmpl_var name="progressbar"}%;" aria-valuenow="{tmpl_var name="percentage"}" aria-valuemin="0" aria-valuemax="100">{tmpl_var name="percentage"}</div>
+								<div class='progress-bar-striped progress-bar-{tmpl_if name="percentage" op="<" value="50"}success{tmpl_elseif name="percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role="progressbar" style="width: {tmpl_var name="progressbar"}%;" aria-valuenow="{tmpl_var name="percentage"}" aria-valuemin="0" aria-valuemax="100"><span>{tmpl_var name="percentage"}</span></div>
 						</div>{/tmpl_if}
 </td>
 
diff --git a/interface/web/sites/templates/user_quota_stats_list.htm b/interface/web/sites/templates/user_quota_stats_list.htm
index f5a6c0fd77..c7265c0111 100644
--- a/interface/web/sites/templates/user_quota_stats_list.htm
+++ b/interface/web/sites/templates/user_quota_stats_list.htm
@@ -40,7 +40,7 @@
                             <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="hard"}</a></td>
                             <td><a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="files"}</a></td>
                             <td colspan="2">{tmpl_if name="progressbar" op="!=" value="-1"}<div class="progress" style="height: 20px">
-                                <div class='progress-bar-striped progress-bar-{tmpl_if name="percentage" op="<" value="50"}success{tmpl_elseif name="percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role="progressbar" style="width: {tmpl_var name="progressbar"}%;" aria-valuenow="{tmpl_var name="percentage"}" aria-valuemin="0" aria-valuemax="100">{tmpl_var name="percentage"}%</div>
+                                <div class='progress-bar-striped progress-bar-{tmpl_if name="percentage" op="<" value="50"}success{tmpl_elseif name="percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role="progressbar" style="width: {tmpl_var name="progressbar"}%;" aria-valuenow="{tmpl_var name="percentage"}" aria-valuemin="0" aria-valuemax="100"><span>{tmpl_var name="percentage"}%</span></div>
                         </div>{/tmpl_if}</td>
 
                         </tr>
-- 
GitLab


From f6fbe2a8abfdaacfd5b9750e7050fee1b23f77f3 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 9 Dec 2020 09:10:09 +0100
Subject: [PATCH 162/441] Apply 1 suggestion(s) to 1 file(s)

---
 server/lib/classes/monitor_tools.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index 3783452aac..9fd9d3f8f3 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -650,7 +650,7 @@ class monitor_tools {
 					$log = 'Unable to read ' . $logfile;
 				}
 			}
-		}else{
+		} else {
 			if($journalmatch != ''){
 				$log = $this->_getOutputFromExecCommand('journalctl -n 100 --no-pager ' . escapeshellcmd($journalmatch));
 			}else{
-- 
GitLab


From 6f29d682ca8fab6bd3a53d486c63b74121854296 Mon Sep 17 00:00:00 2001
From: Helmo <rink@initfour.nl>
Date: Wed, 9 Dec 2020 09:16:26 +0100
Subject: [PATCH 163/441] Apply 1 suggestion(s) to 1 file(s)

---
 interface/web/dashboard/ajax_get_json.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/interface/web/dashboard/ajax_get_json.php b/interface/web/dashboard/ajax_get_json.php
index ddedf0c39c..76f284352b 100644
--- a/interface/web/dashboard/ajax_get_json.php
+++ b/interface/web/dashboard/ajax_get_json.php
@@ -196,7 +196,8 @@ function _search($module, $section, $additional_sql = '', $params = ''){
 			if(is_file($lng_file)) include $lng_file;
 
 			// Get the real result count, without LIMIT.
-			$sql_real_rows = preg_replace(array('/\*/', "/ LIMIT.*$/"), array('COUNT(*) as c', ''), $sql);
+			$sql_real_rows = "SELECT COUNT(*) as `c` FROM ?? WHERE ".$where_clause.$authsql.$order_clause;
+
 			$result_count = $app->db->queryOneRecord($sql_real_rows, $db_table);
 
 			$result_array['cheader'] = array('title' => $category_title,
-- 
GitLab


From f17a975d39192630bdfc14744965fb23f91eceee Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 9 Dec 2020 09:41:45 +0100
Subject: [PATCH 164/441] Apply 1 suggestion(s) to 1 file(s)

---
 server/mods-available/remoteaction_core_module.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/mods-available/remoteaction_core_module.inc.php b/server/mods-available/remoteaction_core_module.inc.php
index bdaba5cb06..eea8fd6941 100644
--- a/server/mods-available/remoteaction_core_module.inc.php
+++ b/server/mods-available/remoteaction_core_module.inc.php
@@ -179,7 +179,7 @@ class remoteaction_core_module {
 		//TODO : change this when distribution information has been integrated into server record
 		if(file_exists('/etc/gentoo-release')) {
 			exec("glsa-check -f --nocolor affected");
-		}elseif(file_exists('/etc/redhat-release')) {
+		} elseif(file_exists('/etc/redhat-release')) {
 			exec("dnf -y update");
 		}
 		else {
-- 
GitLab


From acfe7552fa6401142636e25d376fd8b0964929ef Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Wed, 9 Dec 2020 12:17:43 +0100
Subject: [PATCH 165/441] Add values for xfer, also_notify, and dnssec_wanted
 (#5934)

---
 install/sql/ispconfig3.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 67f0f3bdcb..1059a11059 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -2507,7 +2507,7 @@ INSERT INTO `country` (`iso`, `name`, `printable_name`, `iso3`, `numcode`, `eu`)
 -- Dumping data for table `dns_template`
 --
 
-INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `name`, `fields`, `template`, `visible`) VALUES (1, 1, 1, 'riud', 'riud', '', 'Default', 'DOMAIN,IP,NS1,NS2,EMAIL,DKIM,DNSSEC', '[ZONE]\norigin={DOMAIN}.\nns={NS1}.\nmbox={EMAIL}.\nrefresh=7200\nretry=540\nexpire=604800\nminimum=3600\nttl=3600\ndnssec_algo=ECDSAP256SHA256\n\n[DNS_RECORDS]\nA|{DOMAIN}.|{IP}|0|3600\nA|www|{IP}|0|3600\nA|mail|{IP}|0|3600\nNS|{DOMAIN}.|{NS1}.|0|3600\nNS|{DOMAIN}.|{NS2}.|0|3600\nMX|{DOMAIN}.|mail.{DOMAIN}.|10|3600\nTXT|{DOMAIN}.|v=spf1 mx a ~all|0|3600', 'y');
+INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `name`, `fields`, `template`, `visible`) VALUES (1, 1, 1, 'riud', 'riud', '', 'Default', 'DOMAIN,IP,NS1,NS2,EMAIL,DKIM,DNSSEC', '[ZONE]\norigin={DOMAIN}.\nns={NS1}.\nmbox={EMAIL}.\nrefresh=7200\nretry=540\nexpire=604800\nminimum=3600\nttl=3600\nxfer=\nalso_notify=\ndnssec_wanted=N\ndnssec_algo=ECDSAP256SHA256\n\n[DNS_RECORDS]\nA|{DOMAIN}.|{IP}|0|3600\nA|www|{IP}|0|3600\nA|mail|{IP}|0|3600\nNS|{DOMAIN}.|{NS1}.|0|3600\nNS|{DOMAIN}.|{NS2}.|0|3600\nMX|{DOMAIN}.|mail.{DOMAIN}.|10|3600\nTXT|{DOMAIN}.|v=spf1 mx a ~all|0|3600', 'y');
 
 
 -- --------------------------------------------------------
-- 
GitLab


From 3bf6572db555d96d8424a6aae81fa5927bd5a5f0 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Wed, 9 Dec 2020 12:30:48 +0100
Subject: [PATCH 166/441] Set default for dnssec_wanted (#5960)

---
 interface/web/dns/dns_wizard.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php
index 4aa0644020..bef4422ef3 100644
--- a/interface/web/dns/dns_wizard.php
+++ b/interface/web/dns/dns_wizard.php
@@ -341,7 +341,7 @@ if($_POST['create'] == 1) {
 	$section = '';
 	$vars = array();
 	$vars['xfer']='';
-	$vars['dnssec_wanted']='';
+	$vars['dnssec_wanted']='N';
 	$vars['dnssec_algo']='ECDSAP256SHA256';
 	$dns_rr = array();
 	foreach($tpl_rows as $row) {
-- 
GitLab


From 59df9256a0eac577349ee33b3843bac9714c190a Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Wed, 9 Dec 2020 12:41:47 +0100
Subject: [PATCH 167/441] Replace @ to example.com. in data field (#5943)

---
 interface/web/dns/dns_edit_base.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/interface/web/dns/dns_edit_base.php b/interface/web/dns/dns_edit_base.php
index a94bd54946..843f377db5 100644
--- a/interface/web/dns/dns_edit_base.php
+++ b/interface/web/dns/dns_edit_base.php
@@ -117,6 +117,9 @@ class dns_page_action extends tform_actions {
 		if($this->dataRecord["name"] === '@') {
 			$this->dataRecord["name"] = $soa['origin'];
 		}
+		if($this->dataRecord["data"] === '@') {
+			$this->dataRecord["data"] = $soa['origin'];
+		}
 
 		// Replace * to *.example.com.
 		if($this->dataRecord["name"] === '*') {
-- 
GitLab


From 9692086b47ce2db97db05a344c13528ce37c000b Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Wed, 9 Dec 2020 13:39:05 +0100
Subject: [PATCH 168/441] Show backup stats to admin (#5962)

---
 interface/web/sites/lib/module.conf.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/sites/lib/module.conf.php b/interface/web/sites/lib/module.conf.php
index 775a704873..5f1a25a449 100644
--- a/interface/web/sites/lib/module.conf.php
+++ b/interface/web/sites/lib/module.conf.php
@@ -213,7 +213,7 @@ $items[] = array(   'title'   => 'Database quota',
 	'link'    => 'sites/database_quota_stats.php',
 	'html_id' => 'databse_quota_stats');
 
-if($app->auth->get_client_limit($userid, 'backup') == 'y') {
+if($app->auth->get_client_limit($userid, 'backup') != 'n') {
         $items[] = array (
                 'title'   => 'Backup Stats',
                 'target'  => 'content',
-- 
GitLab


From d0a303be9095202297080f625ab4048767507106 Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pdreissen@notes-it.nl>
Date: Wed, 9 Dec 2020 13:55:21 +0100
Subject: [PATCH 169/441] Fix for database quota view, updates ispconfig.css
 version Closes #5961

---
 interface/web/sites/database_quota_stats.php                | 4 ++--
 interface/web/sites/templates/database_quota_stats_list.htm | 4 ++--
 interface/web/themes/default/templates/main.tpl.htm         | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/interface/web/sites/database_quota_stats.php b/interface/web/sites/database_quota_stats.php
index df17928e36..c256549ff4 100644
--- a/interface/web/sites/database_quota_stats.php
+++ b/interface/web/sites/database_quota_stats.php
@@ -76,7 +76,7 @@ class list_action extends listform_actions {
 				$rec['percentage'] = '';
 				$rec['progressbar'] = -1;
 			} else {
-				if ($rec['used'] > 0 ) $rec['percentage'] = round(100 * intval($rec['used']) / ( intval($rec['quota'])*1024*1024) ).'%';
+				if ($rec['used'] > 0 ) $rec['percentage'] = round(100 * intval($rec['used']) / ( intval($rec['quota'])*1024*1024) );
 				$rec['quota'] .= ' MB';
 			}
 
@@ -94,7 +94,7 @@ class list_action extends listform_actions {
 			$rec['quota'] = $rec['database_quota'];
 		}
 		$rec['id'] = $rec[$this->idx_key];
-
+		$rec['progressbar_value'] = $rec['percentage'] >= 100 ? 100 : $rec['percentage'];
 		return $rec;
 	}
 
diff --git a/interface/web/sites/templates/database_quota_stats_list.htm b/interface/web/sites/templates/database_quota_stats_list.htm
index 28f4bbd11d..1c30e14609 100644
--- a/interface/web/sites/templates/database_quota_stats_list.htm
+++ b/interface/web/sites/templates/database_quota_stats_list.htm
@@ -36,8 +36,8 @@
 							<td><a href="#" data-load-content="sites/database_edit.php?id={tmpl_var name='id'}">{tmpl_var name="client"}</a></td>
 							<td><a href="#" data-load-content="sites/database_edit.php?id={tmpl_var name='id'}">{tmpl_var name="used"}</a></td>
 							<td><a href="#" data-load-content="sites/database_edit.php?id={tmpl_var name='id'}">{tmpl_var name="quota"}</a></td>
-							<td colspan="2">{tmpl_if name="progressbar" op="!=" value="-1"}<div class="progress" style="height: 20px">
-								<div class='progress-bar-striped progress-bar-{tmpl_if name="percentage" op="<" value="50"}success{tmpl_elseif name="percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role="progressbar" style="width: {tmpl_var name="progressbar"}%;" aria-valuenow="{tmpl_var name="percentage"}" aria-valuemin="0" aria-valuemax="100"><span>{tmpl_var name="percentage"}</span></div>
+							<td colspan="2">{tmpl_if name="progressbar" op="!=" value="-1"}<div class="progress">
+								<div class='progress-bar-striped progress-bar-{tmpl_if name="percentage" op="<" value="50"}success{tmpl_elseif name="percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role="progressbar" style="width: {tmpl_var name="progressbar_value"}%;" aria-valuenow="{tmpl_var name="percentage"}" aria-valuemin="0" aria-valuemax="100"><span>{tmpl_var name="percentage"}%</span></div>
 						</div>{/tmpl_if}
 </td>
 
diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm
index e04bf29081..b3630f6ecf 100644
--- a/interface/web/themes/default/templates/main.tpl.htm
+++ b/interface/web/themes/default/templates/main.tpl.htm
@@ -22,7 +22,7 @@
 
   <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/bootstrap.min.css' />
   <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/fonts.min.css' />
-  <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/ispconfig.css?ver=3.2' />
+  <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/ispconfig.css?ver=3.2.2' />
   <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/pushy.min.css' />
   <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/bootstrap-datetimepicker.min.css' />
   <link rel='stylesheet' href='themes/<tmpl_var name='current_theme'>/assets/stylesheets/responsive.min.css' />
-- 
GitLab


From 0b137df268ae6c5f6bc97c3b18fbea29b2ae8009 Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pdreissen@notes-it.nl>
Date: Wed, 9 Dec 2020 15:43:31 +0100
Subject: [PATCH 170/441] Firefox list style issue

---
 interface/web/themes/default/assets/stylesheets/ispconfig.css | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css
index 9c72186885..9d44048e82 100644
--- a/interface/web/themes/default/assets/stylesheets/ispconfig.css
+++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css
@@ -290,7 +290,7 @@ body {
 .progress-bar-danger, .progress-bar-warning, .progress-bar-success {
     text-align: center;
     color: white;
-    display: list-item;
+    height: 100%;
 }
 
 .progress span {
-- 
GitLab


From 335113ab93b56ce239ad375a2eb97ba93040fd6a Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 25 Nov 2020 14:24:53 -0700
Subject: [PATCH 171/441] fix cleanup of untracked backup files

---
 server/lib/classes/backup.inc.php | 84 +++++++++++++++++++------------
 1 file changed, 53 insertions(+), 31 deletions(-)

diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php
index e7333356b4..128a3993c0 100644
--- a/server/lib/classes/backup.inc.php
+++ b/server/lib/classes/backup.inc.php
@@ -721,7 +721,7 @@ class backup
     }
 
     /**
-     * Garbage collection: deletes records from database about files that do not exist and deletes untracked files.
+     * Garbage collection: deletes records from database about files that do not exist and deletes untracked files and cleans up backup download directories.
      * The backup directory must be mounted before calling this method.
      * @param int $server_id
      * @param string|null $backup_type if defined then process only backups of this type
@@ -740,25 +740,32 @@ class backup
         $backup_dir = trim($server_config['backup_dir']);
         $sql = "SELECT * FROM web_backup WHERE server_id = ?";
         $sql_domains = "SELECT domain_id,document_root,system_user,system_group,backup_interval FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')";
+        $sql_domains_with_backups = "SELECT domain_id,document_root,system_user,system_group,backup_interval FROM web_domain WHERE domain_id in (SELECT * FROM web_backup WHERE server_id = ?" . ((!empty($backup_type)) ? " AND backup_type = ?" : "") . ") AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')";
         array_push($args, $server_id);
         array_push($args_domains, $server_id);
+        array_push($args_domains_with_backups, $server_id);
         if (!empty($backup_type)) {
             $sql .= " AND backup_type = ?";
             array_push($args, $backup_type);
+            array_push($args_domains_with_backups, $backup_type);
         }
         if (!empty($domain_id)) {
             $sql .= " AND parent_domain_id = ?";
             $sql_domains .= " AND domain_id = ?";
+            $sql_domains_with_backups .= " AND domain_id = ?";
             array_push($args, $domain_id);
             array_push($args_domains, $domain_id);
+            array_push($args_domains_with_backups, $domain_id);
         }
         array_unshift($args, $sql);
         array_unshift($args_domains, $sql_domains);
+        array_unshift($args_domains_with_backups, $sql_domains);
 
         $db_list = array($app->db);
         if ($app->db->dbHost != $app->dbmaster->dbHost)
             array_push($db_list, $app->dbmaster);
 
+	// Cleanup web_backup entries for non-existent backup files
         foreach ($db_list as $db) {
             $backups = call_user_func_array(array($db, "queryAllRecords"), $args);
             foreach ($backups as $backup) {
@@ -771,27 +778,42 @@ class backup
             }
         }
 
-        foreach ($db_list as $db) {
-            $domains = call_user_func_array(array($db, "queryAllRecords"), $args_domains);
-            foreach ($domains as $rec) {
-                $domain_id = $rec['domain_id'];
-                $domain_backup_dir = $backup_dir . '/web' . $domain_id;
-                $files = self::get_files($domain_backup_dir);
-
-                //Delete files that are in backup directory, but do not exist in database
-                if (!empty($files)) {
-                    $sql = "SELECT backup_id,filename FROM web_backup WHERE server_id = ? AND parent_domain_id = ?";
+	// Cleanup backup files with missing web_backup entries (runs on all servers)
+        $domains = $app->dbmaster->queryAllRecords($args_domains_with_backups);
+        foreach ($domains as $rec) {
+            $domain_id = $rec['domain_id'];
+            $domain_backup_dir = $backup_dir . '/web' . $domain_id;
+            $files = self::get_files($domain_backup_dir);
+
+            if (!empty($files)) {
+                // leave out server_id here, in case backup storage is shared between servers
+                $sql = "SELECT backup_id, filename FROM web_backup WHERE parent_domain_id = ?";
+                foreach ($db_list as $db) {
+                    $backup_record_exists = false;
                     $backups = $db->queryAllRecords($sql, $server_id, $domain_id);
                     foreach ($backups as $backup) {
-                        if (!in_array($backup['filename'],$files)) {
-                            $backup_file = $backup_dir . '/web' . $domain_id . '/' . $backup['filename'];
-                            $app->log('Backup file ' . $backup_file . ' is not contained in database, deleting this file from disk', LOGLEVEL_DEBUG);
-                            @unlink($backup_file);
+                        if (in_array($backup['filename'],$files)) {
+                            $backup_record_exists = true;
                         }
                     }
+                    if (!$backup_record_exists) {
+                        $backup_file = $backup_dir . '/web' . $domain_id . '/' . $backup['filename'];
+                        $app->log('Backup file ' . $backup_file . ' is not contained in database, deleting this file from disk', LOGLEVEL_DEBUG);
+                        @unlink($backup_file);
+                    }
                 }
+            }
+        }
 
-                //Remove backupdir symlink and create as directory instead
+	// This cleanup only runs on web servers
+        $domains = $app->db->queryAllRecords($args_domains);
+        foreach ($domains as $rec) {
+            $domain_id = $rec['domain_id'];
+            $domain_backup_dir = $backup_dir . '/web' . $domain_id;
+            $files = self::get_files($domain_backup_dir);
+
+            // Remove backupdir symlink and create as directory instead
+            if (is_link($backup_download_dir) || !is_dir($backup_download_dir)) {
                 $web_path = $rec['document_root'];
                 $app->system->web_folder_protection($web_path, false);
 
@@ -806,23 +828,23 @@ class backup
                 }
 
                 $app->system->web_folder_protection($web_path, true);
+            }
 
-                // delete old files from backup download dir (/var/www/example.com/backup)
-                if (is_dir($backup_download_dir)) {
-                    $dir_handle = dir($backup_download_dir);
-                    $now = time();
-                    while (false !== ($entry = $dir_handle->read())) {
-                        $full_filename = $backup_download_dir . '/' . $entry;
-                        if ($entry != '.' && $entry != '..' && is_file($full_filename)) {
-                            // delete files older than 3 days
-                            if ($now - filemtime($full_filename) >= 60 * 60 * 24 * 3) {
-                                $app->log('Backup file ' . $full_filename . ' is too old, deleting this file from disk', LOGLEVEL_DEBUG);
-                                @unlink($full_filename);
-                            }
+            // delete old files from backup download dir (/var/www/example.com/backup)
+            if (is_dir($backup_download_dir)) {
+                $dir_handle = dir($backup_download_dir);
+                $now = time();
+                while (false !== ($entry = $dir_handle->read())) {
+                    $full_filename = $backup_download_dir . '/' . $entry;
+                    if ($entry != '.' && $entry != '..' && is_file($full_filename)) {
+                        // delete files older than 3 days
+                        if ($now - filemtime($full_filename) >= 60 * 60 * 24 * 3) {
+                            $app->log('Backup file ' . $full_filename . ' is too old, deleting this file from disk', LOGLEVEL_DEBUG);
+                            @unlink($full_filename);
                         }
                     }
-                    $dir_handle->close();
                 }
+                $dir_handle->close();
             }
         }
     }
@@ -1419,7 +1441,7 @@ class backup
                 $ok = self::make_web_backup($rec, $backup_job);
                 break;
             case 'mysql':
-				$rec['server_id'] = $server_id;
+                $rec['server_id'] = $server_id;
                 $ok = self::make_database_backup($rec, $backup_job);
                 break;
             default:
@@ -1460,7 +1482,7 @@ class backup
             }
         }
 
-		$sql = "SELECT DISTINCT d.*, db.server_id as `server_id` FROM web_database as db INNER JOIN web_domain as d ON (d.domain_id = db.parent_domain_id) WHERE db.server_id = ? AND db.active = 'y' AND d.backup_interval != 'none' AND d.backup_interval != ''";
+	$sql = "SELECT DISTINCT d.*, db.server_id as `server_id` FROM web_database as db INNER JOIN web_domain as d ON (d.domain_id = db.parent_domain_id) WHERE db.server_id = ? AND db.active = 'y' AND d.backup_interval != 'none' AND d.backup_interval != ''";
         $databases = $app->dbmaster->queryAllRecords($sql, $server_id);
 
         foreach ($databases as $database) {
-- 
GitLab


From 17a4a5d4a6cb8b23e9ac6fe1b1cc0eea5cea200b Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 7 Dec 2020 07:42:13 -0700
Subject: [PATCH 172/441] log directory not automatically excluded from backups

---
 server/lib/classes/backup.inc.php | 1 -
 1 file changed, 1 deletion(-)

diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php
index 128a3993c0..1685f8da51 100644
--- a/server/lib/classes/backup.inc.php
+++ b/server/lib/classes/backup.inc.php
@@ -1315,7 +1315,6 @@ class backup
 	$backup_excludes = array(
 		escapeshellarg('./backup\*'),
 		'./bin', './dev', './etc', './lib', './lib32', './lib64', './opt', './sys', './usr', './var', './proc', './run', './tmp',
-		'./log',
 		);
 
         $b_excludes = explode(',', trim($web_domain['backup_excludes']));
-- 
GitLab


From d296003668c50cb66a88ab724e784c15cb1b554c Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 7 Dec 2020 11:11:11 -0700
Subject: [PATCH 173/441] fix query calls, bad escaping of db name, and include
 zip fixes from !1345

---
 server/lib/classes/backup.inc.php | 63 ++++++++++++++++++-------------
 1 file changed, 37 insertions(+), 26 deletions(-)

diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php
index 1685f8da51..486493a20e 100644
--- a/server/lib/classes/backup.inc.php
+++ b/server/lib/classes/backup.inc.php
@@ -736,11 +736,12 @@ class backup
         //First check that all records in database have related files and delete records without files on disk
         $args = array();
         $args_domains = array();
+        $args_domains_with_backups = array();
         $server_config = $app->getconf->get_server_config($server_id, 'server');
         $backup_dir = trim($server_config['backup_dir']);
         $sql = "SELECT * FROM web_backup WHERE server_id = ?";
         $sql_domains = "SELECT domain_id,document_root,system_user,system_group,backup_interval FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')";
-        $sql_domains_with_backups = "SELECT domain_id,document_root,system_user,system_group,backup_interval FROM web_domain WHERE domain_id in (SELECT * FROM web_backup WHERE server_id = ?" . ((!empty($backup_type)) ? " AND backup_type = ?" : "") . ") AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')";
+        $sql_domains_with_backups = "SELECT domain_id,document_root,system_user,system_group,backup_interval FROM web_domain WHERE domain_id in (SELECT parent_domain_id FROM web_backup WHERE server_id = ?" . ((!empty($backup_type)) ? " AND backup_type = ?" : "") . ") AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')";
         array_push($args, $server_id);
         array_push($args_domains, $server_id);
         array_push($args_domains_with_backups, $server_id);
@@ -759,7 +760,7 @@ class backup
         }
         array_unshift($args, $sql);
         array_unshift($args_domains, $sql_domains);
-        array_unshift($args_domains_with_backups, $sql_domains);
+        array_unshift($args_domains_with_backups, $sql_domains_with_backups);
 
         $db_list = array($app->db);
         if ($app->db->dbHost != $app->dbmaster->dbHost)
@@ -779,7 +780,7 @@ class backup
         }
 
 	// Cleanup backup files with missing web_backup entries (runs on all servers)
-        $domains = $app->dbmaster->queryAllRecords($args_domains_with_backups);
+        $domains = call_user_func_array(array($app->dbmaster, "queryAllRecords"), $args_domains_with_backups);
         foreach ($domains as $rec) {
             $domain_id = $rec['domain_id'];
             $domain_backup_dir = $backup_dir . '/web' . $domain_id;
@@ -788,29 +789,29 @@ class backup
             if (!empty($files)) {
                 // leave out server_id here, in case backup storage is shared between servers
                 $sql = "SELECT backup_id, filename FROM web_backup WHERE parent_domain_id = ?";
+		$untracked_backup_files = array();
                 foreach ($db_list as $db) {
-                    $backup_record_exists = false;
-                    $backups = $db->queryAllRecords($sql, $server_id, $domain_id);
+                    $backups = $db->queryAllRecords($sql, $domain_id);
                     foreach ($backups as $backup) {
-                        if (in_array($backup['filename'],$files)) {
-                            $backup_record_exists = true;
+                        if (!in_array($backup['filename'],$files)) {
+                            $untracked_backup_files[] = $backup['filename'];
                         }
                     }
-                    if (!$backup_record_exists) {
-                        $backup_file = $backup_dir . '/web' . $domain_id . '/' . $backup['filename'];
-                        $app->log('Backup file ' . $backup_file . ' is not contained in database, deleting this file from disk', LOGLEVEL_DEBUG);
-                        @unlink($backup_file);
-                    }
+                }
+		array_unique( $untracked_backup_files );
+		foreach ($untracked_backup_files as $f) {
+                    $backup_file = $backup_dir . '/web' . $domain_id . '/' . $f;
+                    $app->log('Backup file ' . $backup_file . ' is not contained in database, deleting this file from disk', LOGLEVEL_DEBUG);
+                    @unlink($backup_file);
                 }
             }
         }
 
 	// This cleanup only runs on web servers
-        $domains = $app->db->queryAllRecords($args_domains);
+        $domains = call_user_func_array(array($app->db, "queryAllRecords"), $args_domains);
         foreach ($domains as $rec) {
             $domain_id = $rec['domain_id'];
             $domain_backup_dir = $backup_dir . '/web' . $domain_id;
-            $files = self::get_files($domain_backup_dir);
 
             // Remove backupdir symlink and create as directory instead
             if (is_link($backup_download_dir) || !is_dir($backup_download_dir)) {
@@ -836,7 +837,7 @@ class backup
                 $now = time();
                 while (false !== ($entry = $dir_handle->read())) {
                     $full_filename = $backup_download_dir . '/' . $entry;
-                    if ($entry != '.' && $entry != '..' && is_file($full_filename)) {
+                    if ($entry != '.' && $entry != '..' && is_file($full_filename) && ! is_link($full_filename)) {
                         // delete files older than 3 days
                         if ($now - filemtime($full_filename) >= 60 * 60 * 24 * 3) {
                             $app->log('Backup file ' . $full_filename . ' is too old, deleting this file from disk', LOGLEVEL_DEBUG);
@@ -919,16 +920,24 @@ class backup
      * Generates excludes list for compressors
      * @param string[] $backup_excludes
      * @param string $arg
+     * @param string $pre
+     * @param string $post
      * @return string
      * @author Ramil Valitov <ramilvalitov@gmail.com>
      */
-    protected static function generateExcludeList($backup_excludes, $arg)
+    protected static function generateExcludeList($backup_excludes, $arg, $pre='', $post='')
     {
-        $excludes = implode(" " . $arg, $backup_excludes);
-        if (!empty($excludes)) {
-            $excludes = $arg . $excludes;
+        $excludes = "";
+        foreach ($backup_excludes as $ex) {
+	    # pass through escapeshellarg if not already done
+            if ( preg_match( "/^'.+'$/", $ex ) ) {
+                $excludes .= "${arg}${pre}${ex}${post} ";
+            } else {
+                $excludes .= "${arg}" . escapeshellarg("${pre}${ex}${post}") . " ";
+            }
         }
-        return $excludes;
+
+        return trim( $excludes );
     }
 
     /**
@@ -987,12 +996,14 @@ class backup
                 if (!empty($password)) {
                     $zip_options .= ' --password ' . escapeshellarg($password);
                 }
+                $excludes = self::generateExcludeList($backup_excludes, '-x ');
+                $excludes .= " " . self::generateExcludeList($backup_excludes, '-x ', '', '/*');
                 if ($backup_mode == 'user_zip') {
                     //Standard casual behaviour of ISPConfig
-                    $app->system->exec_safe($find_user_files . ' | zip ' . $zip_options . ' -b ? ' . $excludes . ' --symlinks ? -@', $web_path, $web_user, $web_group, $http_server_user, $backup_tmp, $web_backup_dir . '/' . $web_backup_file);
+                    $app->system->exec_safe($find_user_files . ' | zip ' . $zip_options . ' -b ? --symlinks ? -@ ' . $excludes, $web_path, $web_user, $web_group, $http_server_user, $backup_tmp, $web_backup_dir . '/' . $web_backup_file);
                 } else {
-                    //Use cd to have a correct directory structure inside the archive, extra options to zip hidden (dot) files
-                    $app->system->exec_safe('cd ? && zip ' . $zip_options . ' -b ? ' . $excludes . ' --symlinks -r ? * .* -x "../*"', $web_path, $backup_tmp, $web_backup_dir . '/' . $web_backup_file);
+                    //Use cd to have a correct directory structure inside the archive, zip  current directory "." to include hidden (dot) files
+                    $app->system->exec_safe('cd ? && zip ' . $zip_options . ' -b ? --symlinks -r ? . ' . $excludes, $web_path, $backup_tmp, $web_backup_dir . '/' . $web_backup_file);
                 }
                 $exit_code = $app->system->last_exec_retcode();
                 // zip can return 12(due to harmless warnings) and still create valid backups
@@ -1237,8 +1248,8 @@ class backup
                 //* Remove old backups
                 self::backups_garbage_collection($server_id, 'mysql', $domain_id);
                 $prefix_list = array(
-                            'db_'.escapeshellarg($db_name).'_',
-                            'manual-db_'.escapeshellarg($db_name).'_',
+                            "db_${db_name}_",
+                            "manual-db_${db_name}_",
                         );
                 self::clearBackups($server_id, $domain_id, intval($rec['backup_copies']), $db_backup_dir, $prefix_list);
             } else {
@@ -1313,7 +1324,7 @@ class backup
 
 	# default exclusions
 	$backup_excludes = array(
-		escapeshellarg('./backup\*'),
+		'./backup*',
 		'./bin', './dev', './etc', './lib', './lib32', './lib64', './opt', './sys', './usr', './var', './proc', './run', './tmp',
 		);
 
-- 
GitLab


From 3a0383c45fa9e3763855cc6beb39123349caceb5 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 9 Dec 2020 10:16:10 -0700
Subject: [PATCH 174/441] nicer calling syntax for queryAllRecords

---
 server/lib/classes/backup.inc.php | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php
index 486493a20e..cafff35f18 100644
--- a/server/lib/classes/backup.inc.php
+++ b/server/lib/classes/backup.inc.php
@@ -734,33 +734,30 @@ class backup
         global $app;
 
         //First check that all records in database have related files and delete records without files on disk
-        $args = array();
-        $args_domains = array();
-        $args_domains_with_backups = array();
+        $args_sql = array();
+        $args_sql_domains = array();
+        $args_sql_domains_with_backups = array();
         $server_config = $app->getconf->get_server_config($server_id, 'server');
         $backup_dir = trim($server_config['backup_dir']);
         $sql = "SELECT * FROM web_backup WHERE server_id = ?";
         $sql_domains = "SELECT domain_id,document_root,system_user,system_group,backup_interval FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')";
         $sql_domains_with_backups = "SELECT domain_id,document_root,system_user,system_group,backup_interval FROM web_domain WHERE domain_id in (SELECT parent_domain_id FROM web_backup WHERE server_id = ?" . ((!empty($backup_type)) ? " AND backup_type = ?" : "") . ") AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')";
-        array_push($args, $server_id);
-        array_push($args_domains, $server_id);
-        array_push($args_domains_with_backups, $server_id);
+        array_push($args_sql, $server_id);
+        array_push($args_sql_domains, $server_id);
+        array_push($args_sql_domains_with_backups, $server_id);
         if (!empty($backup_type)) {
             $sql .= " AND backup_type = ?";
-            array_push($args, $backup_type);
-            array_push($args_domains_with_backups, $backup_type);
+            array_push($args_sql, $backup_type);
+            array_push($args_sql_domains_with_backups, $backup_type);
         }
         if (!empty($domain_id)) {
             $sql .= " AND parent_domain_id = ?";
             $sql_domains .= " AND domain_id = ?";
             $sql_domains_with_backups .= " AND domain_id = ?";
-            array_push($args, $domain_id);
-            array_push($args_domains, $domain_id);
-            array_push($args_domains_with_backups, $domain_id);
+            array_push($args_sql, $domain_id);
+            array_push($args_sql_domains, $domain_id);
+            array_push($args_sql_domains_with_backups, $domain_id);
         }
-        array_unshift($args, $sql);
-        array_unshift($args_domains, $sql_domains);
-        array_unshift($args_domains_with_backups, $sql_domains_with_backups);
 
         $db_list = array($app->db);
         if ($app->db->dbHost != $app->dbmaster->dbHost)
@@ -768,7 +765,7 @@ class backup
 
 	// Cleanup web_backup entries for non-existent backup files
         foreach ($db_list as $db) {
-            $backups = call_user_func_array(array($db, "queryAllRecords"), $args);
+            $backups = $app->db->queryAllRecords($sql, true, $args_sql);
             foreach ($backups as $backup) {
                 $backup_file = $backup_dir . '/web' . $backup['parent_domain_id'] . '/' . $backup['filename'];
                 if (!is_file($backup_file)) {
@@ -780,7 +777,7 @@ class backup
         }
 
 	// Cleanup backup files with missing web_backup entries (runs on all servers)
-        $domains = call_user_func_array(array($app->dbmaster, "queryAllRecords"), $args_domains_with_backups);
+        $domains = $app->dbmaster->queryAllRecords($sql_domains_with_backups, true, $args_sql_domains_with_backups);
         foreach ($domains as $rec) {
             $domain_id = $rec['domain_id'];
             $domain_backup_dir = $backup_dir . '/web' . $domain_id;
@@ -808,7 +805,7 @@ class backup
         }
 
 	// This cleanup only runs on web servers
-        $domains = call_user_func_array(array($app->db, "queryAllRecords"), $args_domains);
+        $domains = $app->db->queryAllRecords($sql_domains, true, $args_sql_domains);
         foreach ($domains as $rec) {
             $domain_id = $rec['domain_id'];
             $domain_backup_dir = $backup_dir . '/web' . $domain_id;
-- 
GitLab


From 6183781bff8a45ceedb269711b6743941a1e2e59 Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Thu, 10 Dec 2020 09:02:51 +0100
Subject: [PATCH 175/441] wrong main.cf after install (Fixes #5963)

---
 install/lib/installer_base.lib.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index f73aefe2c5..31fc679383 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1496,7 +1496,7 @@ class installer_base {
 		foreach ($options as $value) {
 			$value = trim($value);
 			if ($value == '') continue;
-			if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf|", $value)) {
+			if (preg_match("|check_recipient_access\s+proxy:mysql:${config_dir}/mysql-verify_recipients.cf|", $value)) {
 				continue;
 			}
 			$new_options[] = $value;
@@ -1504,7 +1504,7 @@ class installer_base {
 		if ($configure_lmtp && $conf['mail']['content_filter'] === 'amavisd') {
 			for ($i = 0; isset($new_options[$i]); $i++) {
 				if ($new_options[$i] == 'reject_unlisted_recipient') {
-					array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf"));
+					array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${config_dir}/mysql-verify_recipients.cf"));
 					break;
 				}
 			}
-- 
GitLab


From 919b34aac838895bf8309a5f33eae308a6f8b950 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Thu, 10 Dec 2020 14:29:20 +0100
Subject: [PATCH 176/441] Move @ replacement function to idnividual records
 that need it. Fix typo in comment

---
 interface/web/dns/dns_alias_edit.php | 11 +++++++++++
 interface/web/dns/dns_cname_edit.php | 10 ++++++++++
 interface/web/dns/dns_dname_edit.php | 11 +++++++++++
 interface/web/dns/dns_edit_base.php  |  5 +----
 4 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/interface/web/dns/dns_alias_edit.php b/interface/web/dns/dns_alias_edit.php
index 20bbc38d86..3dfb59dead 100644
--- a/interface/web/dns/dns_alias_edit.php
+++ b/interface/web/dns/dns_alias_edit.php
@@ -51,6 +51,17 @@ class page_action extends dns_page_action {
 		if($tmp['number'] > 0) return true;
 		return false;
 	}
+
+  function onSubmit() {
+		global $app, $conf;
+		// Get the parent soa record of the domain
+		$soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]);
+		// Replace @ to example.com. in data field
+		if($this->dataRecord["data"] === '@') {
+			$this->dataRecord["data"] = $soa['origin'];
+		}
+		parent::onSubmit();
+	}
 }
 
 $page = new page_action;
diff --git a/interface/web/dns/dns_cname_edit.php b/interface/web/dns/dns_cname_edit.php
index 38bb8140c4..e2fde267d2 100644
--- a/interface/web/dns/dns_cname_edit.php
+++ b/interface/web/dns/dns_cname_edit.php
@@ -53,6 +53,16 @@ class page_action extends dns_page_action {
 		return false;
 	}
 
+	function onSubmit() {
+		global $app, $conf;
+		// Get the parent soa record of the domain
+		$soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]);
+		// Replace @ to example.com. in data field
+		if($this->dataRecord["data"] === '@') {
+			$this->dataRecord["data"] = $soa['origin'];
+		}
+		parent::onSubmit();
+	}
 }
 
 $page = new page_action;
diff --git a/interface/web/dns/dns_dname_edit.php b/interface/web/dns/dns_dname_edit.php
index a1e1cb6c07..4e97a8632c 100644
--- a/interface/web/dns/dns_dname_edit.php
+++ b/interface/web/dns/dns_dname_edit.php
@@ -52,6 +52,17 @@ class page_action extends dns_page_action {
 		if($tmp['number'] > 0) return true;
 		return false;
 	}
+
+	function onSubmit() {
+		global $app, $conf;
+		// Get the parent soa record of the domain
+		$soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]);
+		// Replace @ to example.com. in data field
+		if($this->dataRecord["data"] === '@') {
+			$this->dataRecord["data"] = $soa['origin'];
+		}
+		parent::onSubmit();
+	}
 }
 
 $page = new page_action;
diff --git a/interface/web/dns/dns_edit_base.php b/interface/web/dns/dns_edit_base.php
index 843f377db5..61c08f6576 100644
--- a/interface/web/dns/dns_edit_base.php
+++ b/interface/web/dns/dns_edit_base.php
@@ -104,7 +104,7 @@ class dns_page_action extends tform_actions {
 			$client_group_id = intval($_SESSION["s"]["user"]["default_group"]);
 			$client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
 
-			// Check if the user may add another mailbox.
+			// Check if the user may add another record.
 			if($this->id == 0 && $client["limit_dns_record"] >= 0) {
 				$tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id);
 				if($tmp["number"] >= $client["limit_dns_record"]) {
@@ -117,9 +117,6 @@ class dns_page_action extends tform_actions {
 		if($this->dataRecord["name"] === '@') {
 			$this->dataRecord["name"] = $soa['origin'];
 		}
-		if($this->dataRecord["data"] === '@') {
-			$this->dataRecord["data"] = $soa['origin'];
-		}
 
 		// Replace * to *.example.com.
 		if($this->dataRecord["name"] === '*') {
-- 
GitLab


From 4e9b2914f4e9b6f5acbbaac9dbb08bc0d170c537 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 10 Dec 2020 14:48:07 +0100
Subject: [PATCH 177/441] Apply 1 suggestion(s) to 1 file(s)

---
 install/sql/incremental/upd_dev_collection.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index f72e1eb05f..1544ea81b0 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1,5 +1,5 @@
 -- drop old php column because new installations don't have them (fails in multi-server)
 ALTER TABLE `web_domain` DROP COLUMN `fastcgi_php_version`;
 
--- add php_fpm_pool_dir column to server_php
+-- add php_fpm_socket_dir column to server_php
 ALTER TABLE `server_php` ADD `php_fpm_socket_dir` varchar(255) DEFAULT NULL AFTER `php_fpm_pool_dir`;
-- 
GitLab


From 5f842cb8975dc11a019e952c43aa4b19df589808 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Thu, 10 Dec 2020 15:18:27 +0100
Subject: [PATCH 178/441] Fix FTP user auth error with MySQL 8 (#5939)

---
 .../sql/incremental/upd_dev_collection.sql    |  3 +++
 install/tpl/pureftpd_mysql.conf.master        | 22 +++++++++----------
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 1544ea81b0..520b9cc950 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -3,3 +3,6 @@ ALTER TABLE `web_domain` DROP COLUMN `fastcgi_php_version`;
 
 -- add php_fpm_socket_dir column to server_php
 ALTER TABLE `server_php` ADD `php_fpm_socket_dir` varchar(255) DEFAULT NULL AFTER `php_fpm_pool_dir`;
+
+-- rename Comodo to "Sectigo / Comodo CA"
+UPDATE `ftp_user` SET `expires` = NULL WHERE `expires` = '0000-00-00 00:00:00';
diff --git a/install/tpl/pureftpd_mysql.conf.master b/install/tpl/pureftpd_mysql.conf.master
index 484f1054c8..fe3df27a3a 100644
--- a/install/tpl/pureftpd_mysql.conf.master
+++ b/install/tpl/pureftpd_mysql.conf.master
@@ -59,12 +59,12 @@ MYSQLCrypt      crypt
 
 # Query to execute in order to fetch the password
 
-MYSQLGetPW      SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW())
+MYSQLGetPW      SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires > NOW())
 
 
 # Query to execute in order to fetch the system user name or uid
 
-MYSQLGetUID     SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW())
+MYSQLGetUID     SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires > NOW())
 
 
 # Optional : default UID - if set this overrides MYSQLGetUID
@@ -74,7 +74,7 @@ MYSQLGetUID     SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '{se
 
 # Query to execute in order to fetch the system user group or gid
 
-MYSQLGetGID     SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW())
+MYSQLGetGID     SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires > NOW())
 
 
 # Optional : default GID - if set this overrides MYSQLGetGID
@@ -84,34 +84,34 @@ MYSQLGetGID     SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '{se
 
 # Query to execute in order to fetch the home directory
 
-MYSQLGetDir     SELECT dir FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW())
+MYSQLGetDir     SELECT dir FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires > NOW())
 
 
-# Optional : query to get the maximal number of files 
+# Optional : query to get the maximal number of files
 # Pure-FTPd must have been compiled with virtual quotas support.
 
-MySQLGetQTAFS  SELECT quota_files FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW())
+MySQLGetQTAFS  SELECT quota_files FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW())
 
 
 # Optional : query to get the maximal disk usage (virtual quotas)
 # The number should be in Megabytes.
 # Pure-FTPd must have been compiled with virtual quotas support.
 
-MySQLGetQTASZ  SELECT quota_size FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_size != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW())
+MySQLGetQTASZ  SELECT quota_size FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_size != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW())
 
 
 # Optional : ratios. The server has to be compiled with ratio support.
 
-MySQLGetRatioUL SELECT ul_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW())
-MySQLGetRatioDL SELECT dl_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW())
+MySQLGetRatioUL SELECT ul_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW())
+MySQLGetRatioDL SELECT dl_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW())
 
 
 # Optional : bandwidth throttling.
 # The server has to be compiled with throttling support.
 # Values are in KB/s .
 
-MySQLGetBandwidthUL SELECT ul_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW())
-MySQLGetBandwidthDL SELECT dl_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW())
+MySQLGetBandwidthUL SELECT ul_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW())
+MySQLGetBandwidthDL SELECT dl_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW())
 
 # Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :
 # 1) You know what you are doing.
-- 
GitLab


From 5ab09ce8554942beef0c9898eb237a5783e8b177 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Thu, 10 Dec 2020 15:28:41 +0100
Subject: [PATCH 179/441] Fix comment for query

---
 install/sql/incremental/upd_dev_collection.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 520b9cc950..a12f9d482b 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -4,5 +4,5 @@ ALTER TABLE `web_domain` DROP COLUMN `fastcgi_php_version`;
 -- add php_fpm_socket_dir column to server_php
 ALTER TABLE `server_php` ADD `php_fpm_socket_dir` varchar(255) DEFAULT NULL AFTER `php_fpm_pool_dir`;
 
--- rename Comodo to "Sectigo / Comodo CA"
+-- fix #5939
 UPDATE `ftp_user` SET `expires` = NULL WHERE `expires` = '0000-00-00 00:00:00';
-- 
GitLab


From 2e299c5473badec2ea3037151a0f4d765d60af02 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 10 Dec 2020 10:54:15 -0700
Subject: [PATCH 180/441] restoreFileOwnership() excludes system paths

---
 server/lib/classes/backup.inc.php | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php
index cafff35f18..3cdf17d1fc 100644
--- a/server/lib/classes/backup.inc.php
+++ b/server/lib/classes/backup.inc.php
@@ -100,12 +100,21 @@ class backup
      * @param string $web_user
      * @author Ramil Valitov <ramilvalitov@gmail.com>
      */
-    protected static function restoreFileOwnership($web_document_root, $web_user)
+    protected static function restoreFileOwnership($web_document_root, $web_user, $web_group)
     {
         global $app;
 
+        $blacklist = array('bin', 'dev', 'etc', 'home', 'lib', 'lib32', 'lib64', 'log', 'opt', 'proc', 'net', 'run', 'sbin', 'ssl', 'srv', 'sys', 'usr', 'var');
+
+	$find_excludes = '-not -path "." -and -not -path "./web/stats/*"';
+
+	foreach ( $blacklist as $dir ) {
+		$find_excludes .= ' -and -not -path "./'.$dir.'" -and -not -path "./'.$dir.'/*"';
+	}
+
         $app->log('Restoring permissions for ' . $web_document_root, LOGLEVEL_DEBUG);
-        $app->system->exec_safe('cd ? && find . -not -path "./web/stats/*" -and -not -path "./log" -and -not -path "./log/*" -and -not -path "./ssl" -and -not -path "./ssl/*" -and -not -path "." -exec chown ?:? {} \;', $web_document_root, $web_user, $web_user);
+        $app->system->exec_safe('cd ? && find . '.$find_excludes.' -exec chown ?:? {} \;', $web_document_root, $web_user, $web_group);
+
     }
 
     /**
@@ -290,7 +299,7 @@ class backup
                              */
                             $success = ($retval == 0 || $retval == 50);
                             if ($success) {
-                                self::restoreFileOwnership($web_root, $web_user);
+                                self::restoreFileOwnership($web_root, $web_user, $web_group);
                             }
                             break;
                         case 'rar':
-- 
GitLab


From 0c490a4d8dcca6bd57baed7f0bcca23fc4f0e53b Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 10 Dec 2020 12:00:42 -0700
Subject: [PATCH 181/441] fix bad newlines in sieve Reject action

---
 interface/lib/plugins/mail_user_filter_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/lib/plugins/mail_user_filter_plugin.inc.php b/interface/lib/plugins/mail_user_filter_plugin.inc.php
index 4f24042b30..a6fe968e43 100644
--- a/interface/lib/plugins/mail_user_filter_plugin.inc.php
+++ b/interface/lib/plugins/mail_user_filter_plugin.inc.php
@@ -217,7 +217,7 @@ class mail_user_filter_plugin {
 			} elseif ($page_form->dataRecord["action"] == 'stop') {
 				$content .= "    stop;\n";
 			} elseif ($page_form->dataRecord["action"] == 'reject') {
-				$content .= '    reject "'.$page_form->dataRecord["target"].'";    stop;\n\n';
+				$content .= '    reject "'.$page_form->dataRecord["target"].'";' . "\n    stop;\n";
 			} else {
 				$content .= "    discard;\n    stop;\n";
 			}
-- 
GitLab


From 58f7c06c102303f700afaaa444cdf1312ba28cf1 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 11 Dec 2020 11:00:08 +0100
Subject: [PATCH 182/441] Apply 1 suggestion(s) to 1 file(s)

---
 install/lib/installer_base.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 31fc679383..96ef499c67 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1496,7 +1496,7 @@ class installer_base {
 		foreach ($options as $value) {
 			$value = trim($value);
 			if ($value == '') continue;
-			if (preg_match("|check_recipient_access\s+proxy:mysql:${config_dir}/mysql-verify_recipients.cf|", $value)) {
+			if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf|", $value)) {
 				continue;
 			}
 			$new_options[] = $value;
-- 
GitLab


From d903931fa7437ae5b9049d987a415e7716a385f3 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 11 Dec 2020 11:00:24 +0100
Subject: [PATCH 183/441] Apply 1 suggestion(s) to 1 file(s)

---
 install/lib/installer_base.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 96ef499c67..7bb75d8c37 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1458,7 +1458,7 @@ class installer_base {
 		}
 
 		$config_dir = $conf['postfix']['config_dir'];
-		$quoted_config_dir = preg_quote($config_dir, '/');
+		$quoted_config_dir = preg_quote($config_dir, '|');
 		$postfix_version = `postconf -d mail_version 2>/dev/null`;
 		$postfix_version = preg_replace( '/mail_version\s*=\s*(.*)\s*/', '$1', $postfix_version );
 
-- 
GitLab


From c1535d34931d15f14a601f933c07eb6dbda970a2 Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Sat, 12 Dec 2020 17:16:16 +0100
Subject: [PATCH 184/441] Do OS-Update for Redhat family

---
 server/mods-available/remoteaction_core_module.inc.php  | 5 +++--
 server/plugins-available/software_update_plugin.inc.php | 5 +++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/server/mods-available/remoteaction_core_module.inc.php b/server/mods-available/remoteaction_core_module.inc.php
index eea8fd6941..1c1e18d87e 100644
--- a/server/mods-available/remoteaction_core_module.inc.php
+++ b/server/mods-available/remoteaction_core_module.inc.php
@@ -181,8 +181,9 @@ class remoteaction_core_module {
 			exec("glsa-check -f --nocolor affected");
 		} elseif(file_exists('/etc/redhat-release')) {
 			exec("dnf -y update");
-		}
-		else {
+		} elseif(file_exists('/etc/redhat-release')) {
+			exec("dnf -y update");
+		} else {
 			exec("apt-get update");
 			exec("apt-get -y upgrade");
 		}
diff --git a/server/plugins-available/software_update_plugin.inc.php b/server/plugins-available/software_update_plugin.inc.php
index 2626d1e756..29393edf3c 100644
--- a/server/plugins-available/software_update_plugin.inc.php
+++ b/server/plugins-available/software_update_plugin.inc.php
@@ -289,6 +289,11 @@ class software_update_plugin {
 			$app->log('Execeuted Debian / Ubuntu update', LOGLEVEL_DEBUG);
 		}
 
+		//** Redhat, CentOS, Fedora
+		if(file_exists('/etc/redhat-release')) {
+			exec("dnf -y update");
+		}
+
 		//** Gentoo Linux
 		if(file_exists('/etc/gentoo-release')) {
 			exec("glsa-check -f --nocolor affected");
-- 
GitLab


From 8b949e731941bbf43fe516df6bba9e5dad77007b Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Sat, 12 Dec 2020 18:53:30 +0100
Subject: [PATCH 185/441] Do OS-Update for Redhat family - add CentOS7 yum

---
 server/plugins-available/software_update_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/software_update_plugin.inc.php b/server/plugins-available/software_update_plugin.inc.php
index 29393edf3c..211951685d 100644
--- a/server/plugins-available/software_update_plugin.inc.php
+++ b/server/plugins-available/software_update_plugin.inc.php
@@ -291,7 +291,7 @@ class software_update_plugin {
 
 		//** Redhat, CentOS, Fedora
 		if(file_exists('/etc/redhat-release')) {
-			exec("dnf -y update");
+			exec("which dnf &> /dev/null && dnf -y update || yum -y update");
 		}
 
 		//** Gentoo Linux
-- 
GitLab


From 8a5fbd6f12e8489542134124a5e4b5d0b67aac92 Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Sat, 12 Dec 2020 18:54:46 +0100
Subject: [PATCH 186/441] Do OS-Update for Redhat family - add CentOS7 yum

---
 server/mods-available/remoteaction_core_module.inc.php | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/server/mods-available/remoteaction_core_module.inc.php b/server/mods-available/remoteaction_core_module.inc.php
index 1c1e18d87e..56cc3745c2 100644
--- a/server/mods-available/remoteaction_core_module.inc.php
+++ b/server/mods-available/remoteaction_core_module.inc.php
@@ -180,9 +180,7 @@ class remoteaction_core_module {
 		if(file_exists('/etc/gentoo-release')) {
 			exec("glsa-check -f --nocolor affected");
 		} elseif(file_exists('/etc/redhat-release')) {
-			exec("dnf -y update");
-		} elseif(file_exists('/etc/redhat-release')) {
-			exec("dnf -y update");
+			exec("which dnf &> /dev/null && dnf -y update || yum -y update");
 		} else {
 			exec("apt-get update");
 			exec("apt-get -y upgrade");
-- 
GitLab


From df80789bdfce4e35e0bd5a902ccec35bbce931aa Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Thu, 10 Dec 2020 09:02:51 +0100
Subject: [PATCH 187/441] wrong main.cf after install (Fixes #5963)

---
 install/lib/installer_base.lib.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index f73aefe2c5..31fc679383 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1496,7 +1496,7 @@ class installer_base {
 		foreach ($options as $value) {
 			$value = trim($value);
 			if ($value == '') continue;
-			if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf|", $value)) {
+			if (preg_match("|check_recipient_access\s+proxy:mysql:${config_dir}/mysql-verify_recipients.cf|", $value)) {
 				continue;
 			}
 			$new_options[] = $value;
@@ -1504,7 +1504,7 @@ class installer_base {
 		if ($configure_lmtp && $conf['mail']['content_filter'] === 'amavisd') {
 			for ($i = 0; isset($new_options[$i]); $i++) {
 				if ($new_options[$i] == 'reject_unlisted_recipient') {
-					array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf"));
+					array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${config_dir}/mysql-verify_recipients.cf"));
 					break;
 				}
 			}
-- 
GitLab


From 4e0e6059a70f60b5527f92f0e141b5a244e7b66f Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 11 Dec 2020 11:00:08 +0100
Subject: [PATCH 188/441] Apply 1 suggestion(s) to 1 file(s)

---
 install/lib/installer_base.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 31fc679383..96ef499c67 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1496,7 +1496,7 @@ class installer_base {
 		foreach ($options as $value) {
 			$value = trim($value);
 			if ($value == '') continue;
-			if (preg_match("|check_recipient_access\s+proxy:mysql:${config_dir}/mysql-verify_recipients.cf|", $value)) {
+			if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf|", $value)) {
 				continue;
 			}
 			$new_options[] = $value;
-- 
GitLab


From 2ae1dd2c33bbe22e84d3b202d32c83629686f3a0 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 11 Dec 2020 11:00:24 +0100
Subject: [PATCH 189/441] Apply 1 suggestion(s) to 1 file(s)

---
 install/lib/installer_base.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 96ef499c67..7bb75d8c37 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1458,7 +1458,7 @@ class installer_base {
 		}
 
 		$config_dir = $conf['postfix']['config_dir'];
-		$quoted_config_dir = preg_quote($config_dir, '/');
+		$quoted_config_dir = preg_quote($config_dir, '|');
 		$postfix_version = `postconf -d mail_version 2>/dev/null`;
 		$postfix_version = preg_replace( '/mail_version\s*=\s*(.*)\s*/', '$1', $postfix_version );
 
-- 
GitLab


From c9f472bf4b8450b1a28349791cb986016e61de00 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 14 Dec 2020 16:44:19 -0700
Subject: [PATCH 190/441] sender_login_maps returns mail_user.cc

---
 install/tpl/mysql-virtual_sender_login_maps.cf.master | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/install/tpl/mysql-virtual_sender_login_maps.cf.master b/install/tpl/mysql-virtual_sender_login_maps.cf.master
index d2a70015f5..7342cf87fa 100644
--- a/install/tpl/mysql-virtual_sender_login_maps.cf.master
+++ b/install/tpl/mysql-virtual_sender_login_maps.cf.master
@@ -9,3 +9,6 @@ query = SELECT destination FROM mail_forwarding WHERE source = '%s' AND active =
         UNION
         SELECT login FROM mail_user WHERE email = '%s' AND disablesmtp = 'n' AND server_id = {server_id}
            AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX(email, '@', -1) AND active = 'y' AND server_id = {server_id})
+        UNION
+        SELECT cc FROM mail_user WHERE email = '%s' AND disablesmtp = 'n' AND disabledeliver = 'y' AND server_id = {server_id}
+           AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX(email, '@', -1) AND active = 'y' AND server_id = {server_id})
-- 
GitLab


From 571ca4e3badaccf1a20558db46da7dce18b34032 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Wed, 16 Dec 2020 20:05:32 +0100
Subject: [PATCH 191/441] Allow subnet for xfer and also notify (#3122)

---
 interface/lib/classes/validate_dns.inc.php | 33 +++++++++++++++++-----
 interface/web/dns/form/dns_soa.tform.php   | 13 +++------
 interface/web/dns/lib/lang/ar_dns_soa.lng  |  4 +--
 interface/web/dns/lib/lang/bg_dns_soa.lng  |  4 +--
 interface/web/dns/lib/lang/el_dns_soa.lng  |  2 +-
 interface/web/dns/lib/lang/en_dns_soa.lng  |  4 +--
 interface/web/dns/lib/lang/fi_dns_soa.lng  |  4 +--
 interface/web/dns/lib/lang/hu_dns_soa.lng  |  4 +--
 interface/web/dns/lib/lang/id_dns_soa.lng  |  4 +--
 interface/web/dns/lib/lang/ja_dns_soa.lng  |  4 +--
 interface/web/dns/lib/lang/nl_dns_soa.lng  |  4 +--
 interface/web/dns/lib/lang/pt_dns_soa.lng  |  4 +--
 interface/web/dns/lib/lang/ro_dns_soa.lng  |  4 +--
 interface/web/dns/lib/lang/se_dns_soa.lng  |  2 +-
 interface/web/dns/lib/lang/sk_dns_soa.lng  |  4 +--
 15 files changed, 54 insertions(+), 40 deletions(-)

diff --git a/interface/lib/classes/validate_dns.inc.php b/interface/lib/classes/validate_dns.inc.php
index 48759286a8..fd9faa593b 100644
--- a/interface/lib/classes/validate_dns.inc.php
+++ b/interface/lib/classes/validate_dns.inc.php
@@ -283,33 +283,52 @@ class validate_dns {
 		}
 		return $new_serial;
 	}
-	
-	function validate_xfer($field_name, $field_value, $validator) {
+
+	function validate_ip($field_name, $field_value, $validator) {
 		global $app;
-		
+
 		$errorMessage = '';
-		
+
 		if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n';
 		if($validator['allowempty'] == 'y' && $field_value == '') {
 			//* Do nothing
 		} elseif ($field_value == 'any') {
 			//* Do nothing
 		} else {
-			//* Check if its a IPv4 or IPv6 address
+			//* Check if its a IPv4 or IPv6 address/range
 			if(isset($validator['separator']) && $validator['separator'] != '') {
 				//* When the field may contain several IP addresses, split them by the char defined as separator
 				$field_value_array = explode($validator['separator'], $field_value);
 			} else {
 				$field_value_array[] = $field_value;
 			}
+			// Check if it's a valid input
 			foreach($field_value_array as $field_value) {
-				$field_value = trim($field_value);
+				// Check if the IP is valid without range
+				$ip = strstr($field_value, '/', true) ?: $field_value;
+				if (strpos($field_value, '/') !== false) {
+					$subnet = strstr($field_value, '/', false);
+					$subnet = ltrim($subnet, "/");
+				}
 				if(function_exists('filter_var')) {
-						if(!filter_var($field_value, FILTER_VALIDATE_IP)) {
+						if(!filter_var($ip, FILTER_VALIDATE_IP)) {
 						$errmsg = $validator['errmsg'];
 						$errorMessage .= $app->tform->lng($errmsg)."<br />\r\n";
 					}
 				} else $this->errorMessage .= "function filter_var missing <br />\r\n";
+				// Check if the range is valid
+				if ($subnet !== '') {
+					if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
+						if ($subnet < 1 || $subnet > 128) {
+							$errmsg = $validator['errmsg'];
+							$errorMessage .= $app->tform->lng($errmsg)."<br />\r\n";
+						}
+					}
+					elseif ($subnet < 1 || $subnet > 32) {
+						$errmsg = $validator['errmsg'];
+						$errorMessage .= $app->tform->lng($errmsg)."<br />\r\n";
+					}
+				}
 			}
 		}
 		return $errorMessage;
diff --git a/interface/web/dns/form/dns_soa.tform.php b/interface/web/dns/form/dns_soa.tform.php
index fea4bd1f98..fe71757788 100644
--- a/interface/web/dns/form/dns_soa.tform.php
+++ b/interface/web/dns/form/dns_soa.tform.php
@@ -244,18 +244,11 @@ $form["tabs"]['dns_soa'] = array (
 			'formtype' => 'TEXT',
 			'validators' => array (  0 => array ( 'type' => 'CUSTOM',
 					'class' => 'validate_dns',
-					'function' => 'validate_xfer',
+					'function' => 'validate_ip',
 					'allowempty' => 'y',
 					'separator' => ',',
 					'errmsg'=> 'xfer_error_regex'),
 			),
-			/*
-			'validators' => array (  0 => array ( 'type' => 'ISIP',
-					'allowempty' => 'y',
-					'separator' => ',',
-					'errmsg'=> 'xfer_error_regex'),
-			),
-			*/
 			'default' => '',
 			'value'  => '',
 			'width'  => '30',
@@ -264,7 +257,9 @@ $form["tabs"]['dns_soa'] = array (
 		'also_notify' => array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
-			'validators'    => array (  0 => array ( 'type' => 'ISIP',
+			'validators' => array (  0 => array ( 'type' => 'CUSTOM',
+					'class' => 'validate_dns',
+					'function' => 'validate_ip',
 					'allowempty' => 'y',
 					'separator' => ',',
 					'errmsg'=> 'also_notify_error_regex'
diff --git a/interface/web/dns/lib/lang/ar_dns_soa.lng b/interface/web/dns/lib/lang/ar_dns_soa.lng
index 8c13c59e8e..0d90b7091b 100644
--- a/interface/web/dns/lib/lang/ar_dns_soa.lng
+++ b/interface/web/dns/lib/lang/ar_dns_soa.lng
@@ -22,7 +22,7 @@ $wb['ns_error_regex'] = 'NS has a invalid format.';
 $wb['mbox_error_empty'] = 'Email is empty.';
 $wb['mbox_error_regex'] = 'Email format invalid.';
 $wb['also_notify_txt'] = 'Also Notify';
-$wb['also_notify_error_regex'] = 'Please use an IP address.';
+$wb['also_notify_error_regex'] = 'Also notify: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['update_acl_txt'] = 'Update ACL';
 $wb['seconds_txt'] = 'Seconds';
 $wb['eg_domain_tld'] = 'e.g. domain.tld';
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
diff --git a/interface/web/dns/lib/lang/bg_dns_soa.lng b/interface/web/dns/lib/lang/bg_dns_soa.lng
index c43ad91196..4cd3c705ac 100644
--- a/interface/web/dns/lib/lang/bg_dns_soa.lng
+++ b/interface/web/dns/lib/lang/bg_dns_soa.lng
@@ -23,7 +23,7 @@ $wb['mbox_error_empty'] = 'Полето с емайл е празно.';
 $wb['mbox_error_regex'] = 'Полето е емайл е в грешен формат.';
 $wb['also_notify_txt'] = 'Also Notify';
 $wb['update_acl_txt'] = 'Обнови ACL';
-$wb['also_notify_error_regex'] = 'Please use an IP address.';
+$wb['also_notify_error_regex'] = 'Also notify: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['seconds_txt'] = 'Seconds';
 $wb['eg_domain_tld'] = 'e.g. domain.tld';
 $wb['eg_ns1_domain_tld'] = 'e.g. ns1.domain.tld';
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Минималния TTL е 60 секунди.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
diff --git a/interface/web/dns/lib/lang/el_dns_soa.lng b/interface/web/dns/lib/lang/el_dns_soa.lng
index aae62bef76..a22c9de413 100644
--- a/interface/web/dns/lib/lang/el_dns_soa.lng
+++ b/interface/web/dns/lib/lang/el_dns_soa.lng
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
diff --git a/interface/web/dns/lib/lang/en_dns_soa.lng b/interface/web/dns/lib/lang/en_dns_soa.lng
index 9651eb2d10..7f42b9f27a 100644
--- a/interface/web/dns/lib/lang/en_dns_soa.lng
+++ b/interface/web/dns/lib/lang/en_dns_soa.lng
@@ -25,8 +25,8 @@ $wb['ns_error_regex'] = 'NS has a invalid format.';
 $wb['mbox_error_empty'] = 'Email is empty.';
 $wb['mbox_error_regex'] = 'Email format invalid.';
 $wb['also_notify_txt'] = 'Also Notify';
-$wb['also_notify_error_regex'] = 'Also notify: Please use an IP address.';
-$wb['xfer_error_regex'] = 'Xfer: Please use one or more IP addresses, separated by , or use the keyword: any';
+$wb['also_notify_error_regex'] = 'Also notify: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['update_acl_txt'] = 'Update ACL';
 $wb['seconds_txt'] = 'Seconds';
 $wb['eg_domain_tld'] = 'e.g. domain.tld';
diff --git a/interface/web/dns/lib/lang/fi_dns_soa.lng b/interface/web/dns/lib/lang/fi_dns_soa.lng
index b34b2893fd..d90de950b0 100644
--- a/interface/web/dns/lib/lang/fi_dns_soa.lng
+++ b/interface/web/dns/lib/lang/fi_dns_soa.lng
@@ -22,7 +22,7 @@ $wb['ns_error_regex'] = 'Nimipalvelin-kenttä on tyhjä.';
 $wb['mbox_error_empty'] = 'Sähköpostiosoite on tyhjä.';
 $wb['mbox_error_regex'] = 'Sähköpostiosoite on vääränlainen';
 $wb['also_notify_txt'] = 'Läheta ilmoitus';
-$wb['also_notify_error_regex'] = 'Please use an IP address.';
+$wb['also_notify_error_regex'] = 'Also notify: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['update_acl_txt'] = 'Päivitä ACL';
 $wb['seconds_txt'] = 'Seconds';
 $wb['eg_domain_tld'] = 'e.g. domain.tld';
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
diff --git a/interface/web/dns/lib/lang/hu_dns_soa.lng b/interface/web/dns/lib/lang/hu_dns_soa.lng
index 445de86d69..38d3272f04 100644
--- a/interface/web/dns/lib/lang/hu_dns_soa.lng
+++ b/interface/web/dns/lib/lang/hu_dns_soa.lng
@@ -22,7 +22,7 @@ $wb['ns_error_regex'] = 'NS has a invalid format.';
 $wb['mbox_error_empty'] = 'Email is empty.';
 $wb['mbox_error_regex'] = 'Email format invalid.';
 $wb['also_notify_txt'] = 'Also Notify';
-$wb['also_notify_error_regex'] = 'Please use an IP address.';
+$wb['also_notify_error_regex'] = 'Also notify: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['update_acl_txt'] = 'Update ACL';
 $wb['seconds_txt'] = 'Seconds';
 $wb['eg_domain_tld'] = 'e.g. domain.tld';
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
diff --git a/interface/web/dns/lib/lang/id_dns_soa.lng b/interface/web/dns/lib/lang/id_dns_soa.lng
index c9a43ad057..2c1842e6f2 100644
--- a/interface/web/dns/lib/lang/id_dns_soa.lng
+++ b/interface/web/dns/lib/lang/id_dns_soa.lng
@@ -22,7 +22,7 @@ $wb['ns_error_regex'] = 'Format NS salah.';
 $wb['mbox_error_empty'] = 'Email kosong.';
 $wb['mbox_error_regex'] = 'Format Email tidak valid.';
 $wb['also_notify_txt'] = 'Notifikasi Juga';
-$wb['also_notify_error_regex'] = 'Please use an IP address.';
+$wb['also_notify_error_regex'] = 'Also notify: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['update_acl_txt'] = 'Mutakhirkan ACL';
 $wb['seconds_txt'] = 'Seconds';
 $wb['eg_domain_tld'] = 'e.g. domain.tld';
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
diff --git a/interface/web/dns/lib/lang/ja_dns_soa.lng b/interface/web/dns/lib/lang/ja_dns_soa.lng
index 7ab5799750..a2e5e20c71 100644
--- a/interface/web/dns/lib/lang/ja_dns_soa.lng
+++ b/interface/web/dns/lib/lang/ja_dns_soa.lng
@@ -22,7 +22,7 @@ $wb['ns_error_regex'] = 'NS が不正な文字を含んでいます。';
 $wb['mbox_error_empty'] = 'メールアドレスを指定してください';
 $wb['mbox_error_regex'] = 'メールアドレスの形式が不正です。';
 $wb['also_notify_txt'] = 'Also Notify';
-$wb['also_notify_error_regex'] = 'Please use an IP address.';
+$wb['also_notify_error_regex'] = 'Also notify: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['update_acl_txt'] = 'Update ACL';
 $wb['seconds_txt'] = 'Seconds';
 $wb['eg_domain_tld'] = 'e.g. domain.tld';
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
diff --git a/interface/web/dns/lib/lang/nl_dns_soa.lng b/interface/web/dns/lib/lang/nl_dns_soa.lng
index 1f875df3c9..2b2b734e3b 100644
--- a/interface/web/dns/lib/lang/nl_dns_soa.lng
+++ b/interface/web/dns/lib/lang/nl_dns_soa.lng
@@ -22,7 +22,7 @@ $wb['ns_error_regex'] = 'NS  heeft een ongeldig format.';
 $wb['mbox_error_empty'] = 'E-mail is niet ingvuld.';
 $wb['mbox_error_regex'] = 'E-mail formaat ongeldig.';
 $wb['also_notify_txt'] = 'ook notifcatie';
-$wb['also_notify_error_regex'] = 'Please use an IP address.';
+$wb['also_notify_error_regex'] = 'Also notify: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['update_acl_txt'] = 'Update ACL';
 $wb['seconds_txt'] = 'Seconds';
 $wb['eg_domain_tld'] = 'e.g. domain.tld';
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
diff --git a/interface/web/dns/lib/lang/pt_dns_soa.lng b/interface/web/dns/lib/lang/pt_dns_soa.lng
index 7b6ac864a1..7d4c692855 100644
--- a/interface/web/dns/lib/lang/pt_dns_soa.lng
+++ b/interface/web/dns/lib/lang/pt_dns_soa.lng
@@ -22,7 +22,7 @@ $wb['ns_error_regex'] = 'NS tem um formato inválido.';
 $wb['mbox_error_empty'] = 'Correio está em branco.';
 $wb['mbox_error_regex'] = 'Correio com formato inválido.';
 $wb['also_notify_txt'] = 'Also Notify';
-$wb['also_notify_error_regex'] = 'Please use an IP address.';
+$wb['also_notify_error_regex'] = 'Also notify: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['update_acl_txt'] = 'Actualizar ACL';
 $wb['seconds_txt'] = 'Seconds';
 $wb['eg_domain_tld'] = 'e.g. domain.tld';
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
diff --git a/interface/web/dns/lib/lang/ro_dns_soa.lng b/interface/web/dns/lib/lang/ro_dns_soa.lng
index 9ae957f240..f1125b6981 100644
--- a/interface/web/dns/lib/lang/ro_dns_soa.lng
+++ b/interface/web/dns/lib/lang/ro_dns_soa.lng
@@ -22,7 +22,7 @@ $wb['ns_error_regex'] = 'NS are un format invalid';
 $wb['mbox_error_empty'] = 'Email-ul este gol';
 $wb['mbox_error_regex'] = 'Format email invalid.';
 $wb['also_notify_txt'] = 'Also Notify';
-$wb['also_notify_error_regex'] = 'Please use an IP address.';
+$wb['also_notify_error_regex'] = 'Also notify: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['update_acl_txt'] = 'Update ACL';
 $wb['seconds_txt'] = 'Seconds';
 $wb['eg_domain_tld'] = 'e.g. domain.tld';
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
diff --git a/interface/web/dns/lib/lang/se_dns_soa.lng b/interface/web/dns/lib/lang/se_dns_soa.lng
index 8e380f85a3..a27181699d 100644
--- a/interface/web/dns/lib/lang/se_dns_soa.lng
+++ b/interface/web/dns/lib/lang/se_dns_soa.lng
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
diff --git a/interface/web/dns/lib/lang/sk_dns_soa.lng b/interface/web/dns/lib/lang/sk_dns_soa.lng
index c96399cc4e..a03b15d477 100644
--- a/interface/web/dns/lib/lang/sk_dns_soa.lng
+++ b/interface/web/dns/lib/lang/sk_dns_soa.lng
@@ -22,7 +22,7 @@ $wb['ns_error_regex'] = 'NS má neplatný formát.';
 $wb['mbox_error_empty'] = 'Email je prázdny.';
 $wb['mbox_error_regex'] = 'Email má neplatný formát.';
 $wb['also_notify_txt'] = 'Also Notify';
-$wb['also_notify_error_regex'] = 'Please use an IP address.';
+$wb['also_notify_error_regex'] = 'Also notify: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['update_acl_txt'] = 'Update ACL';
 $wb['seconds_txt'] = 'Seconds';
 $wb['eg_domain_tld'] = 'e.g. domain.tld';
@@ -34,7 +34,7 @@ $wb['retry_range_error'] = 'Min. Retry time is 60 seconds.';
 $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
 $wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
 $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
-$wb['xfer_error_regex'] = 'Also notify: Please use an IP address.';
+$wb['xfer_error_regex'] = 'Zone transfers: Please use a valid IP range, one or more IP addresses separated by a comma or use the keyword: any';
 $wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
 $wb['dnssec_wanted_txt'] = 'Sign zone (DNSSEC)';
 $wb['dnssec_wanted_info'] = 'When disabling DNSSEC keys are not going to be deleted if DNSSEC was enabled before and keys already have been generated but the zone will no longer be delivered in signed format afterwards. If you use PowerDNS, keys WILL be deleted!';
-- 
GitLab


From cc4076bcad9298d5f20815ea38d0a7d4c2dfad07 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 17 Dec 2020 01:01:49 +0100
Subject: [PATCH 192/441] Update sites_web_domain_add.php

---
 remoting_client/examples/sites_web_domain_add.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/remoting_client/examples/sites_web_domain_add.php b/remoting_client/examples/sites_web_domain_add.php
index 0ee462ab7a..84c5c79e13 100644
--- a/remoting_client/examples/sites_web_domain_add.php
+++ b/remoting_client/examples/sites_web_domain_add.php
@@ -53,6 +53,7 @@ try {
 		'allow_override' => 'All',
 		'apache_directives' => '',
 		'php_open_basedir' => '/',
+		'pm' => 'ondemand',
 		'pm_max_requests' => 0,
 		'pm_process_idle_timeout' => 10,
 		'custom_php_ini' => '',
-- 
GitLab


From 3718e6ba5a10dcdb2fad2e4bc0e6860b498b49f2 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 17 Dec 2020 11:18:32 +0100
Subject: [PATCH 193/441] Fix using webroot map on certbot

---
 server/lib/classes/letsencrypt.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php
index 3923954e10..a118d55769 100644
--- a/server/lib/classes/letsencrypt.inc.php
+++ b/server/lib/classes/letsencrypt.inc.php
@@ -162,7 +162,7 @@ class letsencrypt {
 			$webroot_args = "$cmd --webroot-path /usr/local/ispconfig/interface/acme";
 		}
 
-		$cmd = $letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server $acme_version --rsa-key-size 4096 --email postmaster@$domain $cmd --webroot-path /usr/local/ispconfig/interface/acme";
+		$cmd = $letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server $acme_version --rsa-key-size 4096 --email postmaster@$domain $webroot_args";
 
 		return $cmd;
 	}
-- 
GitLab


From 62b0c1f507f67bf908d465c66590a73f23f550e3 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 17 Dec 2020 12:55:25 -0700
Subject: [PATCH 194/441] manual database backups scheduled once per server

---
 interface/lib/classes/plugin_backuplist.inc.php   | 2 +-
 interface/web/sites/templates/web_backup_list.htm | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/interface/lib/classes/plugin_backuplist.inc.php b/interface/lib/classes/plugin_backuplist.inc.php
index 81fe1daae7..4774eb6c49 100644
--- a/interface/lib/classes/plugin_backuplist.inc.php
+++ b/interface/lib/classes/plugin_backuplist.inc.php
@@ -58,7 +58,7 @@ class plugin_backuplist extends plugin_base {
 		if ($tmp['number'] == 0) {
 			if($action_type === 'backup_database') {
 				// get all server ids of databases for this domain
-				$sql = 'SELECT `server_id` FROM `web_database` WHERE `parent_domain_id` = ?';
+				$sql = 'SELECT distinct(`server_id`) FROM `web_database` WHERE `parent_domain_id` = ?';
 				$result = $app->db->query($sql, $domain_id);
 				while(($cur = $result->get())) {
 					$server_id = $cur['server_id'];
diff --git a/interface/web/sites/templates/web_backup_list.htm b/interface/web/sites/templates/web_backup_list.htm
index 47c08d4413..f2baa48f91 100644
--- a/interface/web/sites/templates/web_backup_list.htm
+++ b/interface/web/sites/templates/web_backup_list.htm
@@ -1,6 +1,6 @@
 <h3><tmpl_var name="manual_backup_title_txt"></h3>
-<button class="btn btn-default formbutton-default" type="button" onclick="ISPConfig.confirm_action('sites/web_vhost_domain_edit.php?id={tmpl_var name='parent_id'}&next_tab=backup&make_backup=database&','{tmpl_var name='make_backup_confirm_txt'}');">{tmpl_var name="make_backup_database_txt"}</button>
-<button class="btn btn-default formbutton-default" type="button" onclick="ISPConfig.confirm_action('sites/web_vhost_domain_edit.php?id={tmpl_var name='parent_id'}&next_tab=backup&make_backup=web&','{tmpl_var name='make_backup_confirm_txt'}');">{tmpl_var name="make_backup_web_txt"}</button>
+<button class="btn btn-default formbutton-default" type="button" onclick="ISPConfig.confirm_action('sites/web_vhost_domain_edit.php?id={tmpl_var name='parent_id'}&next_tab=backup&make_backup=database','{tmpl_var name='make_backup_confirm_txt'}');">{tmpl_var name="make_backup_database_txt"}</button>
+<button class="btn btn-default formbutton-default" type="button" onclick="ISPConfig.confirm_action('sites/web_vhost_domain_edit.php?id={tmpl_var name='parent_id'}&next_tab=backup&make_backup=web','{tmpl_var name='make_backup_confirm_txt'}');">{tmpl_var name="make_backup_web_txt"}</button>
 
 <tmpl_if name="msg">
   <br><br>
-- 
GitLab


From de1ac5656d0a68f4d2be92539d11ad2e8bc33cde Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Sat, 31 Oct 2020 21:17:08 +0100
Subject: [PATCH 195/441] Add extra links to datalog

---
 interface/web/monitor/dataloghistory_view.php | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/interface/web/monitor/dataloghistory_view.php b/interface/web/monitor/dataloghistory_view.php
index b86334b0af..6a268c4fa7 100644
--- a/interface/web/monitor/dataloghistory_view.php
+++ b/interface/web/monitor/dataloghistory_view.php
@@ -79,6 +79,15 @@ if (!empty($value)) {
 			case 'web_database_user':
 				$file = 'sites/database_user_edit.php';
 			break;
+                       case 'ftp_user':
+                               $file = 'sites/ftp_user_edit.php';
+                       break;
+                       case 'shell_user':
+                               $file = 'sites/shell_user_edit.php';
+                       break;
+                       case 'dns_soa':
+                               $file = 'dns/dns_soa_edit.php';
+                       break;
 
 			// TODO Add a link per content type
 			default:
-- 
GitLab


From 44ab3adcd1f6f07b47e299d40c4b1d96e1c8fc6e Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Thu, 17 Dec 2020 22:17:18 +0100
Subject: [PATCH 196/441] Correct mail_forwarding sub type links

---
 interface/web/monitor/dataloghistory_view.php | 23 +++++++++++++++----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/interface/web/monitor/dataloghistory_view.php b/interface/web/monitor/dataloghistory_view.php
index 6a268c4fa7..433f1e0ee9 100644
--- a/interface/web/monitor/dataloghistory_view.php
+++ b/interface/web/monitor/dataloghistory_view.php
@@ -52,6 +52,10 @@ $record = $app->db->queryOneRecord('SELECT * FROM sys_datalog WHERE datalog_id =
 $out['id'] = $id;
 $out['username'] = $record['user'];
 
+if(!$data = unserialize(stripslashes($record['data']))) {
+	$data = unserialize($record['data']);
+}
+
 $out['timestamp'] = date($app->lng('conf_format_datetime'), $record['tstamp']);
 $out['table'] = $record['dbtable'];
 list($key, $value) = explode(':', $record['dbidx']);
@@ -62,7 +66,20 @@ if (!empty($value)) {
 	} else {
 		switch ($out['table']) {
 			case 'mail_forwarding':
-				$file = 'mail/mail_forward_edit.php';
+				switch ($data['new']['type']) {
+					case 'alias':
+						$file = 'mail/mail_alias_edit.php';
+						break;
+					case 'aliasdomain':
+						$file = 'mail/mail_aliasdomain_edit.php';
+						break;
+					case 'forward':
+						$file = 'mail/mail_forward_edit.php';
+						break;
+					case 'catchall':
+						$file = 'mail/mail_domain_catchall_edit.php';
+						break;
+				}
 			break;
 			case 'mail_user':
 				$file = 'mail/mail_user_edit.php';
@@ -107,10 +124,6 @@ $out['action_name'] = $app->lng($record['action']);
 
 $out['session_id'] = $record['session_id'];
 
-if(!$data = unserialize(stripslashes($record['data']))) {
-	$data = unserialize($record['data']);
-}
-
 switch ($record['action']) {
 	case 'i':
 		$inserts = array();
-- 
GitLab


From 8be19f199c450df69a127c17995b98f71cf759e7 Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Fri, 18 Dec 2020 19:48:11 +0100
Subject: [PATCH 197/441] fix tls1.3 in nginx

---
 server/conf/nginx_vhost.conf.master           |  4 +---
 server/plugins-available/nginx_plugin.inc.php | 12 +++---------
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index 5bd90fd822..f2b3e0f833 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -19,11 +19,9 @@ server {
 </tmpl_if>
 </tmpl_if>
 
-<tmpl_if name='tls1.3_supported' op='==' value='y'>
-<tmpl_var name="ssl_protocols">
+<tmpl_if name='tls13_supported' op='==' value='y'>
 	ssl_protocols TLSv1.3 TLSv1.2;
 <tmpl_else>
-<tmpl_var name="ssl_protocols">
 	ssl_protocols TLSv1.2;
 </tmpl_if>
 		# ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 9eb2e1ef04..ddaba273e5 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1631,16 +1631,10 @@ class nginx_plugin {
 		// set logging variable
 		$vhost_data['logging'] = $web_config['logging'];
 
-                // Provide TLS 1.3 support if Nginx version is >= 1.13.0 and when it was linked against OpenSSL(>=1.1.1) at build time.
-		$output = $app->system->exec_safe('nginx -V 2>&1');
-
-		if(preg_match('/built with OpenSSL\s*(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
-                        $nginx_openssl_ver = $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) ? '.' . $matches[5] : '');
-		}
-
-		if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($nginx_openssl_ver, '1.1.1', '>='))) {
+         // Provide TLS 1.3 support if Nginx version is >= 1.13.0 and when it was linked against OpenSSL(>=1.1.1) at build time.
+		if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($app->system->getopensslversion(true), '1.1.1', '>='))) {
 			$app->log('Enable TLS 1.3 for: '.$domain, LOGLEVEL_DEBUG);
-			$vhost_data['tls1.3_supported'] = 'y';
+			$vhost_data['tls13_supported'] = "y";
 		}
 
 		$tpl->setVar($vhost_data);
-- 
GitLab


From efd4f18ac5f83e2929f93daa6437c5f2575e2cfe Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 18 Dec 2020 21:23:32 +0100
Subject: [PATCH 198/441] Apply 1 suggestion(s) to 1 file(s)

---
 interface/lib/classes/plugin_backuplist.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/lib/classes/plugin_backuplist.inc.php b/interface/lib/classes/plugin_backuplist.inc.php
index 4774eb6c49..0b98dc9ec0 100644
--- a/interface/lib/classes/plugin_backuplist.inc.php
+++ b/interface/lib/classes/plugin_backuplist.inc.php
@@ -58,7 +58,7 @@ class plugin_backuplist extends plugin_base {
 		if ($tmp['number'] == 0) {
 			if($action_type === 'backup_database') {
 				// get all server ids of databases for this domain
-				$sql = 'SELECT distinct(`server_id`) FROM `web_database` WHERE `parent_domain_id` = ?';
+				$sql = 'SELECT DISTINCT `server_id` FROM `web_database` WHERE `parent_domain_id` = ?';
 				$result = $app->db->query($sql, $domain_id);
 				while(($cur = $result->get())) {
 					$server_id = $cur['server_id'];
-- 
GitLab


From e0453b974d712e3b38de4ee5b0ee2e4feb0fcc0b Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Sun, 20 Dec 2020 15:37:14 +0100
Subject: [PATCH 199/441] fix tls1.3 in nginx

---
 server/plugins-available/nginx_plugin.inc.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index ddaba273e5..5213063a84 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1631,8 +1631,11 @@ class nginx_plugin {
 		// set logging variable
 		$vhost_data['logging'] = $web_config['logging'];
 
-         // Provide TLS 1.3 support if Nginx version is >= 1.13.0 and when it was linked against OpenSSL(>=1.1.1) at build time.
-		if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($app->system->getopensslversion(true), '1.1.1', '>='))) {
+		// Provide TLS 1.3 support if Nginx version is >= 1.13.0 and when it was linked against OpenSSL(>=1.1.1) at build time and when it was linked against OpenSSL(>=1.1.1) at runtime.
+		$nginx_openssl_ver = $app->system->exec_safe('nginx -V 2>&1 | grep OpenSSL | sed \'s/.*built\([a-zA-Z ]*\)OpenSSL \([0-9.]*\).*/\2/\'');
+		if(version_compare($app->system->getnginxversion(true), '1.13.0', '>=')
+			&& version_compare($nginx_openssl_ver, '1.1.1', '>=')
+			&& version_compare($app->system->getopensslversion(true), '1.1.1', '>=')) {
 			$app->log('Enable TLS 1.3 for: '.$domain, LOGLEVEL_DEBUG);
 			$vhost_data['tls13_supported'] = "y";
 		}
-- 
GitLab


From f77cf03c6be318f93517fb2f7abc6bd1579d54a6 Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Sun, 20 Dec 2020 16:29:29 +0100
Subject: [PATCH 200/441] fix tls1.3 in nginx

---
 server/plugins-available/nginx_plugin.inc.php | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 5213063a84..7d95671b70 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1632,10 +1632,11 @@ class nginx_plugin {
 		$vhost_data['logging'] = $web_config['logging'];
 
 		// Provide TLS 1.3 support if Nginx version is >= 1.13.0 and when it was linked against OpenSSL(>=1.1.1) at build time and when it was linked against OpenSSL(>=1.1.1) at runtime.
-		$nginx_openssl_ver = $app->system->exec_safe('nginx -V 2>&1 | grep OpenSSL | sed \'s/.*built\([a-zA-Z ]*\)OpenSSL \([0-9.]*\).*/\2/\'');
+		$nginx_openssl_build_ver = $app->system->exec_safe('nginx -V 2>&1 | grep OpenSSL | sed \'s/.*built\([a-zA-Z ]*\)OpenSSL \([0-9.]*\).*/\2/\'');
+		$nginx_openssl_running_ver = $app->system->exec_safe('nginx -V 2>&1 | grep \'running with\' | sed \'s/.*running\([a-zA-Z ]*\)OpenSSL \([0-9.]*\).*/\2/\'');
 		if(version_compare($app->system->getnginxversion(true), '1.13.0', '>=')
-			&& version_compare($nginx_openssl_ver, '1.1.1', '>=')
-			&& version_compare($app->system->getopensslversion(true), '1.1.1', '>=')) {
+			&& version_compare($nginx_openssl_build_ver, '1.1.1', '>=')
+			&& (empty($nginx_openssl_running_ver) || version_compare($nginx_openssl_running_ver, '1.1.1', '>='))) {
 			$app->log('Enable TLS 1.3 for: '.$domain, LOGLEVEL_DEBUG);
 			$vhost_data['tls13_supported'] = "y";
 		}
-- 
GitLab


From 1e01e0dd39a8b7b72b80d4c6543ed09523b86828 Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Mon, 21 Dec 2020 11:10:36 +0100
Subject: [PATCH 201/441] fix tls1.3 in nginx - more precise selector

---
 server/plugins-available/nginx_plugin.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 7d95671b70..ada8e71c3c 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1632,8 +1632,8 @@ class nginx_plugin {
 		$vhost_data['logging'] = $web_config['logging'];
 
 		// Provide TLS 1.3 support if Nginx version is >= 1.13.0 and when it was linked against OpenSSL(>=1.1.1) at build time and when it was linked against OpenSSL(>=1.1.1) at runtime.
-		$nginx_openssl_build_ver = $app->system->exec_safe('nginx -V 2>&1 | grep OpenSSL | sed \'s/.*built\([a-zA-Z ]*\)OpenSSL \([0-9.]*\).*/\2/\'');
-		$nginx_openssl_running_ver = $app->system->exec_safe('nginx -V 2>&1 | grep \'running with\' | sed \'s/.*running\([a-zA-Z ]*\)OpenSSL \([0-9.]*\).*/\2/\'');
+		$nginx_openssl_build_ver = $app->system->exec_safe('nginx -V 2>&1 | grep \'built with OpenSSL\' | sed \'s/.*built\([a-zA-Z ]*\)OpenSSL \([0-9.]*\).*/\2/\'');
+		$nginx_openssl_running_ver = $app->system->exec_safe('nginx -V 2>&1 | grep \'running with OpenSSL\' | sed \'s/.*running\([a-zA-Z ]*\)OpenSSL \([0-9.]*\).*/\2/\'');
 		if(version_compare($app->system->getnginxversion(true), '1.13.0', '>=')
 			&& version_compare($nginx_openssl_build_ver, '1.1.1', '>=')
 			&& (empty($nginx_openssl_running_ver) || version_compare($nginx_openssl_running_ver, '1.1.1', '>='))) {
-- 
GitLab


From 5bde2b9caf8cc9109aedf8900316cc618dae6eb7 Mon Sep 17 00:00:00 2001
From: Sroka <j.sroka7@gmail.com>
Date: Mon, 21 Dec 2020 17:50:13 +0100
Subject: [PATCH 202/441] Fix php_fpm_socket_dir

---
 server/plugins-available/nginx_plugin.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index ada8e71c3c..73e788ed43 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1094,7 +1094,7 @@ class nginx_plugin {
 					$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 					$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 					$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
-					$custom_php_fpm_socket_dir = $tmp_php['custom_php_fpm_socket_dir'];
+					$custom_php_fpm_socket_dir = $tmp_php['php_fpm_socket_dir'];
 					if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 				}
 			}
@@ -1106,7 +1106,7 @@ class nginx_plugin {
 					$custom_php_fpm_ini_dir = $tmp_php['php_fpm_ini_dir'];
 					$custom_php_fpm_init_script = $tmp_php['php_fpm_init_script'];
 					$custom_php_fpm_pool_dir = $tmp_php['php_fpm_pool_dir'];
-					$custom_php_fpm_socket_dir = $tmp_php['custom_php_fpm_socket_dir'];
+					$custom_php_fpm_socket_dir = $tmp_php['php_fpm_socket_dir'];
 					if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/';
 				}
 			}
-- 
GitLab


From 09e1cab0fe20b901987c7000ab3a69aa94883841 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 21 Dec 2020 18:50:22 +0100
Subject: [PATCH 203/441] Update 500-clean_mailboxes.inc.php

---
 server/lib/classes/cron.d/500-clean_mailboxes.inc.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php
index 7e8c82da64..711c735db1 100755
--- a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php
+++ b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php
@@ -53,10 +53,11 @@ class cronjob_clean_mailboxes extends cronjob {
 	public function onRunJob() {
 		global $app, $conf;
 
-		$trash_names=array('Trash', 'Papierkorb', 'Deleted Items', 'Deleted Messages', 'INBOX.Trash', 'INBOX.Papierkorb', 'INBOX.Deleted Messages');
+		$trash_names=array('Trash', 'Papierkorb', 'Deleted Items', 'Deleted Messages', 'INBOX.Trash', 'INBOX.Papierkorb', 'INBOX.Deleted Messages', 'Corbeille');
 		$junk_names=array('Junk', 'Junk Email', 'SPAM', 'INBOX.SPAM');
 
-		$purge_cmd = 'doveadm expunge -u ? mailbox ? sentbefore ';
+		$expunge_cmd = 'doveadm expunge -u ? mailbox ? sentbefore ';
+		$purge_cmd = 'doveadm purge -u ?';
 		$recalc_cmd = 'doveadm quota recalc -u ?';
 
 		$server_id = intval($conf['server_id']);
@@ -67,17 +68,18 @@ class cronjob_clean_mailboxes extends cronjob {
 				if($email['purge_trash_days'] > 0) {
 					foreach($trash_names as $trash) {
 						if(is_dir($email['maildir'].'/Maildir/.'.$trash)) {
-							$app->system->exec_safe($purge_cmd.intval($email['purge_trash_days']).'d', $email['email'], $trash);
+							$app->system->exec_safe($expunge_cmd.intval($email['purge_trash_days']).'d', $email['email'], $trash);
 						}
 					}
 				}
 				if($email['purge_junk_days'] > 0) {
 					foreach($junk_names as $junk) {
 						if(is_dir($email['maildir'].'/Maildir/.'.$junk)) {
-							$app->system->exec_safe($purge_cmd.intval($email['purge_junk_days']).'d', $email['email'], $junk);
+							$app->system->exec_safe($expunge_cmd.intval($email['purge_junk_days']).'d', $email['email'], $junk);
 						}
 					}
 				}
+				$app->system->exec_safe($purge_cmd, $email['email']);
 				$app->system->exec_safe($recalc_cmd, $email['email']);
 			}
 		}
-- 
GitLab


From 5d0e31b7571d978590333d3579a8d5e971c6c67e Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Tue, 22 Dec 2020 13:12:00 +0100
Subject: [PATCH 204/441] Apply suggestion from !1358

---
 interface/lib/classes/validate_dns.inc.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/interface/lib/classes/validate_dns.inc.php b/interface/lib/classes/validate_dns.inc.php
index fd9faa593b..345396fbba 100644
--- a/interface/lib/classes/validate_dns.inc.php
+++ b/interface/lib/classes/validate_dns.inc.php
@@ -305,10 +305,12 @@ class validate_dns {
 			// Check if it's a valid input
 			foreach($field_value_array as $field_value) {
 				// Check if the IP is valid without range
-				$ip = strstr($field_value, '/', true) ?: $field_value;
-				if (strpos($field_value, '/') !== false) {
-					$subnet = strstr($field_value, '/', false);
-					$subnet = ltrim($subnet, "/");
+				$subnet = '';
+				$ip = $field_value;
+				if(strpos($ip, '/') !== false) {
+					list($ip, $subnet) = explode('/', $ip, 2);
+					$ip = trim($ip);
+					$subnet = intval($subnet);
 				}
 				if(function_exists('filter_var')) {
 						if(!filter_var($ip, FILTER_VALIDATE_IP)) {
-- 
GitLab


From 0a423117bc9ed66a4bb290eb62688173523c54ec Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 22 Dec 2020 15:05:55 +0100
Subject: [PATCH 205/441] Apply 1 suggestion(s) to 1 file(s)

---
 interface/lib/classes/validate_dns.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/lib/classes/validate_dns.inc.php b/interface/lib/classes/validate_dns.inc.php
index 345396fbba..c4b94b5f77 100644
--- a/interface/lib/classes/validate_dns.inc.php
+++ b/interface/lib/classes/validate_dns.inc.php
@@ -306,7 +306,7 @@ class validate_dns {
 			foreach($field_value_array as $field_value) {
 				// Check if the IP is valid without range
 				$subnet = '';
-				$ip = $field_value;
+				$ip = trim($field_value);
 				if(strpos($ip, '/') !== false) {
 					list($ip, $subnet) = explode('/', $ip, 2);
 					$ip = trim($ip);
-- 
GitLab


From 062368aef4ca6b2644656f9b7c1dd0fd15271a1b Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 22 Dec 2020 11:28:36 -0700
Subject: [PATCH 206/441] don't allow empty web_folder

---
 interface/web/sites/form/web_vhost_domain.tform.php  | 12 +++++++-----
 interface/web/sites/lib/lang/ar_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/ar_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/bg_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/bg_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/br_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/br_web_vhost_subdomain.lng    |  1 +
 interface/web/sites/lib/lang/ca_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/ca_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/cz_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/cz_web_vhost_subdomain.lng    |  1 +
 interface/web/sites/lib/lang/de_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/de_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/dk_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/dk_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/el_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/el_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/en_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/en_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/es_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/es_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/fi_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/fi_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/fr_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/fr_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/hr_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/hr_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/hu_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/hu_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/id_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/id_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/it_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/it_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/ja_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/ja_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/nl_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/nl_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/pl_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/pl_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/pt_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/pt_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/ro_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/ro_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/ru_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/ru_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/se_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/se_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/sk_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/sk_web_vhost_subdomain.lng    |  2 +-
 interface/web/sites/lib/lang/tr_web_vhost_domain.lng |  1 +
 .../web/sites/lib/lang/tr_web_vhost_subdomain.lng    |  2 +-
 51 files changed, 57 insertions(+), 28 deletions(-)

diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php
index 85387f6dab..5c26f8254d 100644
--- a/interface/web/sites/form/web_vhost_domain.tform.php
+++ b/interface/web/sites/form/web_vhost_domain.tform.php
@@ -367,12 +367,14 @@ if($vhostdomain_type == 'domain') {
 	);
 	$form['tabs']['domain']['fields']['web_folder'] = array (
 		'datatype' => 'VARCHAR',
-		'validators' => array (  0 => array ( 'type' => 'REGEX',
-				'regex' => '@^((?!(.*\.\.)|(.*\./)|(.*//))[^/][\w/_\.\-]{1,100})?$@',
-				'errmsg'=> 'web_folder_error_regex'),
+		'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
+						'errmsg'=> 'web_folder_error_empty'),
+					1 => array ( 'type' => 'REGEX',
+						'regex' => '@^((?!(.*\.\.)|(.*\./)|(.*//))[^/][\w/_\.\-]{1,100})?$@',
+						'errmsg'=> 'web_folder_error_regex'),
 		),
-		'filters'   => array( 0 => array( 	'event' => 'SAVE',
-											'type' => 'TRIM'),
+		'filters'   => array( 0 => array( 'event' => 'SAVE',
+						'type' => 'TRIM'),
 		),
 		'formtype' => 'TEXT',
 		'default' => '',
diff --git a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
index 6551a1ee65..ab8c2b2520 100644
--- a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
@@ -114,6 +114,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
index 8fbb96bd50..14b4a4b0b1 100644
--- a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
@@ -113,6 +113,7 @@ $wb['password_match_txt'] = 'The passwords do match.';
 $wb['ssl_key_txt'] = 'SSL Key';
 $wb['perl_txt'] = 'Perl';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/br_web_vhost_domain.lng b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
index e9795a9942..5bc8b5db7f 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
@@ -15,6 +15,7 @@ $wb['ssl_domain_txt'] = 'Domínio SSL';
 $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize o caractere  (barra).';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Tipo';
 $wb['parent_domain_id_txt'] = 'Site Pai';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
diff --git a/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng
index 3f1dc2d080..76df925aa8 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['domain_txt'] = 'Domínio';
 $wb['host_txt'] = 'Nome do host';
 $wb['web_folder_error_regex'] = 'Pasta Web é inválida. Por favor não utilize o caractere  (barra).';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Tipo';
 $wb['redirect_type_txt'] = 'Tipo de redirecionamento';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
diff --git a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
index 4607132a76..050338e77b 100644
--- a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
@@ -15,6 +15,7 @@ $wb['ssl_domain_txt'] = 'SSL Domain';
 $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
diff --git a/interface/web/sites/lib/lang/ca_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/ca_web_vhost_subdomain.lng
index c5ef06416a..2c9fbc7e6c 100644
--- a/interface/web/sites/lib/lang/ca_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/ca_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
index 021176aa13..c46d90c12b 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
@@ -20,6 +20,7 @@ $wb['domain_txt'] = 'Doména';
 $wb['type_txt'] = 'Verze';
 $wb['host_txt'] = 'Název hostitele';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['redirect_type_txt'] = 'Typ přesměrování';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
 $wb['l_redirect_txt'] = 'L (Last redirect rule)';
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng
index 705a49f240..fac991966e 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Doména';
 $wb['host_txt'] = 'Název hostitele';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Verze';
 $wb['redirect_type_txt'] = 'Typ přesměrování';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
index 52c602f19a..e99e1eebcb 100644
--- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
@@ -14,6 +14,7 @@ $wb['domain_txt'] = 'Domain';
 $wb['type_txt'] = 'Typ';
 $wb['parent_domain_id_txt'] = 'Zugehörige Webseite';
 $wb['web_folder_error_regex'] = 'Ungültige Verzeichnisangabe, bitte keinen / eingeben.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['redirect_type_txt'] = 'Weiterleitungstyp';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
 $wb['l_redirect_txt'] = 'L (Last redirect rule)';
diff --git a/interface/web/sites/lib/lang/de_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/de_web_vhost_subdomain.lng
index 5941e822e4..ac615eb4ad 100644
--- a/interface/web/sites/lib/lang/de_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/de_web_vhost_subdomain.lng
@@ -18,6 +18,7 @@ $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Host';
 $wb['type_txt'] = 'Typ';
 $wb['web_folder_error_regex'] = 'Ungültige Ordnerangabe, bitte keinen / eingeben.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['redirect_type_txt'] = 'Redirect-Typ';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
 $wb['l_redirect_txt'] = 'L (Last redirect rule)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
index ed4bf4d2dc..4a11c506b7 100644
--- a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
@@ -15,6 +15,7 @@ $wb['ssl_domain_txt'] = 'SSL Domain';
 $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
diff --git a/interface/web/sites/lib/lang/dk_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/dk_web_vhost_subdomain.lng
index 48e1542a6e..9563199028 100644
--- a/interface/web/sites/lib/lang/dk_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/dk_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domæne';
 $wb['host_txt'] = 'Værtsnavn';
 $wb['web_folder_error_regex'] = 'Ugyldigt folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Omdiriger Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/el_web_vhost_domain.lng b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
index 9f1e5613c4..7982767973 100644
--- a/interface/web/sites/lib/lang/el_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
@@ -114,6 +114,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/el_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/el_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/el_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/el_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
index 98bebee634..9220220ec4 100644
--- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
@@ -15,6 +15,7 @@ $wb['ssl_domain_txt'] = 'SSL Domain';
 $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
diff --git a/interface/web/sites/lib/lang/en_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/en_web_vhost_subdomain.lng
index 512a8169fc..771ec5f342 100644
--- a/interface/web/sites/lib/lang/en_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/en_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['parent_domain_id_txt'] = 'Parent Website';
 $wb['redirect_type_txt'] = 'Redirect Type';
@@ -133,4 +134,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
\ No newline at end of file
diff --git a/interface/web/sites/lib/lang/es_web_vhost_domain.lng b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
index 08520c668d..587c3b9b47 100644
--- a/interface/web/sites/lib/lang/es_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
@@ -96,6 +96,7 @@ $wb['pm_min_spare_servers_error_regex'] = 'PHP-FPM pm.min_spare_servers debe ser
 $wb['pm_max_spare_servers_error_regex'] = 'PHP-FPM pm.max_spare_servers debe ser un valor entero positivo.';
 $wb['ssl_key_txt'] = 'Clave SSL';
 $wb['web_folder_error_regex'] = 'La carpeta introducida no es válida. Por favor no introduzcas una barra.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'Ya hay un subdominio con estas configuraciones.';
 $wb['perl_txt'] = 'Perl';
 $wb['hd_quota_error_regex'] = 'Cuota de disco no es válida.';
diff --git a/interface/web/sites/lib/lang/es_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/es_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/es_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/es_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
index 6d68bd9d55..ceda787e69 100644
--- a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
@@ -113,6 +113,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/fi_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/fi_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/fi_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/fi_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
index 6f6ee29386..4e74ee0eb9 100644
--- a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
@@ -113,6 +113,7 @@ $wb['repeat_password_txt'] = 'Vérification du mot de passe';
 $wb['password_mismatch_txt'] = 'Les mots de passe ne correspondent pas.';
 $wb['password_match_txt'] = 'Les mots de passe correspondent.';
 $wb['web_folder_error_regex'] = 'Le dossier saisi est invalide. Ne saisissez pas de ./ (slash).';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'Un sous-domaine avec cette configuration existe déjà.';
 $wb['available_php_directive_snippets_txt'] = 'Directives PHP Snippets disponibles :';
 $wb['available_apache_directive_snippets_txt'] = 'Directives Apache Snippets disponibles :';
diff --git a/interface/web/sites/lib/lang/fr_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/fr_web_vhost_subdomain.lng
index 7b8245d717..b3c8601f79 100644
--- a/interface/web/sites/lib/lang/fr_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/fr_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
index 0384b1111d..ec1d62d2e2 100644
--- a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
@@ -113,6 +113,7 @@ $wb['repeat_password_txt'] = 'Ponovi šifru';
 $wb['password_mismatch_txt'] = 'Šifre nisu identične.';
 $wb['password_match_txt'] = 'Šifre su identične.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'Već postoji poddomena sa ovim postavkama.';
 $wb['available_php_directive_snippets_txt'] = 'Dostupne PHP direktive:';
 $wb['available_apache_directive_snippets_txt'] = 'Dostupne Apache direktive:';
diff --git a/interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng
index c3167cc892..6783f909f4 100644
--- a/interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domena';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Neispravan direktorij. Nemojte koristiti slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Vrsta';
 $wb['redirect_type_txt'] = 'Vrsta redirekcije';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
index 89b1c06418..c5ff589363 100644
--- a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
@@ -113,6 +113,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/hu_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/hu_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/hu_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/hu_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/id_web_vhost_domain.lng b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
index 7c874a7a6b..b085c246fd 100644
--- a/interface/web/sites/lib/lang/id_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
@@ -113,6 +113,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/id_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/id_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/id_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/id_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/it_web_vhost_domain.lng b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
index 887ad9cde7..22fce96dab 100644
--- a/interface/web/sites/lib/lang/it_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
@@ -114,6 +114,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/it_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/it_web_vhost_subdomain.lng
index f391fc1473..5366e37baf 100644
--- a/interface/web/sites/lib/lang/it_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/it_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Dominio';
 $wb['host_txt'] = 'Nome Host';
 $wb['web_folder_error_regex'] = 'Cartella inserita non valida. Per favore non inserire uno slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Tipo';
 $wb['redirect_type_txt'] = 'Tipo reinderizzamento';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
index f29aae19c6..0ffa0a9c23 100644
--- a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
@@ -113,6 +113,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/ja_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/ja_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/ja_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/ja_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
index b179780b89..0cf3cb726c 100644
--- a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
@@ -113,6 +113,7 @@ $wb['repeat_password_txt'] = 'Herhaal wachtwoord';
 $wb['password_mismatch_txt'] = 'De wachtwoorden zijn ongelijk.';
 $wb['password_match_txt'] = 'De wachtwoorden zijn gelijk.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/nl_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/nl_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/nl_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/nl_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
index a69a1e8a24..3e383505bc 100644
--- a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
@@ -99,6 +99,7 @@ $wb['hd_quota_error_regex'] = 'Limit dysku jest nieprawidłowy.';
 $wb['traffic_quota_error_regex'] = 'Limit transferu jest nieprawidłowy.';
 $wb['ssl_key_txt'] = 'Klucz SSL';
 $wb['web_folder_error_regex'] = 'Wprowadzono nieprawidłowy katalog. Proszę nie wpisywać znaku slash [ / ]';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'Istnieje już subdomena z tymi ustawieniami.';
 $wb['perl_txt'] = 'Perl';
 $wb['server_php_id_txt'] = 'Wersja PHP';
diff --git a/interface/web/sites/lib/lang/pl_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/pl_web_vhost_subdomain.lng
index 300ce3080a..3350cce054 100644
--- a/interface/web/sites/lib/lang/pl_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/pl_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Serwer';
 $wb['domain_txt'] = 'Domena';
 $wb['host_txt'] = 'Nazwa hosta';
 $wb['web_folder_error_regex'] = 'Wpisano nieprawidłowy folder. Proszę nie dopisywać znaku slash: / ';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Rodzaj';
 $wb['redirect_type_txt'] = 'Rodzaj przekierowania';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
index 16297d56fe..fe5b29be92 100644
--- a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
@@ -113,6 +113,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/pt_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/pt_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/pt_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/pt_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
index 085305658c..218e104833 100644
--- a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
@@ -114,6 +114,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/ro_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/ro_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/ro_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/ro_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
index 4133237bb7..11e947b412 100644
--- a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
@@ -113,6 +113,7 @@ $wb['repeat_password_txt'] = 'Повторить пароль';
 $wb['password_mismatch_txt'] = 'Пароли не совпадают.';
 $wb['password_match_txt'] = 'Эти пароли совпадают.';
 $wb['web_folder_error_regex'] = 'Неверный ввод папки. Пожалуйста, не вводите слеш.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'Поддомен с такими настройками уже существует.';
 $wb['available_php_directive_snippets_txt'] = 'Доступные заготовки директив PHP:';
 $wb['available_apache_directive_snippets_txt'] = 'Доступные заготовки директив Apache:';
diff --git a/interface/web/sites/lib/lang/ru_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/ru_web_vhost_subdomain.lng
index d459fcd076..77af212253 100644
--- a/interface/web/sites/lib/lang/ru_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/ru_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Сервер';
 $wb['domain_txt'] = 'Домен';
 $wb['host_txt'] = 'Хост';
 $wb['web_folder_error_regex'] = 'Неверный ввод папки. Пожалуйста, не вводите слеш.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Тип';
 $wb['redirect_type_txt'] = 'Тип редиректа';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'Порт HTTP';
 $wb['https_port_txt'] = 'Порт HTTPS';
 $wb['http_port_error_regex'] = 'Некорректный порт HTTP.';
 $wb['https_port_error_regex'] = 'Некорректный порт HTTPS.';
-?>
diff --git a/interface/web/sites/lib/lang/se_web_vhost_domain.lng b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
index a6bdb9e1b5..5edba1fe9e 100644
--- a/interface/web/sites/lib/lang/se_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
@@ -114,6 +114,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/se_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/se_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/se_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/se_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
index 49e5f6c833..e7d6b1f45b 100644
--- a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
@@ -113,6 +113,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
 $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
 $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
diff --git a/interface/web/sites/lib/lang/sk_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/sk_web_vhost_subdomain.lng
index 13e1558aa6..06f15bfe38 100644
--- a/interface/web/sites/lib/lang/sk_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/sk_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
 $wb['domain_txt'] = 'Domain';
 $wb['host_txt'] = 'Hostname';
 $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Type';
 $wb['redirect_type_txt'] = 'Redirect Type';
 $wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
 $wb['https_port_txt'] = 'HTTPS Port';
 $wb['http_port_error_regex'] = 'HTTP Port invalid.';
 $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
-?>
diff --git a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
index 9f7ef413b1..1228e81c7d 100644
--- a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
@@ -15,6 +15,7 @@ $wb['ssl_domain_txt'] = 'SSL Etki Alanı';
 $wb['server_id_txt'] = 'Sunucu';
 $wb['domain_txt'] = 'Etki Alanı';
 $wb['web_folder_error_regex'] = 'Yazdığınız klasör geçersiz. Lütfen / karakterini yazmayın.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Tür';
 $wb['parent_domain_id_txt'] = 'Üst Web Sitesi';
 $wb['redirect_type_txt'] = 'Yönlendirme Türü';
diff --git a/interface/web/sites/lib/lang/tr_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/tr_web_vhost_subdomain.lng
index 8fb06e2802..66677d8b56 100644
--- a/interface/web/sites/lib/lang/tr_web_vhost_subdomain.lng
+++ b/interface/web/sites/lib/lang/tr_web_vhost_subdomain.lng
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Sunucu';
 $wb['domain_txt'] = 'Etki Alanı';
 $wb['host_txt'] = 'Sunucu Adı';
 $wb['web_folder_error_regex'] = 'Yazılan klasör geçersiz. Lütfen / karakteri kullanmadan yazın.';
+$wb['web_folder_error_empty'] = 'Web folder cannot be empty.  Use /web/ to make the same as the Parent Website';
 $wb['type_txt'] = 'Tür';
 $wb['parent_domain_id_txt'] = 'Üst Web Sitesi';
 $wb['redirect_type_txt'] = 'Yönlendirme Türü';
@@ -133,4 +134,3 @@ $wb['http_port_txt'] = 'HTTP Kapı Numarası';
 $wb['https_port_txt'] = 'HTTPS Kapı Numarası';
 $wb['http_port_error_regex'] = 'HTTP kapı numarası geçersiz.';
 $wb['https_port_error_regex'] = 'HTTPS kapı numarası geçersiz.';
-?>
-- 
GitLab


From f064194e003f579933193424a5f66fc163202f60 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Tue, 22 Dec 2020 22:40:08 +0100
Subject: [PATCH 207/441] Add numerical check for subnet (#5975)

---
 interface/lib/classes/validate_dns.inc.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/interface/lib/classes/validate_dns.inc.php b/interface/lib/classes/validate_dns.inc.php
index c4b94b5f77..15d670d84a 100644
--- a/interface/lib/classes/validate_dns.inc.php
+++ b/interface/lib/classes/validate_dns.inc.php
@@ -310,7 +310,6 @@ class validate_dns {
 				if(strpos($ip, '/') !== false) {
 					list($ip, $subnet) = explode('/', $ip, 2);
 					$ip = trim($ip);
-					$subnet = intval($subnet);
 				}
 				if(function_exists('filter_var')) {
 						if(!filter_var($ip, FILTER_VALIDATE_IP)) {
@@ -320,7 +319,11 @@ class validate_dns {
 				} else $this->errorMessage .= "function filter_var missing <br />\r\n";
 				// Check if the range is valid
 				if ($subnet !== '') {
-					if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
+					if (!is_numeric($subnet)) {
+						$errmsg = $validator['errmsg'];
+						$errorMessage .= $app->tform->lng($errmsg)."<br />\r\n";
+					}
+					elseif (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
 						if ($subnet < 1 || $subnet > 128) {
 							$errmsg = $validator['errmsg'];
 							$errorMessage .= $app->tform->lng($errmsg)."<br />\r\n";
-- 
GitLab


From 368e1c3548b9a3acdc035a215389367cbc1e1e05 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 23 Dec 2020 13:54:50 +0100
Subject: [PATCH 208/441] Apply 1 suggestion(s) to 1 file(s)

---
 .gitlab-ci.yml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 91d23fac07..f3bb140d1b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -57,7 +57,6 @@ test:install:
   only:
     - schedules
     - web
-    - merge_requests
   script:
     - $CI_PROJECT_DIR/helper_scripts/test_install_docker.sh
     - apt-get update
-- 
GitLab


From 8f0440285e5a4b301f2d2b6fc0bfdf6c9dcd5d17 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 24 Dec 2020 09:06:18 -0700
Subject: [PATCH 209/441] fix bind plugin loglevel error

---
 server/plugins-available/bind_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index a32a1931cd..a7bcc2e678 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -340,7 +340,7 @@ class bind_plugin {
 			if($return_status === 0) {
 				$app->log("Writing BIND domain file: ".$filename, LOGLEVEL_DEBUG);
 			} else {
-				$loglevel = @($dns_config['disable_bind_log'] === 'y')?'LOGLEVEL_DEBUG':'LOGLEVEL_WARN';
+				$loglevel = @($dns_config['disable_bind_log'] === 'y') ? LOGLEVEL_DEBUG : LOGLEVEL_WARN;
 				$app->log("Writing BIND domain file failed: ".$filename." ".implode(' ', $out), $loglevel);
 				if(is_array($out) && !empty($out)){
 					$app->log('Reason for Bind restart failure: '.implode("\n", $out), $loglevel);
-- 
GitLab


From 3eb43fe73ac0d1c699623ae43d16e3ee21bfcf61 Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pdreissen@notes-it.nl>
Date: Sat, 26 Dec 2020 12:33:40 +0100
Subject: [PATCH 210/441] addendum fixes center of database quota dashlet
 closes #5954

---
 interface/web/dashboard/dashlets/templates/databasequota.htm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/dashboard/dashlets/templates/databasequota.htm b/interface/web/dashboard/dashlets/templates/databasequota.htm
index 7cfd10b095..062b8d99b2 100644
--- a/interface/web/dashboard/dashlets/templates/databasequota.htm
+++ b/interface/web/dashboard/dashlets/templates/databasequota.htm
@@ -16,7 +16,7 @@
 			  <td>{tmpl_var name='database_quota'}</td>
 			  {tmpl_if name="database_quota" op="!=" value="unlimited"}<td>
 			  <div class='progress'>
-				  <div class='progress-bar-striped progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width: {tmpl_var name="used_percentage"}%'>{tmpl_var name="used_percentage"}%
+				  <div class='progress-bar-striped progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width: {tmpl_var name="used_percentage"}%'><span>{tmpl_var name="used_percentage"}%</span>
 				  <span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='database_quota'}</span>
 				  </div>
 			  </div>
-- 
GitLab


From 5c0fcb454b2263c9c0983eaaec58443511120591 Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pdreissen@notes-it.nl>
Date: Sun, 27 Dec 2020 20:08:43 +0100
Subject: [PATCH 211/441] fix limits dashlet not centered, with unlimited
 databasequota do not display progressbar

---
 interface/web/dashboard/dashlets/templates/databasequota.htm | 2 +-
 interface/web/dashboard/dashlets/templates/limits.htm        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/dashboard/dashlets/templates/databasequota.htm b/interface/web/dashboard/dashlets/templates/databasequota.htm
index 062b8d99b2..082dd1f8c0 100644
--- a/interface/web/dashboard/dashlets/templates/databasequota.htm
+++ b/interface/web/dashboard/dashlets/templates/databasequota.htm
@@ -14,7 +14,7 @@
 			  <td>{tmpl_var name='database_name'}</td>
 			  <td>{tmpl_var name='used'}</td>
 			  <td>{tmpl_var name='database_quota'}</td>
-			  {tmpl_if name="database_quota" op="!=" value="unlimited"}<td>
+			  {tmpl_if name="quota_raw" op="!=" value="0"}<td>
 			  <div class='progress'>
 				  <div class='progress-bar-striped progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width: {tmpl_var name="used_percentage"}%'><span>{tmpl_var name="used_percentage"}%</span>
 				  <span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='database_quota'}</span>
diff --git a/interface/web/dashboard/dashlets/templates/limits.htm b/interface/web/dashboard/dashlets/templates/limits.htm
index d4144ee562..7b46206335 100644
--- a/interface/web/dashboard/dashlets/templates/limits.htm
+++ b/interface/web/dashboard/dashlets/templates/limits.htm
@@ -19,7 +19,7 @@
 								role='progressbar' aria-valuemin='0' aria-valuemax='100'
 								aria-valuenow='{tmpl_var name="progressbar"}' style='width:{tmpl_var name="progressbar"}%'
 								data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='percentage'}%">
-								{tmpl_var name="percentage"}%
+								<span>{tmpl_var name="percentage"}%</span>
 								<span class='sr-only'>{tmpl_var name='usage'} {tmpl_var name='of_txt'} {tmpl_var
 									name='value'}</span>
 							</div>
-- 
GitLab


From 7de40252c76588b538c19c68e27c702caa5d2b1f Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pdreissen@notes-it.nl>
Date: Sun, 27 Dec 2020 20:27:23 +0100
Subject: [PATCH 212/441] fix unlimited progressbar in mailquota dashlet

---
 interface/web/dashboard/dashlets/templates/mailquota.htm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm
index d80c619fee..9013c7ac3b 100644
--- a/interface/web/dashboard/dashlets/templates/mailquota.htm
+++ b/interface/web/dashboard/dashlets/templates/mailquota.htm
@@ -16,7 +16,7 @@
 			  <td>{tmpl_var name='name'}</td>
 			  <td>{tmpl_var name='used'}</td>
 			  <td>{tmpl_var name='quota'}</td>
-			  {tmpl_if name="quota" op="!=" value="unlimited"}<td>
+			  {tmpl_if name="quota_raw" op="!=" value="0"}<td>
 			  <div class='progress'>
 				  <div class='progress-bar-striped progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width:{tmpl_var name="used_percentage"}%'><span>{tmpl_var name="used_percentage"}%</span>
 				  <span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'}</span>
-- 
GitLab


From 84066d639252a0f23fd32d81e40becc3ef036956 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Tue, 20 Oct 2020 16:53:12 +0200
Subject: [PATCH 213/441] Do now show FTP traffic when the client has no ftp
 access

---
 interface/web/sites/lib/module.conf.php | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/interface/web/sites/lib/module.conf.php b/interface/web/sites/lib/module.conf.php
index 5f1a25a449..80a034819c 100644
--- a/interface/web/sites/lib/module.conf.php
+++ b/interface/web/sites/lib/module.conf.php
@@ -198,11 +198,12 @@ $items[] = array(   'title'   => 'Web traffic',
 	'link'    => 'sites/web_sites_stats.php',
 	'html_id' => 'websites_stats');
 
-$items[] = array(   'title'   => 'FTP traffic',
-	'target'  => 'content',
-	'link'    => 'sites/ftp_sites_stats.php',
-	'html_id' => 'ftpsites_stats');
-
+if($app->auth->get_client_limit($userid, 'ftp_user') != 0) {
+	$items[] = array(   'title'   => 'FTP traffic',
+		'target'  => 'content',
+		'link'    => 'sites/ftp_sites_stats.php',
+		'html_id' => 'ftpsites_stats');
+}
 $items[] = array(   'title'   => 'Website quota (Harddisk)',
 	'target'  => 'content',
 	'link'    => 'sites/user_quota_stats.php',
-- 
GitLab


From 949ab384196038e4f4b55b6add24194ab1cd9da2 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Tue, 27 Oct 2020 14:31:14 +0100
Subject: [PATCH 214/441] Remove unreachable code

---
 interface/lib/classes/remote.d/dns.inc.php | 1 -
 1 file changed, 1 deletion(-)

diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php
index b65dd63c8d..463b474cd1 100644
--- a/interface/lib/classes/remote.d/dns.inc.php
+++ b/interface/lib/classes/remote.d/dns.inc.php
@@ -46,7 +46,6 @@ class remoting_dns extends remoting {
 		global $app, $conf;
 		if(!$this->checkPerm($session_id, 'dns_templatezone_add')) {
 			throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
-			return false;
 		}
 
 		$client = $app->db->queryOneRecord("SELECT default_dnsserver FROM client WHERE client_id = ?", $client_id);
-- 
GitLab


From 49d255efc6457ab2f4fdbd0a8dd5643362762c1e Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Fri, 30 Oct 2020 16:37:31 +0100
Subject: [PATCH 215/441] Extra dutch translation string

---
 interface/web/login/lib/lang/nl.lng | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/login/lib/lang/nl.lng b/interface/web/login/lib/lang/nl.lng
index 2c98275fd4..cd5f3b713d 100644
--- a/interface/web/login/lib/lang/nl.lng
+++ b/interface/web/login/lib/lang/nl.lng
@@ -16,7 +16,7 @@ $wb['username_txt'] = 'Gebruikersnaam';
 $wb['password_txt'] = 'Wachtwoord';
 $wb['login_button_txt'] = 'Inloggen';
 $wb['pw_lost_txt'] = 'Wachtwoord vergeten';
-$wb['error_maintenance_mode'] = 'This ISPConfig installation is currently under maintenance. We should be back shortly. Thank you for your patience.';
+$wb['error_maintenance_mode'] = 'Deze dienst is momenteel in onderhoud. We zijn spoedig weer beschikbaar.';
 $wb['login_txt'] = 'Inloggen';
 $wb['pw_reset_txt'] = 'Wachtwoord herstellen';
 $wb['pw_button_txt'] = 'Wachtwoord versturen';
-- 
GitLab


From ae7a1e2a29894d70a762760ccb75f7ba4bc13173 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Sat, 31 Oct 2020 20:54:53 +0100
Subject: [PATCH 216/441] typo

---
 install/lib/installer_base.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 7bb75d8c37..553eb90b2c 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -34,7 +34,7 @@ class installer_base {
 	var $language = 'en';
 	var $db;
 	public $install_ispconfig_interface = true;
-	public $is_update = false; // true if it is an update, falsi if it is a new install
+	public $is_update = false; // true if it is an update, false if it is a new install
 	public $min_php = '5.4'; // minimal php-version for update / install
 	protected $mailman_group = 'list';
 
-- 
GitLab


From 2b43a922dd782eabbe89edb64eef8bc7d35adfcb Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Thu, 3 Dec 2020 14:25:28 +0100
Subject: [PATCH 217/441] Fix comment

---
 install/lib/install.lib.php | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index 3d77443372..7a49939600 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -882,9 +882,8 @@ function get_apps_vhost_port_number() {
 }
 
 /*
-* Get the port number of the ISPConfig controlpanel vhost
-*/
-
+ * Check if SSL is anabled in the ISPConfig controlpanel vhost.
+ */
 function is_ispconfig_ssl_enabled() {
 	global $conf;
 	$ispconfig_vhost_file = $conf['apache']['vhost_conf_dir'].'/ispconfig.vhost';
-- 
GitLab


From f8563e03ef517f087b8626a9d405f07d2b381a66 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Wed, 9 Dec 2020 14:26:40 +0100
Subject: [PATCH 218/441] Remove duplicate _csrf_id and _csrf_key parameters

---
 interface/web/mail/templates/mail_alias_list.htm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/mail/templates/mail_alias_list.htm b/interface/web/mail/templates/mail_alias_list.htm
index f65e40a908..21f868dc81 100644
--- a/interface/web/mail/templates/mail_alias_list.htm
+++ b/interface/web/mail/templates/mail_alias_list.htm
@@ -53,7 +53,7 @@
                             <td><a href="#" data-load-content="mail/mail_alias_edit.php?id={tmpl_var name='id'}">{tmpl_var name="source"}</a></td>
                             <td><a href="#" data-load-content="mail/mail_alias_edit.php?id={tmpl_var name='id'}">{tmpl_var name="destination"}</a></td>
                             <td class="text-right">
-                                <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('mail/mail_alias_del.php?id={tmpl_var name='id'}&_csrf_id={tmpl_var name='csrf_id'}&_csrf_key={tmpl_var name='csrf_key'}&_csrf_id={tmpl_var name='csrf_id'}&_csrf_key={tmpl_var name='csrf_key'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a>
+                                <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('mail/mail_alias_del.php?id={tmpl_var name='id'}&_csrf_id={tmpl_var name='csrf_id'}&_csrf_key={tmpl_var name='csrf_key'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a>
                             </td>
                         </tr>
                     </tmpl_loop>
-- 
GitLab


From de55f865b29986d6b91a64d9779241a4fad0e6c0 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Sat, 26 Dec 2020 21:39:36 +0100
Subject: [PATCH 219/441] Use tstamp via placeholder, value was already passed
 to query().

---
 interface/lib/classes/remoting.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index 751edcf024..094d83c971 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -124,7 +124,7 @@ class remoting {
 			$remote_functions = '';
 			$tstamp = time() + $this->session_timeout;
 			$sql = 'INSERT INTO remote_session (remote_session,remote_userid,remote_functions,client_login,tstamp'
-				.') VALUES (?, ?, ?, 1, $tstamp)';
+				.') VALUES (?, ?, ?, 1, ?)';
 			$app->db->query($sql, $remote_session,$remote_userid,$remote_functions,$tstamp);
 			return $remote_session;
 		} else {
-- 
GitLab


From bad887aac38aa99318123780bee23d24778f4f0e Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Sun, 27 Dec 2020 20:53:06 +0100
Subject: [PATCH 220/441] Fix nonexistant CONST

---
 server/plugins-available/bind_plugin.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index a32a1931cd..d3c678d7aa 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -208,7 +208,7 @@ class bind_plugin {
 
 		//* Check for available entropy
 		if (file_get_contents('/proc/sys/kernel/random/entropy_avail') < 200) {
-			$app->log('DNSSEC ERROR: We are low on entropy. This could cause server script to fail. Please consider installing package haveged.', LOGLEVEL_ERR);
+			$app->log('DNSSEC ERROR: We are low on entropy. This could cause server script to fail. Please consider installing package haveged.', LOGLEVEL_ERROR);
 			echo "DNSSEC ERROR: We are low on entropy. This could cause server script to fail. Please consider installing package haveged.\n";
 			return false;
 		}
@@ -219,7 +219,7 @@ class bind_plugin {
 		$app->system->exec_safe('cd ?; named-checkzone ? ? | egrep -ho \'[0-9]{10}\'', $dns_config['bind_zonefiles_dir'], $domain, $dns_config['bind_zonefiles_dir'].'/'.$filespre.$domain);
 		$retState = $app->system->last_exec_retcode();
 		if ($retState != 0) {
-			$app->log('DNSSEC Error: Error in Zonefile for '.$domain, LOGLEVEL_ERR);
+			$app->log('DNSSEC Error: Error in Zonefile for '.$domain, LOGLEVEL_ERROR);
 			return false;
 		}
 
-- 
GitLab


From 2adaa6b2d616dac22bd3ceba2272aa6e9762aab9 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Thu, 31 Dec 2020 11:03:20 +0100
Subject: [PATCH 221/441] Remove call to long deleted script

Removed in 2016 via 708b93bdea4b623a6b1fe3d2ca7e472fd60c4cac
---
 server/plugins-available/bind_plugin.inc.php | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index d3c678d7aa..775fd20ffa 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -417,12 +417,6 @@ class bind_plugin {
 		if(is_file($zone_file_name.'.err')) unlink($zone_file_name.'.err');
 		$app->log("Deleting BIND domain file: ".$zone_file_name, LOGLEVEL_DEBUG);
 
- 		//* DNSSEC-Implementation
- 		if($data['old']['dnssec_initialized'] == 'Y' && file_exists('/usr/local/ispconfig/server/scripts/dnssec-delete.sh')) {
-			//delete keys
-			$app->system->exec_safe('/usr/local/ispconfig/server/scripts/dnssec-delete.sh ?', $data['old']['origin']);
-		}
-
 		//* Reload bind nameserver
 		$app->services->restartServiceDelayed('bind', 'reload');
 
-- 
GitLab


From d37894f5294038181d2efffc17d78ca0710d8541 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 31 Dec 2020 16:02:48 -0700
Subject: [PATCH 222/441] remote api functions: Roundcube plugins functions

---
 interface/web/admin/lib/remote.conf.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/interface/web/admin/lib/remote.conf.php b/interface/web/admin/lib/remote.conf.php
index a1067a992f..9c2db8144e 100644
--- a/interface/web/admin/lib/remote.conf.php
+++ b/interface/web/admin/lib/remote.conf.php
@@ -3,4 +3,9 @@
 $function_list['server_get,server_config_set,get_function_list,client_templates_get_all,server_get_serverid_by_ip,server_ip_get,server_ip_add,server_ip_update,server_ip_delete,system_config_set,system_config_get,config_value_get,config_value_add,config_value_update,config_value_replace,config_value_delete'] = 'Server functions';
 $function_list['admin_record_permissions'] = 'Record permission changes';
 
+# Roundcube: generate list of actual soap methods used with:
+# grep soap-\> /usr/share/roundcube/plugins/ispconfig3_*/ispconfig3_*.php | sed -e 's/^.*soap->//g' -e 's/(.*$//g' | sort -u | xargs | sed -e 's/ /,/g'
+#
+$function_list['client_get_id,login,logout,mail_alias_get,mail_fetchmail_add,mail_fetchmail_delete,mail_fetchmail_get,mail_fetchmail_update,mail_policy_get,mail_spamfilter_blacklist_add,mail_spamfilter_blacklist_delete,mail_spamfilter_blacklist_get,mail_spamfilter_blacklist_update,mail_spamfilter_user_add,mail_spamfilter_user_get,mail_spamfilter_user_update,mail_spamfilter_whitelist_add,mail_spamfilter_whitelist_delete,mail_spamfilter_whitelist_get,mail_spamfilter_whitelist_update,mail_user_filter_add,mail_user_filter_delete,mail_user_filter_get,mail_user_filter_update,mail_user_get,mail_user_update,server_get,server_get_app_version'] = 'Roundcube plugins functions';
+
 ?>
-- 
GitLab


From 5fe7013ed572ab1f64955478f34a1664e856e591 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Sun, 3 Jan 2021 14:52:20 +0100
Subject: [PATCH 223/441] - do not allow raw SQL through array[SQL] in db lib -
 don't make sql request on invalid arguments in password reset form

---
 interface/lib/classes/db_mysql.inc.php        | 36 +++++++++----------
 interface/web/login/password_reset.php        | 14 ++++----
 .../classes/cron.d/300-quota_notify.inc.php   |  6 ++--
 server/lib/classes/db_mysql.inc.php           | 36 +++++++++----------
 4 files changed, 43 insertions(+), 49 deletions(-)

diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php
index feab66cd93..cd9c333b22 100644
--- a/interface/lib/classes/db_mysql.inc.php
+++ b/interface/lib/classes/db_mysql.inc.php
@@ -171,14 +171,10 @@ class db
 					} elseif(is_null($sValue) || (is_string($sValue) && (strcmp($sValue, '#NULL#') == 0))) {
 						$sTxt = 'NULL';
 					} elseif(is_array($sValue)) {
-						if(isset($sValue['SQL'])) {
-							$sTxt = $sValue['SQL'];
-						} else {
-							$sTxt = '';
-							foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\'';
-							$sTxt = '(' . substr($sTxt, 1) . ')';
-							if($sTxt == '()') $sTxt = '(0)';
-						}
+						$sTxt = '';
+						foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\'';
+						$sTxt = '(' . substr($sTxt, 1) . ')';
+						if($sTxt == '()') $sTxt = '(0)';
 					} else {
 						$sTxt = '\'' . $this->escape($sValue) . '\'';
 					}
@@ -258,7 +254,7 @@ class db
 
 	private function _query($sQuery = '') {
 		global $app;
-		
+
 		$aArgs = func_get_args();
 
 		if ($sQuery == '') {
@@ -354,7 +350,7 @@ class db
 	 * @return array result row or NULL if none found
 	 */
 	public function queryOneRecord($sQuery = '') {
-		
+
 		$aArgs = func_get_args();
 		if(!empty($aArgs)) {
 			$sQuery = array_shift($aArgs);
@@ -363,7 +359,7 @@ class db
 		}
 		array_unshift($aArgs, $sQuery);
 		}
-  
+
 		$oResult = call_user_func_array([&$this, 'query'], $aArgs);
 		if(!$oResult) return null;
 
@@ -750,7 +746,7 @@ class db
 			foreach($insert_data as $key => $val) {
 				$key_str .= '??,';
 				$params[] = $key;
-				
+
 				$val_str .= '?,';
 				$v_params[] = $val;
 			}
@@ -764,7 +760,7 @@ class db
 			$this->query("INSERT INTO ?? $insert_data_str", $tablename);
 			$app->log("deprecated use of passing values to datalogInsert() - table " . $tablename, 1);
 		}
-		
+
 		$old_rec = array();
 		$index_value = $this->insertID();
 		if(!$index_value && isset($insert_data[$index_field])) {
@@ -1112,7 +1108,7 @@ class db
 	 * @access public
 	 * @return string 'mariadb' or string 'mysql'
 	 */
-	
+
 	public function getDatabaseType() {
 		$tmp = $this->queryOneRecord('SELECT VERSION() as version');
 		if(stristr($tmp['version'],'mariadb')) {
@@ -1140,7 +1136,7 @@ class db
 			return $version[0];
 		}
 	}
-	
+
 	/**
 	 * Get a mysql password hash
 	 *
@@ -1150,9 +1146,9 @@ class db
 	 */
 
 	public function getPasswordHash($password) {
-		
+
 		$password_type = 'password';
-		
+
 		/* Disabled until caching_sha2_password is implemented
 		if($this->getDatabaseType() == 'mysql' && $this->getDatabaseVersion(true) >= 8) {
 			// we are in MySQL 8 mode
@@ -1162,16 +1158,16 @@ class db
 			}
 		}
 		*/
-		
+
 		if($password_type == 'caching_sha2_password') {
 			/*
-				caching_sha2_password hashing needs to be implemented, have not 
+				caching_sha2_password hashing needs to be implemented, have not
 				found valid PHP implementation for the new password hash type.
 			*/
 		} else {
 			$password_hash = '*'.strtoupper(sha1(sha1($password, true)));
 		}
-		
+
 		return $password_hash;
 	}
 
diff --git a/interface/web/login/password_reset.php b/interface/web/login/password_reset.php
index 9a2541bba0..2e1d5e6aad 100644
--- a/interface/web/login/password_reset.php
+++ b/interface/web/login/password_reset.php
@@ -47,7 +47,7 @@ include ISPC_ROOT_PATH.'/web/login/lib/lang/'.$app->functions->check_language($c
 $app->tpl->setVar($wb);
 $continue = true;
 
-if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != '' && $_POST['username'] != 'admin') {
+if(isset($_POST['username']) && is_string($_POST['username']) && $_POST['username'] != '' && isset($_POST['email']) && is_string($_POST['email']) && $_POST['email'] != '' && $_POST['username'] != 'admin') {
 	if(!preg_match("/^[\w\.\-\_]{1,64}$/", $_POST['username'])) {
 		$app->tpl->setVar("error", $wb['user_regex_error']);
 		$continue = false;
@@ -60,11 +60,13 @@ if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != '
 	$username = $_POST['username'];
 	$email = $_POST['email'];
 
-	$client = $app->db->queryOneRecord("SELECT client.*, sys_user.lost_password_function, sys_user.lost_password_hash, IF(sys_user.lost_password_reqtime IS NOT NULL AND DATE_SUB(NOW(), INTERVAL 15 MINUTE) < sys_user.lost_password_reqtime, 1, 0) as `lost_password_wait` FROM client,sys_user WHERE client.username = ? AND client.email = ? AND client.client_id = sys_user.client_id", $username, $email);
+	if($continue) {
+		$client = $app->db->queryOneRecord("SELECT client.*, sys_user.lost_password_function, sys_user.lost_password_hash, IF(sys_user.lost_password_reqtime IS NOT NULL AND DATE_SUB(NOW(), INTERVAL 15 MINUTE) < sys_user.lost_password_reqtime, 1, 0) as `lost_password_wait` FROM client,sys_user WHERE client.username = ? AND client.email = ? AND client.client_id = sys_user.client_id", $username, $email);
+	}
 
-	if($client['lost_password_function'] == 0) {
+	if($client && $client['lost_password_function'] == 0) {
 		$app->tpl->setVar("error", $wb['lost_password_function_disabled_txt']);
-	} elseif($client['lost_password_wait'] == 1) {
+	} elseif($client && $client['lost_password_wait'] == 1) {
 		$app->tpl->setVar("error", $wb['lost_password_function_wait_txt']);
 	} elseif ($continue) {
 		if($client['client_id'] > 0) {
@@ -111,7 +113,7 @@ if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != '
 		$app->tpl->setVar("error", $wb['user_regex_error']);
 		$continue = false;
 	}
-	
+
 	$username = $_GET['username'];
 	$hash = $_GET['hash'];
 
@@ -127,7 +129,7 @@ if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != '
 		if($client['client_id'] > 0) {
 			$server_config_array = $app->getconf->get_global_config();
 			$min_password_length = $app->auth->get_min_password_length();
-			
+
 			$new_password = $app->auth->get_random_password($min_password_length, true);
 			$new_password_encrypted = $app->auth->crypt_password($new_password);
 
diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php
index bd6a410309..5e1bb92276 100644
--- a/server/lib/classes/cron.d/300-quota_notify.inc.php
+++ b/server/lib/classes/cron.d/300-quota_notify.inc.php
@@ -250,7 +250,7 @@ class cronjob_quota_notify extends cronjob {
 
 						//* Send quota notifications
 						if(($web_config['overquota_notify_admin'] == 'y' || $web_config['overquota_notify_client'] == 'y') && $send_notification == true) {
-							$app->dbmaster->datalogUpdate('web_domain', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'domain_id', $rec['domain_id']);
+							$app->dbmaster->datalogUpdate('web_domain', array("last_quota_notification" => date('Y-m-d')), 'domain_id', $rec['domain_id']);
 
 							$placeholders = array('{domain}' => $rec['domain'],
 								'{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'),
@@ -379,7 +379,7 @@ class cronjob_quota_notify extends cronjob {
 						elseif($mail_config['overquota_notify_freq'] > 0 && $rec['notified_before'] >= $mail_config['overquota_notify_freq']) $send_notification = true;
 
 						if(($mail_config['overquota_notify_admin'] == 'y' || $mail_config['overquota_notify_client'] == 'y') && $send_notification == true) {
-							$app->dbmaster->datalogUpdate('mail_user', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'mailuser_id', $rec['mailuser_id']);
+							$app->dbmaster->datalogUpdate('mail_user', array("last_quota_notification" => date('Y-m-d')), 'mailuser_id', $rec['mailuser_id']);
 
 							$placeholders = array('{email}' => $rec['email'],
 								'{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'),
@@ -466,7 +466,7 @@ class cronjob_quota_notify extends cronjob {
 
 									//* Send quota notifications
 									if(($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_client'] == 'y') && $send_notification == true) {
-										$app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'database_id', $rec['database_id']);
+										$app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => date('Y-m-d')), 'database_id', $rec['database_id']);
 										$placeholders = array(
 											'{database_name}' => $rec['database_name'],
 											'{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'),
diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php
index df38086ebe..9b9d43b442 100644
--- a/server/lib/classes/db_mysql.inc.php
+++ b/server/lib/classes/db_mysql.inc.php
@@ -171,14 +171,10 @@ class db
 					} elseif(is_null($sValue) || (is_string($sValue) && (strcmp($sValue, '#NULL#') == 0))) {
 						$sTxt = 'NULL';
 					} elseif(is_array($sValue)) {
-						if(isset($sValue['SQL'])) {
-							$sTxt = $sValue['SQL'];
-						} else {
-							$sTxt = '';
-							foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\'';
-							$sTxt = '(' . substr($sTxt, 1) . ')';
-							if($sTxt == '()') $sTxt = '(0)';
-						}
+						$sTxt = '';
+						foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\'';
+						$sTxt = '(' . substr($sTxt, 1) . ')';
+						if($sTxt == '()') $sTxt = '(0)';
 					} else {
 						$sTxt = '\'' . $this->escape($sValue) . '\'';
 					}
@@ -258,7 +254,7 @@ class db
 
 	private function _query($sQuery = '') {
 		global $app;
-		
+
 		$aArgs = func_get_args();
 
 		if ($sQuery == '') {
@@ -354,7 +350,7 @@ class db
 	 * @return array result row or NULL if none found
 	 */
 	public function queryOneRecord($sQuery = '') {
-		
+
 		$aArgs = func_get_args();
 		if(!empty($aArgs)) {
 			$sQuery = array_shift($aArgs);
@@ -363,7 +359,7 @@ class db
 		}
 		array_unshift($aArgs, $sQuery);
 		}
-  
+
 		$oResult = call_user_func_array([&$this, 'query'], $aArgs);
 		if(!$oResult) return null;
 
@@ -750,7 +746,7 @@ class db
 			foreach($insert_data as $key => $val) {
 				$key_str .= '??,';
 				$params[] = $key;
-				
+
 				$val_str .= '?,';
 				$v_params[] = $val;
 			}
@@ -764,7 +760,7 @@ class db
 			$this->query("INSERT INTO ?? $insert_data_str", $tablename);
 			$app->log("deprecated use of passing values to datalogInsert() - table " . $tablename, 1);
 		}
-		
+
 		$old_rec = array();
 		$index_value = $this->insertID();
 		if(!$index_value && isset($insert_data[$index_field])) {
@@ -1140,7 +1136,7 @@ class db
 			return $version[0];
 		}
 	}
-	
+
 	/**
 	 * Get a mysql password hash
 	 *
@@ -1148,11 +1144,11 @@ class db
 	 * @param string   cleartext password
 	 * @return string  Password hash
 	 */
-	
+
 	public function getPasswordHash($password) {
-		
+
 		$password_type = 'password';
-		
+
 		/* Disabled until caching_sha2_password is implemented
 		if($this->getDatabaseType() == 'mysql' && $this->getDatabaseVersion(true) >= 8) {
 			// we are in MySQL 8 mode
@@ -1162,16 +1158,16 @@ class db
 			}
 		}
 		*/
-		
+
 		if($password_type == 'caching_sha2_password') {
 			/*
-				caching_sha2_password hashing needs to be implemented, have not 
+				caching_sha2_password hashing needs to be implemented, have not
 				found valid PHP implementation for the new password hash type.
 			*/
 		} else {
 			$password_hash = '*'.strtoupper(sha1(sha1($password, true)));
 		}
-		
+
 		return $password_hash;
 	}
 
-- 
GitLab


From dbfb249a158b28de3bac81951ee4f1ac154f9be2 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Sun, 3 Jan 2021 15:25:13 +0100
Subject: [PATCH 224/441] - merge collection sql updates to new sql update file

---
 install/sql/incremental/upd_0092.sql           | 8 ++++++++
 install/sql/incremental/upd_dev_collection.sql | 8 --------
 2 files changed, 8 insertions(+), 8 deletions(-)
 create mode 100644 install/sql/incremental/upd_0092.sql

diff --git a/install/sql/incremental/upd_0092.sql b/install/sql/incremental/upd_0092.sql
new file mode 100644
index 0000000000..a12f9d482b
--- /dev/null
+++ b/install/sql/incremental/upd_0092.sql
@@ -0,0 +1,8 @@
+-- drop old php column because new installations don't have them (fails in multi-server)
+ALTER TABLE `web_domain` DROP COLUMN `fastcgi_php_version`;
+
+-- add php_fpm_socket_dir column to server_php
+ALTER TABLE `server_php` ADD `php_fpm_socket_dir` varchar(255) DEFAULT NULL AFTER `php_fpm_pool_dir`;
+
+-- fix #5939
+UPDATE `ftp_user` SET `expires` = NULL WHERE `expires` = '0000-00-00 00:00:00';
diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index a12f9d482b..e69de29bb2 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1,8 +0,0 @@
--- drop old php column because new installations don't have them (fails in multi-server)
-ALTER TABLE `web_domain` DROP COLUMN `fastcgi_php_version`;
-
--- add php_fpm_socket_dir column to server_php
-ALTER TABLE `server_php` ADD `php_fpm_socket_dir` varchar(255) DEFAULT NULL AFTER `php_fpm_pool_dir`;
-
--- fix #5939
-UPDATE `ftp_user` SET `expires` = NULL WHERE `expires` = '0000-00-00 00:00:00';
-- 
GitLab


From 5b98587f5f3842b1ecaab60af87e88f654a26ca7 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Sun, 3 Jan 2021 19:30:39 +0100
Subject: [PATCH 225/441] - do not use md5 on sys_user password - update user
 password with new hashing algo on login - delete initial password from
 ispconfig sql file

---
 install/dist/lib/fedora.lib.php    |  4 +--
 install/dist/lib/gentoo.lib.php    |  4 +--
 install/dist/lib/opensuse.lib.php  |  4 +--
 install/lib/installer_base.lib.php | 32 ++++++++++++++++++--
 install/sql/ispconfig3.sql         |  2 +-
 interface/web/login/index.php      | 48 ++++++++++++++++--------------
 6 files changed, 63 insertions(+), 31 deletions(-)

diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index 506659f6e7..9e3f07d102 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -1227,8 +1227,8 @@ class installer_dist extends installer_base {
 		caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 
 		if ($this->install_ispconfig_interface == true && isset($conf['interface_password']) && $conf['interface_password']!='admin') {
-			$sql = "UPDATE sys_user SET passwort = md5(?) WHERE username = 'admin';";
-			$this->db->query($sql, $conf['interface_password']);
+			$sql = "UPDATE sys_user SET passwort = ? WHERE username = 'admin';";
+			$this->db->query($sql, $this->crypt_password($conf['interface_password']));
 		}
 
 		if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){
diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index acd4dbcf61..a7d62cda0b 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -1115,8 +1115,8 @@ class installer extends installer_base
 		caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 
 		if ($this->install_ispconfig_interface == true && isset($conf['interface_password']) && $conf['interface_password']!='admin') {
-			$sql = "UPDATE sys_user SET passwort = md5(?) WHERE username = 'admin';";
-			$this->db->query($sql, $conf['interface_password']);
+			$sql = "UPDATE sys_user SET passwort = ? WHERE username = 'admin';";
+			$this->db->query($sql, $this->crypt_password($conf['interface_password']));
 		}
 
 		if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index cb145ea7df..8a4152d9b5 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -1215,8 +1215,8 @@ class installer_dist extends installer_base {
 		caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 
 		if ($this->install_ispconfig_interface == true && isset($conf['interface_password']) && $conf['interface_password']!='admin') {
-			$sql = "UPDATE sys_user SET passwort = md5(?) WHERE username = 'admin';";
-			$this->db->query($sql, $conf['interface_password']);
+			$sql = "UPDATE sys_user SET passwort = ? WHERE username = 'admin';";
+			$this->db->query($sql, $this->crypt_password($conf['interface_password']));
 		}
 
 		if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 7bb75d8c37..338a3dfc7e 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -157,6 +157,34 @@ class installer_base {
 		else return true;
 	}
 
+	public function crypt_password($cleartext_password, $charset = 'UTF-8') {
+		if($charset != 'UTF-8') {
+			$cleartext_password = mb_convert_encoding($cleartext_password, $charset, 'UTF-8');
+		}
+
+		if(defined('CRYPT_SHA512') && CRYPT_SHA512 == 1) {
+			$salt = '$6$rounds=5000$';
+			$salt_length = 16;
+		} elseif(defined('CRYPT_SHA256') && CRYPT_SHA256 == 1) {
+			$salt = '$5$rounds=5000$';
+			$salt_length = 16;
+		} else {
+			$salt = '$1$';
+			$salt_length = 12;
+		}
+
+		if(function_exists('openssl_random_pseudo_bytes')) {
+			$salt .= substr(bin2hex(openssl_random_pseudo_bytes($salt_length)), 0, $salt_length);
+		} else {
+			$base64_alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789./';
+			for($n = 0; $n < $salt_length; $n++) {
+				$salt .= $base64_alphabet[mt_rand(0, 63)];
+			}
+		}
+		$salt .= "$";
+		return crypt($cleartext_password, $salt);
+	}
+
 	//** Detect installed applications
 	public function find_installed_apps() {
 		global $conf;
@@ -3415,8 +3443,8 @@ class installer_base {
 		caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 
 		if ($this->install_ispconfig_interface == true && isset($conf['interface_password']) && $conf['interface_password']!='admin') {
-			$sql = "UPDATE sys_user SET passwort = md5(?) WHERE username = 'admin';";
-			$this->db->query($sql, $conf['interface_password']);
+			$sql = "UPDATE sys_user SET passwort = ? WHERE username = 'admin';";
+			$this->db->query($sql, $this->crypt_password($conf['interface_password']));
 		}
 
 		if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 8fb5cdfb74..0f10d59ac6 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -2580,7 +2580,7 @@ INSERT INTO `sys_theme` (`var_id`, `tpl_name`, `username`, `logo_url`) VALUES (N
 -- Dumping data for table `sys_user`
 --
 
-INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `username`, `passwort`, `modules`, `startmodule`, `app_theme`, `typ`, `active`, `language`, `groups`, `default_group`, `client_id`) VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'dashboard,admin,client,mail,monitor,sites,dns,vm,tools,help', 'dashboard', 'default', 'admin', 1, 'en', '1,2', 1, 0);
+INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `username`, `passwort`, `modules`, `startmodule`, `app_theme`, `typ`, `active`, `language`, `groups`, `default_group`, `client_id`) VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', 'xxx', 'dashboard,admin,client,mail,monitor,sites,dns,vm,tools,help', 'dashboard', 'default', 'admin', 1, 'en', '1,2', 1, 0);
 
 -- --------------------------------------------------------
 
diff --git a/interface/web/login/index.php b/interface/web/login/index.php
index b5d5abc27b..d820e917c9 100644
--- a/interface/web/login/index.php
+++ b/interface/web/login/index.php
@@ -83,23 +83,23 @@ if(count($_POST) > 0) {
 				 * The actual user is NOT a admin or reseller, but maybe he
 				 * has logged in as "normal" user before...
 				 */
-				
+
 				if (isset($_SESSION['s_old'])&& ($_SESSION['s_old']['user']['typ'] == 'admin' || $app->auth->has_clients($_SESSION['s_old']['user']['userid']))){
 					/* The "old" user is admin or reseller, so everything is ok
 					 * if he is reseller, we need to check if he logs in to one of his clients
 					 */
 					if($_SESSION['s_old']['user']['typ'] != 'admin') {
-						
+
 						/* this is the one currently logged in (normal user) */
 						$old_client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
 						$old_client = $app->db->queryOneRecord("SELECT client.client_id, client.parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $old_client_group_id);
-						
+
 						/* this is the reseller, that shall be re-logged in */
 						$sql = "SELECT * FROM sys_user WHERE USERNAME = ? and PASSWORT = ?";
 						$tmp = $app->db->queryOneRecord($sql, $username, $password);
 						$client_group_id = $app->functions->intval($tmp['default_group']);
 						$tmp_client = $app->db->queryOneRecord("SELECT client.client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
-						
+
 						if(!$tmp_client || $old_client["parent_client_id"] != $tmp_client["client_id"] || $tmp["default_group"] != $_SESSION["s_old"]["user"]["default_group"] ) {
 							die("You don't have the right to 'login as' this user!");
 						}
@@ -115,12 +115,12 @@ if(count($_POST) > 0) {
 				/* a reseller wants to 'login as', we need to check if he is allowed to */
 				$res_client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
 				$res_client = $app->db->queryOneRecord("SELECT client.client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $res_client_group_id);
-				
+
 				/* this is the user the reseller wants to 'login as' */
 				$sql = "SELECT * FROM sys_user WHERE USERNAME = ? and PASSWORT = ?";
 				$tmp = $app->db->queryOneRecord($sql, $username, $password);
 				$tmp_client = $app->db->queryOneRecord("SELECT client.client_id, client.parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $tmp["default_group"]);
-				
+
 				if(!$tmp || $tmp_client["parent_client_id"] != $res_client["client_id"]) {
 					die("You don't have the right to login as this user!");
 				}
@@ -129,16 +129,16 @@ if(count($_POST) > 0) {
 				unset($tmp_client);
 			}
 			$loginAs = true;
-			
+
 		} else {
 			/* normal login */
 			$loginAs = false;
 		}
-		
+
 		//* Check if there are already wrong logins
 		$sql = "SELECT * FROM `attempts_login` WHERE `ip`= ? AND  `login_time` > (NOW() - INTERVAL 1 MINUTE) LIMIT 1";
 		$alreadyfailed = $app->db->queryOneRecord($sql, $ip);
-		
+
 		//* too many failedlogins
 		if($alreadyfailed['times'] > 5) {
 			$error = $app->lng('error_user_too_many_logins');
@@ -148,7 +148,7 @@ if(count($_POST) > 0) {
 				$sql = "SELECT * FROM sys_user WHERE USERNAME = ? and PASSWORT = ?";
 				$user = $app->db->queryOneRecord($sql, $username, $password);
 			} else {
-			
+
 				if(stristr($username, '@')) {
 					//* mailuser login
 					$sql = "SELECT * FROM mail_user WHERE login = ? or email = ?";
@@ -160,7 +160,7 @@ if(count($_POST) > 0) {
 						if(crypt(stripslashes($password), $saved_password) == $saved_password) {
 							//* Get the sys_user language of the client of the mailuser
 							$sys_user_lang = $app->db->queryOneRecord("SELECT language FROM sys_user WHERE default_group = ?", $mailuser['sys_groupid'] );
-							
+
 							//* we build a fake user here which has access to the mailuser module only and userid 0
 							$user = array();
 							$user['userid'] = 0;
@@ -196,6 +196,10 @@ if(count($_POST) > 0) {
 							//* The password is md5 encrypted
 							if(md5($password) != $saved_password) {
 								$user = false;
+							} else {
+								// update password with secure algo
+								$sql = 'UPDATE `sys_user` SET `passwort` = ? WHERE `username` = ?';
+								$app->db->query($sql, $app->auth->crypt_password($password), $username);
 							}
 						}
 					} else {
@@ -203,19 +207,19 @@ if(count($_POST) > 0) {
 					}
 				}
 			}
-			
+
 			if($user) {
 				if($user['active'] == 1) {
 					// Maintenance mode - allow logins only when maintenance mode is off or if the user is admin
 					if(!$app->is_under_maintenance() || $user['typ'] == 'admin'){
-						
+
 						// User login right, so attempts can be deleted
 						$sql = "DELETE FROM `attempts_login` WHERE `ip`=?";
 						$app->db->query($sql, $ip);
 						$user = $app->db->toLower($user);
-						
+
 						if ($loginAs) $oldSession = $_SESSION['s'];
-						
+
 						// Session regenerate causes login problems on some systems, see Issue #3827
 						// Set session_regenerate_id to no in security settings, it you encounter
 						// this problem.
@@ -231,7 +235,7 @@ if(count($_POST) > 0) {
 						$_SESSION['s']['language'] = $app->functions->check_language($user['language']);
 						$_SESSION["s"]['theme'] = $_SESSION['s']['user']['theme'];
 						if ($loginAs) $_SESSION['s']['plugin_cache'] = $_SESSION['s_old']['plugin_cache'];
-						
+
 						if(is_file(ISPC_WEB_PATH . '/' . $_SESSION['s']['user']['startmodule'].'/lib/module.conf.php')) {
 							include_once $app->functions->check_include_path(ISPC_WEB_PATH . '/' . $_SESSION['s']['user']['startmodule'].'/lib/module.conf.php');
 							$menu_dir = ISPC_WEB_PATH.'/' . $_SESSION['s']['user']['startmodule'] . '/lib/menu.d';
@@ -257,20 +261,20 @@ if(count($_POST) > 0) {
 								$_SESSION['show_error_msg'] = $app->lng('theme_not_compatible');
 							}
 						}
-						
+
 						$app->plugin->raiseEvent('login', $username);
-						
+
 						//* Save successfull login message to var
-						$authlog = 'Successful login for user \''. $username .'\' from '. $_SERVER['REMOTE_ADDR'] .' at '. date('Y-m-d H:i:s') . ' with session ID ' .session_id();						
+						$authlog = 'Successful login for user \''. $username .'\' from '. $_SERVER['REMOTE_ADDR'] .' at '. date('Y-m-d H:i:s') . ' with session ID ' .session_id();
 						$authlog_handle = fopen($conf['ispconfig_log_dir'].'/auth.log', 'a');
 						fwrite($authlog_handle, $authlog ."\n");
 						fclose($authlog_handle);
-						
+
 						/*
 						* We need LOGIN_REDIRECT instead of HEADER_REDIRECT to load the
 						* new theme, if the logged-in user has another
 						*/
-						
+
 						if ($loginAs){
 							echo 'LOGIN_REDIRECT:'.$_SESSION['s']['module']['startpage'];
 							exit;
@@ -327,7 +331,7 @@ if($security_config['password_reset_allowed'] == 'yes') {
 } else {
 	$app->tpl->setVar('pw_lost_show', 0);
 }
-		
+
 $app->tpl->setVar('error', $error);
 $app->tpl->setVar('error_txt', $app->lng('error_txt'));
 $app->tpl->setVar('login_txt', $app->lng('login_txt'));
-- 
GitLab


From eabdde5dcb8d13c2b9ffb269eb6b85b55f1031d6 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Mon, 4 Jan 2021 11:41:34 +0100
Subject: [PATCH 226/441] - dont use md5 on remote users

---
 interface/lib/classes/remoting.inc.php        | 30 ++++++++++++-------
 .../web/admin/form/remote_user.tform.php      | 10 +++----
 2 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index 751edcf024..f3b597830b 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -128,13 +128,23 @@ class remoting {
 			$app->db->query($sql, $remote_session,$remote_userid,$remote_functions,$tstamp);
 			return $remote_session;
 		} else {
-			$sql = "SELECT * FROM remote_user WHERE remote_username = ? and remote_password = md5(?)";
-			$remote_user = $app->db->queryOneRecord($sql, $username, $password);
+			$sql = "SELECT * FROM remote_user WHERE remote_username = ? and remote_password = ?";
+			$remote_user = $app->db->queryOneRecord($sql, $username, $app->auth->crypt_password($password));
+			if(!$remote_user) {
+				// fallback to md5
+				$sql = "SELECT * FROM remote_user WHERE remote_username = ? and remote_password = ?";
+				$remote_user = $app->db->queryOneRecord($sql, $username, md5($password));
+				if($remote_user) {
+					// update hash algo
+					$sql = 'UPDATE `remote_user` SET `remote_password` = ? WHERE `remote_username` = ?';
+					$app->db->query($sql, $app->auth->crypt_password($password), $username);
+				}
+			}
 			if($remote_user['remote_userid'] > 0) {
 				if (trim($remote_user['remote_ips']) != '') {
 					$allowed_ips = explode(',',$remote_user['remote_ips']);
-					foreach($allowed_ips as $i => $allowed) { 
-						if(!filter_var($allowed, FILTER_VALIDATE_IP)) { 
+					foreach($allowed_ips as $i => $allowed) {
+						if(!filter_var($allowed, FILTER_VALIDATE_IP)) {
 							// get the ip for a hostname
 							unset($allowed_ips[$i]);
 							$temp=dns_get_record($allowed, DNS_A+DNS_AAAA);
@@ -169,7 +179,7 @@ class remoting {
 				if(!$remote_allowed) {
 					throw new SoapFault('login_failed', 'The login is not allowed from '.$_SERVER['REMOTE_ADDR']);
 					return false;
-				}	
+				}
 				//* Create a remote user session
 				//srand ((double)microtime()*1000000);
 				$remote_session = md5(mt_rand().uniqid('ispco'));
@@ -368,22 +378,22 @@ class remoting {
 
 		//* Load the form definition
 		$app->remoting_lib->loadFormDef($formdef_file);
-		
+
 		//* get old record and merge with params, so only new values have to be set in $params
                $old_rec = $app->remoting_lib->getDataRecord($primary_id, $client_id);
-		
+
 		foreach ($app->remoting_lib->formDef['fields'] as $fieldName => $fieldConf)
         {
             if ($fieldConf['formtype'] === 'PASSWORD' && empty($params[$fieldName])) {
                 unset($old_rec[$fieldName]);
             }
         }
-		
+
 		$params = $app->functions->array_merge($old_rec,$params);
 
 		//* Get the SQL query
 		$sql = $app->remoting_lib->getSQL($params, 'UPDATE', $primary_id);
-		
+
 		// throw new SoapFault('debug', $sql);
 		if($app->remoting_lib->errorMessage != '') {
 			throw new SoapFault('data_processing_error', $app->remoting_lib->errorMessage);
@@ -546,7 +556,7 @@ class remoting {
 			return false;
 		}
 	}
-	
+
 	/**
 	    Gets a list of all servers
 	    @param int session_id
diff --git a/interface/web/admin/form/remote_user.tform.php b/interface/web/admin/form/remote_user.tform.php
index 6e351730c2..0a8595f1b8 100644
--- a/interface/web/admin/form/remote_user.tform.php
+++ b/interface/web/admin/form/remote_user.tform.php
@@ -109,7 +109,7 @@ $form["tabs"]['remote_user'] = array (
 					'errmsg' => 'weak_password_txt'
 				)
 			),
-			'encryption' => 'MD5',
+			'encryption' => 'CRYPT',
 			'default' => '',
 			'value'  => '',
 			'width'  => '30',
@@ -124,11 +124,11 @@ $form["tabs"]['remote_user'] = array (
 		'remote_ips' => array (
 			'datatype'  => 'TEXT',
 			'formtype'  => 'TEXT',
-			'validators'  => array (  
+			'validators'  => array (
 				0 => array (
-					'type' => 'CUSTOM', 
-					'class' => 'validate_remote_user', 
-					'function' => 'valid_remote_ip', 
+					'type' => 'CUSTOM',
+					'class' => 'validate_remote_user',
+					'function' => 'valid_remote_ip',
 					'errmsg' => 'remote_user_error_ips'),
 			),
 			'default' => '',
-- 
GitLab


From b87fc251e40314d69030b676d4e3a781915ccca4 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Mon, 4 Jan 2021 11:59:47 +0100
Subject: [PATCH 227/441] - fixed hash generation for remote password

---
 interface/lib/classes/remoting.inc.php | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index f3b597830b..001f214229 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -128,19 +128,22 @@ class remoting {
 			$app->db->query($sql, $remote_session,$remote_userid,$remote_functions,$tstamp);
 			return $remote_session;
 		} else {
-			$sql = "SELECT * FROM remote_user WHERE remote_username = ? and remote_password = ?";
-			$remote_user = $app->db->queryOneRecord($sql, $username, $app->auth->crypt_password($password));
-			if(!$remote_user) {
-				// fallback to md5
-				$sql = "SELECT * FROM remote_user WHERE remote_username = ? and remote_password = ?";
-				$remote_user = $app->db->queryOneRecord($sql, $username, md5($password));
-				if($remote_user) {
+			$sql = "SELECT * FROM remote_user WHERE remote_username = ?";
+			$remote_user = $app->db->queryOneRecord($sql, $username);
+			if($remote_user) {
+				if(substr($remote_user['remote_password'], 0, 1) === '$') {
+					if(crypt(stripslashes($password), $remote_user['remote_password']) != $remote_user['remote_password']) {
+						$remote_user = null;
+					}
+				} elseif(md5($password) == $remote_user['remote_password']) {
 					// update hash algo
 					$sql = 'UPDATE `remote_user` SET `remote_password` = ? WHERE `remote_username` = ?';
 					$app->db->query($sql, $app->auth->crypt_password($password), $username);
+				} else {
+					$remote_user = null;
 				}
 			}
-			if($remote_user['remote_userid'] > 0) {
+			if($remote_user && $remote_user['remote_userid'] > 0) {
 				if (trim($remote_user['remote_ips']) != '') {
 					$allowed_ips = explode(',',$remote_user['remote_ips']);
 					foreach($allowed_ips as $i => $allowed) {
-- 
GitLab


From d6933c0e36ed09826d639658740e58971a4c84c6 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Mon, 4 Jan 2021 14:44:48 +0100
Subject: [PATCH 228/441] - adjust ispconfig log file permissions

---
 install/dist/lib/fedora.lib.php    | 1 +
 install/dist/lib/gentoo.lib.php    | 1 +
 install/dist/lib/opensuse.lib.php  | 1 +
 install/lib/installer_base.lib.php | 1 +
 4 files changed, 4 insertions(+)

diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index 9e3f07d102..9620bf3561 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -1372,6 +1372,7 @@ class installer_dist extends installer_base {
 		//* Create the ispconfig log directory
 		if(!is_dir($conf['ispconfig_log_dir'])) mkdir($conf['ispconfig_log_dir']);
 		if(!is_file($conf['ispconfig_log_dir'].'/ispconfig.log')) exec('touch '.$conf['ispconfig_log_dir'].'/ispconfig.log');
+		chmod($conf['ispconfig_log_dir'].'/ispconfig.log', 0600);
 
 		if(is_user('getmail')) {
 			exec('mv /usr/local/ispconfig/server/scripts/run-getmail.sh /usr/local/bin/run-getmail.sh');
diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index a7d62cda0b..f719fbee38 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -1252,6 +1252,7 @@ class installer extends installer_base
 		if (!is_file($conf['ispconfig_log_dir'].'/ispconfig.log')) {
 			touch($conf['ispconfig_log_dir'].'/ispconfig.log');
 		}
+		chmod($conf['ispconfig_log_dir'].'/ispconfig.log', 0600);
 
 		//* Create the ispconfig auth log file and set uid/gid
 		if(!is_file($conf['ispconfig_log_dir'].'/auth.log')) {
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 8a4152d9b5..b9e3a1c575 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -1369,6 +1369,7 @@ class installer_dist extends installer_base {
 		//* Create the ispconfig log directory
 		if(!is_dir($conf['ispconfig_log_dir'])) mkdir($conf['ispconfig_log_dir']);
 		if(!is_file($conf['ispconfig_log_dir'].'/ispconfig.log')) exec('touch '.$conf['ispconfig_log_dir'].'/ispconfig.log');
+		chmod($conf['ispconfig_log_dir'].'/ispconfig.log', 0600);
 
 		if(is_user('getmail')) {
 			exec('mv /usr/local/ispconfig/server/scripts/run-getmail.sh /usr/local/bin/run-getmail.sh');
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 338a3dfc7e..cec9c55b42 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -3588,6 +3588,7 @@ class installer_base {
 			if(!is_dir($conf['ispconfig_log_dir'])) mkdir($conf['ispconfig_log_dir'], 0755);
 			touch($conf['ispconfig_log_dir'].'/ispconfig.log');
 		}
+		chmod($conf['ispconfig_log_dir'].'/ispconfig.log', 0600);
 
 		//* Create the ispconfig auth log file and set uid/gid
 		if(!is_file($conf['ispconfig_log_dir'].'/auth.log')) {
-- 
GitLab


From 6360c54b16163254a1e336fc5513955840ff987e Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Mon, 4 Jan 2021 21:03:11 +0100
Subject: [PATCH 229/441] Fix remote user logins (column width) (#5989)

---
 install/sql/incremental/upd_dev_collection.sql | 1 +
 install/sql/ispconfig3.sql                     | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index e69de29bb2..9f4c0f17b6 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -0,0 +1 @@
+ALTER TABLE remote_user MODIFY remote_password VARCHAR(200) NOT NULL DEFAULT '';
\ No newline at end of file
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 0f10d59ac6..d4640ea47a 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -1325,7 +1325,7 @@ CREATE TABLE `remote_user` (
   `sys_perm_group` varchar(5) default NULL,
   `sys_perm_other` varchar(5) default NULL,
   `remote_username` varchar(64) NOT NULL DEFAULT '',
-  `remote_password` varchar(64) NOT NULL DEFAULT '',
+  `remote_password` varchar(200) NOT NULL DEFAULT '',
   `remote_access` enum('y','n') NOT NULL DEFAULT 'y',
   `remote_ips` TEXT,
   `remote_functions` text,
-- 
GitLab


From 598d0e0a2dcb05df7614b554defe7f91c38abb56 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Mon, 4 Jan 2021 21:31:15 +0100
Subject: [PATCH 230/441] Apply 1 suggestion(s) to 1 file(s)

---
 install/sql/incremental/upd_dev_collection.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 9f4c0f17b6..02a94fdc1a 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1 +1 @@
-ALTER TABLE remote_user MODIFY remote_password VARCHAR(200) NOT NULL DEFAULT '';
\ No newline at end of file
+ALTER TABLE `remote_user` MODIFY `remote_password` VARCHAR(200) NOT NULL DEFAULT '';
\ No newline at end of file
-- 
GitLab


From b1f0c209804d3b627ab62fcba53e32df289ec8b6 Mon Sep 17 00:00:00 2001
From: Hj Ahmad Rasyid Hj Ismail <ahrasis@gmail.com>
Date: Wed, 6 Jan 2021 07:32:57 +0100
Subject: [PATCH 231/441] Update installer_base.lib.php to overwrite
 self-signed certificate with LE SSL certs when possible. A temporary backup
 is made to be restored if LE SSL certs failed to be issued. It will be made
 permanent if LE SSL certs are successfully issued. To resolve raised issue
 https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/5919

---
 install/lib/installer_base.lib.php | 74 ++++++++++++++++++++----------
 1 file changed, 50 insertions(+), 24 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 7bb75d8c37..6996198e7a 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2871,8 +2871,13 @@ class installer_base {
 			$ip_address_match = true;
 		}
 
+		// Get subject and issuer of ispserver.crt to check if it is self-signed cert
+		if (file_exists($ssl_crt_file)) {
+			$crt_subject = exec("openssl x509 -in ".escapeshellarg($ssl_crt_file)." -inform PEM -noout -subject");
+			$crt_issuer = exec("openssl x509 -in ".escapeshellarg($ssl_crt_file)." -inform PEM -noout -issuer");
+		}
 
-		if ((!@is_dir($acme_cert_dir) || !@file_exists($check_acme_file) || !@file_exists($ssl_crt_file) || md5_file($check_acme_file) != md5_file($ssl_crt_file)) && $ip_address_match == true) {
+		if ((@file_exists($ssl_crt_file) && ($crt_subject == $crt_issuer)) || (!@is_dir($acme_cert_dir) || !@file_exists($check_acme_file) || !@file_exists($ssl_crt_file) || md5_file($check_acme_file) != md5_file($ssl_crt_file)) && $ip_address_match == true) {
 
 			// This script is needed earlier to check and open http port 80 or standalone might fail
 			// Make executable and temporary symlink latest letsencrypt pre, post and renew hook script before install
@@ -2942,6 +2947,14 @@ class installer_base {
 
 			$issued_successfully = false;
 
+			// Backup existing ispserver ssl files
+			if(file_exists($ssl_crt_file) || is_link($ssl_crt_file))
+				rename($ssl_crt_file, $ssl_crt_file.'-temporary.bak');
+			if(file_exists($ssl_key_file) || is_link($ssl_key_file))
+				rename($ssl_key_file, $ssl_key_file.'-temporary.bak');
+			if(file_exists($ssl_pem_file) || is_link($ssl_pem_file))
+				rename($ssl_pem_file, $ssl_pem_file.'-temporary.bak');
+
 			// Attempt to use Neilpang acme.sh first, as it is now the preferred LE client
 			if (is_executable($acme)) {
 
@@ -2958,18 +2971,6 @@ class installer_base {
 				if($ret == 0 || ($ret == 2 && file_exists($check_acme_file))) {
 					// acme.sh returns with 2 on issue for already existing certificate
 
-
-					// Backup existing ispserver ssl files
-					if(file_exists($ssl_crt_file) || is_link($ssl_crt_file)) {
-						rename($ssl_crt_file, $ssl_crt_file . '-' . $date->format('YmdHis') . '.bak');
-					}
-					if(file_exists($ssl_key_file) || is_link($ssl_key_file)) {
-						rename($ssl_key_file, $ssl_key_file . '-' . $date->format('YmdHis') . '.bak');
-					}
-					if(file_exists($ssl_pem_file) || is_link($ssl_pem_file)) {
-						rename($ssl_pem_file, $ssl_pem_file . '-' . $date->format('YmdHis') . '.bak');
-					}
-
 					$check_acme_file = $ssl_crt_file;
 
 					// Define LE certs name and path, then install them
@@ -2978,8 +2979,26 @@ class installer_base {
 					$acme_chain = "--fullchain-file " . escapeshellarg($ssl_crt_file);
 					exec("$acme --install-cert -d " . escapeshellarg($hostname) . " $acme_key $acme_chain");
 					$issued_successfully = true;
+
+					// Make temporary backup of self-signed certs permanent
+					if(file_exists($ssl_crt_file.'-temporary.bak') || is_link($ssl_crt_file.'-temporary.bak'))
+						rename($ssl_crt_file.'-temporary.bak', $ssl_crt_file.'-'.$date->format('YmdHis').'.bak');
+					if(file_exists($ssl_key_file.'-temporary.bak') || is_link($ssl_key_file.'-temporary.bak'))
+						rename($ssl_key_file.'-temporary.bak', $ssl_key_file.'-'.$date->format('YmdHis').'.bak');
+					if(file_exists($ssl_pem_file.'-temporary.bak') || is_link($ssl_pem_file.'-temporary.bak'))
+						rename($ssl_pem_file.'-temporary.bak', $ssl_pem_file.'-'.$date->format('YmdHis').'.bak');
+
 				} else {
 					swriteln('Issuing certificate via acme.sh failed. Please check that your hostname can be verified by letsencrypt');
+
+					// Restore temporary backup of self-signed certs
+					if(file_exists($ssl_crt_file.'-temporary.bak') || is_link($ssl_crt_file.'-temporary.bak'))
+						rename($ssl_crt_file.'-temporary.bak', $ssl_crt_file);
+					if(file_exists($ssl_key_file.'-temporary.bak') || is_link($ssl_key_file.'-temporary.bak'))
+						rename($ssl_key_file.'-temporary.bak', $ssl_key_file);
+					if(file_exists($ssl_pem_file.'-temporary.bak') || is_link($ssl_pem_file.'-temporary.bak'))
+						rename($ssl_pem_file.'-temporary.bak', $ssl_pem_file);
+
 				}
 			// Else, we attempt to use the official LE certbot client certbot
 			} else {
@@ -3011,24 +3030,31 @@ class installer_base {
 					if($ret == 0) {
 						// certbot returns with 0 on issue for already existing certificate
 
-						// Backup existing ispserver ssl files
-						if(file_exists($ssl_crt_file) || is_link($ssl_crt_file)) {
-							rename($ssl_crt_file, $ssl_crt_file . '-' . $date->format('YmdHis') . '.bak');
-						}
-						if(file_exists($ssl_key_file) || is_link($ssl_key_file)) {
-							rename($ssl_key_file, $ssl_key_file . '-' . $date->format('YmdHis') . '.bak');
-						}
-						if(file_exists($ssl_pem_file) || is_link($ssl_pem_file)) {
-							rename($ssl_pem_file, $ssl_pem_file . '-' . $date->format('YmdHis') . '.bak');
-						}
-
 						$acme_cert_dir = '/etc/letsencrypt/live/' . $hostname;
 						symlink($acme_cert_dir . '/fullchain.pem', $ssl_crt_file);
 						symlink($acme_cert_dir . '/privkey.pem', $ssl_key_file);
 
 						$issued_successfully = true;
+
+						// Make temporary backup of self-signed certs permanent
+						if(file_exists($ssl_crt_file.'-temporary.bak') || is_link($ssl_crt_file.'-temporary.bak'))
+							rename($ssl_crt_file.'-temporary.bak', $ssl_crt_file.'-'.$date->format('YmdHis').'.bak');
+						if(file_exists($ssl_key_file.'-temporary.bak') || is_link($ssl_key_file.'-temporary.bak'))
+							rename($ssl_key_file.'-temporary.bak', $ssl_key_file.'-'.$date->format('YmdHis').'.bak');
+						if(file_exists($ssl_pem_file.'-temporary.bak') || is_link($ssl_pem_file.'-temporary.bak'))
+							rename($ssl_pem_file.'-temporary.bak', $ssl_pem_file.'-'.$date->format('YmdHis').'.bak');
+
 					} else {
 						swriteln('Issuing certificate via certbot failed. Please check log files and make sure that your hostname can be verified by letsencrypt');
+
+						// Restore temporary backup of self-signed certs
+						if(file_exists($ssl_crt_file.'-temporary.bak') || is_link($ssl_crt_file.'-temporary.bak'))
+							rename($ssl_crt_file.'-temporary.bak', $ssl_crt_file);
+						if(file_exists($ssl_key_file.'-temporary.bak') || is_link($ssl_key_file.'-temporary.bak'))
+							rename($ssl_key_file.'-temporary.bak', $ssl_key_file);
+						if(file_exists($ssl_pem_file.'-temporary.bak') || is_link($ssl_pem_file.'-temporary.bak'))
+							rename($ssl_pem_file.'-temporary.bak', $ssl_pem_file);
+						
 					}
 				} else {
 					swriteln('Did not find any valid acme client (acme.sh or certbot)');
-- 
GitLab


From f2bfd8c6f1d70048bdbfc5b125adf62a1c95daf1 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Wed, 6 Jan 2021 15:28:32 +0100
Subject: [PATCH 232/441] Fix typo (SEPCIAL -> SPECIAL) (#6001)

---
 install/tpl/debian6_dovecot2.conf.master  | 2 +-
 install/tpl/fedora_dovecot2.conf.master   | 2 +-
 install/tpl/opensuse_dovecot2.conf.master | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/install/tpl/debian6_dovecot2.conf.master b/install/tpl/debian6_dovecot2.conf.master
index f933463b0b..5032488a6f 100644
--- a/install/tpl/debian6_dovecot2.conf.master
+++ b/install/tpl/debian6_dovecot2.conf.master
@@ -111,7 +111,7 @@ plugin {
   quota_status_overquota = "552 5.2.2 Mailbox is full"
 }
 
-imap_capability=+SEPCIAL-USE XLIST
+imap_capability=+SPECIAL-USE XLIST
 namespace inbox {
   inbox = yes
   separator = .
diff --git a/install/tpl/fedora_dovecot2.conf.master b/install/tpl/fedora_dovecot2.conf.master
index a217e28d99..81d71a37fe 100644
--- a/install/tpl/fedora_dovecot2.conf.master
+++ b/install/tpl/fedora_dovecot2.conf.master
@@ -105,7 +105,7 @@ plugin {
   quota_status_overquota = "552 5.2.2 Mailbox is full"
 }
 
-imap_capability=+SEPCIAL-USE XLIST
+imap_capability=+SPECIAL-USE XLIST
 namespace inbox {
   inbox = yes
   separator = .
diff --git a/install/tpl/opensuse_dovecot2.conf.master b/install/tpl/opensuse_dovecot2.conf.master
index 7dc715ef69..fbbb102e1a 100644
--- a/install/tpl/opensuse_dovecot2.conf.master
+++ b/install/tpl/opensuse_dovecot2.conf.master
@@ -104,7 +104,7 @@ plugin {
   quota_status_overquota = "552 5.2.2 Mailbox is full"
 }
 
-imap_capability=+SEPCIAL-USE XLIST
+imap_capability=+SPECIAL-USE XLIST
 namespace inbox {
   inbox = yes
   separator = .
-- 
GitLab


From 1b79629119251e3cf0c948a8cf90bfe057791fcd Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Sun, 10 Jan 2021 18:16:38 +0100
Subject: [PATCH 233/441] Remove descriptions from forms (#6008)

---
 interface/web/admin/form/dbsync.tform.php           | 2 +-
 interface/web/admin/form/groups.tform.php           | 2 +-
 interface/web/admin/form/iptables.tform.php         | 2 +-
 interface/web/admin/form/server_config.tform.php    | 2 +-
 interface/web/admin/form/server_ip.tform.php        | 2 +-
 interface/web/admin/form/server_ip_map.tform.php    | 6 +++---
 interface/web/admin/form/server_php.tform.php       | 2 +-
 interface/web/admin/form/software_package.tform.php | 2 +-
 interface/web/admin/form/software_repo.tform.php    | 2 +-
 interface/web/admin/form/system_config.tform.php    | 2 +-
 interface/web/admin/form/tpl_default.tform.php      | 2 +-
 11 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/interface/web/admin/form/dbsync.tform.php b/interface/web/admin/form/dbsync.tform.php
index 8a4181b888..b854db81f9 100644
--- a/interface/web/admin/form/dbsync.tform.php
+++ b/interface/web/admin/form/dbsync.tform.php
@@ -94,7 +94,7 @@ unset($form);
 
 
 $form['title']          = 'DB sync';
-$form['description']    = 'ISPConfig database synchronisation tool.';
+//$form['description']    = 'ISPConfig database synchronisation tool.';
 $form['name']           = 'dbsync';
 $form['action']         = 'dbsync_edit.php';
 $form['db_table']       = 'sys_dbsync';
diff --git a/interface/web/admin/form/groups.tform.php b/interface/web/admin/form/groups.tform.php
index 5bcbe6279f..6a2b3acb9f 100644
--- a/interface/web/admin/form/groups.tform.php
+++ b/interface/web/admin/form/groups.tform.php
@@ -60,7 +60,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 $form["title"]    = "Groups";
-$form["description"]  = "groups_description";
+//$form["description"]  = "groups_description";
 $form["name"]    = "groups";
 $form["action"]   = "groups_edit.php";
 $form["db_table"]  = "sys_group";
diff --git a/interface/web/admin/form/iptables.tform.php b/interface/web/admin/form/iptables.tform.php
index 76d747020d..d36ade42b8 100644
--- a/interface/web/admin/form/iptables.tform.php
+++ b/interface/web/admin/form/iptables.tform.php
@@ -1,7 +1,7 @@
 <?php
 
 $form["title"]    = "IPTables";
-$form["description"]  = "IPTables based firewall";
+//$form["description"]  = "IPTables based firewall";
 $form["name"]    = "iptables";
 $form["action"]   = "iptables_edit.php";
 $form["db_table"]  = "iptables";
diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index 7d1e1526f5..7bed0323da 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -34,7 +34,7 @@
  */
 
 $form["title"] = "server_config";
-$form["description"] = "";
+//$form["description"] = "";
 $form["name"] = "server_config";
 $form["action"] = "server_config_edit.php";
 $form["db_table"] = "server";
diff --git a/interface/web/admin/form/server_ip.tform.php b/interface/web/admin/form/server_ip.tform.php
index d86dbb7535..920e551191 100644
--- a/interface/web/admin/form/server_ip.tform.php
+++ b/interface/web/admin/form/server_ip.tform.php
@@ -65,7 +65,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 $form["title"]    = "server_ip_edit_title";
-$form["description"]  = "server_ip_edit_desc";
+//$form["description"]  = "server_ip_edit_desc";
 $form["name"]    = "server_ip";
 $form["action"]   = "server_ip_edit.php";
 $form["db_table"]  = "server_ip";
diff --git a/interface/web/admin/form/server_ip_map.tform.php b/interface/web/admin/form/server_ip_map.tform.php
index 2374ca0ce0..1f611d1dad 100644
--- a/interface/web/admin/form/server_ip_map.tform.php
+++ b/interface/web/admin/form/server_ip_map.tform.php
@@ -29,7 +29,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 $form["title"]    = "server_ip_map_title";
-$form["description"]  = "server_ip_map_desc";
+//$form["description"]  = "server_ip_map_desc";
 $form["name"]    = "server_ip_map";
 $form["action"]   = "server_ip_map_edit.php";
 $form["db_table"]  = "server_ip_map";
@@ -59,7 +59,7 @@ $form["tabs"]['server_ip_map'] = array (
 		'source_ip' => array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'SELECT',
-			'validators' => array (  
+			'validators' => array (
 				0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'source_ip_empty'),
 			),
 			'default' => '',
@@ -68,7 +68,7 @@ $form["tabs"]['server_ip_map'] = array (
 		'destination_ip' => array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
-			'validators' => array (  
+			'validators' => array (
 				0 => array ( 'type' => 'ISIPV4', 'errmsg'=> 'ip_error_wrong'),
 				1 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'destination_ip_empty'),
             ),
diff --git a/interface/web/admin/form/server_php.tform.php b/interface/web/admin/form/server_php.tform.php
index 59eb7b4a6f..2a37a1e6d1 100644
--- a/interface/web/admin/form/server_php.tform.php
+++ b/interface/web/admin/form/server_php.tform.php
@@ -60,7 +60,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 $form["title"]    = "Additional PHP Versions";
-$form["description"]  = "Form to edit additional PHP versions";
+//$form["description"]  = "Form to edit additional PHP versions";
 $form["name"]    = "server_php";
 $form["action"]   = "server_php_edit.php";
 $form["db_table"]  = "server_php";
diff --git a/interface/web/admin/form/software_package.tform.php b/interface/web/admin/form/software_package.tform.php
index b8368d5457..888bc6df1a 100644
--- a/interface/web/admin/form/software_package.tform.php
+++ b/interface/web/admin/form/software_package.tform.php
@@ -60,7 +60,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 $form["title"]    = "Software Package";
-$form["description"]  = "Modify software package details";
+//$form["description"]  = "Modify software package details";
 $form["name"]    = "software_package";
 $form["action"]   = "software_package_edit.php";
 $form["db_table"]  = "software_package";
diff --git a/interface/web/admin/form/software_repo.tform.php b/interface/web/admin/form/software_repo.tform.php
index cbf68b3a35..2c208ce216 100644
--- a/interface/web/admin/form/software_repo.tform.php
+++ b/interface/web/admin/form/software_repo.tform.php
@@ -60,7 +60,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 $form["title"]    = "Software Repository";
-$form["description"]  = "Software Repository which may contain addons or updates";
+//$form["description"]  = "Software Repository which may contain addons or updates";
 $form["name"]    = "software_repo";
 $form["action"]   = "software_repo_edit.php";
 $form["db_table"]  = "software_repo";
diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index bbfb921e9a..88d0fef26c 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -34,7 +34,7 @@
 */
 
 $form["title"]   = "system_config_title";
-$form["description"]  = "system_config_desc_txt";
+//$form["description"]  = "system_config_desc_txt";
 $form["name"]   = "system_config";
 $form["action"]  = "system_config_edit.php";
 $form["db_table"] = "sys_ini";
diff --git a/interface/web/admin/form/tpl_default.tform.php b/interface/web/admin/form/tpl_default.tform.php
index baa84d7b30..804cfd9542 100644
--- a/interface/web/admin/form/tpl_default.tform.php
+++ b/interface/web/admin/form/tpl_default.tform.php
@@ -60,7 +60,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 $form["title"]   = "tpl_default_head_txt";
-$form["description"]  = "tpl_default_desc_txt";
+//$form["description"]  = "tpl_default_desc_txt";
 $form["name"]   = "tpl_default";
 $form["action"]  = "tpl_default.php";
 $form["db_table"] = "sys_theme";
-- 
GitLab


From 910e1023b0bcb9d5e633fd32c9da079d7debc0ff Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Sun, 10 Jan 2021 18:31:45 +0100
Subject: [PATCH 234/441] Add missing label for php_fpm_socket_dir (#6009)

---
 interface/web/admin/lib/lang/ar_server_php.lng        | 1 +
 interface/web/admin/lib/lang/bg_server_php.lng        | 1 +
 interface/web/admin/lib/lang/br_server_php.lng        | 1 +
 interface/web/admin/lib/lang/ca_server_php.lng        | 1 +
 interface/web/admin/lib/lang/cz_server_php.lng        | 1 +
 interface/web/admin/lib/lang/de_server_php.lng        | 1 +
 interface/web/admin/lib/lang/dk_server_php.lng        | 1 +
 interface/web/admin/lib/lang/el_server_php.lng        | 1 +
 interface/web/admin/lib/lang/en_server_php.lng        | 1 +
 interface/web/admin/lib/lang/es_server_php.lng        | 1 +
 interface/web/admin/lib/lang/fi_server_php.lng        | 1 +
 interface/web/admin/lib/lang/fr_server_php.lng        | 1 +
 interface/web/admin/lib/lang/hr_server_php.lng        | 1 +
 interface/web/admin/lib/lang/hu_server_php.lng        | 1 +
 interface/web/admin/lib/lang/id_server_php.lng        | 1 +
 interface/web/admin/lib/lang/it_server_php.lng        | 1 +
 interface/web/admin/lib/lang/ja_server_php.lng        | 1 +
 interface/web/admin/lib/lang/nl_server_php.lng        | 1 +
 interface/web/admin/lib/lang/pl_server_php.lng        | 1 +
 interface/web/admin/lib/lang/pt_server_php.lng        | 1 +
 interface/web/admin/lib/lang/ro_server_php.lng        | 1 +
 interface/web/admin/lib/lang/ru_server_php.lng        | 1 +
 interface/web/admin/lib/lang/se_server_php.lng        | 1 +
 interface/web/admin/lib/lang/sk_server_php.lng        | 1 +
 interface/web/admin/lib/lang/tr_server_php.lng        | 1 +
 interface/web/admin/templates/server_php_fpm_edit.htm | 8 ++++----
 26 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/interface/web/admin/lib/lang/ar_server_php.lng b/interface/web/admin/lib/lang/ar_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/ar_server_php.lng
+++ b/interface/web/admin/lib/lang/ar_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/bg_server_php.lng b/interface/web/admin/lib/lang/bg_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/bg_server_php.lng
+++ b/interface/web/admin/lib/lang/bg_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/br_server_php.lng b/interface/web/admin/lib/lang/br_server_php.lng
index 6524531be5..97b70c2e8f 100644
--- a/interface/web/admin/lib/lang/br_server_php.lng
+++ b/interface/web/admin/lib/lang/br_server_php.lng
@@ -13,6 +13,7 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Diretório PHP.ini';
 $wb['php_fpm_init_script_txt'] = 'Caminho do script de inicialização PHP-FPM';
 $wb['php_fpm_ini_dir_txt'] = 'Caminho do diretório PHP.ini';
 $wb['php_fpm_pool_dir_txt'] = 'Caminho do diretório da pool PHP-FPM';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Ativo';
 $wb['php_in_use_error'] = 'Esta versão PHP está em uso.';
 $wb['php_name_in_use_error'] = 'O nome não pode ser modificado.';
diff --git a/interface/web/admin/lib/lang/ca_server_php.lng b/interface/web/admin/lib/lang/ca_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/ca_server_php.lng
+++ b/interface/web/admin/lib/lang/ca_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/cz_server_php.lng b/interface/web/admin/lib/lang/cz_server_php.lng
index d955c3b633..ab255bcea7 100644
--- a/interface/web/admin/lib/lang/cz_server_php.lng
+++ b/interface/web/admin/lib/lang/cz_server_php.lng
@@ -13,6 +13,7 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Cesta k php.ini adresáři';
 $wb['php_fpm_init_script_txt'] = 'Cesta k PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Cesta k php.ini adresáři';
 $wb['php_fpm_pool_dir_txt'] = 'Cesta k PHP-FPM pool adresáři';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Aktivní';
 $wb['php_in_use_error'] = 'This PHP-Version is in use.';
 $wb['php_name_in_use_error'] = 'The name can not be changed.';
diff --git a/interface/web/admin/lib/lang/de_server_php.lng b/interface/web/admin/lib/lang/de_server_php.lng
index f43e79b4af..b3ad5d9913 100644
--- a/interface/web/admin/lib/lang/de_server_php.lng
+++ b/interface/web/admin/lib/lang/de_server_php.lng
@@ -13,6 +13,7 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Pfad zum php.ini Verzeichnis';
 $wb['php_fpm_init_script_txt'] = 'Pfad zum PHP-FPM Init Script';
 $wb['php_fpm_ini_dir_txt'] = 'Pfad zum php.ini Verzeichnis';
 $wb['php_fpm_pool_dir_txt'] = 'Pfad zum PHP-FPM Pool Verzeichnis';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Aktiv';
 $wb['php_in_use_error'] = 'Diese PHP-Version wird noch benutzt.';
 $wb['php_name_in_use_error'] = 'Der Name kann nicht geändert werden.';
diff --git a/interface/web/admin/lib/lang/dk_server_php.lng b/interface/web/admin/lib/lang/dk_server_php.lng
index ff8586f5ea..b21f00eec9 100644
--- a/interface/web/admin/lib/lang/dk_server_php.lng
+++ b/interface/web/admin/lib/lang/dk_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Sti til php.ini mappe';
 $wb['php_fpm_init_script_txt'] = 'Sti til PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Sti til php.ini mappe';
 $wb['php_fpm_pool_dir_txt'] = 'Sti til PHP-FPM pool mappe';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/el_server_php.lng b/interface/web/admin/lib/lang/el_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/el_server_php.lng
+++ b/interface/web/admin/lib/lang/el_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/en_server_php.lng b/interface/web/admin/lib/lang/en_server_php.lng
index 9d322804bb..491be1aae2 100644
--- a/interface/web/admin/lib/lang/en_server_php.lng
+++ b/interface/web/admin/lib/lang/en_server_php.lng
@@ -13,6 +13,7 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 $wb['php_in_use_error'] = 'This PHP-Version is in use.';
 $wb['php_name_in_use_error'] = 'The name can not be changed.';
diff --git a/interface/web/admin/lib/lang/es_server_php.lng b/interface/web/admin/lib/lang/es_server_php.lng
index 762fa0ed8c..478bd07eeb 100644
--- a/interface/web/admin/lib/lang/es_server_php.lng
+++ b/interface/web/admin/lib/lang/es_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fpm_init_script_txt'] = 'Ruta al archivo de arranque de PHP-FPM';
 $wb['php_fpm_pool_dir_txt'] = 'Ruta al directorio de procesos de PHP-FPM';
 $wb['server_id_txt'] = 'Servidor';
 $wb['server_php_name_error_empty'] = 'El campo Nombre no puede estar vacío.';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/fi_server_php.lng b/interface/web/admin/lib/lang/fi_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/fi_server_php.lng
+++ b/interface/web/admin/lib/lang/fi_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/fr_server_php.lng b/interface/web/admin/lib/lang/fr_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/fr_server_php.lng
+++ b/interface/web/admin/lib/lang/fr_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/hr_server_php.lng b/interface/web/admin/lib/lang/hr_server_php.lng
index 5bfc1dd6d2..d6a95e74f0 100644
--- a/interface/web/admin/lib/lang/hr_server_php.lng
+++ b/interface/web/admin/lib/lang/hr_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Putanja do php.ini direktorija';
 $wb['php_fpm_init_script_txt'] = 'Putanja do PHP-FPM init skripte';
 $wb['php_fpm_ini_dir_txt'] = 'Putanja do php.ini direktorija';
 $wb['php_fpm_pool_dir_txt'] = 'Putanja do PHP-FPM pool direktorija';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/hu_server_php.lng b/interface/web/admin/lib/lang/hu_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/hu_server_php.lng
+++ b/interface/web/admin/lib/lang/hu_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/id_server_php.lng b/interface/web/admin/lib/lang/id_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/id_server_php.lng
+++ b/interface/web/admin/lib/lang/id_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/it_server_php.lng b/interface/web/admin/lib/lang/it_server_php.lng
index 805528f376..42d926d83b 100644
--- a/interface/web/admin/lib/lang/it_server_php.lng
+++ b/interface/web/admin/lib/lang/it_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Percorso per  php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Percorso per  PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Percorso per  php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Percorso per  PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/ja_server_php.lng b/interface/web/admin/lib/lang/ja_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/ja_server_php.lng
+++ b/interface/web/admin/lib/lang/ja_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/nl_server_php.lng b/interface/web/admin/lib/lang/nl_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/nl_server_php.lng
+++ b/interface/web/admin/lib/lang/nl_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/pl_server_php.lng b/interface/web/admin/lib/lang/pl_server_php.lng
index 5a7c7b6f9b..207be27c6f 100644
--- a/interface/web/admin/lib/lang/pl_server_php.lng
+++ b/interface/web/admin/lib/lang/pl_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Ścieżka do katalogu php.ini';
 $wb['php_fpm_init_script_txt'] = 'Ścieżka do skryptu inicjującego PHP-FPM';
 $wb['php_fpm_ini_dir_txt'] = 'Ścieżka do katalogu php.ini';
 $wb['php_fpm_pool_dir_txt'] = 'Ścieżka do katalogu pool PHP-FPM';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/pt_server_php.lng b/interface/web/admin/lib/lang/pt_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/pt_server_php.lng
+++ b/interface/web/admin/lib/lang/pt_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/ro_server_php.lng b/interface/web/admin/lib/lang/ro_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/ro_server_php.lng
+++ b/interface/web/admin/lib/lang/ro_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/ru_server_php.lng b/interface/web/admin/lib/lang/ru_server_php.lng
index 854b8a3c23..cfcf8de4e5 100644
--- a/interface/web/admin/lib/lang/ru_server_php.lng
+++ b/interface/web/admin/lib/lang/ru_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Путь к каталогу php.ini FastCGI';
 $wb['php_fpm_init_script_txt'] = 'Путь к скрипту нициализации PHP-FPM';
 $wb['php_fpm_ini_dir_txt'] = 'Путь к каталогу php.ini PHP-FPM';
 $wb['php_fpm_pool_dir_txt'] = 'Путь до каталога пула PHP-FPM';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/se_server_php.lng b/interface/web/admin/lib/lang/se_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/se_server_php.lng
+++ b/interface/web/admin/lib/lang/se_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/sk_server_php.lng b/interface/web/admin/lib/lang/sk_server_php.lng
index 179a8fc357..24ad3c4be8 100644
--- a/interface/web/admin/lib/lang/sk_server_php.lng
+++ b/interface/web/admin/lib/lang/sk_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
 $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
 ?>
diff --git a/interface/web/admin/lib/lang/tr_server_php.lng b/interface/web/admin/lib/lang/tr_server_php.lng
index e0437e94b3..d4ad338db1 100644
--- a/interface/web/admin/lib/lang/tr_server_php.lng
+++ b/interface/web/admin/lib/lang/tr_server_php.lng
@@ -13,5 +13,6 @@ $wb['php_fastcgi_ini_dir_txt'] = 'php.ini Klasörünün Yolu';
 $wb['php_fpm_init_script_txt'] = 'PHP-FPM BaÅŸlatma BetiÄŸinin Yolu';
 $wb['php_fpm_ini_dir_txt'] = 'php.ini Klasörünün Yolu';
 $wb['php_fpm_pool_dir_txt'] = 'PHP-FPM Havuz Klasörünün Yolu';
+$wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Etkin';
 ?>
diff --git a/interface/web/admin/templates/server_php_fpm_edit.htm b/interface/web/admin/templates/server_php_fpm_edit.htm
index 5e4cae9ac5..c3369f1fdb 100644
--- a/interface/web/admin/templates/server_php_fpm_edit.htm
+++ b/interface/web/admin/templates/server_php_fpm_edit.htm
@@ -8,12 +8,12 @@
                 <label for="php_fpm_pool_dir" class="col-sm-3 control-label">{tmpl_var name='php_fpm_pool_dir_txt'}</label>
                 <div class="col-sm-9"><input type="text" name="php_fpm_pool_dir" id="php_fpm_pool_dir" value="{tmpl_var name='php_fpm_pool_dir'}" class="form-control" /></div></div>
             <div class="form-group">
-                <label for="php_fpm_socket_dir" class="col-sm-3 control-label">{tmpl_var name='php_fpm_socket_dir'}</label>
+                <label for="php_fpm_socket_dir" class="col-sm-3 control-label">{tmpl_var name='php_fpm_socket_dir_txt'}</label>
                 <div class="col-sm-9"><input type="text" name="php_fpm_socket_dir" id="php_fpm_socket_dir" value="{tmpl_var name='php_fpm_socket_dir'}" class="form-control" /></div></div>
-        
-            
+
+
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
-            
+
         <div class="clear"><div class="right">
             <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_php_edit.php">{tmpl_var name='btn_save_txt'}</button>
             <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_php_list.php">{tmpl_var name='btn_cancel_txt'}</button>
-- 
GitLab


From c6827aa608e3923de4b0bdee2c624edbb86eff16 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Sun, 10 Jan 2021 18:36:34 +0100
Subject: [PATCH 235/441] Add missing translations from !950

---
 interface/web/admin/lib/lang/ar_server_php.lng | 2 ++
 interface/web/admin/lib/lang/bg_server_php.lng | 2 ++
 interface/web/admin/lib/lang/br_server_php.lng | 1 +
 interface/web/admin/lib/lang/ca_server_php.lng | 2 ++
 interface/web/admin/lib/lang/cz_server_php.lng | 1 +
 interface/web/admin/lib/lang/dk_server_php.lng | 2 ++
 interface/web/admin/lib/lang/el_server_php.lng | 2 ++
 interface/web/admin/lib/lang/es_server_php.lng | 2 ++
 interface/web/admin/lib/lang/fi_server_php.lng | 2 ++
 interface/web/admin/lib/lang/fr_server_php.lng | 2 ++
 interface/web/admin/lib/lang/hr_server_php.lng | 2 ++
 interface/web/admin/lib/lang/hu_server_php.lng | 2 ++
 interface/web/admin/lib/lang/id_server_php.lng | 2 ++
 interface/web/admin/lib/lang/it_server_php.lng | 2 ++
 interface/web/admin/lib/lang/ja_server_php.lng | 2 ++
 interface/web/admin/lib/lang/nl_server_php.lng | 2 ++
 interface/web/admin/lib/lang/pl_server_php.lng | 2 ++
 interface/web/admin/lib/lang/pt_server_php.lng | 2 ++
 interface/web/admin/lib/lang/ro_server_php.lng | 2 ++
 interface/web/admin/lib/lang/ru_server_php.lng | 2 ++
 interface/web/admin/lib/lang/se_server_php.lng | 2 ++
 interface/web/admin/lib/lang/sk_server_php.lng | 2 ++
 interface/web/admin/lib/lang/tr_server_php.lng | 2 ++
 23 files changed, 44 insertions(+)

diff --git a/interface/web/admin/lib/lang/ar_server_php.lng b/interface/web/admin/lib/lang/ar_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/ar_server_php.lng
+++ b/interface/web/admin/lib/lang/ar_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/bg_server_php.lng b/interface/web/admin/lib/lang/bg_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/bg_server_php.lng
+++ b/interface/web/admin/lib/lang/bg_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/br_server_php.lng b/interface/web/admin/lib/lang/br_server_php.lng
index 97b70c2e8f..d0a1015833 100644
--- a/interface/web/admin/lib/lang/br_server_php.lng
+++ b/interface/web/admin/lib/lang/br_server_php.lng
@@ -17,3 +17,4 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Ativo';
 $wb['php_in_use_error'] = 'Esta versão PHP está em uso.';
 $wb['php_name_in_use_error'] = 'O nome não pode ser modificado.';
+?>
diff --git a/interface/web/admin/lib/lang/ca_server_php.lng b/interface/web/admin/lib/lang/ca_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/ca_server_php.lng
+++ b/interface/web/admin/lib/lang/ca_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/cz_server_php.lng b/interface/web/admin/lib/lang/cz_server_php.lng
index ab255bcea7..c1c67f05ef 100644
--- a/interface/web/admin/lib/lang/cz_server_php.lng
+++ b/interface/web/admin/lib/lang/cz_server_php.lng
@@ -17,3 +17,4 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Aktivní';
 $wb['php_in_use_error'] = 'This PHP-Version is in use.';
 $wb['php_name_in_use_error'] = 'The name can not be changed.';
+?>
diff --git a/interface/web/admin/lib/lang/dk_server_php.lng b/interface/web/admin/lib/lang/dk_server_php.lng
index b21f00eec9..db6ef1f98a 100644
--- a/interface/web/admin/lib/lang/dk_server_php.lng
+++ b/interface/web/admin/lib/lang/dk_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Sti til php.ini mappe';
 $wb['php_fpm_pool_dir_txt'] = 'Sti til PHP-FPM pool mappe';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/el_server_php.lng b/interface/web/admin/lib/lang/el_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/el_server_php.lng
+++ b/interface/web/admin/lib/lang/el_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/es_server_php.lng b/interface/web/admin/lib/lang/es_server_php.lng
index 478bd07eeb..df2f0778f4 100644
--- a/interface/web/admin/lib/lang/es_server_php.lng
+++ b/interface/web/admin/lib/lang/es_server_php.lng
@@ -15,4 +15,6 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['server_php_name_error_empty'] = 'El campo Nombre no puede estar vacío.';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/fi_server_php.lng b/interface/web/admin/lib/lang/fi_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/fi_server_php.lng
+++ b/interface/web/admin/lib/lang/fi_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/fr_server_php.lng b/interface/web/admin/lib/lang/fr_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/fr_server_php.lng
+++ b/interface/web/admin/lib/lang/fr_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/hr_server_php.lng b/interface/web/admin/lib/lang/hr_server_php.lng
index d6a95e74f0..15ec1b30f5 100644
--- a/interface/web/admin/lib/lang/hr_server_php.lng
+++ b/interface/web/admin/lib/lang/hr_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Putanja do php.ini direktorija';
 $wb['php_fpm_pool_dir_txt'] = 'Putanja do PHP-FPM pool direktorija';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/hu_server_php.lng b/interface/web/admin/lib/lang/hu_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/hu_server_php.lng
+++ b/interface/web/admin/lib/lang/hu_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/id_server_php.lng b/interface/web/admin/lib/lang/id_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/id_server_php.lng
+++ b/interface/web/admin/lib/lang/id_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/it_server_php.lng b/interface/web/admin/lib/lang/it_server_php.lng
index 42d926d83b..d85b5cd7da 100644
--- a/interface/web/admin/lib/lang/it_server_php.lng
+++ b/interface/web/admin/lib/lang/it_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Percorso per  php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Percorso per  PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/ja_server_php.lng b/interface/web/admin/lib/lang/ja_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/ja_server_php.lng
+++ b/interface/web/admin/lib/lang/ja_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/nl_server_php.lng b/interface/web/admin/lib/lang/nl_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/nl_server_php.lng
+++ b/interface/web/admin/lib/lang/nl_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/pl_server_php.lng b/interface/web/admin/lib/lang/pl_server_php.lng
index 207be27c6f..de4ce60ac1 100644
--- a/interface/web/admin/lib/lang/pl_server_php.lng
+++ b/interface/web/admin/lib/lang/pl_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Ścieżka do katalogu php.ini';
 $wb['php_fpm_pool_dir_txt'] = 'Ścieżka do katalogu pool PHP-FPM';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/pt_server_php.lng b/interface/web/admin/lib/lang/pt_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/pt_server_php.lng
+++ b/interface/web/admin/lib/lang/pt_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/ro_server_php.lng b/interface/web/admin/lib/lang/ro_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/ro_server_php.lng
+++ b/interface/web/admin/lib/lang/ro_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/ru_server_php.lng b/interface/web/admin/lib/lang/ru_server_php.lng
index cfcf8de4e5..c5c4942b8e 100644
--- a/interface/web/admin/lib/lang/ru_server_php.lng
+++ b/interface/web/admin/lib/lang/ru_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Путь к каталогу php.ini PHP-FPM';
 $wb['php_fpm_pool_dir_txt'] = 'Путь до каталога пула PHP-FPM';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/se_server_php.lng b/interface/web/admin/lib/lang/se_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/se_server_php.lng
+++ b/interface/web/admin/lib/lang/se_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/sk_server_php.lng b/interface/web/admin/lib/lang/sk_server_php.lng
index 24ad3c4be8..491be1aae2 100644
--- a/interface/web/admin/lib/lang/sk_server_php.lng
+++ b/interface/web/admin/lib/lang/sk_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
 $wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Active';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
diff --git a/interface/web/admin/lib/lang/tr_server_php.lng b/interface/web/admin/lib/lang/tr_server_php.lng
index d4ad338db1..71b130e3d2 100644
--- a/interface/web/admin/lib/lang/tr_server_php.lng
+++ b/interface/web/admin/lib/lang/tr_server_php.lng
@@ -15,4 +15,6 @@ $wb['php_fpm_ini_dir_txt'] = 'php.ini Klasörünün Yolu';
 $wb['php_fpm_pool_dir_txt'] = 'PHP-FPM Havuz Klasörünün Yolu';
 $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory';
 $wb['active_txt'] = 'Etkin';
+$wb['php_in_use_error'] = 'This PHP-Version is in use.';
+$wb['php_name_in_use_error'] = 'The name can not be changed.';
 ?>
-- 
GitLab


From 61b56b28aaecb50479d9cacad8884c56a4a432ad Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Mon, 11 Jan 2021 17:47:20 +0100
Subject: [PATCH 236/441] allow custom rspamd url (Implements #6010)

---
 install/tpl/server.ini.master                       |  1 +
 interface/web/admin/form/server_config.tform.php    | 13 +++++++++++++
 interface/web/admin/server_config_edit.php          |  8 ++++++--
 .../web/admin/templates/server_config_mail_edit.htm |  8 +++++++-
 4 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master
index 175617605a..028fb68a6b 100644
--- a/install/tpl/server.ini.master
+++ b/install/tpl/server.ini.master
@@ -59,6 +59,7 @@ overquota_notify_client=y
 overquota_notify_freq=7
 overquota_notify_onok=n
 sendmail_path=/usr/sbin/sendmail
+rspamd_url=
 
 [getmail]
 getmail_config_dir=/etc/getmail
diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index 7d1e1526f5..1a986d98dd 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -717,6 +717,19 @@ $form["tabs"]['mail'] = array(
 			'default' => 'n',
 			'value' => array(0 => 'n', 1 => 'y')
 		),
+		'rspamd_url' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '',
+			'filters'   => array(
+				0 => array( 'event' => 'SAVE', 'type' => 'IDNTOASCII'),
+				1 => array( 'event' => 'SHOW', 'type' => 'IDNTOUTF8'),
+				2 => array( 'event' => 'SAVE', 'type' => 'TOLOWER')
+			),
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255'
+		),
 		//#################################
 		// END Datatable fields
 		//#################################
diff --git a/interface/web/admin/server_config_edit.php b/interface/web/admin/server_config_edit.php
index 339ac2f2f5..9a54c9fb16 100644
--- a/interface/web/admin/server_config_edit.php
+++ b/interface/web/admin/server_config_edit.php
@@ -90,8 +90,12 @@ class page_action extends tform_actions {
 			$this->dataRecord = $app->getconf->get_server_config($server_id, $section);
 
 			if($section == 'mail'){
-				$server_config = $app->getconf->get_server_config($server_id, 'server');
-				$rspamd_url = 'https://'.$server_config['hostname'].':8081/rspamd/';
+				if(trim($this->dataRecord['rspamd_url'] == '')) {
+					$server_config = $app->getconf->get_server_config($server_id, 'server');
+					$rspamd_url = 'https://'.$server_config['hostname'].':8081/rspamd/';
+				} else {
+					$rspamd_url = $this->dataRecord['rspamd_url'];
+				}
 			}
 		}
 
diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm
index c26cff24ba..76ed5ef4fb 100644
--- a/interface/web/admin/templates/server_config_mail_edit.htm
+++ b/interface/web/admin/templates/server_config_mail_edit.htm
@@ -49,7 +49,13 @@
             </div>
 			<div class="form-group rspamd">
                 <label for="rspamd_url" class="col-sm-3 control-label col-text">{tmpl_var name='rspamd_url_txt'}</label>
-                <div class="col-sm-6"><a href="{tmpl_var name='rspamd_url'}" target="_blank">{tmpl_var name='rspamd_url'}</a><a href="{tmpl_var name='rspamd_url'}" target="_blank" class="btn btn-default formbutton-default formbutton-narrow" style="margin-left:20px"><span class="icon icon-link"></span></a></div>
+				<div class="col-sm-8"><div class="input-group">
+					<input type="text" name="rspamd_url" id="rspamd_url" value="{tmpl_var name='rspamd_url'}" class="form-control" />
+					<span class="input-group-btn">
+						<a href="{tmpl_var name='rspamd_url'}" target="_blank" class="btn btn-default formbutton-default formbutton-narrow" style="margin-left:20px"><span class="icon icon-link"></span></a>
+					</span>
+				</div></div>
+			</div>
             </div>
 			<div class="form-group rspamd">
                 <label for="rspamd_password" class="col-sm-3 control-label">{tmpl_var name='rspamd_password_txt'}</label>
-- 
GitLab


From 8d65452b4f38e96e114809aba5a3c604965d0a6a Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Tue, 12 Jan 2021 06:47:53 +0100
Subject: [PATCH 237/441] remove duplicate php-version-checks from installer /
 updater

---
 install/install.php                | 1 -
 install/lib/installer_base.lib.php | 7 -------
 install/update.php                 | 1 -
 3 files changed, 9 deletions(-)

diff --git a/install/install.php b/install/install.php
index 0df226ee10..7bc3836223 100644
--- a/install/install.php
+++ b/install/install.php
@@ -146,7 +146,6 @@ include_once 'dist/conf/'.$dist['confid'].'.conf.php';
 //** Installer Interface
 //****************************************************************************************************
 $inst = new installer();
-if (!$inst->get_php_version()) die('ISPConfig requires PHP '.$inst->min_php."\n");
 $retval=shell_exec("which which");
 if (empty($retval)) die ("ISPConfig requires which \n");
 
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 8a7fb413ec..94042c6931 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -35,7 +35,6 @@ class installer_base {
 	var $db;
 	public $install_ispconfig_interface = true;
 	public $is_update = false; // true if it is an update, falsi if it is a new install
-	public $min_php = '5.4'; // minimal php-version for update / install
 	protected $mailman_group = 'list';
 
 
@@ -151,12 +150,6 @@ class installer_base {
 		}
 	}
 
-	//** Detect PHP-Version
-	public function get_php_version() {
-		if(version_compare(PHP_VERSION, $this->min_php, '<')) return false;
-		else return true;
-	}
-
 	public function crypt_password($cleartext_password, $charset = 'UTF-8') {
 		if($charset != 'UTF-8') {
 			$cleartext_password = mb_convert_encoding($cleartext_password, $charset, 'UTF-8');
diff --git a/install/update.php b/install/update.php
index 4043647d8e..46031f77bb 100644
--- a/install/update.php
+++ b/install/update.php
@@ -185,7 +185,6 @@ $conf['server_id'] = intval($conf_old["server_id"]);
 $conf['ispconfig_log_priority'] = $conf_old["log_priority"];
 
 $inst = new installer();
-if (!$inst->get_php_version()) die('ISPConfig requieres PHP '.$inst->min_php."\n");
 $inst->is_update = true;
 
 $inst->check_prerequisites();
-- 
GitLab


From c1e666f369252bfea0586a6e5a706bbf020cf8ad Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Tue, 12 Jan 2021 19:41:10 +0100
Subject: [PATCH 238/441] Update README.md

---
 README.md | 44 +++++++++++++++++++++++++++++++++++++-------
 1 file changed, 37 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index 1ffa151993..f59f104bb1 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,43 @@
 # ISPConfig - Hosting Control Panel
-
+![alt text](https://www.ispconfig.org/wp-content/themes/ispconfig/images/ispconfig_logo.png "") \
 Development branch: [![pipeline status](https://git.ispconfig.org/ispconfig/ispconfig3/badges/develop/pipeline.svg)](https://git.ispconfig.org/ispconfig/ispconfig3/commits/develop)
 
-
+## Functions
 - Manage multiple servers from one control panel
-- Web server management (Apache2 and nginx)
-- Mail server management (with virtual mail users)
-- DNS server management (BIND and MyDNS)
+- Single server, multiserver and mirrored clusters.
+- Webserver management (Apache2 and nginx)
+- Mailserver management
+- DNS server management (BIND and PowerDNS)
 - Virtualization (OpenVZ)
-- Administrator, reseller and client login
-- Configuration mirroring and clusters
+- Administrator, reseller, client and mailuser login
 - Open Source software (BSD license)
+
+## Supported daemons
+- HTTP: Apache2 and nginx
+- HTTP stats: Webalizer, GoAccess and AWStats
+- Let's Encrypt: Acme.sh and certbot
+- SMTP: Postfix
+- POP3/IMAP: Dovecot
+- Spamfilter: Rspamd and Amavis
+- FTP: PureFTPD
+- DNS: Bind, PowerDNS
+- Database: MariaDB and MySQL
+
+## Supported operating systems
+- Debian 9, 10, and testing
+- Ubuntu 16.04 - 20.04
+- CentOS 7 and 8
+
+## Auto-install script
+You can install ISPConfig with our official autoinstaller: https://git.ispconfig.org/ispconfig/ispconfig-autoinstaller/-/blob/master/README.md
+
+## Migration tool
+The Migration Tool helps you to import data from other control panels (currently ISPConfig 2 and 3 – 3.2, Plesk 10 – 12.5, Plesk Onyx, CPanel** and Confixx 3). For more information, see https://www.ispconfig.org/add-ons/ispconfig-migration-tool/
+
+** The Migration Toolkit contains now beta support for migrating CPanel to ISPConfig.
+
+## Documentation
+You can support ISPConfig development by buying the manual: https://www.ispconfig.org/documentation/
+
+## Contributing
+If you like to contribute to the ISPConfig development, please send an email to: dev [at] ispconfig [dot] org.
-- 
GitLab


From 3d52e5e94a1cbbbdd421c8bc4f380f798a091bc4 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Tue, 12 Jan 2021 19:43:58 +0100
Subject: [PATCH 239/441] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index f59f104bb1..544c36e7d6 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ Development branch: [![pipeline status](https://git.ispconfig.org/ispconfig/ispc
 - POP3/IMAP: Dovecot
 - Spamfilter: Rspamd and Amavis
 - FTP: PureFTPD
-- DNS: Bind, PowerDNS
+- DNS: BIND9 and PowerDNS
 - Database: MariaDB and MySQL
 
 ## Supported operating systems
-- 
GitLab


From e2b7dfc8e8c2bef60245efefe64f79724b218a90 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 12 Jan 2021 17:26:32 -0700
Subject: [PATCH 240/441] whitelist senders before reject_sender_login_mismatch

---
 install/tpl/debian_postfix.conf.master   | 2 +-
 install/tpl/fedora_postfix.conf.master   | 2 +-
 install/tpl/gentoo_postfix.conf.master   | 2 +-
 install/tpl/opensuse_postfix.conf.master | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master
index a6a48e0e02..03077cbe7d 100644
--- a/install/tpl/debian_postfix.conf.master
+++ b/install/tpl/debian_postfix.conf.master
@@ -27,7 +27,7 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = yes
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master
index 3cd8357a66..fb284e4885 100644
--- a/install/tpl/fedora_postfix.conf.master
+++ b/install/tpl/fedora_postfix.conf.master
@@ -23,7 +23,7 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = yes
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master
index f4a1d4025c..8a50cce3cd 100644
--- a/install/tpl/gentoo_postfix.conf.master
+++ b/install/tpl/gentoo_postfix.conf.master
@@ -22,7 +22,7 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = yes
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master
index 7d3669853a..8186c2ad8a 100644
--- a/install/tpl/opensuse_postfix.conf.master
+++ b/install/tpl/opensuse_postfix.conf.master
@@ -25,7 +25,7 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions =  {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = yes
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
-- 
GitLab


From 46e09fdaa656fc723c6ed02cc2714f1ddb69f9ad Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 13 Jan 2021 10:44:00 -0700
Subject: [PATCH 241/441] mail: add allow_send_as to domain catchall

---
 .../web/mail/form/mail_domain_catchall.tform.php     |  6 ++++++
 .../web/mail/lib/lang/ar_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/bg_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/br_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/ca_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/cz_mail_domain_catchall.lng    |  2 ++
 .../web/mail/lib/lang/de_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/dk_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/el_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/en_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/es_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/fi_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/fr_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/hr_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/hu_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/id_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/it_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/ja_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/nl_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/pl_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/pt_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/ro_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/ru_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/se_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/sk_mail_domain_catchall.lng    |  3 ++-
 .../web/mail/lib/lang/tr_mail_domain_catchall.lng    |  3 ++-
 interface/web/mail/templates/mail_alias_edit.htm     | 12 ++++++------
 .../web/mail/templates/mail_domain_catchall_edit.htm |  6 ++++++
 interface/web/mail/templates/mail_forward_edit.htm   | 12 ++++++------
 29 files changed, 74 insertions(+), 36 deletions(-)

diff --git a/interface/web/mail/form/mail_domain_catchall.tform.php b/interface/web/mail/form/mail_domain_catchall.tform.php
index c43aeb3339..95e10354cc 100644
--- a/interface/web/mail/form/mail_domain_catchall.tform.php
+++ b/interface/web/mail/form/mail_domain_catchall.tform.php
@@ -125,6 +125,12 @@ $form["tabs"]['catchall'] = array (
 			'default' => '',
 			'value'  => array('alias' => 'Alias', 'forward'=>'Forward', 'catchall'=>'Catchall')
 		),
+		'allow_send_as' => array (
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'n',
+			'value'  => array(1 => 'y', 0 => 'n')
+		),
 		'active' => array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
diff --git a/interface/web/mail/lib/lang/ar_mail_domain_catchall.lng b/interface/web/mail/lib/lang/ar_mail_domain_catchall.lng
index 55cc10358e..b55657faf6 100644
--- a/interface/web/mail/lib/lang/ar_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/ar_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'The max. number of email catchall accounts for
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/bg_mail_domain_catchall.lng b/interface/web/mail/lib/lang/bg_mail_domain_catchall.lng
index 06f1f01e11..346ddad909 100644
--- a/interface/web/mail/lib/lang/bg_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/bg_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Максималният брой записи
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/br_mail_domain_catchall.lng b/interface/web/mail/lib/lang/br_mail_domain_catchall.lng
index 3d4f85af8d..3bc3b78d04 100644
--- a/interface/web/mail/lib/lang/br_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/br_mail_domain_catchall.lng
@@ -10,4 +10,5 @@ $wb['domain_txt'] = 'Domínio';
 $wb['source_txt'] = 'Origem';
 $wb['destination_error_isemail'] = 'Endereço de e-mail de destino é inválido.';
 $wb['greylisting_txt'] = 'Habilitar greylist';
-?>
+$wb['send_as_txt'] = 'Enviar como';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/ca_mail_domain_catchall.lng b/interface/web/mail/lib/lang/ca_mail_domain_catchall.lng
index feafd436f6..5499c5a11d 100644
--- a/interface/web/mail/lib/lang/ca_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/ca_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Le nombre maximal de comptes collecteurs pour v
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'La destination n\'est pas valide.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/cz_mail_domain_catchall.lng b/interface/web/mail/lib/lang/cz_mail_domain_catchall.lng
index 0ca32d2347..a425cb74a6 100644
--- a/interface/web/mail/lib/lang/cz_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/cz_mail_domain_catchall.lng
@@ -9,3 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Byl dosažen maximální počet košů účtů
 $wb['source_txt'] = 'Zdroj';
 $wb['destination_error_isemail'] = 'Cílová e-mailová adresa není platná.';
 $wb['greylisting_txt'] = 'Povolit greylisting';
+$wb['send_as_txt'] = 'Odeslat jako';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/de_mail_domain_catchall.lng b/interface/web/mail/lib/lang/de_mail_domain_catchall.lng
index bef241e0ea..02fe5f1000 100644
--- a/interface/web/mail/lib/lang/de_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/de_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Die maximale Anzahl an Catchall Einträgen für
 $wb['source_txt'] = 'Quelle';
 $wb['destination_error_isemail'] = 'Das Ziel ist keine gültige E-Mail Adresse.';
 $wb['greylisting_txt'] = 'Aktiviere Greylisting';
-?>
+$wb['send_as_txt'] = 'Senden als';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/dk_mail_domain_catchall.lng b/interface/web/mail/lib/lang/dk_mail_domain_catchall.lng
index 8c0be49775..1025ca2898 100644
--- a/interface/web/mail/lib/lang/dk_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/dk_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Max. antal af e-mail catchall konti for din kon
 $wb['source_txt'] = 'Kilde';
 $wb['destination_error_isemail'] = 'Destinationen er ikke en gyldig e-mail adresse.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/el_mail_domain_catchall.lng b/interface/web/mail/lib/lang/el_mail_domain_catchall.lng
index b04b43cfcc..9d097c2d42 100644
--- a/interface/web/mail/lib/lang/el_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/el_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Το μέγιστο πλήθος των email c
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/en_mail_domain_catchall.lng b/interface/web/mail/lib/lang/en_mail_domain_catchall.lng
index ecbb8d9444..6af61df4b0 100644
--- a/interface/web/mail/lib/lang/en_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/en_mail_domain_catchall.lng
@@ -10,4 +10,5 @@ $wb['domain_txt'] = 'Domain';
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/es_mail_domain_catchall.lng b/interface/web/mail/lib/lang/es_mail_domain_catchall.lng
index 68e03c8c37..8ff7c6530e 100644
--- a/interface/web/mail/lib/lang/es_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/es_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Ha alcanzado el número máx. de correo \\"reco
 $wb['no_domain_perm'] = 'No tiene permisos para usar este dominio.';
 $wb['source_txt'] = 'Origen';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Enviar como';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/fi_mail_domain_catchall.lng b/interface/web/mail/lib/lang/fi_mail_domain_catchall.lng
index 085a116c2c..743da590ae 100644
--- a/interface/web/mail/lib/lang/fi_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/fi_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Käyttäjätunnuksella on jo sallittu määrä
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/fr_mail_domain_catchall.lng b/interface/web/mail/lib/lang/fr_mail_domain_catchall.lng
index 199cd47224..9ba28dcfb6 100644
--- a/interface/web/mail/lib/lang/fr_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/fr_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Le nombre maximal de comptes collecteurs pour v
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid e-mail address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/hr_mail_domain_catchall.lng b/interface/web/mail/lib/lang/hr_mail_domain_catchall.lng
index 1c8da72ab3..ef6dc1d0cf 100644
--- a/interface/web/mail/lib/lang/hr_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/hr_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Iskorišten ja maksimalan broj email catchall r
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/hu_mail_domain_catchall.lng b/interface/web/mail/lib/lang/hu_mail_domain_catchall.lng
index e26795953d..9e164ea19c 100644
--- a/interface/web/mail/lib/lang/hu_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/hu_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Nincs több catchall lehetőség.';
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/id_mail_domain_catchall.lng b/interface/web/mail/lib/lang/id_mail_domain_catchall.lng
index c380957fdc..69f2837385 100644
--- a/interface/web/mail/lib/lang/id_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/id_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Jumlah maks akun catchall email untuk akun Anda
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/it_mail_domain_catchall.lng b/interface/web/mail/lib/lang/it_mail_domain_catchall.lng
index 3345bed9c7..7403fcd663 100644
--- a/interface/web/mail/lib/lang/it_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/it_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'The max. number of email catchall accounts ragg
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/ja_mail_domain_catchall.lng b/interface/web/mail/lib/lang/ja_mail_domain_catchall.lng
index 6da7d05c56..28e009efe1 100644
--- a/interface/web/mail/lib/lang/ja_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/ja_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'キャッチオールアカウントが最大
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/nl_mail_domain_catchall.lng b/interface/web/mail/lib/lang/nl_mail_domain_catchall.lng
index ee9c1f7678..37e5c80abc 100644
--- a/interface/web/mail/lib/lang/nl_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/nl_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Het max. aantal e-mail catchall accounts voor u
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/pl_mail_domain_catchall.lng b/interface/web/mail/lib/lang/pl_mail_domain_catchall.lng
index fad83875ca..644e90e6c5 100644
--- a/interface/web/mail/lib/lang/pl_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/pl_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Maksymalna ilość kont e-mail catchall dla Two
 $wb['source_txt'] = 'Źródło';
 $wb['destination_error_isemail'] = 'Cel nie jest poprawnym adresem email.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/pt_mail_domain_catchall.lng b/interface/web/mail/lib/lang/pt_mail_domain_catchall.lng
index e81afd74b9..8d8bac47bf 100644
--- a/interface/web/mail/lib/lang/pt_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/pt_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'O número máximo de catchall para este domíni
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/ro_mail_domain_catchall.lng b/interface/web/mail/lib/lang/ro_mail_domain_catchall.lng
index c0689ca044..9de50490ad 100644
--- a/interface/web/mail/lib/lang/ro_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/ro_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'numarul maxim de CATCHALL pe contul dumneavoatr
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/ru_mail_domain_catchall.lng b/interface/web/mail/lib/lang/ru_mail_domain_catchall.lng
index 25349ca497..13ba70c92c 100644
--- a/interface/web/mail/lib/lang/ru_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/ru_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Максимальное число Макс. 
 $wb['source_txt'] = 'Источник';
 $wb['destination_error_isemail'] = 'Не выбран получатель или запись некорректна.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Отправить как';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/se_mail_domain_catchall.lng b/interface/web/mail/lib/lang/se_mail_domain_catchall.lng
index 39c6e6c559..6724ff3204 100644
--- a/interface/web/mail/lib/lang/se_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/se_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Det maximala antalet catchall-adresser för dit
 $wb['source_txt'] = 'Källa';
 $wb['destination_error_isemail'] = 'Destinationen när inte en giltig epostadress.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/sk_mail_domain_catchall.lng b/interface/web/mail/lib/lang/sk_mail_domain_catchall.lng
index 03c701c6db..012a585ee8 100644
--- a/interface/web/mail/lib/lang/sk_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/sk_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Max. počet e-mailových doménových košov pr
 $wb['source_txt'] = 'Source';
 $wb['destination_error_isemail'] = 'Destination is no valid email address.';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
+$wb['send_as_txt'] = 'Send as';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/lib/lang/tr_mail_domain_catchall.lng b/interface/web/mail/lib/lang/tr_mail_domain_catchall.lng
index bcdf629846..1cb732b58b 100644
--- a/interface/web/mail/lib/lang/tr_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/tr_mail_domain_catchall.lng
@@ -9,4 +9,5 @@ $wb['limit_mailcatchall_txt'] = 'Hesabınıza ekleyebileceğiniz en fazla tümü
 $wb['domain_txt'] = 'Etki Alanı';
 $wb['source_txt'] = 'Kaynak';
 $wb['destination_error_isemail'] = 'Hedef e-posta adresi geçersiz.';
-?>
+$wb['send_as_txt'] = 'Gönderen';
+$wb['send_as_exp'] = 'Allow destination to send from email addresses in this domain';
diff --git a/interface/web/mail/templates/mail_alias_edit.htm b/interface/web/mail/templates/mail_alias_edit.htm
index 2fd149a348..7cd50b7d6f 100644
--- a/interface/web/mail/templates/mail_alias_edit.htm
+++ b/interface/web/mail/templates/mail_alias_edit.htm
@@ -17,21 +17,21 @@
                 </select></div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
+                <label class="col-sm-3 control-label">{tmpl_var name='send_as_txt'}</label>
                 <div class="col-sm-9">
-                    {tmpl_var name='active'}
+                    {tmpl_var name='allow_send_as'} <small> {tmpl_var name='send_as_exp'}</small>
                 </div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label">{tmpl_var name='send_as_txt'}</label>
+                <label class="col-sm-3 control-label">{tmpl_var name='greylisting_txt'}</label>
                 <div class="col-sm-9">
-                    {tmpl_var name='allow_send_as'} <small>{tmpl_var name='send_as_exp'}</small>
+                    {tmpl_var name='greylisting'}
                 </div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label">{tmpl_var name='greylisting_txt'}</label>
+                <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
                 <div class="col-sm-9">
-                    {tmpl_var name='greylisting'}
+                    {tmpl_var name='active'}
                 </div>
             </div>
 
diff --git a/interface/web/mail/templates/mail_domain_catchall_edit.htm b/interface/web/mail/templates/mail_domain_catchall_edit.htm
index 8da10f1f09..f42781c62f 100644
--- a/interface/web/mail/templates/mail_domain_catchall_edit.htm
+++ b/interface/web/mail/templates/mail_domain_catchall_edit.htm
@@ -10,6 +10,12 @@
             <div class="form-group">
                 <label for="destination" class="col-sm-3 control-label">{tmpl_var name='destination_txt'}</label>
                 <div class="col-sm-9"><input type="text" name="destination" id="destination" value="{tmpl_var name='destination'}" class="form-control" /></div></div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">{tmpl_var name='send_as_txt'}</label>
+                <div class="col-sm-9">
+                    {tmpl_var name='allow_send_as'} <small> {tmpl_var name='send_as_exp'}</small>
+                </div>
+            </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='greylisting_txt'}</label>
                 <div class="col-sm-9">
diff --git a/interface/web/mail/templates/mail_forward_edit.htm b/interface/web/mail/templates/mail_forward_edit.htm
index 128ad4cd75..908156f31f 100644
--- a/interface/web/mail/templates/mail_forward_edit.htm
+++ b/interface/web/mail/templates/mail_forward_edit.htm
@@ -15,21 +15,21 @@
                 <div class="col-sm-9"><textarea rows="10" cols="40" name="destination" id="destination" class="form-control">{tmpl_var name='destination'}</textarea></div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
+                <label class="col-sm-3 control-label">{tmpl_var name='send_as_txt'}</label>
                 <div class="col-sm-9">
-                    {tmpl_var name='active'}
+                    {tmpl_var name='allow_send_as'} <small> {tmpl_var name='send_as_exp'}</small>
                 </div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label">{tmpl_var name='send_as_txt'}</label>
+                <label class="col-sm-3 control-label">{tmpl_var name='greylisting_txt'}</label>
                 <div class="col-sm-9">
-                    {tmpl_var name='allow_send_as'} <small>{tmpl_var name='send_as_exp'}</small>
+                    {tmpl_var name='greylisting'}
                 </div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label">{tmpl_var name='greylisting_txt'}</label>
+                <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
                 <div class="col-sm-9">
-                    {tmpl_var name='greylisting'}
+                    {tmpl_var name='active'}
                 </div>
             </div>
 
-- 
GitLab


From ce648830e1fec00ee8a81372edbd2e8d2384c036 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 13 Jan 2021 17:07:54 -0700
Subject: [PATCH 242/441] allow client to use mail whitelist

---
 .../web/mail/form/mail_whitelist.tform.php    |  4 +++
 interface/web/mail/lib/module.conf.php        | 26 ++++++++++++---
 .../web/mail/list/mail_whitelist.list.php     | 33 ++++++++++++++-----
 interface/web/mail/mail_whitelist_del.php     |  2 --
 interface/web/mail/mail_whitelist_edit.php    | 31 +++++++++++------
 interface/web/mail/mail_whitelist_list.php    |  2 --
 6 files changed, 70 insertions(+), 28 deletions(-)

diff --git a/interface/web/mail/form/mail_whitelist.tform.php b/interface/web/mail/form/mail_whitelist.tform.php
index edd3248371..d4b9baf742 100644
--- a/interface/web/mail/form/mail_whitelist.tform.php
+++ b/interface/web/mail/form/mail_whitelist.tform.php
@@ -118,5 +118,9 @@ $form["tabs"]['whitelist'] = array (
 	)
 );
 
+if (! $app->auth->is_admin()) {
+	$form["tabs"]['whitelist']['fields']['type']['value'] = array('recipient' => 'Recipient', 'sender' => 'Sender');
+}
+
 
 ?>
diff --git a/interface/web/mail/lib/module.conf.php b/interface/web/mail/lib/module.conf.php
index d9d97bc8b2..fbe8ffbcb5 100644
--- a/interface/web/mail/lib/module.conf.php
+++ b/interface/web/mail/lib/module.conf.php
@@ -61,6 +61,20 @@ if($app->auth->get_client_limit($userid, 'mailcatchall') != 0)
 		'html_id' => 'mail_domain_catchall_list');
 }
 
+if(! $app->auth->is_admin())
+{
+	$items[] = array(   'title'  => 'Email Whitelist',
+		'target'  => 'content',
+		'link'     => 'mail/mail_whitelist_list.php',
+		'html_id' => 'mail_whitelist_list');
+
+
+	$items[] = array(   'title'  => 'Email Blacklist',
+		'target'  => 'content',
+		'link'     => 'mail/mail_blacklist_list.php',
+		'html_id' => 'mail_blacklist_list');
+}
+
 if($app->auth->get_client_limit($userid, 'mailrouting') != 0)
 {
 	$items[] = array( 'title'  => 'Email Routing',
@@ -110,8 +124,8 @@ if($app->auth->get_client_limit($userid, 'spamfilter_wblist') != 0)
 		'html_id' => 'spamfilter_blacklist_list');
 }
 
-if($app->auth->is_admin()) {
-
+if($app->auth->is_admin())
+{
 	$items[] = array(  'title'  => 'User / Domain',
 		'target'  => 'content',
 		'link'     => 'mail/spamfilter_users_list.php',
@@ -191,7 +205,9 @@ $items[] = array( 'title'  => 'Mailbox traffic',
 	'target'  => 'content',
 	'link' => 'mail/mail_user_stats.php',
 	'html_id' => 'mail_user_stats');
-if($app->auth->get_client_limit($userid, 'backup') == 'y') {
+
+if($app->auth->get_client_limit($userid, 'backup') == 'y')
+{
         $items[] = array (
             'title'   => 'Backup Stats',
             'target'  => 'content',
@@ -206,8 +222,8 @@ $module['nav'][] = array( 'title' => 'Statistics',
 
 //**** Global filters menu
 $items = array();
-if($_SESSION['s']['user']['typ'] == 'admin') {
-
+if($app->auth->is_admin())
+{
 	$items[] = array(   'title'  => 'Postfix Whitelist',
 		'target'  => 'content',
 		'link'     => 'mail/mail_whitelist_list.php',
diff --git a/interface/web/mail/list/mail_whitelist.list.php b/interface/web/mail/list/mail_whitelist.list.php
index e27edad6da..61f1d9f261 100644
--- a/interface/web/mail/list/mail_whitelist.list.php
+++ b/interface/web/mail/list/mail_whitelist.list.php
@@ -78,17 +78,32 @@ $liste["item"][] = array( 'field'  => "source",
 	'op'  => "like",
 	'prefix' => "%",
 	'suffix' => "%",
+	'datasource' => array (  'type' => 'SQL',
+		'querystring' => 'SELECT access_id,source FROM mail_access WHERE {AUTHSQL} ORDER BY source',
+		'keyfield'=> 'access_id',
+		'valuefield'=> 'source'
+	),
 	'width'  => "",
 	'value'  => "");
 
-$liste["item"][] = array( 'field'  => "type",
-	'datatype' => "VARCHAR",
-	'formtype' => "SELECT",
-	'op'  => "=",
-	'prefix' => "",
-	'suffix' => "",
-	'width'  => "",
-	'value'  => array('recipient' => 'recipient_txt', 'sender' => 'sender_txt', 'client' => 'client_txt'));
-
+if ($app->auth->is_admin()) {
+	$liste["item"][] = array( 'field'  => "type",
+		'datatype' => "VARCHAR",
+		'formtype' => "SELECT",
+		'op'  => "=",
+		'prefix' => "",
+		'suffix' => "",
+		'width'  => "",
+		'value'  => array('recipient' => 'recipient_txt', 'sender' => 'sender_txt', 'client' => 'client_txt'));
+} else {
+	$liste["item"][] = array( 'field'  => "type",
+		'datatype' => "VARCHAR",
+		'formtype' => "SELECT",
+		'op'  => "=",
+		'prefix' => "",
+		'suffix' => "",
+		'width'  => "",
+		'value'  => array('recipient' => 'recipient_txt', 'sender' => 'sender_txt'));
+}
 
 ?>
diff --git a/interface/web/mail/mail_whitelist_del.php b/interface/web/mail/mail_whitelist_del.php
index 06ce88550b..94be228f67 100644
--- a/interface/web/mail/mail_whitelist_del.php
+++ b/interface/web/mail/mail_whitelist_del.php
@@ -42,8 +42,6 @@ $tform_def_file = "form/mail_whitelist.tform.php";
 require_once '../../lib/config.inc.php';
 require_once '../../lib/app.inc.php';
 
-if($_SESSION["s"]["user"]["typ"] != 'admin') $app->error('This function needs admin privileges');
-
 //* Check permissions for module
 $app->auth->check_module_permissions('mail');
 
diff --git a/interface/web/mail/mail_whitelist_edit.php b/interface/web/mail/mail_whitelist_edit.php
index 35fa825ec7..37aaf25754 100644
--- a/interface/web/mail/mail_whitelist_edit.php
+++ b/interface/web/mail/mail_whitelist_edit.php
@@ -50,19 +50,11 @@ $app->load('tform_actions');
 
 class page_action extends tform_actions {
 
-	function onShowNew() {
-		global $app, $conf;
-
-		if($_SESSION["s"]["user"]["typ"] != 'admin') die('This function needs admin privileges');
-		
-		parent::onShowNew();
-	}
+	protected $client_allowed_types = array( 'recipient', 'sender' );
 
 	function onBeforeUpdate() {
 		global $app, $conf;
 
-		if($_SESSION["s"]["user"]["typ"] != 'admin') die('This function needs admin privileges');
-		
 		//* Check if the server has been changed
 		// We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
 		$rec = $app->db->queryOneRecord("SELECT server_id from mail_access WHERE access_id = ?", $this->id);
@@ -77,7 +69,26 @@ class page_action extends tform_actions {
 	function onSubmit() {
 		global $app, $conf;
 
-		if($_SESSION["s"]["user"]["typ"] != 'admin') die('This function needs admin privileges');
+		// Non-admin checks
+		if($_SESSION["s"]["user"]["typ"] != 'admin') {
+			// Non-admin can only use type 'sender' or 'recipient' and address must belong to the client's domains
+			if(! in_array($this->dataRecord["type"], $this->client_allowed_types)) {
+				$app->tform->errorMessage .= $app->lng('Whitelist type requires admin permissions');
+			}
+			// address must be valid email
+			if(! filter_var( $this->dataRecord["source"], FILTER_VALIDATE_EMAIL )) {
+				$app->tform->errorMessage .= $app->lng('Invalid address: must be a valid email address');
+			}
+			$tmp = explode('@', $this->dataRecord["source"]);
+			$domain = trim( array_pop($tmp) );
+			$AUTHSQL = $app->tform->getAuthSQL('r');
+			$rec = $app->db->queryOneRecord("SELECT domain_id from mail_domain WHERE ${AUTHSQL} AND domain = ?", $domain);
+			// address must belong to the client's domains
+			if(! (is_array($rec) && isset($rec['domain_id']) && is_numeric($rec['domain_id']))) {
+				$app->tform->errorMessage .= $app->lng('Invalid address: you have no permission for this domain.');
+			}
+			unset($rec);
+		}
 
 		if(substr($this->dataRecord['source'], 0, 1) === '@') $this->dataRecord['source'] = substr($this->dataRecord['source'], 1);
 
diff --git a/interface/web/mail/mail_whitelist_list.php b/interface/web/mail/mail_whitelist_list.php
index 73877797b4..4fd33dd977 100644
--- a/interface/web/mail/mail_whitelist_list.php
+++ b/interface/web/mail/mail_whitelist_list.php
@@ -12,8 +12,6 @@ $list_def_file = "list/mail_whitelist.list.php";
 * End Form configuration
 ******************************************/
 
-if($_SESSION["s"]["user"]["typ"] != 'admin') $app->error('This function needs admin privileges');
-
 //* Check permissions for module
 $app->auth->check_module_permissions('mail');
 
-- 
GitLab


From 90bee4977612bef81e40a35f643b40830715ee6c Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 14 Jan 2021 10:09:28 -0700
Subject: [PATCH 243/441] allow client to use mail blacklist

---
 .../web/mail/form/mail_blacklist.tform.php    |  3 ++
 .../web/mail/form/mail_whitelist.tform.php    |  2 +-
 .../web/mail/list/mail_blacklist.list.php     | 13 +++++-
 .../web/mail/list/mail_whitelist.list.php     | 27 +++++------
 interface/web/mail/mail_blacklist_del.php     |  3 --
 interface/web/mail/mail_blacklist_edit.php    | 46 +++++++++++--------
 interface/web/mail/mail_blacklist_list.php    |  2 -
 interface/web/mail/mail_whitelist_edit.php    |  1 -
 8 files changed, 53 insertions(+), 44 deletions(-)

diff --git a/interface/web/mail/form/mail_blacklist.tform.php b/interface/web/mail/form/mail_blacklist.tform.php
index 957f35b95b..df29fbd6d9 100644
--- a/interface/web/mail/form/mail_blacklist.tform.php
+++ b/interface/web/mail/form/mail_blacklist.tform.php
@@ -112,5 +112,8 @@ $form["tabs"]['blacklist'] = array (
 	)
 );
 
+if (! $app->auth->is_admin()) {
+	$form['tabs']['blacklist']['fields']['type']['value'] = array('recipient' => 'Recipient', 'sender' => 'Sender');
+}
 
 ?>
diff --git a/interface/web/mail/form/mail_whitelist.tform.php b/interface/web/mail/form/mail_whitelist.tform.php
index d4b9baf742..8b570e449d 100644
--- a/interface/web/mail/form/mail_whitelist.tform.php
+++ b/interface/web/mail/form/mail_whitelist.tform.php
@@ -119,7 +119,7 @@ $form["tabs"]['whitelist'] = array (
 );
 
 if (! $app->auth->is_admin()) {
-	$form["tabs"]['whitelist']['fields']['type']['value'] = array('recipient' => 'Recipient', 'sender' => 'Sender');
+	$form['tabs']['whitelist']['fields']['type']['value'] = array('recipient' => 'Recipient', 'sender' => 'Sender');
 }
 
 
diff --git a/interface/web/mail/list/mail_blacklist.list.php b/interface/web/mail/list/mail_blacklist.list.php
index a2f3997fd7..6f92c0465f 100644
--- a/interface/web/mail/list/mail_blacklist.list.php
+++ b/interface/web/mail/list/mail_blacklist.list.php
@@ -78,10 +78,20 @@ $liste["item"][] = array( 'field'  => "source",
 	'op'  => "like",
 	'prefix' => "%",
 	'suffix' => "%",
+	'datasource' => array (  'type' => 'SQL',
+		'querystring' => 'SELECT access_id,source FROM mail_access WHERE {AUTHSQL} ORDER BY source',
+		'keyfield'=> 'access_id',
+		'valuefield'=> 'source'
+	),
 	'width'  => "",
 	'value'  => "");
 
 
+if ($app->auth->is_admin()) {
+	$type_values[] = array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client');
+} else {
+	$type_values[] = array('recipient' => 'Recipient', 'sender' => 'Sender');
+}
 $liste["item"][] = array( 'field'  => "type",
 	'datatype' => "VARCHAR",
 	'formtype' => "SELECT",
@@ -89,7 +99,6 @@ $liste["item"][] = array( 'field'  => "type",
 	'prefix' => "",
 	'suffix' => "",
 	'width'  => "",
-	'value'  => array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client'));
-
+	'value'  => $type_values);
 
 ?>
diff --git a/interface/web/mail/list/mail_whitelist.list.php b/interface/web/mail/list/mail_whitelist.list.php
index 61f1d9f261..e8a345c10e 100644
--- a/interface/web/mail/list/mail_whitelist.list.php
+++ b/interface/web/mail/list/mail_whitelist.list.php
@@ -86,24 +86,19 @@ $liste["item"][] = array( 'field'  => "source",
 	'width'  => "",
 	'value'  => "");
 
+
 if ($app->auth->is_admin()) {
-	$liste["item"][] = array( 'field'  => "type",
-		'datatype' => "VARCHAR",
-		'formtype' => "SELECT",
-		'op'  => "=",
-		'prefix' => "",
-		'suffix' => "",
-		'width'  => "",
-		'value'  => array('recipient' => 'recipient_txt', 'sender' => 'sender_txt', 'client' => 'client_txt'));
+	$type_values[] = array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client');
 } else {
-	$liste["item"][] = array( 'field'  => "type",
-		'datatype' => "VARCHAR",
-		'formtype' => "SELECT",
-		'op'  => "=",
-		'prefix' => "",
-		'suffix' => "",
-		'width'  => "",
-		'value'  => array('recipient' => 'recipient_txt', 'sender' => 'sender_txt'));
+	$type_values[] = array('recipient' => 'Recipient', 'sender' => 'Sender');
 }
+$liste["item"][] = array( 'field'  => "type",
+	'datatype' => "VARCHAR",
+	'formtype' => "SELECT",
+	'op'  => "=",
+	'prefix' => "",
+	'suffix' => "",
+	'width'  => "",
+	'value'  => $type_values);
 
 ?>
diff --git a/interface/web/mail/mail_blacklist_del.php b/interface/web/mail/mail_blacklist_del.php
index aa671c4887..3cb83a50a0 100644
--- a/interface/web/mail/mail_blacklist_del.php
+++ b/interface/web/mail/mail_blacklist_del.php
@@ -42,9 +42,6 @@ $tform_def_file = "form/mail_blacklist.tform.php";
 require_once '../../lib/config.inc.php';
 require_once '../../lib/app.inc.php';
 
-
-if($_SESSION["s"]["user"]["typ"] != 'admin') $app->error('This function needs admin privileges');
-
 //* Check permissions for module
 $app->auth->check_module_permissions('mail');
 
diff --git a/interface/web/mail/mail_blacklist_edit.php b/interface/web/mail/mail_blacklist_edit.php
index b86729b919..1ad8d6affd 100644
--- a/interface/web/mail/mail_blacklist_edit.php
+++ b/interface/web/mail/mail_blacklist_edit.php
@@ -50,36 +50,44 @@ $app->load('tform_actions');
 
 class page_action extends tform_actions {
 
-	function onShowNew() {
-		global $app, $conf;
-
-		if($_SESSION["s"]["user"]["typ"] != 'admin') die('This function needs admin privileges');
-		parent::onShowNew();
-	}
-
+	protected $client_allowed_types = array( 'recipient', 'sender' );
 
 	function onBeforeUpdate() {
 		global $app, $conf;
 
-		if($_SESSION["s"]["user"]["typ"] != 'admin') die('This function needs admin privileges');
-
 		//* Check if the server has been changed
-		// We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
-		if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
-			$rec = $app->db->queryOneRecord("SELECT server_id from mail_access WHERE access_id = ?", $this->id);
-			if($rec['server_id'] != $this->dataRecord["server_id"]) {
-				//* Add a error message and switch back to old server
-				$app->tform->errorMessage .= $app->lng('The Server can not be changed.');
-				$this->dataRecord["server_id"] = $rec['server_id'];
-			}
-			unset($rec);
+		$rec = $app->db->queryOneRecord("SELECT server_id from mail_access WHERE access_id = ?", $this->id);
+		if($rec['server_id'] != $this->dataRecord["server_id"]) {
+			//* Add a error message and switch back to old server
+			$app->tform->errorMessage .= $app->lng('The Server can not be changed.');
+			$this->dataRecord["server_id"] = $rec['server_id'];
 		}
+		unset($rec);
 	}
 
 	function onSubmit() {
 		global $app, $conf;
 
-		if($_SESSION["s"]["user"]["typ"] != 'admin') die('This function needs admin privileges');
+		// Non-admin checks
+		if($_SESSION["s"]["user"]["typ"] != 'admin') {
+			// Non-admin can only use type 'sender' or 'recipient' and address must belong to the client's domains
+			if(! in_array($this->dataRecord["type"], $this->client_allowed_types)) {
+				$app->tform->errorMessage .= $app->lng('Blacklist type requires admin permissions');
+			}
+			// address must be valid email
+			if(! filter_var( $this->dataRecord["source"], FILTER_VALIDATE_EMAIL )) {
+				$app->tform->errorMessage .= $app->lng('Invalid address: must be a valid email address');
+			}
+			$tmp = explode('@', $this->dataRecord["source"]);
+			$domain = trim( array_pop($tmp) );
+			$AUTHSQL = $app->tform->getAuthSQL('r');
+			$rec = $app->db->queryOneRecord("SELECT domain_id from mail_domain WHERE ${AUTHSQL} AND domain = ?", $domain);
+			// address must belong to the client's domains
+			if(! (is_array($rec) && isset($rec['domain_id']) && is_numeric($rec['domain_id']))) {
+				$app->tform->errorMessage .= $app->lng('Invalid address: you have no permission for this domain.');
+			}
+			unset($rec);
+		}
 		
 		if(substr($this->dataRecord['source'], 0, 1) === '@') $this->dataRecord['source'] = substr($this->dataRecord['source'], 1);
 		
diff --git a/interface/web/mail/mail_blacklist_list.php b/interface/web/mail/mail_blacklist_list.php
index ecb24d867c..cf1e50ddaa 100644
--- a/interface/web/mail/mail_blacklist_list.php
+++ b/interface/web/mail/mail_blacklist_list.php
@@ -12,8 +12,6 @@ $list_def_file = "list/mail_blacklist.list.php";
 * End Form configuration
 ******************************************/
 
-if($_SESSION["s"]["user"]["typ"] != 'admin') $app->error('This function needs admin privileges');
-
 //* Check permissions for module
 $app->auth->check_module_permissions('mail');
 
diff --git a/interface/web/mail/mail_whitelist_edit.php b/interface/web/mail/mail_whitelist_edit.php
index 37aaf25754..52106c1882 100644
--- a/interface/web/mail/mail_whitelist_edit.php
+++ b/interface/web/mail/mail_whitelist_edit.php
@@ -56,7 +56,6 @@ class page_action extends tform_actions {
 		global $app, $conf;
 
 		//* Check if the server has been changed
-		// We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
 		$rec = $app->db->queryOneRecord("SELECT server_id from mail_access WHERE access_id = ?", $this->id);
 		if($rec['server_id'] != $this->dataRecord["server_id"]) {
 			//* Add a error message and switch back to old server
-- 
GitLab


From 6ac2ee44483040cd9c22c8e50f3252aa54d2422c Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 14 Jan 2021 14:25:29 -0700
Subject: [PATCH 244/441] add client limit for number of white / blacklist

---
 .../sql/incremental/upd_dev_collection.sql    |  5 ++-
 install/sql/ispconfig3.sql                    |  2 +
 interface/web/client/form/client.tform.php    | 14 +++++++
 .../web/client/form/client_template.tform.php | 14 +++++++
 interface/web/client/form/reseller.tform.php  | 14 +++++++
 interface/web/client/lib/lang/ar_client.lng   |  3 +-
 .../client/lib/lang/ar_client_template.lng    |  3 +-
 interface/web/client/lib/lang/ar_reseller.lng |  3 +-
 interface/web/client/lib/lang/bg_client.lng   |  3 +-
 .../client/lib/lang/bg_client_template.lng    |  3 +-
 interface/web/client/lib/lang/bg_reseller.lng |  3 +-
 interface/web/client/lib/lang/br_client.lng   |  2 +
 .../client/lib/lang/br_client_template.lng    |  2 +
 interface/web/client/lib/lang/br_reseller.lng |  2 +
 interface/web/client/lib/lang/ca_client.lng   |  3 +-
 .../client/lib/lang/ca_client_template.lng    |  3 +-
 interface/web/client/lib/lang/ca_reseller.lng |  3 +-
 interface/web/client/lib/lang/cz_client.lng   |  2 +
 .../client/lib/lang/cz_client_template.lng    |  2 +
 interface/web/client/lib/lang/cz_reseller.lng |  2 +
 interface/web/client/lib/lang/de_client.lng   |  3 +-
 .../client/lib/lang/de_client_template.lng    |  3 +-
 interface/web/client/lib/lang/de_reseller.lng |  3 +-
 interface/web/client/lib/lang/dk_client.lng   |  3 +-
 .../client/lib/lang/dk_client_template.lng    |  3 +-
 interface/web/client/lib/lang/dk_reseller.lng |  3 +-
 interface/web/client/lib/lang/el_client.lng   |  3 +-
 .../client/lib/lang/el_client_template.lng    |  3 +-
 interface/web/client/lib/lang/el_reseller.lng |  3 +-
 interface/web/client/lib/lang/en_client.lng   |  3 +-
 .../client/lib/lang/en_client_template.lng    |  3 +-
 interface/web/client/lib/lang/en_reseller.lng |  3 +-
 interface/web/client/lib/lang/es_client.lng   |  3 +-
 .../client/lib/lang/es_client_template.lng    |  3 +-
 interface/web/client/lib/lang/es_reseller.lng |  3 +-
 interface/web/client/lib/lang/fi_client.lng   |  3 +-
 .../client/lib/lang/fi_client_template.lng    |  3 +-
 interface/web/client/lib/lang/fi_reseller.lng |  3 +-
 interface/web/client/lib/lang/fr_client.lng   |  3 +-
 .../client/lib/lang/fr_client_template.lng    |  3 +-
 interface/web/client/lib/lang/fr_reseller.lng |  3 +-
 interface/web/client/lib/lang/hr_client.lng   |  3 +-
 .../client/lib/lang/hr_client_template.lng    |  3 +-
 interface/web/client/lib/lang/hr_reseller.lng |  3 +-
 interface/web/client/lib/lang/hu_client.lng   |  3 +-
 .../client/lib/lang/hu_client_template.lng    |  3 +-
 interface/web/client/lib/lang/hu_reseller.lng |  3 +-
 interface/web/client/lib/lang/id_client.lng   |  3 +-
 .../client/lib/lang/id_client_template.lng    |  3 +-
 interface/web/client/lib/lang/id_reseller.lng |  3 +-
 interface/web/client/lib/lang/it_client.lng   |  3 +-
 .../client/lib/lang/it_client_template.lng    |  3 +-
 interface/web/client/lib/lang/it_reseller.lng |  3 +-
 interface/web/client/lib/lang/ja_client.lng   |  3 +-
 .../client/lib/lang/ja_client_template.lng    |  3 +-
 interface/web/client/lib/lang/ja_reseller.lng |  3 +-
 interface/web/client/lib/lang/nl_client.lng   |  3 +-
 .../client/lib/lang/nl_client_template.lng    |  3 +-
 interface/web/client/lib/lang/nl_reseller.lng |  3 +-
 interface/web/client/lib/lang/pl_client.lng   |  3 +-
 .../client/lib/lang/pl_client_template.lng    |  3 +-
 interface/web/client/lib/lang/pl_reseller.lng |  3 +-
 interface/web/client/lib/lang/pt_client.lng   |  3 +-
 .../client/lib/lang/pt_client_template.lng    |  3 +-
 interface/web/client/lib/lang/pt_reseller.lng |  3 +-
 interface/web/client/lib/lang/ro_client.lng   |  3 +-
 .../client/lib/lang/ro_client_template.lng    |  3 +-
 interface/web/client/lib/lang/ro_reseller.lng |  3 +-
 interface/web/client/lib/lang/ru_client.lng   |  3 +-
 .../client/lib/lang/ru_client_template.lng    |  3 +-
 interface/web/client/lib/lang/ru_reseller.lng |  3 +-
 interface/web/client/lib/lang/se_client.lng   |  3 +-
 .../client/lib/lang/se_client_template.lng    |  3 +-
 interface/web/client/lib/lang/se_reseller.lng |  3 +-
 interface/web/client/lib/lang/sk_client.lng   |  3 +-
 .../client/lib/lang/sk_client_template.lng    |  3 +-
 interface/web/client/lib/lang/sk_reseller.lng |  3 +-
 interface/web/client/lib/lang/tr_client.lng   |  3 +-
 .../client/lib/lang/tr_client_template.lng    |  3 +-
 interface/web/client/lib/lang/tr_reseller.lng |  3 +-
 .../client/templates/client_edit_limits.htm   |  3 ++
 .../templates/client_template_edit_limits.htm |  3 ++
 .../client/templates/reseller_edit_limits.htm |  3 ++
 interface/web/dashboard/dashlets/limits.php   |  4 ++
 .../web/mail/lib/lang/ar_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/ar_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/bg_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/bg_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/br_mail_blacklist.lng   |  1 +
 .../web/mail/lib/lang/br_mail_whitelist.lng   |  1 +
 .../web/mail/lib/lang/ca_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/ca_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/cz_mail_blacklist.lng   |  1 +
 .../web/mail/lib/lang/cz_mail_whitelist.lng   |  1 +
 .../web/mail/lib/lang/de_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/de_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/dk_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/dk_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/el_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/el_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/en_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/en_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/es_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/es_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/fi_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/fi_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/fr_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/fr_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/hr_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/hr_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/hu_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/hu_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/id_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/id_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/it_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/it_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/ja_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/ja_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/nl_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/nl_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/pl_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/pl_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/pt_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/pt_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/ro_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/ro_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/ru_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/ru_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/se_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/se_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/sk_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/sk_mail_whitelist.lng   |  2 +-
 .../web/mail/lib/lang/tr_mail_blacklist.lng   |  2 +-
 .../web/mail/lib/lang/tr_mail_whitelist.lng   |  2 +-
 interface/web/mail/mail_blacklist_edit.php    | 36 ++++++++++++++++--
 interface/web/mail/mail_whitelist_edit.php    | 37 +++++++++++++++++--
 remoting_client/API-docs/client_add.html      |  1 +
 remoting_client/API-docs/client_update.html   |  1 +
 remoting_client/examples/client_add.php       |  1 +
 139 files changed, 329 insertions(+), 124 deletions(-)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 02a94fdc1a..13b1e1097e 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1 +1,4 @@
-ALTER TABLE `remote_user` MODIFY `remote_password` VARCHAR(200) NOT NULL DEFAULT '';
\ No newline at end of file
+ALTER TABLE `remote_user` MODIFY `remote_password` VARCHAR(200) NOT NULL DEFAULT '';
+
+ALTER TABLE `client` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
+ALTER TABLE `client_template` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index d4640ea47a..333a908a5a 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -178,6 +178,7 @@ CREATE TABLE `client` (
   `limit_mailforward` int(11) NOT NULL DEFAULT '-1',
   `limit_mailcatchall` int(11) NOT NULL DEFAULT '-1',
   `limit_mailrouting` int(11) NOT NULL DEFAULT '0',
+  `limit_mail_wblist` int(11) NOT NULL DEFAULT '0',
   `limit_mailfilter` int(11) NOT NULL DEFAULT '-1',
   `limit_fetchmail` int(11) NOT NULL DEFAULT '-1',
   `limit_mailquota` int(11) NOT NULL DEFAULT '-1',
@@ -309,6 +310,7 @@ CREATE TABLE `client_template` (
   `limit_mailforward` int(11) NOT NULL default '-1',
   `limit_mailcatchall` int(11) NOT NULL default '-1',
   `limit_mailrouting` int(11) NOT NULL default '0',
+  `limit_mail_wblist` int(11) NOT NULL default '0',
   `limit_mailfilter` int(11) NOT NULL default '-1',
   `limit_fetchmail` int(11) NOT NULL default '-1',
   `limit_mailquota` int(11) NOT NULL default '-1',
diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index 0801ae3515..7ad9aecac6 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.tform.php
@@ -840,6 +840,20 @@ $form["tabs"]['limits'] = array (
 			'rows'  => '',
 			'cols'  => ''
 		),
+		'limit_mail_wblist' => array (
+			'datatype' => 'INTEGER',
+			'formtype' => 'TEXT',
+			'validators' => array (  0 => array ( 'type' => 'ISINT',
+					'errmsg'=> 'limit_mail_wblist_error_notint'),
+			),
+			'default' => '-1',
+			'value'  => '',
+			'separator' => '',
+			'width'  => '10',
+			'maxlength' => '10',
+			'rows'  => '',
+			'cols'  => ''
+		),
 		'limit_mailfilter' => array (
 			'datatype' => 'INTEGER',
 			'formtype' => 'TEXT',
diff --git a/interface/web/client/form/client_template.tform.php b/interface/web/client/form/client_template.tform.php
index 4a3405bbe5..5883cce56c 100644
--- a/interface/web/client/form/client_template.tform.php
+++ b/interface/web/client/form/client_template.tform.php
@@ -256,6 +256,20 @@ $form["tabs"]['limits'] = array (
 			'rows'  => '',
 			'cols'  => ''
 		),
+		'limit_mail_wblist' => array (
+			'datatype' => 'INTEGER',
+			'formtype' => 'TEXT',
+			'validators' => array (  0 => array ( 'type' => 'ISINT',
+					'errmsg'=> 'limit_mail_wblist_error_notint'),
+			),
+			'default' => '-1',
+			'value'  => '',
+			'separator' => '',
+			'width'  => '10',
+			'maxlength' => '10',
+			'rows'  => '',
+			'cols'  => ''
+		),
 		'limit_mailfilter' => array (
 			'datatype' => 'INTEGER',
 			'formtype' => 'TEXT',
diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php
index 3c559c78d6..8c94132b3b 100644
--- a/interface/web/client/form/reseller.tform.php
+++ b/interface/web/client/form/reseller.tform.php
@@ -838,6 +838,20 @@ $form["tabs"]['limits'] = array (
 			'rows'  => '',
 			'cols'  => ''
 		),
+		'limit_mail_wblist' => array (
+			'datatype' => 'INTEGER',
+			'formtype' => 'TEXT',
+			'validators' => array (  0 => array ( 'type' => 'ISINT',
+					'errmsg'=> 'limit_mail_wblist_error_notint'),
+			),
+			'default' => '-1',
+			'value'  => '',
+			'separator' => '',
+			'width'  => '10',
+			'maxlength' => '10',
+			'rows'  => '',
+			'cols'  => ''
+		),
 		'limit_mailfilter' => array (
 			'datatype' => 'INTEGER',
 			'formtype' => 'TEXT',
diff --git a/interface/web/client/lib/lang/ar_client.lng b/interface/web/client/lib/lang/ar_client.lng
index 04a7c6d17f..fde7171aa2 100644
--- a/interface/web/client/lib/lang/ar_client.lng
+++ b/interface/web/client/lib/lang/ar_client.lng
@@ -6,6 +6,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Max. number of domain aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -68,6 +69,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'The email domain alias limit must b
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/ar_client_template.lng b/interface/web/client/lib/lang/ar_client_template.lng
index 0a88594a59..fe67603b19 100644
--- a/interface/web/client/lib/lang/ar_client_template.lng
+++ b/interface/web/client/lib/lang/ar_client_template.lng
@@ -8,6 +8,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Max. number of domain aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -37,6 +38,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'The email domain alias limit must b
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/ar_reseller.lng b/interface/web/client/lib/lang/ar_reseller.lng
index 512bc5cb23..afd557ab18 100644
--- a/interface/web/client/lib/lang/ar_reseller.lng
+++ b/interface/web/client/lib/lang/ar_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. number of email aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias limit must be a number.';
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/bg_client.lng b/interface/web/client/lib/lang/bg_client.lng
index d6effa66e0..d9e5c1de61 100644
--- a/interface/web/client/lib/lang/bg_client.lng
+++ b/interface/web/client/lib/lang/bg_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Макс. брой email aliases';
 $wb['limit_mailforward_txt'] = 'Макс. брой email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Макс. брой email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Макс. брой email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Макс. брой email filters';
 $wb['limit_fetchmail_txt'] = 'Макс. брой fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Размер на пощенските кутии';
@@ -63,6 +64,7 @@ $wb['limit_mailalias_error_notint'] = ' The email alias трябва да е ч
 $wb['limit_mailforward_error_notint'] = 'The email forward трябва да е число';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall трябва да е число';
 $wb['limit_mailrouting_error_notint'] = 'The email routing трябва да е число';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter трябва да е число';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail трябва да е число';
 $wb['limit_mailquota_error_notint'] = 'Размерът на пощенските кутии трябва да е число.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/bg_client_template.lng b/interface/web/client/lib/lang/bg_client_template.lng
index 75f89a0fea..0ca56504f1 100644
--- a/interface/web/client/lib/lang/bg_client_template.lng
+++ b/interface/web/client/lib/lang/bg_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Макс. брой на email aliases';
 $wb['limit_mailforward_txt'] = 'Макс. брой на email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Макс. брой на email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Макс. брой на email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Макс. брой на email filters';
 $wb['limit_fetchmail_txt'] = 'Макс. брой на fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Квота на пощенската кутия';
@@ -32,6 +33,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias трябва да е чи
 $wb['limit_mailforward_error_notint'] = 'The email forward трябва да е число';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall трябва да е число';
 $wb['limit_mailrouting_error_notint'] = 'The email routing трябва да е число';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter трябва да е число';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail трябва да е число';
 $wb['limit_mailquota_error_notint'] = 'The email quota трябва да е число';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/bg_reseller.lng b/interface/web/client/lib/lang/bg_reseller.lng
index f749fa5519..d34dff83d6 100644
--- a/interface/web/client/lib/lang/bg_reseller.lng
+++ b/interface/web/client/lib/lang/bg_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. number of email aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Квота на пощенската кутия';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias трябва да е чи
 $wb['limit_mailforward_error_notint'] = 'The email forward трябва да е число';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall трябва да е число';
 $wb['limit_mailrouting_error_notint'] = 'The email routing трябва да е число';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter трябва да е число';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail трябва да е число';
 $wb['limit_mailquota_error_notint'] = 'The email quota трябва да е число';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/br_client.lng b/interface/web/client/lib/lang/br_client.lng
index 2f9d3c2056..4d2928459d 100644
--- a/interface/web/client/lib/lang/br_client.lng
+++ b/interface/web/client/lib/lang/br_client.lng
@@ -7,6 +7,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Limite de alias de domínios';
 $wb['limit_mailforward_txt'] = 'Limite de encaminhamentos de email';
 $wb['limit_mailcatchall_txt'] = 'Limite de contas cata tudo';
 $wb['limit_mailrouting_txt'] = 'Limite de rotas de email';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Limite de filtros de email';
 $wb['limit_fetchmail_txt'] = 'Limite de contas de busca';
 $wb['limit_mailquota_txt'] = 'Cota da conta de email';
@@ -73,6 +74,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'O limite de alias de domínios de e
 $wb['limit_mailforward_error_notint'] = 'O limite de encaminhamentos de email deve ser um número.';
 $wb['limit_mailcatchall_error_notint'] = 'O limite de contas cata tudo deve ser um número.';
 $wb['limit_mailrouting_error_notint'] = 'O limite de rotas de email deve ser um número.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'O limite de filtros de email deve ser um número.';
 $wb['limit_mailfetchmail_error_notint'] = 'O limite de contas de busca deve ser um número.';
 $wb['limit_mailquota_error_notint'] = 'O limite das cotas de email deve ser um número.';
diff --git a/interface/web/client/lib/lang/br_client_template.lng b/interface/web/client/lib/lang/br_client_template.lng
index bfafbeb823..3c866f48e7 100644
--- a/interface/web/client/lib/lang/br_client_template.lng
+++ b/interface/web/client/lib/lang/br_client_template.lng
@@ -12,6 +12,7 @@ $wb['limit_mailmailinglist_txt'] = 'Limite de listas de email';
 $wb['limit_mailforward_txt'] = 'Limite de encaminhamentos de email';
 $wb['limit_mailcatchall_txt'] = 'Limite de contas cata tudo';
 $wb['limit_mailrouting_txt'] = 'Limite de rotas de email';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Limite de filtros de email';
 $wb['limit_fetchmail_txt'] = 'Limite de contas de busca';
 $wb['limit_mailquota_txt'] = 'Cota da conta de email';
@@ -47,6 +48,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'O limite de alias de domínios deve
 $wb['limit_mailforward_error_notint'] = 'O limite de encaminhamento de emails deve ser um número.';
 $wb['limit_mailcatchall_error_notint'] = 'O limite de contas cata tudo deve ser um número.';
 $wb['limit_mailrouting_error_notint'] = 'O limite de rotas de email deve ser um número.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'O limite de filtros de email deve ser um número.';
 $wb['limit_mailfetchmail_error_notint'] = 'O limite de contas de busca deve ser um número.';
 $wb['limit_mailquota_error_notint'] = 'O limite da cota de emails deve ser um número.';
diff --git a/interface/web/client/lib/lang/br_reseller.lng b/interface/web/client/lib/lang/br_reseller.lng
index 08941ffd88..9dacacda44 100644
--- a/interface/web/client/lib/lang/br_reseller.lng
+++ b/interface/web/client/lib/lang/br_reseller.lng
@@ -7,6 +7,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Limite de alias de domínios';
 $wb['limit_mailforward_txt'] = 'Limite de encaminhamentos de email';
 $wb['limit_mailcatchall_txt'] = 'Limite de contas cata tudo';
 $wb['limit_mailrouting_txt'] = 'Limite de rotas de email';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Limite de filtros de email';
 $wb['limit_fetchmail_txt'] = 'Limite de contas de busca';
 $wb['limit_mailquota_txt'] = 'Cota de contas de email';
@@ -73,6 +74,7 @@ $wb['limit_mailalias_error_notint'] = 'O limite de alias de email deve ser um n
 $wb['limit_mailforward_error_notint'] = 'O limite de encaminhamentos deve ser um número.';
 $wb['limit_mailcatchall_error_notint'] = 'O limite de contas cata tudo deve ser um número.';
 $wb['limit_mailrouting_error_notint'] = 'O limite de rotas de email deve ser um número.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'O limite de filtros de email deve ser um número.';
 $wb['limit_mailfetchmail_error_notint'] = 'O limite de contas de busca deve ser um número.';
 $wb['limit_mailquota_error_notint'] = 'O limite das cotas de email deve ser um número.';
diff --git a/interface/web/client/lib/lang/ca_client.lng b/interface/web/client/lib/lang/ca_client.lng
index e4cc2f2dbe..56b6718749 100644
--- a/interface/web/client/lib/lang/ca_client.lng
+++ b/interface/web/client/lib/lang/ca_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Nombre maximal d\'alias d\'email';
 $wb['limit_mailforward_txt'] = 'Nombre maximal de routeurs d\'email';
 $wb['limit_mailcatchall_txt'] = 'Nombre maximal de comptes collecteurs';
 $wb['limit_mailrouting_txt'] = 'Nombre maximal de routes d\'email';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Nombre maximal de filtres d\'emails';
 $wb['limit_fetchmail_txt'] = 'Nombre maximal de comptes récupérateur courriel';
 $wb['limit_mailquota_txt'] = 'Quota des boites courriel';
@@ -61,6 +62,7 @@ $wb['limit_mailalias_error_notint'] = 'La limite d\'alias d\'email doit être un
 $wb['limit_mailforward_error_notint'] = 'La limite de routeurs d\'email doit être un nombre.';
 $wb['limit_mailcatchall_error_notint'] = 'La limite de comptes collecteurs doit être un nombre.';
 $wb['limit_mailrouting_error_notint'] = 'La limite de routes d\'email doit être un nombre.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'La limite de filtres d\'email doit être un nombre.';
 $wb['limit_mailfetchmail_error_notint'] = 'La limite de comptes récupérateur courriel doit être un nombre.';
 $wb['limit_mailquota_error_notint'] = 'La limite du quota des boites d\'email doit être un nombre.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/ca_client_template.lng b/interface/web/client/lib/lang/ca_client_template.lng
index aa51796744..c72d067822 100644
--- a/interface/web/client/lib/lang/ca_client_template.lng
+++ b/interface/web/client/lib/lang/ca_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Nombre maximal d\'alias d\'email';
 $wb['limit_mailforward_txt'] = 'Nombre maximal de routeurs d\'email';
 $wb['limit_mailcatchall_txt'] = 'Nombre maximal de comptes collecteurs';
 $wb['limit_mailrouting_txt'] = 'Nombre maximal de routes d\'emails';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Nombre maximal de filtres d\'emails';
 $wb['limit_fetchmail_txt'] = 'Nombre maximal de comptes récupérateur courriel';
 $wb['limit_mailquota_txt'] = 'Quota des boites courriel';
@@ -31,6 +32,7 @@ $wb['limit_mailalias_error_notint'] = 'La limite d\'alias d\'email doit être un
 $wb['limit_mailforward_error_notint'] = 'La limite de routeurs d\'email doit être un nombre.';
 $wb['limit_mailcatchall_error_notint'] = 'La limite de comptes collecteurs doit être un nombre.';
 $wb['limit_mailrouting_error_notint'] = 'La limite de routes d\'email doit être un nombre.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'La limite de filtres d\'email doit être un nombre.';
 $wb['limit_mailfetchmail_error_notint'] = 'La limite de comptes récupérateur courriel doit être un nombre.';
 $wb['limit_mailquota_error_notint'] = 'La limite du quota des boites d\'email doit être un nombre.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/ca_reseller.lng b/interface/web/client/lib/lang/ca_reseller.lng
index 411096ef54..de734d385b 100644
--- a/interface/web/client/lib/lang/ca_reseller.lng
+++ b/interface/web/client/lib/lang/ca_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Nombre maximal d\'alias d\'email';
 $wb['limit_mailforward_txt'] = 'Nombre maximal de routeurs d\'email';
 $wb['limit_mailcatchall_txt'] = 'Nombre maximal de comptes collecteurs';
 $wb['limit_mailrouting_txt'] = 'Nombre maximal de routes d\'emails';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Nombre maximal de filtres d\'emails';
 $wb['limit_fetchmail_txt'] = 'Nombre maximal de comptes récupérateur courriel';
 $wb['limit_mailquota_txt'] = 'Quota des boites courriel';
@@ -64,6 +65,7 @@ $wb['limit_mailalias_error_notint'] = 'La limite d\'alias d\'email doit être un
 $wb['limit_mailforward_error_notint'] = 'La limite de routeurs d\'email doit être un nombre.';
 $wb['limit_mailcatchall_error_notint'] = 'La limite de comptes collecteurs doit être un nombre.';
 $wb['limit_mailrouting_error_notint'] = 'La limite de routes d\'email doit être un nombre.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'La limite de filtres d\'email doit être un nombre.';
 $wb['limit_mailfetchmail_error_notint'] = 'La limite de comptes récupérateur courriel doit être un nombre.';
 $wb['limit_mailquota_error_notint'] = 'La limite du quota des boites d\'email doit être un nombre.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/cz_client.lng b/interface/web/client/lib/lang/cz_client.lng
index 372080507e..c6bc86a59d 100644
--- a/interface/web/client/lib/lang/cz_client.lng
+++ b/interface/web/client/lib/lang/cz_client.lng
@@ -6,6 +6,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Max. počet doménových přezdívek';
 $wb['limit_mailforward_txt'] = 'Max. počet e-mailových předavačů';
 $wb['limit_mailcatchall_txt'] = 'Max. počet e-mailových košů';
 $wb['limit_mailrouting_txt'] = 'Max. počet e-mailových směrování';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. počet e-mailových filtrů';
 $wb['limit_fetchmail_txt'] = 'Max. počet účtů externího získávání e-mailů';
 $wb['limit_mailquota_txt'] = 'Kvóta e-mailové schránky';
@@ -67,6 +68,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'Limit pro e-mailové doménové ali
 $wb['limit_mailforward_error_notint'] = 'Limit pro e-mailové předávání musí být číslo.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit pro e-mailové koše musí být číslo.';
 $wb['limit_mailrouting_error_notint'] = 'Limit pro e-mailová směrování musí být číslo.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit pro e-mailové filtry limit musí být číslo.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit pro externí získávání e-mailů musí být číslo.';
 $wb['limit_mailquota_error_notint'] = 'Limit pro e-mailovou kvótu musí být číslo.';
diff --git a/interface/web/client/lib/lang/cz_client_template.lng b/interface/web/client/lib/lang/cz_client_template.lng
index 8cb8b34a4e..812a8e2766 100644
--- a/interface/web/client/lib/lang/cz_client_template.lng
+++ b/interface/web/client/lib/lang/cz_client_template.lng
@@ -8,6 +8,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Max. počet doménových přezdívek';
 $wb['limit_mailforward_txt'] = 'Max. počet e-mailových předávání';
 $wb['limit_mailcatchall_txt'] = 'Max. počet e-mailových košů';
 $wb['limit_mailrouting_txt'] = 'Max. počet e-mailových směrování';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. počet e-mailových filtrů';
 $wb['limit_fetchmail_txt'] = 'Max. počet účtů externího získávání e-mailů';
 $wb['limit_mailquota_txt'] = 'Kvóta e-mailové schránky';
@@ -37,6 +38,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'Limit pro e-mailové doménové ali
 $wb['limit_mailforward_error_notint'] = 'Limit pro e-mailové předávání musí být číslo.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit pro e-mailové koše musí být číslo.';
 $wb['limit_mailrouting_error_notint'] = 'Limit pro e-mailová směrování musí být číslo.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit pro e-mailové filtry limit musí být číslo.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit pro externí získávání e-mailů musí být číslo.';
 $wb['limit_mailquota_error_notint'] = 'Limit pro e-mailovou kvótu musí být číslo.';
diff --git a/interface/web/client/lib/lang/cz_reseller.lng b/interface/web/client/lib/lang/cz_reseller.lng
index 751afa6990..79888530b0 100644
--- a/interface/web/client/lib/lang/cz_reseller.lng
+++ b/interface/web/client/lib/lang/cz_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. počet e-mailových aliasů';
 $wb['limit_mailforward_txt'] = 'Max. počet e-mailových předávání';
 $wb['limit_mailcatchall_txt'] = 'Max. počet e-mailových košů';
 $wb['limit_mailrouting_txt'] = 'Max. počet e-mailových směrování';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. počet e-mailových filtrů';
 $wb['limit_fetchmail_txt'] = 'Max. počet účtů externího získávání e-mailů';
 $wb['limit_mailquota_txt'] = 'Kvóta e-mailové schránky';
@@ -65,6 +66,7 @@ $wb['limit_mailalias_error_notint'] = 'Limit pro e-mailové aliasy musí být č
 $wb['limit_mailforward_error_notint'] = 'Limit pro e-mailové předávání musí být číslo.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit pro e-mailové koše musí být číslo.';
 $wb['limit_mailrouting_error_notint'] = 'Limit pro e-mailová směrování musí být číslo.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit pro e-mailové filtry limit musí být číslo.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit pro externí získávání e-mailů musí být číslo.';
 $wb['limit_mailquota_error_notint'] = 'Limit pro e-mailovou kvótu musí být číslo.';
diff --git a/interface/web/client/lib/lang/de_client.lng b/interface/web/client/lib/lang/de_client.lng
index ca22ce638c..cce0b03b68 100644
--- a/interface/web/client/lib/lang/de_client.lng
+++ b/interface/web/client/lib/lang/de_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. Anzahl an E-Mail Aliase';
 $wb['limit_mailforward_txt'] = 'Max. Anzahl an E-Mail Weiterleitungen';
 $wb['limit_mailcatchall_txt'] = 'Max. Anzahl an E-Mail Catchall Konten';
 $wb['limit_mailrouting_txt'] = 'Max. Anzahl an E-Mail Routen';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. Anzahl an E-Mail Filter';
 $wb['limit_fetchmail_txt'] = 'Max. Anzahl an Fetchmail Konten';
 $wb['limit_mailquota_txt'] = 'E-Mail Konto Beschränkung';
@@ -64,6 +65,7 @@ $wb['limit_mailalias_error_notint'] = 'Das E-Mail Alias Limit muss eine Zahl sei
 $wb['limit_mailforward_error_notint'] = 'Das E-Mail Weiterleitung Limit muss eine Zahl sein.';
 $wb['limit_mailcatchall_error_notint'] = 'Das E-Mail Catchall Limit muss eine Zahl sein.';
 $wb['limit_mailrouting_error_notint'] = 'Das E-Mail Routing Limit muss eine Zahl sein.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Das E-Mail Filter Limit muss eine Zahl sein.';
 $wb['limit_mailfetchmail_error_notint'] = 'Das Fetchmail Limit muss eine Zahl sein.';
 $wb['limit_mailquota_error_notint'] = 'Das E-Mailbeschränkungs Limit muss eine Zahl sein.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/de_client_template.lng b/interface/web/client/lib/lang/de_client_template.lng
index a8431a8187..aaf26f9996 100644
--- a/interface/web/client/lib/lang/de_client_template.lng
+++ b/interface/web/client/lib/lang/de_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Max. Anzahl an E-Mail Aliasse';
 $wb['limit_mailforward_txt'] = 'Max. Anzahl an E-Mail Weiterleitungen';
 $wb['limit_mailcatchall_txt'] = 'Max. Anzahl an E-Mail Catchall Konten';
 $wb['limit_mailrouting_txt'] = 'Max. Anzahl E-Mail Routen';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. Anzahl an E-Mail Filtern';
 $wb['limit_fetchmail_txt'] = 'Max. Anzahl an E-Mail Sammeldienst Konten';
 $wb['limit_mailquota_txt'] = 'E-Mail Konto Beschränkung';
@@ -34,6 +35,7 @@ $wb['limit_mailalias_error_notint'] = 'Das E-Mail Alias Limit muss eine Zahl sei
 $wb['limit_mailforward_error_notint'] = 'Das E-Mail Weiterleitung Limit muss eine Zahl sein.';
 $wb['limit_mailcatchall_error_notint'] = 'Das E-Mail Catchall Limit muss eine Zahl sein.';
 $wb['limit_mailrouting_error_notint'] = 'Das E-Mail Routing Limit muss eine Zahl sein.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Das E-Mail Filter Limit muss eine Zahl sein.';
 $wb['limit_mailfetchmail_error_notint'] = 'Das E-Mail Sammeldienst Limit muss eine Zahl sein.';
 $wb['limit_mailquota_error_notint'] = 'Das E-Mail Beschränkungs Limit muss eine Zahl sein.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Web-Server';
 $wb['db_servers_txt'] = 'Datenbank-Server';
 $wb['mail_servers_txt'] = 'Mail-Server';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/de_reseller.lng b/interface/web/client/lib/lang/de_reseller.lng
index 9f68b18cf5..5d6a8f134f 100644
--- a/interface/web/client/lib/lang/de_reseller.lng
+++ b/interface/web/client/lib/lang/de_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. Anzahl an E-Mail Aliasse';
 $wb['limit_mailforward_txt'] = 'Max. Anzahl an E-Mail Weiterleitungen';
 $wb['limit_mailcatchall_txt'] = 'Max. Anzahl an E-Mail Catchall Konten';
 $wb['limit_mailrouting_txt'] = 'Max. Anzahl an E-Mail Routen';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. Anzahl an E-Mail Filtern';
 $wb['limit_fetchmail_txt'] = 'Max. Anzahl an Fetchmail Konten';
 $wb['limit_mailquota_txt'] = 'E-Mail konten Beschränkung';
@@ -65,6 +66,7 @@ $wb['limit_mailalias_error_notint'] = 'Das E-Mail Alias Limit muss eine Zahl sei
 $wb['limit_mailforward_error_notint'] = 'Das E-Mail Weiterleitungs Limit muss eine Zahl sein.';
 $wb['limit_mailcatchall_error_notint'] = 'Das E-Mail Catchall Limit muss eine Zahl sein.';
 $wb['limit_mailrouting_error_notint'] = 'Das E-Mail Routing Limit muss eine Zahl sein.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Das E-Mail Filter Limit muss eine Zahl sein.';
 $wb['limit_mailfetchmail_error_notint'] = 'Das Fetchmail Limit muss eine Zahl sein.';
 $wb['limit_mailquota_error_notint'] = 'Das E-Mail Beschräkungs Limit muss eine Zahl sein.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/dk_client.lng b/interface/web/client/lib/lang/dk_client.lng
index b1e549dd91..fc83620acb 100644
--- a/interface/web/client/lib/lang/dk_client.lng
+++ b/interface/web/client/lib/lang/dk_client.lng
@@ -7,6 +7,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Max. antal af domæne aliaser';
 $wb['limit_mailforward_txt'] = 'Max. antal af e-mail forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. antal af e-mail catchall konti';
 $wb['limit_mailrouting_txt'] = 'Max. antal af e-mail routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. antal af e-mail filtere';
 $wb['limit_fetchmail_txt'] = 'Max. antal af fetchmail konti';
 $wb['limit_mailquota_txt'] = 'Postboks kvota';
@@ -70,6 +71,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'E-mail domæne alias grænse skal v
 $wb['limit_mailforward_error_notint'] = 'E-mail forward grænse skal være et tal.';
 $wb['limit_mailcatchall_error_notint'] = 'E-mail catchall grænse skal være et tal.';
 $wb['limit_mailrouting_error_notint'] = 'E-mail routing grænse skal være et tal.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'E-mail filter grænse skal være et tal.';
 $wb['limit_mailfetchmail_error_notint'] = 'Fetchmail grænse skal være et tal.';
 $wb['limit_mailquota_error_notint'] = 'E-mail kvote grænse skal være et tal.';
@@ -202,4 +204,3 @@ $wb['limit_directive_snippets_txt'] = 'Show web server config selection';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/dk_client_template.lng b/interface/web/client/lib/lang/dk_client_template.lng
index 04acf57d64..fa9399197f 100644
--- a/interface/web/client/lib/lang/dk_client_template.lng
+++ b/interface/web/client/lib/lang/dk_client_template.lng
@@ -11,6 +11,7 @@ $wb['limit_mailmailinglist_txt'] = 'Max. antal af mailing lister';
 $wb['limit_mailforward_txt'] = 'Max. antal af e-mail forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. antal af e-mail catchall konti';
 $wb['limit_mailrouting_txt'] = 'Max. antal af e-mail routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. antal af e-mail filtere';
 $wb['limit_fetchmail_txt'] = 'Max. antal af fetchmail konti';
 $wb['limit_mailquota_txt'] = 'Postboks kvota';
@@ -42,6 +43,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'E-mail domæne alias grænse skal v
 $wb['limit_mailforward_error_notint'] = 'E-mail forward grænse skal være et tal.';
 $wb['limit_mailcatchall_error_notint'] = 'E-mail catchall grænse skal være et tal.';
 $wb['limit_mailrouting_error_notint'] = 'E-mail routing grænse skal være et tal.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'E-mail filter grænse skal være et tal.';
 $wb['limit_mailfetchmail_error_notint'] = 'Fetchmail grænse skal være et tal.';
 $wb['limit_mailquota_error_notint'] = 'E-mail kvote grænse skal være et tal.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/dk_reseller.lng b/interface/web/client/lib/lang/dk_reseller.lng
index 12004df761..19babe52d4 100644
--- a/interface/web/client/lib/lang/dk_reseller.lng
+++ b/interface/web/client/lib/lang/dk_reseller.lng
@@ -7,6 +7,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Max. antal af domæne aliaser';
 $wb['limit_mailforward_txt'] = 'Max. antal af e-mail forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. antal af e-mail catchall konti';
 $wb['limit_mailrouting_txt'] = 'Max. antal af e-mail routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. antal af e-mail filtere';
 $wb['limit_fetchmail_txt'] = 'Max. antal af fetchmail konti';
 $wb['limit_mailquota_txt'] = 'Postboks kvota';
@@ -69,6 +70,7 @@ $wb['limit_mailalias_error_notint'] = 'E-mail alias grænse skal være et tal.';
 $wb['limit_mailforward_error_notint'] = 'E-mail forward grænse skal være et tal.';
 $wb['limit_mailcatchall_error_notint'] = 'E-mail catchall grænse skal være et tal.';
 $wb['limit_mailrouting_error_notint'] = 'E-mail routing grænse skal være et tal.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'E-mail filter grænse skal være et tal.';
 $wb['limit_mailfetchmail_error_notint'] = 'Fetchmail grænse skal være et tal.';
 $wb['limit_mailquota_error_notint'] = 'E-mail kvote grænse skal være et tal.';
@@ -206,4 +208,3 @@ $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a n
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/el_client.lng b/interface/web/client/lib/lang/el_client.lng
index 144e632ef6..3d61198d3d 100644
--- a/interface/web/client/lib/lang/el_client.lng
+++ b/interface/web/client/lib/lang/el_client.lng
@@ -6,6 +6,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Όριο ψευδωνύμων domain';
 $wb['limit_mailforward_txt'] = 'Όριο email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Όριο λογαριασμών email catchall';
 $wb['limit_mailrouting_txt'] = 'Όριο δρομολογήσεων των email';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Όριο φίλτρων email';
 $wb['limit_fetchmail_txt'] = 'Όριο λογαριασμών fetchmail';
 $wb['limit_mailquota_txt'] = 'Όριο χώρου θυρίδας';
@@ -70,6 +71,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'Το όριο των ψευδωνύ
 $wb['limit_mailforward_error_notint'] = 'Το όριο των email forward πρέπει να είναι αριθμός';
 $wb['limit_mailcatchall_error_notint'] = 'Το όριο των email catchall πρέπει να είναι αριθμός';
 $wb['limit_mailrouting_error_notint'] = 'Το όριο των δρομολογήσεων email πρέπει να είναι αριθμός';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Το όριο των email filter πρέπει να είναι αριθμός';
 $wb['limit_mailfetchmail_error_notint'] = 'Το όριο των fetchmail πρέπει να είναι αριθμός';
 $wb['limit_mailquota_error_notint'] = 'Το όριο μεγέθους των email πρέπει να είναι αριθμός';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/el_client_template.lng b/interface/web/client/lib/lang/el_client_template.lng
index 91be0bcffd..7d05bd4cc8 100644
--- a/interface/web/client/lib/lang/el_client_template.lng
+++ b/interface/web/client/lib/lang/el_client_template.lng
@@ -8,6 +8,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Όριο ψευδωνύμων domain';
 $wb['limit_mailforward_txt'] = 'Όριο email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Όριο λογαριασμών email';
 $wb['limit_mailrouting_txt'] = 'Όριο δρομολογήσεων email';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Όριο φίλτρων email';
 $wb['limit_fetchmail_txt'] = 'Όριο λογαριασμών fetchmail';
 $wb['limit_mailquota_txt'] = 'Όριο θυρίδας';
@@ -39,6 +40,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'Το όριο ψευδωνύμων
 $wb['limit_mailforward_error_notint'] = 'Το όριο email forward πρέπει να είναι αριθμός.';
 $wb['limit_mailcatchall_error_notint'] = 'Το όριο email catchall πρέπει να είναι αριθμός.';
 $wb['limit_mailrouting_error_notint'] = 'Το όριο των δρομολογήσεων email πρέπει να είναι αριθμός.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Το όριο φίλτρων email πρέπει να είναι αριθμός.';
 $wb['limit_mailfetchmail_error_notint'] = 'Το όριο fetchmail πρέπει να είναι αριθμός.';
 $wb['limit_mailquota_error_notint'] = 'Το όριο χώρου email πρέπει να είναι αριθμός.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/el_reseller.lng b/interface/web/client/lib/lang/el_reseller.lng
index 3a5e5159aa..9aa37a6333 100644
--- a/interface/web/client/lib/lang/el_reseller.lng
+++ b/interface/web/client/lib/lang/el_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Όριο ψευδωνύμων email';
 $wb['limit_mailforward_txt'] = 'Όριο email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Όριο λογαριασμών email catchall';
 $wb['limit_mailrouting_txt'] = 'Όριο δρομολογήσεων email';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Όριο φίλτρων email';
 $wb['limit_fetchmail_txt'] = 'Όριο λογαριασμών fetchmail';
 $wb['limit_mailquota_txt'] = 'Όριο θυρίδας';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'Το όριο ψευδωνύμων email
 $wb['limit_mailforward_error_notint'] = 'Το όριο email forward πρέπει να είναι αριθμός.';
 $wb['limit_mailcatchall_error_notint'] = 'Το όριο email catchall πρέπει να είναι αριθμός.';
 $wb['limit_mailrouting_error_notint'] = 'Το όριο δρομολογήσεων email πρέπει να είναι αριθμός.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Το όριο φίλτρων email πρέπει να είναι αριθμός.';
 $wb['limit_mailfetchmail_error_notint'] = 'Το όριο fetchmail πρέπει να είναι αριθμός.';
 $wb['limit_mailquota_error_notint'] = 'Το όριο χώρου email πρέπει να είναι αριθμός.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/en_client.lng b/interface/web/client/lib/lang/en_client.lng
index a5991260c5..ee5f3675bd 100644
--- a/interface/web/client/lib/lang/en_client.lng
+++ b/interface/web/client/lib/lang/en_client.lng
@@ -7,6 +7,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Max. number of domain aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -73,6 +74,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'The email domain alias limit must b
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -204,4 +206,3 @@ $wb['email_error_empty'] = 'Email is empty';
 $wb['limit_directive_snippets_txt'] = 'Show web server config selection';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/en_client_template.lng b/interface/web/client/lib/lang/en_client_template.lng
index aa3dfdcb6e..bfccedcf1e 100644
--- a/interface/web/client/lib/lang/en_client_template.lng
+++ b/interface/web/client/lib/lang/en_client_template.lng
@@ -12,6 +12,7 @@ $wb['limit_mailmailinglist_txt'] = 'Max. number of mailing lists';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -47,6 +48,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'The email domain alias limit must b
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -125,4 +127,3 @@ $wb['xmpp_servers_txt'] = 'XMPP Servers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/en_reseller.lng b/interface/web/client/lib/lang/en_reseller.lng
index ec94cb0178..c2315c67b4 100644
--- a/interface/web/client/lib/lang/en_reseller.lng
+++ b/interface/web/client/lib/lang/en_reseller.lng
@@ -7,6 +7,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Max. number of domain aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -73,6 +74,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias limit must be a number.';
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -210,4 +212,3 @@ $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a n
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/es_client.lng b/interface/web/client/lib/lang/es_client.lng
index eae85315b6..645a533a51 100644
--- a/interface/web/client/lib/lang/es_client.lng
+++ b/interface/web/client/lib/lang/es_client.lng
@@ -105,6 +105,8 @@ $wb['limit_mailquota_error_notint'] = 'El límite de cuota de correo debe ser un
 $wb['limit_mailquota_txt'] = 'Cuota de buzones de correo';
 $wb['limit_mailrouting_error_notint'] = 'El límite de enrutadores de correo debe ser un número.';
 $wb['limit_mailrouting_txt'] = 'Cantidad máx. de enrutadores de correos';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_openvz_vm_error_notint'] = 'El límite de servidores virtuales debe ser un número.';
 $wb['limit_openvz_vm_template_id_txt'] = 'Forzar plantilla para servidor virtual';
 $wb['limit_openvz_vm_txt'] = 'Cantidad máxima de servidores virtuales';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/es_client_template.lng b/interface/web/client/lib/lang/es_client_template.lng
index 5c55b23f89..17c73de969 100644
--- a/interface/web/client/lib/lang/es_client_template.lng
+++ b/interface/web/client/lib/lang/es_client_template.lng
@@ -62,6 +62,8 @@ $wb['limit_mailquota_error_notint'] = 'El límite de cuota de correo debe ser un
 $wb['limit_mailquota_txt'] = 'Cuota de buzones de correo';
 $wb['limit_mailrouting_error_notint'] = 'El límite de enrutadores de correo debe ser un número.';
 $wb['limit_mailrouting_txt'] = 'Cantidad máx. de enrutadores de correos';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_openvz_vm_error_notint'] = 'El límite del servidor virtual debe ser un número.';
 $wb['limit_openvz_vm_template_id_txt'] = 'Forzar plantilla de servidor virtual';
 $wb['limit_openvz_vm_txt'] = 'Cantidad máx. de servidores virtuales';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/es_reseller.lng b/interface/web/client/lib/lang/es_reseller.lng
index 6830c56cb8..d2553ce83c 100644
--- a/interface/web/client/lib/lang/es_reseller.lng
+++ b/interface/web/client/lib/lang/es_reseller.lng
@@ -112,6 +112,8 @@ $wb['limit_mailquota_error_notint'] = 'El límite de cuota de correo debe ser un
 $wb['limit_mailquota_txt'] = 'Cuota de buzones de correo';
 $wb['limit_mailrouting_error_notint'] = 'El límite de enrutadores de correo debe ser un número.';
 $wb['limit_mailrouting_txt'] = 'Cantidad máx. de enrutadores de correos';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_openvz_vm_error_notint'] = 'El límite del servidor virtual debe ser un número.';
 $wb['limit_openvz_vm_template_id_txt'] = 'Forzar plantilla de servidor virtual';
 $wb['limit_openvz_vm_txt'] = 'Cantidad máx. de servidores virtuales';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/fi_client.lng b/interface/web/client/lib/lang/fi_client.lng
index 7769af8b99..c0c0a5ba3a 100644
--- a/interface/web/client/lib/lang/fi_client.lng
+++ b/interface/web/client/lib/lang/fi_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Postisoitteiden aliastunnuksien määrä';
 $wb['limit_mailforward_txt'] = 'Edelleenlähetysosoitteiden määrä';
 $wb['limit_mailcatchall_txt'] = 'Postiverkkotunnuksien Catchall-tilien määrä';
 $wb['limit_mailrouting_txt'] = 'Postireititysten määrä';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Roskapostisuodattimien määrä';
 $wb['limit_fetchmail_txt'] = 'Noudettavien postilaatikoiden määrä';
 $wb['limit_mailquota_txt'] = 'Postilaatikon enimmäiskoko';
@@ -62,6 +63,7 @@ $wb['limit_mailalias_error_notint'] = 'Postin aliastunnuksien raja-arvon pitää
 $wb['limit_mailforward_error_notint'] = 'Postin edelleenlähetysten raja-arvon pitää olla numero.';
 $wb['limit_mailcatchall_error_notint'] = 'Postiverkkotunnuksien catchall-tunnuksien raja-arvon pitää olla numero.';
 $wb['limit_mailrouting_error_notint'] = 'Postireititysten raja-arvon pitää olla numero.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Roskapostisuodattimien raja-arvon pitää olla numero.';
 $wb['limit_mailfetchmail_error_notint'] = 'Noudettavien postilaatikoiden raja-arvon pitää olla numero.';
 $wb['limit_mailquota_error_notint'] = 'Postilaatikon koon raja-arvon pitää olla numero.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/fi_client_template.lng b/interface/web/client/lib/lang/fi_client_template.lng
index 70d9069664..d24182806b 100644
--- a/interface/web/client/lib/lang/fi_client_template.lng
+++ b/interface/web/client/lib/lang/fi_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Postialiaksien määrä';
 $wb['limit_mailforward_txt'] = 'Edelleenlähetysosoitteiden määrä';
 $wb['limit_mailcatchall_txt'] = 'Postiverkkotunnuksien Catchall-tilien määrä';
 $wb['limit_mailrouting_txt'] = 'Postireititysten määrä';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Roskapostisuodattimien määrä';
 $wb['limit_fetchmail_txt'] = 'Noudettavien postilaatikoiden määrä';
 $wb['limit_mailquota_txt'] = 'Postilaatikon koko';
@@ -32,6 +33,7 @@ $wb['limit_mailalias_error_notint'] = 'Postialiaksien raja-arvon pitää olla nu
 $wb['limit_mailforward_error_notint'] = 'Edelleenlähetysosoitteiden raja-arvon pitää olla numero.';
 $wb['limit_mailcatchall_error_notint'] = 'Catchall-tunnuksien raja-arvon pitää olla numero.';
 $wb['limit_mailrouting_error_notint'] = 'Postireitityksien raja-arvon pitää olla numero.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Roskapostisuodattimien raja-arvon pitää olla numero.';
 $wb['limit_mailfetchmail_error_notint'] = 'Noudettavien postilaatikoiden raja-arvon pitää olla numero.';
 $wb['limit_mailquota_error_notint'] = 'Postilaatikon koon raja-arvon pitää olla numero.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/fi_reseller.lng b/interface/web/client/lib/lang/fi_reseller.lng
index fbd09f4b3e..06e2ef5fca 100644
--- a/interface/web/client/lib/lang/fi_reseller.lng
+++ b/interface/web/client/lib/lang/fi_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Sähköpostin aliastunnuksien enimmäismäärä';
 $wb['limit_mailforward_txt'] = 'Edelleenlähetettävien sähköpostitunnuksien enimmäismäärä';
 $wb['limit_mailcatchall_txt'] = 'Sähköpostin catchall-tilien enimmäismäärä';
 $wb['limit_mailrouting_txt'] = 'Sähköpostireitityksien enimmäismäärä';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Sähköpostisuodattimien enimmäismäärä';
 $wb['limit_fetchmail_txt'] = 'Noudettavien sähköpotilaatikoiden enimmäismäärä';
 $wb['limit_mailquota_txt'] = 'Sähköpostilaatikoiden levytila';
@@ -65,6 +66,7 @@ $wb['limit_mailalias_error_notint'] = 'Sähköpostialiaksien rajan pitää olla
 $wb['limit_mailforward_error_notint'] = 'Sähköpostin edelleenlähetyksen rajan pitää olla numeerinen.';
 $wb['limit_mailcatchall_error_notint'] = 'Catchall-tunnuksien rajan pitää olla numeerinen.';
 $wb['limit_mailrouting_error_notint'] = 'Sähköpostireittien rajan pitää olla numeerinen.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Sähköpostisuodattimien rajan pitää olla numeerinen.';
 $wb['limit_mailfetchmail_error_notint'] = 'Noudettavien laatikoiden rajan pitää olla numeerinen.';
 $wb['limit_mailquota_error_notint'] = 'Sähköpostin levytilan rajan pitää olla numeerinen.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/fr_client.lng b/interface/web/client/lib/lang/fr_client.lng
index c3de724d93..4ef9a64eeb 100644
--- a/interface/web/client/lib/lang/fr_client.lng
+++ b/interface/web/client/lib/lang/fr_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Nombre maximal d’alias d’e-mail';
 $wb['limit_mailforward_txt'] = 'Nombre maximal de routeurs d’e-mail';
 $wb['limit_mailcatchall_txt'] = 'Nombre maximal de comptes collecteurs';
 $wb['limit_mailrouting_txt'] = 'Nombre maximal de routes d’e-mail';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Nombre maximal de filtres d’e-mails';
 $wb['limit_fetchmail_txt'] = 'Nombre maximal de comptes récupérateur e-mail';
 $wb['limit_mailquota_txt'] = 'Quota des boîtes aux lettres';
@@ -61,6 +62,7 @@ $wb['limit_mailalias_error_notint'] = 'La limite d’alias d’e-mail doit être
 $wb['limit_mailforward_error_notint'] = 'La limite de routeurs d’e-mail doit être un nombre.';
 $wb['limit_mailcatchall_error_notint'] = 'La limite de comptes collecteurs doit être un nombre.';
 $wb['limit_mailrouting_error_notint'] = 'La limite de routes d’e-mail doit être un nombre.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'La limite de filtres d’e-mail doit être un nombre.';
 $wb['limit_mailfetchmail_error_notint'] = 'La limite de comptes récupérateur e-mail doit être un nombre.';
 $wb['limit_mailquota_error_notint'] = 'La limite du quota des boîtes d’e-mail doit être un nombre.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/fr_client_template.lng b/interface/web/client/lib/lang/fr_client_template.lng
index b81788c0d4..e443eb7801 100644
--- a/interface/web/client/lib/lang/fr_client_template.lng
+++ b/interface/web/client/lib/lang/fr_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Nombre maximal d’alias d’e-mail';
 $wb['limit_mailforward_txt'] = 'Nombre maximal de routeurs d’e-mail';
 $wb['limit_mailcatchall_txt'] = 'Nombre maximal de comptes collecteurs';
 $wb['limit_mailrouting_txt'] = 'Nombre maximal de routes d’e-mails';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Nombre maximal de filtres d’e-mails';
 $wb['limit_fetchmail_txt'] = 'Nombre maximal de comptes récupérateur e-mail';
 $wb['limit_mailquota_txt'] = 'Quota des boîtes aux lettres';
@@ -31,6 +32,7 @@ $wb['limit_mailalias_error_notint'] = 'La limite d’alias d’e-mail doit être
 $wb['limit_mailforward_error_notint'] = 'La limite de routeurs d’e-mail doit être un nombre.';
 $wb['limit_mailcatchall_error_notint'] = 'La limite de comptes collecteurs doit être un nombre.';
 $wb['limit_mailrouting_error_notint'] = 'La limite de routes d’e-mail doit être un nombre.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'La limite de filtres d’e-mail doit être un nombre.';
 $wb['limit_mailfetchmail_error_notint'] = 'La limite de comptes récupérateur e-mail doit être un nombre.';
 $wb['limit_mailquota_error_notint'] = 'La limite du quota des boîtes d’e-mail doit être un nombre.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/fr_reseller.lng b/interface/web/client/lib/lang/fr_reseller.lng
index 76d44cb324..448a91ea39 100644
--- a/interface/web/client/lib/lang/fr_reseller.lng
+++ b/interface/web/client/lib/lang/fr_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Nombre maximal d’alias d’e-mail';
 $wb['limit_mailforward_txt'] = 'Nombre maximal de routeurs d’e-mail';
 $wb['limit_mailcatchall_txt'] = 'Nombre maximal de comptes collecteurs';
 $wb['limit_mailrouting_txt'] = 'Nombre maximal de routes d’e-mails';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Nombre maximal de filtres d’e-mails';
 $wb['limit_fetchmail_txt'] = 'Nombre maximal de comptes récupérateur e-mail';
 $wb['limit_mailquota_txt'] = 'Quota des boîtes aux lettres';
@@ -64,6 +65,7 @@ $wb['limit_mailalias_error_notint'] = 'La limite d’alias d’e-mail doit être
 $wb['limit_mailforward_error_notint'] = 'La limite de routeurs d’e-mail doit être un nombre.';
 $wb['limit_mailcatchall_error_notint'] = 'La limite de comptes collecteurs doit être un nombre.';
 $wb['limit_mailrouting_error_notint'] = 'La limite de routes d’e-mail doit être un nombre.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'La limite de filtres d’e-mail doit être un nombre.';
 $wb['limit_mailfetchmail_error_notint'] = 'La limite de comptes récupérateur e-mail doit être un nombre.';
 $wb['limit_mailquota_error_notint'] = 'La limite du quota des boîtes d’e-mail doit être un nombre.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/hr_client.lng b/interface/web/client/lib/lang/hr_client.lng
index 4d16bac0cb..aac50a2f2a 100644
--- a/interface/web/client/lib/lang/hr_client.lng
+++ b/interface/web/client/lib/lang/hr_client.lng
@@ -6,6 +6,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Maksimalan broj aliasa email domena';
 $wb['limit_mailforward_txt'] = 'Maksimalan broj email forwardera';
 $wb['limit_mailcatchall_txt'] = 'Maksimalan broj email catchall računa';
 $wb['limit_mailrouting_txt'] = 'Maksimalan broj email ruta';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Maksimalan broj email filtera';
 $wb['limit_fetchmail_txt'] = 'Maksimalan broj fetchmail računa';
 $wb['limit_mailquota_txt'] = 'Veličina mailboxa';
@@ -70,6 +71,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'Maksimalan broj email alias domena
 $wb['limit_mailforward_error_notint'] = 'Limit email forwarda mora biti znamenka.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit email catchalla mora biti znamenka.';
 $wb['limit_mailrouting_error_notint'] = 'Limit email ruta mora biti znamenka.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit email filtera mora biti znamenka.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit fetchmaila mora biti znamenka.';
 $wb['limit_mailquota_error_notint'] = 'Veličina mailboxa mora biti znamenka.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/hr_client_template.lng b/interface/web/client/lib/lang/hr_client_template.lng
index 12fabbe723..4a2cd0500c 100644
--- a/interface/web/client/lib/lang/hr_client_template.lng
+++ b/interface/web/client/lib/lang/hr_client_template.lng
@@ -8,6 +8,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Maksimalan broj aliasa email domena';
 $wb['limit_mailforward_txt'] = 'Maksimalan broj email forwardera';
 $wb['limit_mailcatchall_txt'] = 'Maksimalan broj email catchall računa';
 $wb['limit_mailrouting_txt'] = 'Maksimalan broj email ruta';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Maksimalan broj email filtera';
 $wb['limit_fetchmail_txt'] = 'Maksimalan broj fetchmail računa';
 $wb['limit_mailquota_txt'] = 'Veličina mailboxa';
@@ -39,6 +40,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'Maksimalan broj email alias domena
 $wb['limit_mailforward_error_notint'] = 'Limit email forwarda mora biti znamenka.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit email catchalla mora biti znamenka.';
 $wb['limit_mailrouting_error_notint'] = 'Limit email ruta mora biti znamenka.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit email filtera mora biti znamenka.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit fetchmaila mora biti znamenka.';
 $wb['limit_mailquota_error_notint'] = 'Veličina mailboxa mora biti znamenka.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/hr_reseller.lng b/interface/web/client/lib/lang/hr_reseller.lng
index d4b9f58eeb..9b01f30b2d 100644
--- a/interface/web/client/lib/lang/hr_reseller.lng
+++ b/interface/web/client/lib/lang/hr_reseller.lng
@@ -6,6 +6,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Maksimalan broj aliasa email domena';
 $wb['limit_mailforward_txt'] = 'Maksimalan broj email forwardera';
 $wb['limit_mailcatchall_txt'] = 'Maksimalan broj email catchall računa';
 $wb['limit_mailrouting_txt'] = 'Maksimalan broj email ruta';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Maksimalan broj email filtera';
 $wb['limit_fetchmail_txt'] = 'Maksimalan broj fetchmail računa';
 $wb['limit_mailquota_txt'] = 'Veličina mailboxa';
@@ -69,6 +70,7 @@ $wb['limit_mailalias_error_notint'] = 'Maksimalan broj email aliasa mora biti zn
 $wb['limit_mailforward_error_notint'] = 'Limit email forwarda mora biti znamenka.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit email catchalla mora biti znamenka.';
 $wb['limit_mailrouting_error_notint'] = 'Limit email ruta mora biti znamenka.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit email filtera mora biti znamenka.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit fetchmaila mora biti znamenka.';
 $wb['limit_mailquota_error_notint'] = 'Veličina mailboxa mora biti znamenka.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/hu_client.lng b/interface/web/client/lib/lang/hu_client.lng
index b11e03273e..402e5adf04 100644
--- a/interface/web/client/lib/lang/hu_client.lng
+++ b/interface/web/client/lib/lang/hu_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Maximálisan létrehozható email alias-ok száma'
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox korlát';
@@ -62,6 +63,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias limit must be a number.';
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/hu_client_template.lng b/interface/web/client/lib/lang/hu_client_template.lng
index 3df432a661..9300d945b6 100644
--- a/interface/web/client/lib/lang/hu_client_template.lng
+++ b/interface/web/client/lib/lang/hu_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Max. number of email aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -32,6 +33,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias limit must be a number.';
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/hu_reseller.lng b/interface/web/client/lib/lang/hu_reseller.lng
index 76755a112b..5970b80d46 100644
--- a/interface/web/client/lib/lang/hu_reseller.lng
+++ b/interface/web/client/lib/lang/hu_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. number of email aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias limit must be a number.';
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/id_client.lng b/interface/web/client/lib/lang/id_client.lng
index df858ebdfa..c7b5cafa43 100644
--- a/interface/web/client/lib/lang/id_client.lng
+++ b/interface/web/client/lib/lang/id_client.lng
@@ -6,6 +6,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Jumlah maks alias domain';
 $wb['limit_mailforward_txt'] = 'Jumlah maks forwarder email';
 $wb['limit_mailcatchall_txt'] = 'Jumlah maks akun catchall email';
 $wb['limit_mailrouting_txt'] = 'Jumlah maks rute email';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Jumlah maks penyaringan email';
 $wb['limit_fetchmail_txt'] = 'Jumlah maks akun fetchmail';
 $wb['limit_mailquota_txt'] = 'Kuota Mailbox';
@@ -67,6 +68,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'Batasan alias domain email harus be
 $wb['limit_mailforward_error_notint'] = 'Batasan forward email harus berupa angka.';
 $wb['limit_mailcatchall_error_notint'] = 'Batasan catchall email harus berupa angka.';
 $wb['limit_mailrouting_error_notint'] = 'Batasan routing email harus berupa angka.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Batasan penyaringan email harus berupa angka.';
 $wb['limit_mailfetchmail_error_notint'] = 'Batasan fetchmail harus berupa angka.';
 $wb['limit_mailquota_error_notint'] = 'Batasan kuota email harus berupa angka.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/id_client_template.lng b/interface/web/client/lib/lang/id_client_template.lng
index 57c55be576..007b4af0da 100644
--- a/interface/web/client/lib/lang/id_client_template.lng
+++ b/interface/web/client/lib/lang/id_client_template.lng
@@ -8,6 +8,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Jumlah maks alias domain';
 $wb['limit_mailforward_txt'] = 'Jumlah maks forwarder email';
 $wb['limit_mailcatchall_txt'] = 'Jumlah maks akun catchall email';
 $wb['limit_mailrouting_txt'] = 'Jumlah maks rute email';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Jumlah maks filter email';
 $wb['limit_fetchmail_txt'] = 'Jumlah maks akun fetchmail';
 $wb['limit_mailquota_txt'] = 'Kuota Mailbox';
@@ -36,6 +37,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'Batasan alias domain email harus be
 $wb['limit_mailforward_error_notint'] = 'Batasan forward email harus berupa angka.';
 $wb['limit_mailcatchall_error_notint'] = 'Batasan catchall email harus berupa angka.';
 $wb['limit_mailrouting_error_notint'] = 'Batasan routing email harus berupa angka.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Batasan penyaringan email harus berupa angka.';
 $wb['limit_mailfetchmail_error_notint'] = 'Batasan fetchmail harus berupa angka.';
 $wb['limit_mailquota_error_notint'] = 'Batasan kuota email harus berupa angka.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/id_reseller.lng b/interface/web/client/lib/lang/id_reseller.lng
index e639f4929e..11b0d95d74 100644
--- a/interface/web/client/lib/lang/id_reseller.lng
+++ b/interface/web/client/lib/lang/id_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Jumlah maks alias email';
 $wb['limit_mailforward_txt'] = 'Jumlah maks forwarder email';
 $wb['limit_mailcatchall_txt'] = 'Jumlah maks akun catchall email';
 $wb['limit_mailrouting_txt'] = 'Jumlah maks rute email';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Jumlah maks penyaringan email';
 $wb['limit_fetchmail_txt'] = 'Jumlah maks akun fetchmail';
 $wb['limit_mailquota_txt'] = 'Kuota Mailbox';
@@ -65,6 +66,7 @@ $wb['limit_mailalias_error_notint'] = 'Batasan alias email harus berupa angka.';
 $wb['limit_mailforward_error_notint'] = 'Batasan forward email harus berupa angka.';
 $wb['limit_mailcatchall_error_notint'] = 'Batasan catchall email harus berupa angka.';
 $wb['limit_mailrouting_error_notint'] = 'Batasan routing email harus berupa angka.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Batasan penyaringan email harus berupa angka.';
 $wb['limit_mailfetchmail_error_notint'] = 'Batasan fetchmail harus berupa angka.';
 $wb['limit_mailquota_error_notint'] = 'Batasan kuota email harus berupa angka.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/it_client.lng b/interface/web/client/lib/lang/it_client.lng
index 8442ace734..6ad3f11a20 100644
--- a/interface/web/client/lib/lang/it_client.lng
+++ b/interface/web/client/lib/lang/it_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Numero massimo di aliases di posta';
 $wb['limit_mailforward_txt'] = 'Numero massimo di forwarders di posta';
 $wb['limit_mailcatchall_txt'] = 'Numero massimo di catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Numero massimo di email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Numero massimo di email filters';
 $wb['limit_fetchmail_txt'] = 'Numero massimo di fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Limite quota mailbox';
@@ -61,6 +62,7 @@ $wb['limit_mailalias_error_notint'] = 'Il limite di email alias deve essere un n
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/it_client_template.lng b/interface/web/client/lib/lang/it_client_template.lng
index 40ef74de16..bc1f90052a 100644
--- a/interface/web/client/lib/lang/it_client_template.lng
+++ b/interface/web/client/lib/lang/it_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Num. massimo alias email';
 $wb['limit_mailforward_txt'] = 'Num. massimo inoltri email';
 $wb['limit_mailcatchall_txt'] = 'Num. massimo account email catchall';
 $wb['limit_mailrouting_txt'] = 'Num. massimo routes email';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Num. massimo filtri email';
 $wb['limit_fetchmail_txt'] = 'Num. massimo account fetchmail';
 $wb['limit_mailquota_txt'] = 'Quota caselle di posta';
@@ -32,6 +33,7 @@ $wb['limit_mailalias_error_notint'] = 'Il limite alias email devessere un numero
 $wb['limit_mailforward_error_notint'] = 'Il limite inoltro email devessere un numero.';
 $wb['limit_mailcatchall_error_notint'] = 'Il limite catchall email devessere un numero.';
 $wb['limit_mailrouting_error_notint'] = 'Il limite routing email devessere un numero .';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Il limite filtri email devessere un numero.';
 $wb['limit_mailfetchmail_error_notint'] = 'Il limite fetchmail devessere un numero.';
 $wb['limit_mailquota_error_notint'] = 'Il limite quota email devessere un numero.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/it_reseller.lng b/interface/web/client/lib/lang/it_reseller.lng
index 8b5d719427..a90a2d8078 100644
--- a/interface/web/client/lib/lang/it_reseller.lng
+++ b/interface/web/client/lib/lang/it_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. number of email aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -65,6 +66,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias limit must be a number.';
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/ja_client.lng b/interface/web/client/lib/lang/ja_client.lng
index de4642d72d..be88a575cd 100644
--- a/interface/web/client/lib/lang/ja_client.lng
+++ b/interface/web/client/lib/lang/ja_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'メールエイリアスの最大数';
 $wb['limit_mailforward_txt'] = 'メールフォワードの最大数';
 $wb['limit_mailcatchall_txt'] = 'キャッチオール・メールアカウントの最大数';
 $wb['limit_mailrouting_txt'] = 'メール配送経路の最大数';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'メールフィルターの最大数';
 $wb['limit_fetchmail_txt'] = 'fetchmailアカウントの最大数';
 $wb['limit_mailquota_txt'] = 'メールボックスの容量';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'メールエイリアスの最大数は
 $wb['limit_mailforward_error_notint'] = 'メールフォワードの最大数は数字で指定してください。';
 $wb['limit_mailcatchall_error_notint'] = 'キャッチオール・メールアドレスの最大数は数字で指定してください。';
 $wb['limit_mailrouting_error_notint'] = 'メールの配送経路の最大数は数字で指定してください。';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'メールフィルターの最大数は数字で指定してください。';
 $wb['limit_mailfetchmail_error_notint'] = 'fetchmailアカウントの最大数は数字で指定してください。';
 $wb['limit_mailquota_error_notint'] = 'メールボックスの最大容量は数字で指定してください。';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/ja_client_template.lng b/interface/web/client/lib/lang/ja_client_template.lng
index 7381465d66..ca83bda97a 100644
--- a/interface/web/client/lib/lang/ja_client_template.lng
+++ b/interface/web/client/lib/lang/ja_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'メールエイリアスの最大数';
 $wb['limit_mailforward_txt'] = 'メールフォワードの最大数';
 $wb['limit_mailcatchall_txt'] = 'キャッチオール・メールアカウントの最大数';
 $wb['limit_mailrouting_txt'] = 'メール配送経路の最大数';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'メールフィルターの最大数';
 $wb['limit_fetchmail_txt'] = 'fetchmailアカウントの最大数';
 $wb['limit_mailquota_txt'] = 'メールボックスの容量';
@@ -35,6 +36,7 @@ $wb['limit_mailalias_error_notint'] = 'メールエイリアスの最大数は
 $wb['limit_mailforward_error_notint'] = 'メールフォワードの最大数は数字で指定してください。';
 $wb['limit_mailcatchall_error_notint'] = 'キャッチオール・メールアドレスの最大数は数字で指定してください。';
 $wb['limit_mailrouting_error_notint'] = 'メールの配送経路の最大数は数字で指定してください。';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'メールフィルターの最大数は数字で指定してください。';
 $wb['limit_mailfetchmail_error_notint'] = 'fetchmailアカウントの最大数は数字で指定してください。';
 $wb['limit_mailquota_error_notint'] = 'メールボックスの最大容量は数字で指定してください。';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/ja_reseller.lng b/interface/web/client/lib/lang/ja_reseller.lng
index a4df95b8b9..1b89262493 100644
--- a/interface/web/client/lib/lang/ja_reseller.lng
+++ b/interface/web/client/lib/lang/ja_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'メールエイリアスの最大数';
 $wb['limit_mailforward_txt'] = 'メールフォワードの最大数';
 $wb['limit_mailcatchall_txt'] = 'キャッチオール・メールアカウントの最大数';
 $wb['limit_mailrouting_txt'] = 'メール配送経路の最大数';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'メールフィルターの最大数';
 $wb['limit_fetchmail_txt'] = 'Fetchmail アカウントの最大数';
 $wb['limit_mailquota_txt'] = 'メールボックスの容量';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'メールエイリアスの最大数は
 $wb['limit_mailforward_error_notint'] = 'メールフォワードの最大数は数字で指定してください。';
 $wb['limit_mailcatchall_error_notint'] = 'キャッチオール・メールアドレスの最大数は数字で指定してください。';
 $wb['limit_mailrouting_error_notint'] = 'メールの配送経路の最大数は数字で指定してください。';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'メールフィルターの最大数は数字で指定してください。';
 $wb['limit_mailfetchmail_error_notint'] = 'fetchmailアカウントの最大数は数字で指定してください。';
 $wb['limit_mailquota_error_notint'] = 'メールボックスの最大容量は数字で指定してください。';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/nl_client.lng b/interface/web/client/lib/lang/nl_client.lng
index cd9f6e1742..1f4e5d70a1 100644
--- a/interface/web/client/lib/lang/nl_client.lng
+++ b/interface/web/client/lib/lang/nl_client.lng
@@ -6,6 +6,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Max. number of domain aliassen';
 $wb['limit_mailforward_txt'] = 'Max. aantal e-mail forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. aantal email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. aantal e-mail routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. aantal e-mail filters';
 $wb['limit_fetchmail_txt'] = 'Max. aantal fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -71,6 +72,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'De e-mail domein alias limiet moet
 $wb['limit_mailforward_error_notint'] = 'De e-mail forward limiet moet een numerieke waarde zijn.';
 $wb['limit_mailcatchall_error_notint'] = 'De e-mail catchall limiet moet een numerieke waarde zijn.';
 $wb['limit_mailrouting_error_notint'] = 'De em-ail routing limiet moet een numerieke waarde zijn.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'De e-mail filter limiet moet een numerieke waarde zijn.';
 $wb['limit_mailfetchmail_error_notint'] = 'De fetchmail limiet moet een numerieke waarde zijn.';
 $wb['limit_mailquota_error_notint'] = 'De e-mail quota limiet moet een numerieke waarde zijn.';
@@ -202,4 +204,3 @@ $wb['limit_directive_snippets_txt'] = 'Show web server config selection';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/nl_client_template.lng b/interface/web/client/lib/lang/nl_client_template.lng
index da4721757d..423b4d7b94 100644
--- a/interface/web/client/lib/lang/nl_client_template.lng
+++ b/interface/web/client/lib/lang/nl_client_template.lng
@@ -8,6 +8,7 @@ $wb['limit_mailaliasdomain_txt'] = 'Max. aantal domein aliassen';
 $wb['limit_mailforward_txt'] = 'Max.aantal e-mail forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. aantal e-mail catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. aantal e-mail routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. aantal e-mail filters';
 $wb['limit_fetchmail_txt'] = 'Max. aantal fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -39,6 +40,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'De e-mail domain alias limiet moet
 $wb['limit_mailforward_error_notint'] = 'De e-mail forward limiet moet een numerieke waarde zijn.';
 $wb['limit_mailcatchall_error_notint'] = 'De e-mail catchall limiet moet een numerieke waarde zijn.';
 $wb['limit_mailrouting_error_notint'] = 'De e-mail routing limiet moet een numerieke waarde zijn.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'De e-mail filter limiet moet een numerieke waarde zijn.';
 $wb['limit_mailfetchmail_error_notint'] = 'De fetchmail limiet moet een numerieke waarde zijn.';
 $wb['limit_mailquota_error_notint'] = 'De e-mail quota limiet moet een numerieke waarde zijn.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/nl_reseller.lng b/interface/web/client/lib/lang/nl_reseller.lng
index e8df5f7ad8..637dddc65d 100644
--- a/interface/web/client/lib/lang/nl_reseller.lng
+++ b/interface/web/client/lib/lang/nl_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. aantal e-mail aliassen';
 $wb['limit_mailforward_txt'] = 'Max. aantal e-mail forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. aantal e-mail catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. aantal e-mail routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. aantal e-mail filters';
 $wb['limit_fetchmail_txt'] = 'Max. aantal fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -67,6 +68,7 @@ $wb['limit_mailalias_error_notint'] = 'De e-mail alias limiet moet een numerieke
 $wb['limit_mailforward_error_notint'] = 'De e-mail forward limiet moet een numerieke waarde zijn.';
 $wb['limit_mailcatchall_error_notint'] = 'De e-mail catchall limiet moet een numerieke waarde zijn.';
 $wb['limit_mailrouting_error_notint'] = 'De e-mail routing limiet moet een numerieke waarde zijn.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'De e-mail filter limiet moet een numerieke waarde zijn.';
 $wb['limit_mailfetchmail_error_notint'] = 'De fetchmail limiet moet een numerieke waarde zijn.';
 $wb['limit_mailquota_error_notint'] = 'De email quota limiet moet een numerieke waarde zijn.';
@@ -206,4 +208,3 @@ $wb['limit_directive_snippets_txt'] = 'Show web server config selection';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/pl_client.lng b/interface/web/client/lib/lang/pl_client.lng
index 89fafa6776..c040e787ae 100644
--- a/interface/web/client/lib/lang/pl_client.lng
+++ b/interface/web/client/lib/lang/pl_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Maksymalna ilość aliasów e-mail';
 $wb['limit_mailforward_txt'] = 'Maksymalna ilość przekierowań e-mail';
 $wb['limit_mailcatchall_txt'] = 'Maksymalna ilość kont e-mail catchall';
 $wb['limit_mailrouting_txt'] = 'Maksymalna ilość ścieżek e-mail';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Maksymalna ilość filtrów e-mail';
 $wb['limit_fetchmail_txt'] = 'Maksymalna ilość kont z fetchmail';
 $wb['limit_mailquota_txt'] = 'Pojemność skrzynki';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'Limit aliasów e-mail musi być liczbą.'
 $wb['limit_mailforward_error_notint'] = 'Limit przekierowań musi być liczbą.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit e-mail catchall musi być liczbą.';
 $wb['limit_mailrouting_error_notint'] = 'Limit ścieżek e-mail musi być liczbą.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit filtrów e-mail musi być liczbą.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit fetchmail musi być liczbą.';
 $wb['limit_mailquota_error_notint'] = 'Limit pojemności skrzynki musi być liczbą.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/pl_client_template.lng b/interface/web/client/lib/lang/pl_client_template.lng
index 3a878ec974..5945310d0c 100644
--- a/interface/web/client/lib/lang/pl_client_template.lng
+++ b/interface/web/client/lib/lang/pl_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Maksymalna ilość aliasów e-mail';
 $wb['limit_mailforward_txt'] = 'Maksymalna ilość przekierowań e-mail';
 $wb['limit_mailcatchall_txt'] = 'Maksymalna ilość kont e-mail catchall';
 $wb['limit_mailrouting_txt'] = 'Maksymalna ilość ścieżek e-mail';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Maksymalna ilość filtrów e-mail';
 $wb['limit_fetchmail_txt'] = 'Maksymalna ilość kont z fetchmail';
 $wb['limit_mailquota_txt'] = 'Pojemność skrzynki';
@@ -35,6 +36,7 @@ $wb['limit_mailalias_error_notint'] = 'Limit aliasów musi być liczbą.';
 $wb['limit_mailforward_error_notint'] = 'Limit przekierowań e-mail musi być liczbą.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit e-mail catchall musi być liczbą.';
 $wb['limit_mailrouting_error_notint'] = 'Limit ścieżek e-mail musi być liczbą.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit filtrów e-mail musi być liczbą.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit fetchmail musi być liczbą.';
 $wb['limit_mailquota_error_notint'] = 'Limit pojemności skrzynki musi być liczbą.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/pl_reseller.lng b/interface/web/client/lib/lang/pl_reseller.lng
index 71f5bcfa4b..2762ebc15b 100644
--- a/interface/web/client/lib/lang/pl_reseller.lng
+++ b/interface/web/client/lib/lang/pl_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Maksymalna ilość aliasów e-mail';
 $wb['limit_mailforward_txt'] = 'Maksymalna ilość przekierowań e-mail';
 $wb['limit_mailcatchall_txt'] = 'Maksymalna ilość kont e-mail catchall';
 $wb['limit_mailrouting_txt'] = 'Maksymalna ilość ścieżek e-mail';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Maksymalna ilość filtrów e-mail';
 $wb['limit_fetchmail_txt'] = 'Maksymalna ilość kont fetchmail';
 $wb['limit_mailquota_txt'] = 'Limit skrzynki pocztowej';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'Limit aliasów e-mail musi być liczbą.'
 $wb['limit_mailforward_error_notint'] = 'Limit przekierowań e-mail musi być liczbą.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit kont e-mail catchall musi być liczbą.';
 $wb['limit_mailrouting_error_notint'] = 'Limit ścieżek e-mail musi być liczbą.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit filtrów e-mail musi być liczbą.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit kont fetchmail musi być liczbą.';
 $wb['limit_mailquota_error_notint'] = 'Limit pojemności konta e-mail musi być liczbą.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/pt_client.lng b/interface/web/client/lib/lang/pt_client.lng
index 9ce35235cd..8ce7235079 100644
--- a/interface/web/client/lib/lang/pt_client.lng
+++ b/interface/web/client/lib/lang/pt_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Número máximo de aliases de correio';
 $wb['limit_mailforward_txt'] = 'Número máximo de redireccionamento de correio';
 $wb['limit_mailcatchall_txt'] = 'Número máximo de catchall de correio';
 $wb['limit_mailrouting_txt'] = 'Número máximo de rotas de correio';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Número máximo de filtros de correio';
 $wb['limit_fetchmail_txt'] = 'Número máximo de fetchmail de correio';
 $wb['limit_mailquota_txt'] = 'Quota de Correio';
@@ -63,6 +64,7 @@ $wb['limit_mailalias_error_notint'] = 'Limite do alias de correio deve ser um n
 $wb['limit_mailforward_error_notint'] = 'Limite de redireccionamento de correio deve ser um número';
 $wb['limit_mailcatchall_error_notint'] = 'Limite de catchall deve ser um número.';
 $wb['limit_mailrouting_error_notint'] = 'Limite de rotas de correio deve ser um número.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limite de filtros de correio deve ser um número.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limite de fetchmail deve ser um número.';
 $wb['limit_mailquota_error_notint'] = 'A quota de correio deve ser um número';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/pt_client_template.lng b/interface/web/client/lib/lang/pt_client_template.lng
index 0c4a949d49..b774a8c410 100644
--- a/interface/web/client/lib/lang/pt_client_template.lng
+++ b/interface/web/client/lib/lang/pt_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Limite Máximo de alias de correio';
 $wb['limit_mailforward_txt'] = 'Limite Máximo de redireccionamentos de correio';
 $wb['limit_mailcatchall_txt'] = 'Limite máximo de contas catchall';
 $wb['limit_mailrouting_txt'] = 'Limite máximo de rotas de Correio';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Número Máximo de Filtros de Correio';
 $wb['limit_fetchmail_txt'] = 'Número Máximo de Contas fetchmail';
 $wb['limit_mailquota_txt'] = 'Espaço de Caixa de Correio';
@@ -32,6 +33,7 @@ $wb['limit_mailalias_error_notint'] = 'O limite do apelido de correio deve ser n
 $wb['limit_mailforward_error_notint'] = 'O limite de direccionamento de correio deve ser um número';
 $wb['limit_mailcatchall_error_notint'] = 'O limite de catchall do domínio deve ser um número';
 $wb['limit_mailrouting_error_notint'] = 'Limite de rota de correio deve ser um número';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'O limite de filtro de correio deve ser um número.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limite fetchmail deve ser um número.';
 $wb['limit_mailquota_error_notint'] = 'Cota de correio deve ser um número.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/pt_reseller.lng b/interface/web/client/lib/lang/pt_reseller.lng
index 6bd89a971a..965a446ffb 100644
--- a/interface/web/client/lib/lang/pt_reseller.lng
+++ b/interface/web/client/lib/lang/pt_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Número máximo de aliases de correio';
 $wb['limit_mailforward_txt'] = 'Número máximo de encaminhamentos de correio';
 $wb['limit_mailcatchall_txt'] = 'Número máximo de contas catchall';
 $wb['limit_mailrouting_txt'] = 'Número máximo de rotas de correio';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Número máximo de filtros de correio';
 $wb['limit_fetchmail_txt'] = 'Número máximo de contas fetchmail ';
 $wb['limit_mailquota_txt'] = 'Quota de correio';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'O limite de aliases de correio deve ser u
 $wb['limit_mailforward_error_notint'] = 'O limite de encaminhamentos de correio deve ser um número.';
 $wb['limit_mailcatchall_error_notint'] = 'O limite de contas catchall deve ser um número.';
 $wb['limit_mailrouting_error_notint'] = 'O limite de rotas de correio deve ser um número.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'O filtro de correio deve ser um número.';
 $wb['limit_mailfetchmail_error_notint'] = 'O limite de fetchmail deve ser um número.';
 $wb['limit_mailquota_error_notint'] = 'O limite de quota de correio deve ser um número.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/ro_client.lng b/interface/web/client/lib/lang/ro_client.lng
index 3bc5e59d2a..5ee1d8aaf6 100644
--- a/interface/web/client/lib/lang/ro_client.lng
+++ b/interface/web/client/lib/lang/ro_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Numar maxim de  email alias-uri';
 $wb['limit_mailforward_txt'] = 'Numar maxim de mail forward';
 $wb['limit_mailcatchall_txt'] = 'numar maxim de mail catch all';
 $wb['limit_mailrouting_txt'] = 'Numar maxim de mail rute';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Numar maxim de filtre mail';
 $wb['limit_fetchmail_txt'] = 'Numar maxim de conturi fetchmail';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -63,6 +64,7 @@ $wb['limit_mailalias_error_notint'] = 'Numarul maxim de alias-uri email trebuie
 $wb['limit_mailforward_error_notint'] = 'Numarul limta de forward-uri email trebuie sa fie un numar intreg';
 $wb['limit_mailcatchall_error_notint'] = 'numarul limta de email catch all trebuie sa fie un numar intreg';
 $wb['limit_mailrouting_error_notint'] = 'numarul maxim de rute email trebuie sa fie un numar intreg';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'numarul maxim de filtre email trebuie sa fie un numar intreg';
 $wb['limit_mailfetchmail_error_notint'] = 'numarul maxim de fetchmail trebuie sa fie un numar intreg';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/ro_client_template.lng b/interface/web/client/lib/lang/ro_client_template.lng
index 57cbe690dd..65e110c2ab 100644
--- a/interface/web/client/lib/lang/ro_client_template.lng
+++ b/interface/web/client/lib/lang/ro_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Max. number of email aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -32,6 +33,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias limit must be a number.';
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/ro_reseller.lng b/interface/web/client/lib/lang/ro_reseller.lng
index 512bc5cb23..afd557ab18 100644
--- a/interface/web/client/lib/lang/ro_reseller.lng
+++ b/interface/web/client/lib/lang/ro_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. number of email aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias limit must be a number.';
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/ru_client.lng b/interface/web/client/lib/lang/ru_client.lng
index 080512f5b0..70456bd255 100644
--- a/interface/web/client/lib/lang/ru_client.lng
+++ b/interface/web/client/lib/lang/ru_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Макс. количество почтовых а
 $wb['limit_mailforward_txt'] = 'Макс.чисо почтовых пересылок';
 $wb['limit_mailcatchall_txt'] = 'Макс. количество учётных записей сводных почтовых ящиков';
 $wb['limit_mailrouting_txt'] = 'Макс. количество почтовых маршрутов';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Макс. количество почтовых фильтров';
 $wb['limit_fetchmail_txt'] = 'Макс. количество учётных записей сборщиков почты';
 $wb['limit_mailquota_txt'] = 'Квота почтового ящика';
@@ -62,6 +63,7 @@ $wb['limit_mailalias_error_notint'] = 'Лимит почтовых алиасо
 $wb['limit_mailforward_error_notint'] = 'Лимит почтовых пересылок должен быть числом.';
 $wb['limit_mailcatchall_error_notint'] = 'Лимит сводных почтовых ящиков должен быть числом.';
 $wb['limit_mailrouting_error_notint'] = 'Лимит почтовых маршрутов должен быть числом.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Лимит почтовых фильтров должен быть числом.';
 $wb['limit_mailfetchmail_error_notint'] = 'Лимит сборщиков почты должен быть числом.';
 $wb['limit_mailquota_error_notint'] = 'Лимит почтовой квоты должен быть числом.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Клик для установки';
 $wb['limit_dns_record_error_notint'] = 'Лимит вторичных DNS-зон должен быть числом.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Лимиты';
-?>
diff --git a/interface/web/client/lib/lang/ru_client_template.lng b/interface/web/client/lib/lang/ru_client_template.lng
index 46168e1ad5..e540984824 100644
--- a/interface/web/client/lib/lang/ru_client_template.lng
+++ b/interface/web/client/lib/lang/ru_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Макс. количество почтовых а
 $wb['limit_mailforward_txt'] = 'Макс. количество почтовых пересылок';
 $wb['limit_mailcatchall_txt'] = 'Макс. количество учётных записей сводных почтовых ящиков';
 $wb['limit_mailrouting_txt'] = 'Макс. количество почтовых маршрутов';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Макс. количество почтовых фильтров';
 $wb['limit_fetchmail_txt'] = 'Макс. количество учётных записей сборщиков почты';
 $wb['limit_mailquota_txt'] = 'Квота почтового ящика';
@@ -32,6 +33,7 @@ $wb['limit_mailalias_error_notint'] = 'Лимит почтовых алиасо
 $wb['limit_mailforward_error_notint'] = 'Лимит почтовых пересылок должен быть числом.';
 $wb['limit_mailcatchall_error_notint'] = 'Лимит сводных почтовых ящиков должен быть числом.';
 $wb['limit_mailrouting_error_notint'] = 'Лимит почтовых маршрутов должен быть числом.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Лимит почтовых фильтров должен быть числом.';
 $wb['limit_mailfetchmail_error_notint'] = 'Лимит сборщиков почты должен быть числом.';
 $wb['limit_mailquota_error_notint'] = 'Лимит почтовой квоты должен быть числом.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Web-серверы';
 $wb['db_servers_txt'] = 'Серверы баз данных';
 $wb['mail_servers_txt'] = 'Серверы почты';
 $wb['Limits'] = 'Лимиты';
-?>
diff --git a/interface/web/client/lib/lang/ru_reseller.lng b/interface/web/client/lib/lang/ru_reseller.lng
index f5806377c3..4b90d0347a 100644
--- a/interface/web/client/lib/lang/ru_reseller.lng
+++ b/interface/web/client/lib/lang/ru_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Макс. количество почтовых а
 $wb['limit_mailforward_txt'] = 'Макс. количество почтовых пересылок';
 $wb['limit_mailcatchall_txt'] = 'Макс. количество учётных записей сводных почтовых ящиков';
 $wb['limit_mailrouting_txt'] = 'Максимальное количество почтовых маршрутов';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Макс. количество почтовых фильтров';
 $wb['limit_fetchmail_txt'] = 'Макс. количество учётных записей сборщиков почты';
 $wb['limit_mailquota_txt'] = 'Квота ящика';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'Лимит почтовых алиасо
 $wb['limit_mailforward_error_notint'] = 'Лимит почтовых пересылок должен быть числом.';
 $wb['limit_mailcatchall_error_notint'] = 'Лимит сводных почтовых ящиков должен быть числом.';
 $wb['limit_mailrouting_error_notint'] = 'Лимит почтовых маршрутов должен быть числом.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Лимит почтовых фильтров должен быть числом.';
 $wb['limit_mailfetchmail_error_notint'] = 'Лимит сборщиков почты должен быть числомм.';
 $wb['limit_mailquota_error_notint'] = 'Лимит почтовой квоты должен быть числом.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Клик для установки';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Лимиты';
-?>
diff --git a/interface/web/client/lib/lang/se_client.lng b/interface/web/client/lib/lang/se_client.lng
index feaee0e9c1..bf585054cd 100644
--- a/interface/web/client/lib/lang/se_client.lng
+++ b/interface/web/client/lib/lang/se_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max antal epostalias';
 $wb['limit_mailforward_txt'] = 'Max antal vidarebefordringar';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max antal epostrutter';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max antal epostfilter';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Kvot för epostkonton';
@@ -63,6 +64,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias limit must be a number.';
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/se_client_template.lng b/interface/web/client/lib/lang/se_client_template.lng
index 46932c9e50..c9001e42e2 100644
--- a/interface/web/client/lib/lang/se_client_template.lng
+++ b/interface/web/client/lib/lang/se_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Max. number of email aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -32,6 +33,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias limit must be a number.';
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/se_reseller.lng b/interface/web/client/lib/lang/se_reseller.lng
index 512bc5cb23..afd557ab18 100644
--- a/interface/web/client/lib/lang/se_reseller.lng
+++ b/interface/web/client/lib/lang/se_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. number of email aliases';
 $wb['limit_mailforward_txt'] = 'Max. number of email forwarders';
 $wb['limit_mailcatchall_txt'] = 'Max. number of email catchall accounts';
 $wb['limit_mailrouting_txt'] = 'Max. number of email routes';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. number of email filters';
 $wb['limit_fetchmail_txt'] = 'Max. number of fetchmail accounts';
 $wb['limit_mailquota_txt'] = 'Mailbox quota';
@@ -66,6 +67,7 @@ $wb['limit_mailalias_error_notint'] = 'The email alias limit must be a number.';
 $wb['limit_mailforward_error_notint'] = 'The email forward limit must be a number.';
 $wb['limit_mailcatchall_error_notint'] = 'The email catchall limit must be a number.';
 $wb['limit_mailrouting_error_notint'] = 'The email routing limit must be a number.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'The email filter limit must be a number.';
 $wb['limit_mailfetchmail_error_notint'] = 'The fetchmail limit must be a number.';
 $wb['limit_mailquota_error_notint'] = 'The email quota limit must be a number.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/sk_client.lng b/interface/web/client/lib/lang/sk_client.lng
index 542b4121d9..cfaced0561 100644
--- a/interface/web/client/lib/lang/sk_client.lng
+++ b/interface/web/client/lib/lang/sk_client.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. počet e-mailových aliasov';
 $wb['limit_mailforward_txt'] = 'Max. počet e-mailových preposielaní';
 $wb['limit_mailcatchall_txt'] = 'Max. počet e-mailových doménových košov';
 $wb['limit_mailrouting_txt'] = 'Max. počet e-mailových smerovaní';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. počet e-mailových filtrov';
 $wb['limit_fetchmail_txt'] = 'Max. počet účtov fetchmail';
 $wb['limit_mailquota_txt'] = 'Kvóta schránky';
@@ -65,6 +66,7 @@ $wb['limit_mailalias_error_notint'] = 'Limit  email alias musí byť číslo.';
 $wb['limit_mailforward_error_notint'] = 'Limit email preposielaní musí byť číslo.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit doménových košov musí byť číslo.';
 $wb['limit_mailrouting_error_notint'] = 'Limit email smerovaní musí byť číslo.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit email filter musí byť číslo.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit fetchmail musí byť číslo.';
 $wb['limit_mailquota_error_notint'] = 'Limit email kvót musí byť číslo.';
@@ -202,4 +204,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/sk_client_template.lng b/interface/web/client/lib/lang/sk_client_template.lng
index e3cb788bdd..9a602da093 100644
--- a/interface/web/client/lib/lang/sk_client_template.lng
+++ b/interface/web/client/lib/lang/sk_client_template.lng
@@ -7,6 +7,7 @@ $wb['limit_mailalias_txt'] = 'Max. počet e-mailových aliasov';
 $wb['limit_mailforward_txt'] = 'Max. počet e-mailových prenose';
 $wb['limit_mailcatchall_txt'] = 'Max. počet e-mailových doménový košov';
 $wb['limit_mailrouting_txt'] = 'Max. počet e-mailových smerovaní';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. počet e-mailových filtrov';
 $wb['limit_fetchmail_txt'] = 'Max. počet účtov fetchmail';
 $wb['limit_mailquota_txt'] = 'Kvóta schránky';
@@ -34,6 +35,7 @@ $wb['limit_mailalias_error_notint'] = 'Limit email aliasov musí byť číslo.';
 $wb['limit_mailforward_error_notint'] = 'Limit emailpreposielaní musí byť číslo.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit email doménových košov musí byť číslo.';
 $wb['limit_mailrouting_error_notint'] = 'Limit email smerovaní musí byť číslo.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit email filter musí byť číslo.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit fetchmail musí byť číslo.';
 $wb['limit_mailquota_error_notint'] = 'Limit email kvôta musí byť číslo.';
@@ -122,4 +124,3 @@ $wb['web_servers_txt'] = 'Webservers';
 $wb['db_servers_txt'] = 'Database servers';
 $wb['mail_servers_txt'] = 'Mailservers';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/sk_reseller.lng b/interface/web/client/lib/lang/sk_reseller.lng
index 82b289df2b..47dbd4f64c 100644
--- a/interface/web/client/lib/lang/sk_reseller.lng
+++ b/interface/web/client/lib/lang/sk_reseller.lng
@@ -5,6 +5,7 @@ $wb['limit_mailalias_txt'] = 'Max. počet e-mailových aliasov';
 $wb['limit_mailforward_txt'] = 'Max. počet e-mailových preposielaní';
 $wb['limit_mailcatchall_txt'] = 'Max. počet e-mailových doménových košov';
 $wb['limit_mailrouting_txt'] = 'Max. počet e-mailových smerovaní';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'Max. počet e-mailových filtrov';
 $wb['limit_fetchmail_txt'] = 'Max. počet účtov fetchmail';
 $wb['limit_mailquota_txt'] = 'Kvóta schránky';
@@ -65,6 +66,7 @@ $wb['limit_mailalias_error_notint'] = 'Limit Email alias musí byť číslo.';
 $wb['limit_mailforward_error_notint'] = 'Limit E-mail preposielanie musí byť číslo.';
 $wb['limit_mailcatchall_error_notint'] = 'Limit E-mail doménový kôš musí byť číslo.';
 $wb['limit_mailrouting_error_notint'] = 'Limit E-mail smerovania musí byť číslo.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'Limit email filter musí byť číslo.';
 $wb['limit_mailfetchmail_error_notint'] = 'Limit fetchmail musí byť číslo.';
 $wb['limit_mailquota_error_notint'] = 'Limit email kvóta musí byť číslo.';
@@ -206,4 +208,3 @@ $wb['password_click_to_set_txt'] = 'Click to set';
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Limits';
-?>
diff --git a/interface/web/client/lib/lang/tr_client.lng b/interface/web/client/lib/lang/tr_client.lng
index d87fe26da9..a922525b67 100644
--- a/interface/web/client/lib/lang/tr_client.lng
+++ b/interface/web/client/lib/lang/tr_client.lng
@@ -7,6 +7,7 @@ $wb['limit_mailaliasdomain_txt'] = 'En Fazla Takma Etki Alanı Sayısı';
 $wb['limit_mailforward_txt'] = 'En Fazla E-posta Yönlendirme Sayısı';
 $wb['limit_mailcatchall_txt'] = 'En Fazla Tümünü Al Hesabı Sayısı';
 $wb['limit_mailrouting_txt'] = 'En Fazla E-posta Yöneltici Sayısı';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'En Fazla E-posta Süzgeci Sayısı';
 $wb['limit_fetchmail_txt'] = 'En Fazla E-posta Alma Hesabı Sayısı';
 $wb['limit_mailquota_txt'] = 'E-posta Kutusu Kotası';
@@ -73,6 +74,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'E-posta takma etki alanı sınırı
 $wb['limit_mailforward_error_notint'] = 'E-posta yönlendirme sınırı bir sayı olmalıdır.';
 $wb['limit_mailcatchall_error_notint'] = 'E-posta tümünü al hesabı sınırı bir sayı olmalıdır.';
 $wb['limit_mailrouting_error_notint'] = 'E-posta yöneltici sınırı bir sayı olmalıdır.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'E-posta süzgeci sınırı bir sayı olmalıdır.';
 $wb['limit_mailfetchmail_error_notint'] = 'E-posta alma sınırı bir sayı olmalıdır.';
 $wb['limit_mailquota_error_notint'] = 'E-posta kota sınırı bir sayı olmalıdır.';
@@ -204,4 +206,3 @@ $wb['email_error_empty'] = 'E-posta boÅŸ olamaz.';
 $wb['limit_directive_snippets_txt'] = 'Web Sunucu Yapılandırma Seçimi Görüntülensin';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Sınırlar';
-?>
diff --git a/interface/web/client/lib/lang/tr_client_template.lng b/interface/web/client/lib/lang/tr_client_template.lng
index 8ae0954db5..64b54bb30e 100644
--- a/interface/web/client/lib/lang/tr_client_template.lng
+++ b/interface/web/client/lib/lang/tr_client_template.lng
@@ -12,6 +12,7 @@ $wb['limit_mailmailinglist_txt'] = 'En Fazla E-posta Listesi Sayısı';
 $wb['limit_mailforward_txt'] = 'En Fazla E-posta Yönlendirici Sayısı';
 $wb['limit_mailcatchall_txt'] = 'En Fazla Tümünü Al Hesabı Sayısı';
 $wb['limit_mailrouting_txt'] = 'En Fazla E-posta Yöneltici Sayısı';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'En Fazla E-posta Süzgeci Sayısı';
 $wb['limit_fetchmail_txt'] = 'En Fazla E-posta Alma Hesabı Sayısı';
 $wb['limit_mailquota_txt'] = 'E-posta Kutusu Kotası';
@@ -47,6 +48,7 @@ $wb['limit_mailaliasdomain_error_notint'] = 'Takma e-posta etki alanı sınırı
 $wb['limit_mailforward_error_notint'] = 'E-posta yönlendirme sınırı bir sayı olmalıdır.';
 $wb['limit_mailcatchall_error_notint'] = 'E-posta tümünü al sınırı bir sayı olmalıdır.';
 $wb['limit_mailrouting_error_notint'] = 'E-posta yöneltici sınırı bir sayı olmalıdır.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'E-posta süzgeci sınırı bir sayı olmalıdır.';
 $wb['limit_mailfetchmail_error_notint'] = 'E-posta alma sınırı bir sayı olmalıdır.';
 $wb['limit_mailquota_error_notint'] = 'E-posta kotası sınırı bir sayı olmalıdır.';
@@ -125,4 +127,3 @@ $wb['xmpp_servers_txt'] = 'XMPP Sunucuları';
 $wb['db_servers_txt'] = 'Veritabanı Sunucuları';
 $wb['mail_servers_txt'] = 'E-posta Sunucuları';
 $wb['Limits'] = 'Sınırlar';
-?>
diff --git a/interface/web/client/lib/lang/tr_reseller.lng b/interface/web/client/lib/lang/tr_reseller.lng
index d7bc06429e..023bc08197 100644
--- a/interface/web/client/lib/lang/tr_reseller.lng
+++ b/interface/web/client/lib/lang/tr_reseller.lng
@@ -7,6 +7,7 @@ $wb['limit_mailaliasdomain_txt'] = 'En Fazla Takma Etki Alanı Sayısı';
 $wb['limit_mailforward_txt'] = 'En Fazla E-posta Yönlendirici Sayısı';
 $wb['limit_mailcatchall_txt'] = 'En Fazla E-posta Tümünü Al Hesabı Sayısı';
 $wb['limit_mailrouting_txt'] = 'En Fazla E-posta Yöneltici Sayısı';
+$wb['limit_mail_wblist_txt'] = 'Max. number of email white / blacklist entries';
 $wb['limit_mailfilter_txt'] = 'En Fazla E-posta Süzgeci Sayısı';
 $wb['limit_fetchmail_txt'] = 'En Fazla E-posta Alma Hesabı Sayısı';
 $wb['limit_mailquota_txt'] = 'E-posta Kutusu Kotası';
@@ -73,6 +74,7 @@ $wb['limit_mailalias_error_notint'] = 'Takma e-posta sınırı bir sayı olmalı
 $wb['limit_mailforward_error_notint'] = 'E-posta yönlendirici sınırı bir sayı olmalıdır.';
 $wb['limit_mailcatchall_error_notint'] = 'E-posta tümünü al hesabı sınırı bir sayı olmalıdır.';
 $wb['limit_mailrouting_error_notint'] = 'E-posta yöneltici sınırı bir sayı olmalıdır.';
+$wb['limit_mail_wblist_error_notint'] = 'The email white / blacklist limit must be a number.';
 $wb['limit_mailfilter_error_notint'] = 'E-posta süzgeci sınırı bir sayı olmalıdır.';
 $wb['limit_mailfetchmail_error_notint'] = 'E-posta alıcısı sınırı bir sayı olmalıdır.';
 $wb['limit_mailquota_error_notint'] = 'E-posta kota sınırı bir sayı olmalıdır.';
@@ -210,4 +212,3 @@ $wb['limit_database_quota_error_notint'] = 'Veritabanı kotası sınırı bir sa
 $wb['Reseller'] = 'Reseller';
 $wb['Address'] = 'Address';
 $wb['Limits'] = 'Sınırlar';
-?>
diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm
index 1f0a855eef..39512208b4 100644
--- a/interface/web/client/templates/client_edit_limits.htm
+++ b/interface/web/client/templates/client_edit_limits.htm
@@ -212,6 +212,9 @@
                 <div class="form-group">
                     <label for="limit_mailrouting" class="col-sm-3 control-label">{tmpl_var name='limit_mailrouting_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_mailrouting" id="limit_mailrouting" value="{tmpl_var name='limit_mailrouting'}" class="form-control" /></div></div>
+                <div class="form-group">
+                    <label for="limit_mail_wblist" class="col-sm-3 control-label">{tmpl_var name='limit_mail_wblist_txt'}</label>
+                    <div class="col-sm-9"><input type="text" name="limit_mail_wblist" id="limit_mail_wblist" value="{tmpl_var name='limit_mail_wblist'}" class="form-control" /></div></div>
                 <div class="form-group">
                     <label for="limit_mailfilter" class="col-sm-3 control-label">{tmpl_var name='limit_mailfilter_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_mailfilter" id="limit_mailfilter" value="{tmpl_var name='limit_mailfilter'}" class="form-control" /></div></div>
diff --git a/interface/web/client/templates/client_template_edit_limits.htm b/interface/web/client/templates/client_template_edit_limits.htm
index 005db0724a..4573e4b0d6 100644
--- a/interface/web/client/templates/client_template_edit_limits.htm
+++ b/interface/web/client/templates/client_template_edit_limits.htm
@@ -169,6 +169,9 @@
                 <div class="form-group">
                     <label for="limit_mailrouting" class="col-sm-3 control-label">{tmpl_var name='limit_mailrouting_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_mailrouting" id="limit_mailrouting" value="{tmpl_var name='limit_mailrouting'}" class="form-control" /></div></div>
+                <div class="form-group">
+                    <label for="limit_mail_wblist" class="col-sm-3 control-label">{tmpl_var name='limit_mail_wblist_txt'}</label>
+                    <div class="col-sm-9"><input type="text" name="limit_mail_wblist" id="limit_mail_wblist" value="{tmpl_var name='limit_mail_wblist'}" class="form-control" /></div></div>
                 <div class="form-group">
                     <label for="limit_mailfilter" class="col-sm-3 control-label">{tmpl_var name='limit_mailfilter_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_mailfilter" id="limit_mailfilter" value="{tmpl_var name='limit_mailfilter'}" class="form-control" /></div></div>
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm
index e1e69d4a14..ff185ce9a4 100644
--- a/interface/web/client/templates/reseller_edit_limits.htm
+++ b/interface/web/client/templates/reseller_edit_limits.htm
@@ -213,6 +213,9 @@
                 <div class="form-group">
                     <label for="limit_mailrouting" class="col-sm-3 control-label">{tmpl_var name='limit_mailrouting_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_mailrouting" id="limit_mailrouting" value="{tmpl_var name='limit_mailrouting'}" class="form-control" /></div></div>
+                <div class="form-group">
+                    <label for="limit_mail_wblist" class="col-sm-3 control-label">{tmpl_var name='limit_mail_wblist_txt'}</label>
+                    <div class="col-sm-9"><input type="text" name="limit_mail_wblist" id="limit_mail_wblist" value="{tmpl_var name='limit_mail_wblist'}" class="form-control" /></div></div>
                 <div class="form-group">
                     <label for="limit_mailfilter" class="col-sm-3 control-label">{tmpl_var name='limit_mailfilter_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_mailfilter" id="limit_mailfilter" value="{tmpl_var name='limit_mailfilter'}" class="form-control" /></div></div>
diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php
index a299bbcaf3..e5a8cc459f 100644
--- a/interface/web/dashboard/dashlets/limits.php
+++ b/interface/web/dashboard/dashlets/limits.php
@@ -47,6 +47,10 @@ class dashlet_limits
             'db_table' => 'mail_transport',
             'db_where' => "");
 
+        $limits[] = array('field' => 'limit_mail_wblist',
+            'db_table' => 'mail_access',
+            'db_where' => "");
+
         $limits[] = array('field' => 'limit_mailfilter',
             'db_table' => 'mail_user_filter',
             'db_where' => "");
diff --git a/interface/web/mail/lib/lang/ar_mail_blacklist.lng b/interface/web/mail/lib/lang/ar_mail_blacklist.lng
index 5b2815c0d0..6173df6a07 100644
--- a/interface/web/mail/lib/lang/ar_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/ar_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Active';
 $wb['source_error_notempty'] = 'Address is empty.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/ar_mail_whitelist.lng b/interface/web/mail/lib/lang/ar_mail_whitelist.lng
index 92c365ba2b..1cdc15564d 100644
--- a/interface/web/mail/lib/lang/ar_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/ar_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Active';
 $wb['source_error_notempty'] = 'Address is empty.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/bg_mail_blacklist.lng b/interface/web/mail/lib/lang/bg_mail_blacklist.lng
index e250039e2e..9b04dc85ba 100644
--- a/interface/web/mail/lib/lang/bg_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/bg_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Активен';
 $wb['source_error_notempty'] = 'Полето с адреса е празно.';
 $wb['type_txt'] = 'Тип';
 $wb['limit_mailfilter_txt'] = 'Максималният брой за емайл филтри в твоят профил е достигнат.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/bg_mail_whitelist.lng b/interface/web/mail/lib/lang/bg_mail_whitelist.lng
index 35c892add4..b17ee61002 100644
--- a/interface/web/mail/lib/lang/bg_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/bg_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Активен';
 $wb['source_error_notempty'] = 'Полето с адреса е празно.';
 $wb['type_txt'] = 'Тип';
 $wb['limit_mailfilter_txt'] = 'Максималният брой на емаил филтри за твоя акаунт е достигнат.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/br_mail_blacklist.lng b/interface/web/mail/lib/lang/br_mail_blacklist.lng
index 516946ce19..b72ea94ff3 100644
--- a/interface/web/mail/lib/lang/br_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/br_mail_blacklist.lng
@@ -6,3 +6,4 @@ $wb['active_txt'] = 'Ativo';
 $wb['source_error_notempty'] = 'Destinatário está vazio.';
 $wb['type_txt'] = 'Tipo';
 $wb['limit_mailfilter_txt'] = 'O limite de filtros de email para esta conta foi alcançado.';
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/br_mail_whitelist.lng b/interface/web/mail/lib/lang/br_mail_whitelist.lng
index e62e5a778e..4af2d198b0 100644
--- a/interface/web/mail/lib/lang/br_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/br_mail_whitelist.lng
@@ -6,3 +6,4 @@ $wb['active_txt'] = 'Ativo';
 $wb['source_error_notempty'] = 'Endereço de email está vazio.';
 $wb['type_txt'] = 'Tipo';
 $wb['limit_mailfilter_txt'] = 'O limite de filtros de email para esta conta foi alcançado.';
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/ca_mail_blacklist.lng b/interface/web/mail/lib/lang/ca_mail_blacklist.lng
index 3f5f9709e8..20d7f65ad2 100644
--- a/interface/web/mail/lib/lang/ca_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/ca_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Actif';
 $wb['source_error_notempty'] = 'L\'adresse est vide.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Le nombre maximal de filtres d\'email pour votre compte a été atteint.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/ca_mail_whitelist.lng b/interface/web/mail/lib/lang/ca_mail_whitelist.lng
index 0d621c95f3..b78c665a10 100644
--- a/interface/web/mail/lib/lang/ca_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/ca_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Actif';
 $wb['source_error_notempty'] = 'L\'adresse est vide.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Le nombre maximal de filtres à mails pour votre compte a été atteint.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/cz_mail_blacklist.lng b/interface/web/mail/lib/lang/cz_mail_blacklist.lng
index 250d3a7ffa..7348b738af 100644
--- a/interface/web/mail/lib/lang/cz_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/cz_mail_blacklist.lng
@@ -6,3 +6,4 @@ $wb['active_txt'] = 'Aktivní';
 $wb['source_error_notempty'] = 'Adresa je prázdná.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Byl dosažen maximální počet e-mail filtrů pro Váš účet.';
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/cz_mail_whitelist.lng b/interface/web/mail/lib/lang/cz_mail_whitelist.lng
index c96f21909a..3db1076231 100644
--- a/interface/web/mail/lib/lang/cz_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/cz_mail_whitelist.lng
@@ -6,3 +6,4 @@ $wb['active_txt'] = 'Aktivní';
 $wb['source_error_notempty'] = 'Adresa je prázdná.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Byl dosažen maximální počet e-mail filtrů pro Váš účet.';
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/de_mail_blacklist.lng b/interface/web/mail/lib/lang/de_mail_blacklist.lng
index 4611dadd06..42f1da41d7 100644
--- a/interface/web/mail/lib/lang/de_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/de_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktiv';
 $wb['source_error_notempty'] = 'Adresse ist leer.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Die maximale Anzahl an E-Mail Filter für Ihr Konto wurde erreicht.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/de_mail_whitelist.lng b/interface/web/mail/lib/lang/de_mail_whitelist.lng
index 1506deba3f..fac0efcb8e 100644
--- a/interface/web/mail/lib/lang/de_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/de_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktiv';
 $wb['source_error_notempty'] = 'E-Mail Adresse ist leer.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Die maximale Anzahl an E-Mail Filtern für Ihr Konto wurde erreicht.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/dk_mail_blacklist.lng b/interface/web/mail/lib/lang/dk_mail_blacklist.lng
index 2830319b06..79ff300aed 100644
--- a/interface/web/mail/lib/lang/dk_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/dk_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktiv';
 $wb['source_error_notempty'] = 'Adresse er tom.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Max. antal af e-mail filtere for din konto er nået.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/dk_mail_whitelist.lng b/interface/web/mail/lib/lang/dk_mail_whitelist.lng
index a05c234f94..bb671d84f0 100644
--- a/interface/web/mail/lib/lang/dk_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/dk_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktiv';
 $wb['source_error_notempty'] = 'Adresse er tom.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Max. antal af email filtere for din konto er nået.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/el_mail_blacklist.lng b/interface/web/mail/lib/lang/el_mail_blacklist.lng
index 479a3deb01..003f7462c7 100644
--- a/interface/web/mail/lib/lang/el_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/el_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Ενεργή';
 $wb['source_error_notempty'] = 'Η διεύθυνση είναι κενή.';
 $wb['type_txt'] = 'Τύπος';
 $wb['limit_mailfilter_txt'] = 'Έχετε φτάσει το μέγιστο πλήθος των φίλτρων email για τον λογαριασμό σας.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/el_mail_whitelist.lng b/interface/web/mail/lib/lang/el_mail_whitelist.lng
index 6c477f60c2..5c3a095a24 100644
--- a/interface/web/mail/lib/lang/el_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/el_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Ενεργή';
 $wb['source_error_notempty'] = 'Η διεύθυνση είναι κενή';
 $wb['type_txt'] = 'Τύπος';
 $wb['limit_mailfilter_txt'] = 'Έχετε φτάσει το μέγιστο πλήθος των φίλτρων email για τον λογαριασμό σας.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/en_mail_blacklist.lng b/interface/web/mail/lib/lang/en_mail_blacklist.lng
index 8bae57d6b0..6173df6a07 100644
--- a/interface/web/mail/lib/lang/en_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/en_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Active';
 $wb['source_error_notempty'] = 'Address is empty.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
-?>
\ No newline at end of file
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/en_mail_whitelist.lng b/interface/web/mail/lib/lang/en_mail_whitelist.lng
index f7e4ab881f..d765aad6a1 100644
--- a/interface/web/mail/lib/lang/en_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/en_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Active';
 $wb['source_error_notempty'] = 'Address is empty.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
-?>
\ No newline at end of file
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/es_mail_blacklist.lng b/interface/web/mail/lib/lang/es_mail_blacklist.lng
index 81ae71c575..29353365d6 100644
--- a/interface/web/mail/lib/lang/es_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/es_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['server_id_txt'] = 'Servidor';
 $wb['source_error_notempty'] = 'La dirección está vacía.';
 $wb['source_txt'] = 'Dirección en la lista negra';
 $wb['type_txt'] = 'Tipo';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/es_mail_whitelist.lng b/interface/web/mail/lib/lang/es_mail_whitelist.lng
index e92979f13c..8cf5323098 100644
--- a/interface/web/mail/lib/lang/es_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/es_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Habilitado';
 $wb['source_error_notempty'] = 'La dirección está vacía.';
 $wb['type_txt'] = 'Tipo';
 $wb['limit_mailfilter_txt'] = 'Ha alcanzado en su cuenta el número máx. de filtros de correo.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/fi_mail_blacklist.lng b/interface/web/mail/lib/lang/fi_mail_blacklist.lng
index 66cb93004e..59aa88bb7e 100644
--- a/interface/web/mail/lib/lang/fi_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/fi_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Käytössä';
 $wb['source_error_notempty'] = 'Estetty osoite on tyhjä';
 $wb['type_txt'] = 'Tyyppi';
 $wb['limit_mailfilter_txt'] = 'Käyttäjätunnuksella on jo sallittu määrä suodattimia.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/fi_mail_whitelist.lng b/interface/web/mail/lib/lang/fi_mail_whitelist.lng
index abd8e85f2b..b0d7cfe270 100644
--- a/interface/web/mail/lib/lang/fi_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/fi_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Käytössä';
 $wb['source_error_notempty'] = 'Osoite on tyhjä';
 $wb['type_txt'] = 'Tyyppi';
 $wb['limit_mailfilter_txt'] = 'Käyttäjätunnuksella on jo sallittu määrä suodattimia.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/fr_mail_blacklist.lng b/interface/web/mail/lib/lang/fr_mail_blacklist.lng
index 161acd632d..035c228bc6 100644
--- a/interface/web/mail/lib/lang/fr_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/fr_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Actif';
 $wb['source_error_notempty'] = 'L’adresse est vide.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Le nombre maximal de filtres d’e-mail pour votre compte a été atteint.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/fr_mail_whitelist.lng b/interface/web/mail/lib/lang/fr_mail_whitelist.lng
index f11d0b76a7..ec11e6c674 100644
--- a/interface/web/mail/lib/lang/fr_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/fr_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Actif';
 $wb['source_error_notempty'] = 'L’adresse est vide.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Le nombre maximal de filtres à mails pour votre compte a été atteint.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/hr_mail_blacklist.lng b/interface/web/mail/lib/lang/hr_mail_blacklist.lng
index dbce8de10d..6842348ef7 100644
--- a/interface/web/mail/lib/lang/hr_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/hr_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktivno';
 $wb['source_error_notempty'] = 'Adresa je prazna';
 $wb['type_txt'] = 'Vrsta';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/hr_mail_whitelist.lng b/interface/web/mail/lib/lang/hr_mail_whitelist.lng
index a43e8eef46..54879fc79c 100644
--- a/interface/web/mail/lib/lang/hr_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/hr_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktivno';
 $wb['source_error_notempty'] = 'Adresa je prazna';
 $wb['type_txt'] = 'Vrsta';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/hu_mail_blacklist.lng b/interface/web/mail/lib/lang/hu_mail_blacklist.lng
index 1d2f0e014e..e183910f78 100644
--- a/interface/web/mail/lib/lang/hu_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/hu_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktív';
 $wb['source_error_notempty'] = 'Cím üres.';
 $wb['type_txt'] = 'Típus';
 $wb['limit_mailfilter_txt'] = 'Nincs több szűrő lehetőség.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/hu_mail_whitelist.lng b/interface/web/mail/lib/lang/hu_mail_whitelist.lng
index 71c3cf39bb..7cda150e54 100644
--- a/interface/web/mail/lib/lang/hu_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/hu_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktív';
 $wb['source_error_notempty'] = 'Cím mező üres.';
 $wb['type_txt'] = 'Típus';
 $wb['limit_mailfilter_txt'] = 'Nincs több szűrő lehetőség.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/id_mail_blacklist.lng b/interface/web/mail/lib/lang/id_mail_blacklist.lng
index 4454a33c24..2271836a3f 100644
--- a/interface/web/mail/lib/lang/id_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/id_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktif';
 $wb['source_error_notempty'] = 'Alamat kosong.';
 $wb['type_txt'] = 'Tipe';
 $wb['limit_mailfilter_txt'] = 'Jumlah maks penyaringan email untuk akun Anda telah tercapai.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/id_mail_whitelist.lng b/interface/web/mail/lib/lang/id_mail_whitelist.lng
index 52dd134271..d73c11c39c 100644
--- a/interface/web/mail/lib/lang/id_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/id_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktif';
 $wb['source_error_notempty'] = 'Alamat kosong.';
 $wb['type_txt'] = 'Tipe';
 $wb['limit_mailfilter_txt'] = 'Jumlah maks filter email untuk akun Anda telah tercapai.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/it_mail_blacklist.lng b/interface/web/mail/lib/lang/it_mail_blacklist.lng
index 169015d658..bb0c21459b 100644
--- a/interface/web/mail/lib/lang/it_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/it_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Attivo';
 $wb['source_error_notempty'] = 'Address  vuoto.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters raggiunto per il tuo account.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/it_mail_whitelist.lng b/interface/web/mail/lib/lang/it_mail_whitelist.lng
index c63f5759f4..e4b151310b 100644
--- a/interface/web/mail/lib/lang/it_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/it_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Attivo';
 $wb['source_error_notempty'] = 'Address  vuoto.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters raggiunto per il tuo account.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/ja_mail_blacklist.lng b/interface/web/mail/lib/lang/ja_mail_blacklist.lng
index 9007f6bb03..a012e29b16 100644
--- a/interface/web/mail/lib/lang/ja_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/ja_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = '有効';
 $wb['source_error_notempty'] = 'アドレスを指定してください';
 $wb['type_txt'] = '種別';
 $wb['limit_mailfilter_txt'] = 'メールフィルターが最大数に達したため、これ以上追加できません。';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/ja_mail_whitelist.lng b/interface/web/mail/lib/lang/ja_mail_whitelist.lng
index 74d51da927..6e903201df 100644
--- a/interface/web/mail/lib/lang/ja_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/ja_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = '有効';
 $wb['source_error_notempty'] = 'アドレスを指定してください';
 $wb['type_txt'] = '種別';
 $wb['limit_mailfilter_txt'] = 'メールフィルターが最大数に達したため、これ以上追加できません。';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/nl_mail_blacklist.lng b/interface/web/mail/lib/lang/nl_mail_blacklist.lng
index baa7b1ebba..1e4f986b60 100644
--- a/interface/web/mail/lib/lang/nl_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/nl_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Actief';
 $wb['source_error_notempty'] = 'Adres is niet ingvuld.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Het max. aantal e-mail filters voor uw account is bereikt.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/nl_mail_whitelist.lng b/interface/web/mail/lib/lang/nl_mail_whitelist.lng
index 604110edd5..25b594dba3 100644
--- a/interface/web/mail/lib/lang/nl_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/nl_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Actief';
 $wb['source_error_notempty'] = 'Adres is niet ingvuld.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Het max. aantal e-mail filters voor uw account is bereikt.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/pl_mail_blacklist.lng b/interface/web/mail/lib/lang/pl_mail_blacklist.lng
index 528f2f741a..5558e5f78f 100644
--- a/interface/web/mail/lib/lang/pl_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/pl_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktywny';
 $wb['source_error_notempty'] = 'Adres jest pusty.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Maksymalna ilość filtrów dla Twojego konta została przekroczona.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/pl_mail_whitelist.lng b/interface/web/mail/lib/lang/pl_mail_whitelist.lng
index 203c5bae73..9e4f6f686c 100644
--- a/interface/web/mail/lib/lang/pl_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/pl_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktywny';
 $wb['source_error_notempty'] = 'Adres jest pusty.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Maksymalna ilość filtrów e-mail dla Twojego konta zosała przekroczona.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/pt_mail_blacklist.lng b/interface/web/mail/lib/lang/pt_mail_blacklist.lng
index b7be9be477..b51b784e0a 100644
--- a/interface/web/mail/lib/lang/pt_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/pt_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Activo';
 $wb['source_error_notempty'] = 'Endereço em branco.';
 $wb['type_txt'] = 'Tipo';
 $wb['limit_mailfilter_txt'] = 'O número máximo de filtros de correio para a conta foi atingido..';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/pt_mail_whitelist.lng b/interface/web/mail/lib/lang/pt_mail_whitelist.lng
index 92cc78d80d..f82845095f 100644
--- a/interface/web/mail/lib/lang/pt_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/pt_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Activo';
 $wb['source_error_notempty'] = 'Endereço em Branco.';
 $wb['type_txt'] = 'Tipo';
 $wb['limit_mailfilter_txt'] = 'O número máximo de filtros para a conta foi atingido.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/ro_mail_blacklist.lng b/interface/web/mail/lib/lang/ro_mail_blacklist.lng
index a0feb78262..cd76a87313 100644
--- a/interface/web/mail/lib/lang/ro_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/ro_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Active';
 $wb['source_error_notempty'] = 'Address este goala';
 $wb['type_txt'] = 'Tip';
 $wb['limit_mailfilter_txt'] = 'Numarul maxim de filtre pentru contul dumneavoastra';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/ro_mail_whitelist.lng b/interface/web/mail/lib/lang/ro_mail_whitelist.lng
index 7a3f9f515c..8eab139b00 100644
--- a/interface/web/mail/lib/lang/ro_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/ro_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Active';
 $wb['source_error_notempty'] = 'Addresa e necompletata';
 $wb['type_txt'] = 'Tip';
 $wb['limit_mailfilter_txt'] = 'numarul maxim de filtre pe contul dumneavoastra a fost atins';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/ru_mail_blacklist.lng b/interface/web/mail/lib/lang/ru_mail_blacklist.lng
index 986935386e..8c022b693e 100644
--- a/interface/web/mail/lib/lang/ru_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/ru_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Активно';
 $wb['source_error_notempty'] = 'Адрес пустой!';
 $wb['type_txt'] = 'Тип';
 $wb['limit_mailfilter_txt'] = 'Максимальное число почтовых фильтров достигнуто.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/ru_mail_whitelist.lng b/interface/web/mail/lib/lang/ru_mail_whitelist.lng
index bd8a1ae06b..5a32140a83 100644
--- a/interface/web/mail/lib/lang/ru_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/ru_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Активно';
 $wb['source_error_notempty'] = 'Адрес пустой!';
 $wb['type_txt'] = 'Тип';
 $wb['limit_mailfilter_txt'] = 'Максимальное число почтовых фильтров достигнуто.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/se_mail_blacklist.lng b/interface/web/mail/lib/lang/se_mail_blacklist.lng
index 34b1f76db9..08b62e1e7c 100644
--- a/interface/web/mail/lib/lang/se_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/se_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['recipient_txt'] = 'Mottagare';
 $wb['source_error_notempty'] = 'Adressfältet är tomt.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Det maximala antalet epostfilter för ditt konto är uppnått.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/se_mail_whitelist.lng b/interface/web/mail/lib/lang/se_mail_whitelist.lng
index 7ce682ff6b..3f78c08817 100644
--- a/interface/web/mail/lib/lang/se_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/se_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['recipient_txt'] = 'Mottagare';
 $wb['source_error_notempty'] = 'Adressen är tom.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Maximala antalet epostfilter för ditt konto är uppnått.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/sk_mail_blacklist.lng b/interface/web/mail/lib/lang/sk_mail_blacklist.lng
index d5775a6642..d3b5c0cfe5 100644
--- a/interface/web/mail/lib/lang/sk_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/sk_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktívne';
 $wb['source_error_notempty'] = 'Adresa je prázdna.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Max. počet e-mailových filtrov pre váš účet je dosiahnutý.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/sk_mail_whitelist.lng b/interface/web/mail/lib/lang/sk_mail_whitelist.lng
index 6e2107a0d8..43ce09e77e 100644
--- a/interface/web/mail/lib/lang/sk_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/sk_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Aktívne';
 $wb['source_error_notempty'] = 'Adresa je prázdna.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Max. počet e-mailových filtrov pre váš účet je dosiahnutý.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/tr_mail_blacklist.lng b/interface/web/mail/lib/lang/tr_mail_blacklist.lng
index 381a11fa98..b59a9b8b42 100644
--- a/interface/web/mail/lib/lang/tr_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/tr_mail_blacklist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Etkin';
 $wb['source_error_notempty'] = 'Adres boÅŸ olamaz.';
 $wb['type_txt'] = 'Tür';
 $wb['limit_mailfilter_txt'] = 'Hesabınıza ekleyebileceğiniz en fazla e-posta süzgeci sayısına ulaştınız.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/lib/lang/tr_mail_whitelist.lng b/interface/web/mail/lib/lang/tr_mail_whitelist.lng
index c6272a9ede..1667809c3e 100644
--- a/interface/web/mail/lib/lang/tr_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/tr_mail_whitelist.lng
@@ -6,4 +6,4 @@ $wb['active_txt'] = 'Etkin';
 $wb['source_error_notempty'] = 'Adres boÅŸ olamaz.';
 $wb['type_txt'] = 'Tür';
 $wb['limit_mailfilter_txt'] = 'Hesabınıza ekleyebileceğiniz en fazla e-posta süzgeci sayısına ulaştınız.';
-?>
+$wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
diff --git a/interface/web/mail/mail_blacklist_edit.php b/interface/web/mail/mail_blacklist_edit.php
index 1ad8d6affd..3c8acb505d 100644
--- a/interface/web/mail/mail_blacklist_edit.php
+++ b/interface/web/mail/mail_blacklist_edit.php
@@ -52,6 +52,21 @@ class page_action extends tform_actions {
 
 	protected $client_allowed_types = array( 'recipient', 'sender' );
 
+	function onShowNew() {
+		global $app;
+
+		if($_SESSION["s"]["user"]["typ"] != 'admin') {
+			if(!$app->tform->checkClientLimit('limit_mail_wblist')) {
+				$app->error($app->tform->wordbook["limit_mail_wblist_txt"]);
+			}
+			if(!$app->tform->checkResellerLimit('limit_mail_wblist')) {
+				$app->error('Reseller: '.$app->tform->wordbook["limit_mail_wblist_txt"]);
+			}
+		}
+
+		parent::onShowNew();
+	}
+
 	function onBeforeUpdate() {
 		global $app, $conf;
 
@@ -70,23 +85,37 @@ class page_action extends tform_actions {
 
 		// Non-admin checks
 		if($_SESSION["s"]["user"]["typ"] != 'admin') {
-			// Non-admin can only use type 'sender' or 'recipient' and address must belong to the client's domains
+			// Non-admin can only use type 'sender' or 'recipient'
 			if(! in_array($this->dataRecord["type"], $this->client_allowed_types)) {
 				$app->tform->errorMessage .= $app->lng('Blacklist type requires admin permissions');
 			}
-			// address must be valid email
+
+			// Address must be valid email
 			if(! filter_var( $this->dataRecord["source"], FILTER_VALIDATE_EMAIL )) {
 				$app->tform->errorMessage .= $app->lng('Invalid address: must be a valid email address');
 			}
+
+			// Address must belong to the client's domains
 			$tmp = explode('@', $this->dataRecord["source"]);
 			$domain = trim( array_pop($tmp) );
 			$AUTHSQL = $app->tform->getAuthSQL('r');
 			$rec = $app->db->queryOneRecord("SELECT domain_id from mail_domain WHERE ${AUTHSQL} AND domain = ?", $domain);
-			// address must belong to the client's domains
 			if(! (is_array($rec) && isset($rec['domain_id']) && is_numeric($rec['domain_id']))) {
 				$app->tform->errorMessage .= $app->lng('Invalid address: you have no permission for this domain.');
 			}
 			unset($rec);
+
+			// Check the client limits
+			$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
+			$client = $app->db->queryOneRecord("SELECT limit_mail_wblist FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+			if($this->id == 0 && $client["limit_mail_wblist"] >= 0) {
+				$TYPES_LIST = "('" . join("', '", $this->client_allowed_types) . "')";
+				$tmp = $app->db->queryOneRecord("SELECT count(access_id) as number FROM mail_access WHERE ${AUTHSQL} AND type in ${TYPES_LIST}");
+				if($tmp["number"] >= $client["limit_mail_wblist"]) {
+					$app->tform->errorMessage .= $app->tform->wordbook["limit_mail_wblist_txt"]."<br>";
+				}
+				unset($tmp);
+			}
 		}
 		
 		if(substr($this->dataRecord['source'], 0, 1) === '@') $this->dataRecord['source'] = substr($this->dataRecord['source'], 1);
@@ -99,5 +128,4 @@ class page_action extends tform_actions {
 $app->tform_actions = new page_action;
 $app->tform_actions->onLoad();
 
-
 ?>
diff --git a/interface/web/mail/mail_whitelist_edit.php b/interface/web/mail/mail_whitelist_edit.php
index 52106c1882..bfabbe64d2 100644
--- a/interface/web/mail/mail_whitelist_edit.php
+++ b/interface/web/mail/mail_whitelist_edit.php
@@ -52,6 +52,21 @@ class page_action extends tform_actions {
 
 	protected $client_allowed_types = array( 'recipient', 'sender' );
 
+	function onShowNew() {
+		global $app;
+
+		if($_SESSION["s"]["user"]["typ"] != 'admin') {
+			if(!$app->tform->checkClientLimit('limit_mail_wblist')) {
+				$app->error($app->tform->wordbook["limit_mail_wblist_txt"]);
+			}
+			if(!$app->tform->checkResellerLimit('limit_mail_wblist')) {
+				$app->error('Reseller: '.$app->tform->wordbook["limit_mail_wblist_txt"]);
+			}
+		}
+
+		parent::onShowNew();
+	}
+
 	function onBeforeUpdate() {
 		global $app, $conf;
 
@@ -70,25 +85,40 @@ class page_action extends tform_actions {
 
 		// Non-admin checks
 		if($_SESSION["s"]["user"]["typ"] != 'admin') {
-			// Non-admin can only use type 'sender' or 'recipient' and address must belong to the client's domains
+			// Non-admin can only use type 'sender' or 'recipient'
 			if(! in_array($this->dataRecord["type"], $this->client_allowed_types)) {
 				$app->tform->errorMessage .= $app->lng('Whitelist type requires admin permissions');
 			}
-			// address must be valid email
+
+			// Address must be valid email
 			if(! filter_var( $this->dataRecord["source"], FILTER_VALIDATE_EMAIL )) {
 				$app->tform->errorMessage .= $app->lng('Invalid address: must be a valid email address');
 			}
+
+			// Address must belong to the client's domains
 			$tmp = explode('@', $this->dataRecord["source"]);
 			$domain = trim( array_pop($tmp) );
 			$AUTHSQL = $app->tform->getAuthSQL('r');
 			$rec = $app->db->queryOneRecord("SELECT domain_id from mail_domain WHERE ${AUTHSQL} AND domain = ?", $domain);
-			// address must belong to the client's domains
 			if(! (is_array($rec) && isset($rec['domain_id']) && is_numeric($rec['domain_id']))) {
 				$app->tform->errorMessage .= $app->lng('Invalid address: you have no permission for this domain.');
 			}
 			unset($rec);
+
+			// Check the client limits
+			$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
+			$client = $app->db->queryOneRecord("SELECT limit_mail_wblist FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+			if($this->id == 0 && $client["limit_mail_wblist"] >= 0) {
+				$TYPES_LIST = "('" . join("', '", $this->client_allowed_types) . "')";
+				$tmp = $app->db->queryOneRecord("SELECT count(access_id) as number FROM mail_access WHERE ${AUTHSQL} AND type in ${TYPES_LIST}");
+				if($tmp["number"] >= $client["limit_mail_wblist"]) {
+					$app->tform->errorMessage .= $app->tform->wordbook["limit_mail_wblist_txt"]."<br>";
+				}
+				unset($tmp);
+			}
 		}
 
+
 		if(substr($this->dataRecord['source'], 0, 1) === '@') $this->dataRecord['source'] = substr($this->dataRecord['source'], 1);
 
 		parent::onSubmit();
@@ -99,5 +129,4 @@ class page_action extends tform_actions {
 $app->tform_actions = new page_action;
 $app->tform_actions->onLoad();
 
-
 ?>
diff --git a/remoting_client/API-docs/client_add.html b/remoting_client/API-docs/client_add.html
index 0e9e9cd9c6..a9390900e6 100644
--- a/remoting_client/API-docs/client_add.html
+++ b/remoting_client/API-docs/client_add.html
@@ -43,6 +43,7 @@
 <p class="margin"> limit_mailforward&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
 <p class="margin"> limit_mailcatchall&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
 <p class="margin"> limit_mailrouting&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
+<p class="margin"> limit_mail_wblist&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
 <p class="margin"> limit_mailfilter&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
 <p class="margin"> limit_fetchmail&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
 <p class="margin"> limit_mailquota&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
diff --git a/remoting_client/API-docs/client_update.html b/remoting_client/API-docs/client_update.html
index 9cbdcd2f33..b38ecb8a67 100644
--- a/remoting_client/API-docs/client_update.html
+++ b/remoting_client/API-docs/client_update.html
@@ -43,6 +43,7 @@
 <p class="margin"> limit_mailforward&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
 <p class="margin"> limit_mailcatchall&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
 <p class="margin"> limit_mailrouting&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
+<p class="margin"> limit_mail_wblist&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
 <p class="margin"> limit_mailfilter&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
 <p class="margin"> limit_fetchmail&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
 <p class="margin"> limit_mailquota&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
diff --git a/remoting_client/examples/client_add.php b/remoting_client/examples/client_add.php
index 6d5b5934d7..7be7493e94 100644
--- a/remoting_client/examples/client_add.php
+++ b/remoting_client/examples/client_add.php
@@ -41,6 +41,7 @@ try {
 		'limit_mailforward' => -1,
 		'limit_mailcatchall' => -1,
 		'limit_mailrouting' => 0,
+		'limit_mail_wblist' => 0,
 		'limit_mailfilter' => -1,
 		'limit_fetchmail' => -1,
 		'limit_mailquota' => -1,
-- 
GitLab


From fac5423a46f33bbcadf2c39650c58042ff1adf05 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 14 Jan 2021 14:21:28 -0700
Subject: [PATCH 245/441] reject_unlisted_senders in smtpd_sender_restrictions

---
 install/tpl/debian_postfix.conf.master   | 4 ++--
 install/tpl/fedora_postfix.conf.master   | 4 ++--
 install/tpl/gentoo_postfix.conf.master   | 4 ++--
 install/tpl/opensuse_postfix.conf.master | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master
index 03077cbe7d..9db5317029 100644
--- a/install/tpl/debian_postfix.conf.master
+++ b/install/tpl/debian_postfix.conf.master
@@ -27,8 +27,8 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
-smtpd_reject_unlisted_sender = yes
+smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
+smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master
index fb284e4885..60450357cf 100644
--- a/install/tpl/fedora_postfix.conf.master
+++ b/install/tpl/fedora_postfix.conf.master
@@ -23,8 +23,8 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
-smtpd_reject_unlisted_sender = yes
+smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
+smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master
index 8a50cce3cd..523b7604ec 100644
--- a/install/tpl/gentoo_postfix.conf.master
+++ b/install/tpl/gentoo_postfix.conf.master
@@ -22,8 +22,8 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
-smtpd_reject_unlisted_sender = yes
+smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
+smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master
index 8186c2ad8a..4fb341fa08 100644
--- a/install/tpl/opensuse_postfix.conf.master
+++ b/install/tpl/opensuse_postfix.conf.master
@@ -25,8 +25,8 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
-smtpd_reject_unlisted_sender = yes
+smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
+smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
 smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
-- 
GitLab


From 8b853398d5b2e95a135a0a487b29739de9b45348 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 15 Jan 2021 16:22:43 -0700
Subject: [PATCH 246/441] fix Type column in whitelist/blacklist list

---
 interface/web/mail/list/mail_blacklist.list.php | 4 ++--
 interface/web/mail/list/mail_whitelist.list.php | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/interface/web/mail/list/mail_blacklist.list.php b/interface/web/mail/list/mail_blacklist.list.php
index 6f92c0465f..d51f31a7d8 100644
--- a/interface/web/mail/list/mail_blacklist.list.php
+++ b/interface/web/mail/list/mail_blacklist.list.php
@@ -88,9 +88,9 @@ $liste["item"][] = array( 'field'  => "source",
 
 
 if ($app->auth->is_admin()) {
-	$type_values[] = array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client');
+	$type_values = array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client');
 } else {
-	$type_values[] = array('recipient' => 'Recipient', 'sender' => 'Sender');
+	$type_values = array('recipient' => 'Recipient', 'sender' => 'Sender');
 }
 $liste["item"][] = array( 'field'  => "type",
 	'datatype' => "VARCHAR",
diff --git a/interface/web/mail/list/mail_whitelist.list.php b/interface/web/mail/list/mail_whitelist.list.php
index e8a345c10e..b4c97f493f 100644
--- a/interface/web/mail/list/mail_whitelist.list.php
+++ b/interface/web/mail/list/mail_whitelist.list.php
@@ -88,9 +88,9 @@ $liste["item"][] = array( 'field'  => "source",
 
 
 if ($app->auth->is_admin()) {
-	$type_values[] = array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client');
+	$type_values = array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client');
 } else {
-	$type_values[] = array('recipient' => 'Recipient', 'sender' => 'Sender');
+	$type_values = array('recipient' => 'Recipient', 'sender' => 'Sender');
 }
 $liste["item"][] = array( 'field'  => "type",
 	'datatype' => "VARCHAR",
-- 
GitLab


From 72fbddab131af72c2b2c4eec7beb548b777de879 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 15 Jan 2021 16:32:21 -0700
Subject: [PATCH 247/441] postfix server plugin: reject_unlisted_senders in
 smtpd_sender_restrictions

---
 server/plugins-available/postfix_server_plugin.inc.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php
index b3e453be55..1818373637 100644
--- a/server/plugins-available/postfix_server_plugin.inc.php
+++ b/server/plugins-available/postfix_server_plugin.inc.php
@@ -161,9 +161,10 @@ class postfix_server_plugin {
 			if ($mail_config['reject_sender_login_mismatch'] == 'y') {
 				array_splice($new_options, 0, 0, array('reject_authenticated_sender_login_mismatch'));
 
+				// insert before permit_sasl_authenticated
 				for ($i = 0; isset($new_options[$i]); $i++) {
-					if ($new_options[$i] == 'permit_mynetworks') {
-						array_splice($new_options, $i+1, 0, array('reject_sender_login_mismatch'));
+					if ($new_options[$i] == 'permit_sasl_authenticated') {
+						array_splice($new_options, $i, 0, array('reject_sender_login_mismatch'));
 						break;
 					}
 				}
@@ -358,7 +359,8 @@ class postfix_server_plugin {
 				exec("postconf -e 'milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}'");
 				exec("postconf -e 'milter_default_action = accept'");
 
-				exec("postconf -e 'smtpd_sender_restrictions = ${raslm} permit_mynetworks, ${rslm} permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf'");
+				exec("postconf -e 'smtpd_sender_restrictions = ${raslm} permit_mynetworks, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, ${rslm} permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender'");
+
 
 				$new_options = array();
 				$options = preg_split("/,\s*/", exec("postconf -h smtpd_recipient_restrictions"));
@@ -397,7 +399,7 @@ class postfix_server_plugin {
 				exec("postconf -e 'content_filter = " . ($configure_lmtp ? "lmtp" : "amavis" ) . ":[127.0.0.1]:10024'");
 
 				// fixme: should read this from conf templates
-				exec("postconf -e 'smtpd_sender_restrictions = ${raslm} check_sender_access regexp:/etc/postfix/tag_as_originating.re, permit_mynetworks, ${rslm} permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:/etc/postfix/tag_as_foreign.re, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf'");
+				exec("postconf -e 'smtpd_sender_restrictions = ${raslm} check_sender_access regexp:/etc/postfix/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, ${rslm} permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:/etc/postfix/tag_as_foreign.re'");
 			}
 		}
 
-- 
GitLab


From 0dfa506057a11bb6f773b8e8dae0bc31c99431c4 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 15 Jan 2021 16:45:41 -0700
Subject: [PATCH 248/441] installer: reject_unlisted_senders in
 smtpd_sender_restrictions

---
 install/lib/installer_base.lib.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 50376e455e..357aa7abeb 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1798,9 +1798,10 @@ class installer_base {
 			if ($mail_config['reject_sender_login_mismatch'] == 'y') {
 				array_splice($new_options, 0, 0, array('reject_authenticated_sender_login_mismatch'));
 
+				// insert before permit_sasl_authenticated
 				for ($i = 0; isset($new_options[$i]); $i++) {
-					if ($new_options[$i] == 'permit_mynetworks') {
-						array_splice($new_options, $i+1, 0, array('reject_sender_login_mismatch'));
+					if ($new_options[$i] == 'permit_sasl_authenticated') {
+						array_splice($new_options, $i, 0, array('reject_sender_login_mismatch'));
 						break;
 					}
 				}
-- 
GitLab


From 10e8ecc2bf807db371cbb743f817947afbd1f18c Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Mon, 18 Jan 2021 08:28:22 +0100
Subject: [PATCH 249/441] fix typo from last commit

---
 install/lib/installer_base.lib.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index d0e2363983..5a73582422 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -34,7 +34,7 @@ class installer_base {
 	var $language = 'en';
 	var $db;
 	public $install_ispconfig_interface = true;
-	public $is_update = false; // true if it is an update, falsi if it is a new install
+	public $is_update = false; // true if it is an update, false if it is a new install
 	protected $mailman_group = 'list';
 
 
@@ -650,7 +650,7 @@ class installer_base {
 				$query = "GRANT SELECT, INSERT ON ?? TO ?@?";
 				if ($verbose){
 					echo $query ."\n";
-				
+				}
 				if(!$this->dbmaster->query($query, $value['db'] . '.sys_log', $value['user'], $host)) {
 					$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
 				}
-- 
GitLab


From 9503aeff4608570c6e4d7a7dd09d55de54a68ad9 Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Mon, 18 Jan 2021 08:39:50 +0100
Subject: [PATCH 250/441] use idn_decode for mailuser and login fails for
 mail-users with IDN domains (Fixes #6021)

---
 interface/web/login/index.php                        | 4 ++--
 interface/web/mailuser/index.php                     | 6 ++++--
 interface/web/mailuser/mail_user_cc_edit.php         | 2 +-
 interface/web/mailuser/mail_user_password_edit.php   | 2 +-
 interface/web/mailuser/mail_user_spamfilter_edit.php | 2 +-
 5 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/interface/web/login/index.php b/interface/web/login/index.php
index d820e917c9..58456dea0e 100644
--- a/interface/web/login/index.php
+++ b/interface/web/login/index.php
@@ -58,7 +58,7 @@ if($app->is_under_maintenance()) {
 if(count($_POST) > 0) {
 
 	//** Check variables
-	if(!preg_match("/^[\w\.\-\_\@]{1,128}$/", $_POST['username'])) $error = $app->lng('user_regex_error');
+	if(!preg_match("/^[\w\.\-\_\@]{1,128}$/", $app->functions->idn_encode($_POST['username']))) $error = $app->lng('user_regex_error');
 	if(!preg_match("/^.{1,256}$/i", $_POST['password'])) $error = $app->lng('pw_error_length');
 
 	//** importing variables
@@ -152,7 +152,7 @@ if(count($_POST) > 0) {
 				if(stristr($username, '@')) {
 					//* mailuser login
 					$sql = "SELECT * FROM mail_user WHERE login = ? or email = ?";
-					$mailuser = $app->db->queryOneRecord($sql, $username, $username);
+					$mailuser = $app->db->queryOneRecord($sql, $username, $app->functions->idn_encode($username));
 					$user = false;
 					if($mailuser) {
 						$saved_password = stripslashes($mailuser['password']);
diff --git a/interface/web/mailuser/index.php b/interface/web/mailuser/index.php
index c9541df2bd..77f5c207aa 100644
--- a/interface/web/mailuser/index.php
+++ b/interface/web/mailuser/index.php
@@ -5,7 +5,7 @@ require_once '../../lib/app.inc.php';
 //* Check permissions for module
 $app->auth->check_module_permissions('mailuser');
 
-$app->uses('tpl');
+$app->uses('tpl, functions');
 
 $app->tpl->newTemplate('form.tpl.htm');
 $app->tpl->setInclude('content_tpl', 'templates/index.htm');
@@ -28,8 +28,10 @@ if($rec['quota'] == 0) {
 
 if($rec['cc'] == '') $rec['cc'] = $wb['none_txt'];
 
-$app->tpl->setVar($rec);
+$rec['email'] = $app->functions->idn_decode($rec['email']);
+$rec['login'] = $app->functions->idn_decode($rec['login']);
 
+$app->tpl->setVar($rec);
 $sql2 = "SELECT * FROM server WHERE server_id = ?";
 $rec2 = $app->db->queryOneRecord($sql2, $rec['server_id']);
 
diff --git a/interface/web/mailuser/mail_user_cc_edit.php b/interface/web/mailuser/mail_user_cc_edit.php
index 778be781ec..9a63b2d953 100644
--- a/interface/web/mailuser/mail_user_cc_edit.php
+++ b/interface/web/mailuser/mail_user_cc_edit.php
@@ -75,7 +75,7 @@ class page_action extends tform_actions {
 		global $app, $conf;
 
 		$rec = $app->tform->getDataRecord($this->id);
-		$app->tpl->setVar("email", $rec['email'], true);
+		$app->tpl->setVar("email", $app->functions->idn_decode($rec['email']), true);
 
 		parent::onShowEnd();
 	}
diff --git a/interface/web/mailuser/mail_user_password_edit.php b/interface/web/mailuser/mail_user_password_edit.php
index 5c5706177a..10a8e75e7e 100644
--- a/interface/web/mailuser/mail_user_password_edit.php
+++ b/interface/web/mailuser/mail_user_password_edit.php
@@ -63,7 +63,7 @@ class page_action extends tform_actions {
 		global $app, $conf;
 
 		$rec = $app->tform->getDataRecord($_SESSION['s']['user']['mailuser_id']);
-		$app->tpl->setVar("email", $rec['email'], true);
+		$app->tpl->setVar("email", $app->functions->idn_decode($rec['email']), true);
 
 		parent::onShowEnd();
 	}
diff --git a/interface/web/mailuser/mail_user_spamfilter_edit.php b/interface/web/mailuser/mail_user_spamfilter_edit.php
index 75649b5a70..8d1e70ba20 100644
--- a/interface/web/mailuser/mail_user_spamfilter_edit.php
+++ b/interface/web/mailuser/mail_user_spamfilter_edit.php
@@ -112,7 +112,7 @@ class page_action extends tform_actions {
 		global $app, $conf;
 
 		$rec = $app->tform->getDataRecord($this->id);
-		$app->tpl->setVar("email", $rec['email'], true);
+		$app->tpl->setVar("email", $app->functions->idn_decode($rec['email']), true);
 
 		// Get the spamfilter policys for the user
 		$tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = ?", $rec['email']);
-- 
GitLab


From 7a3d491c09d4e6a368a280d6b5f8e74b22cdb87d Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Tue, 19 Jan 2021 07:43:15 +0100
Subject: [PATCH 251/441] wrong server-id in admin/server_config_edit.php
 (Fixes #6022)

---
 interface/web/admin/server_config_edit.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/admin/server_config_edit.php b/interface/web/admin/server_config_edit.php
index 9a54c9fb16..1fd1921b84 100644
--- a/interface/web/admin/server_config_edit.php
+++ b/interface/web/admin/server_config_edit.php
@@ -57,7 +57,7 @@ class page_action extends tform_actions {
 		
 		// get the config
 		$app->uses('getconf');
-		$web_config = $app->getconf->get_server_config($conf['server_id'], 'web');
+		$web_config = $app->getconf->get_server_config($this->id, 'web');
 		
 		if($web_config['server_type'] == 'nginx'){
 			unset($app->tform->formDef["tabs"]["fastcgi"]);
-- 
GitLab


From 27d07a12478bcfe5024434657e2e15df203d837d Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 20 Jan 2021 09:52:15 -0700
Subject: [PATCH 252/441] postfix: reject_invalid_helo_hostname after
 permit_sasl_authentication

---
 install/tpl/debian_postfix.conf.master   | 2 +-
 install/tpl/fedora_postfix.conf.master   | 2 +-
 install/tpl/gentoo_postfix.conf.master   | 2 +-
 install/tpl/opensuse_postfix.conf.master | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master
index 9db5317029..7a32434737 100644
--- a/install/tpl/debian_postfix.conf.master
+++ b/install/tpl/debian_postfix.conf.master
@@ -26,7 +26,7 @@ relay_recipient_maps = proxy:mysql:{config_dir}/mysql-virtual_relayrecipientmaps
 smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
-smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
+smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master
index 60450357cf..017c2f2d69 100644
--- a/install/tpl/fedora_postfix.conf.master
+++ b/install/tpl/fedora_postfix.conf.master
@@ -22,7 +22,7 @@ relay_recipient_maps = proxy:mysql:{config_dir}/mysql-virtual_relayrecipientmaps
 smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
-smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
+smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master
index 523b7604ec..8cb78eba49 100644
--- a/install/tpl/gentoo_postfix.conf.master
+++ b/install/tpl/gentoo_postfix.conf.master
@@ -21,7 +21,7 @@ relay_recipient_maps = proxy:mysql:{config_dir}/mysql-virtual_relayrecipientmaps
 smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
-smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
+smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master
index 4fb341fa08..c469112403 100644
--- a/install/tpl/opensuse_postfix.conf.master
+++ b/install/tpl/opensuse_postfix.conf.master
@@ -24,7 +24,7 @@ relay_recipient_maps = proxy:mysql:{config_dir}/mysql-virtual_relayrecipientmaps
 smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
-smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
+smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
-- 
GitLab


From 04b43daf05306ce480f4444741e5a860159b38e8 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 20 Jan 2021 15:14:26 -0700
Subject: [PATCH 253/441] postfix: sender whitelist as first option

---
 install/lib/installer_base.lib.php                     | 8 +++++++-
 install/sql/incremental/upd_dev_collection.sql         | 5 +++++
 install/sql/ispconfig3.sql                             | 2 +-
 install/tpl/debian_postfix.conf.master                 | 2 +-
 install/tpl/fedora_postfix.conf.master                 | 2 +-
 install/tpl/gentoo_postfix.conf.master                 | 2 +-
 install/tpl/opensuse_postfix.conf.master               | 2 +-
 server/plugins-available/postfix_server_plugin.inc.php | 8 +++++++-
 8 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 357aa7abeb..fa80911058 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1796,7 +1796,13 @@ class installer_base {
 				$new_options[] = $value;
 			}
 			if ($mail_config['reject_sender_login_mismatch'] == 'y') {
-				array_splice($new_options, 0, 0, array('reject_authenticated_sender_login_mismatch'));
+				// insert before permit_mynetworks
+				for ($i = 0; isset($new_options[$i]); $i++) {
+					if ($new_options[$i] == 'permit_mynetworks') {
+						array_splice($new_options, $i, 0, array('reject_authenticated_sender_login_mismatch'));
+						break;
+					}
+				}
 
 				// insert before permit_sasl_authenticated
 				for ($i = 0; isset($new_options[$i]); $i++) {
diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 13b1e1097e..90f8139c60 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -2,3 +2,8 @@ ALTER TABLE `remote_user` MODIFY `remote_password` VARCHAR(200) NOT NULL DEFAULT
 
 ALTER TABLE `client` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
 ALTER TABLE `client_template` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
+
+ALTER TABLE mail_access DROP CONSTRAINT `server_id`;
+SET SESSION old_alter_table=1;
+ALTER IGNORE TABLE mail_access ADD UNIQUE KEY `unique_source` (`server_id`,`source`,`type`);
+SET SESSION old_alter_table=0;
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 333a908a5a..baeb079219 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -822,7 +822,7 @@ CREATE TABLE `mail_access` (
   `type` set('recipient','sender','client') NOT NULL DEFAULT 'recipient',
   `active` enum('n','y') NOT NULL default 'y',
   PRIMARY KEY  (`access_id`),
-  KEY `server_id` (`server_id`,`source`)
+  UNIQUE KEY `unique_source` (`server_id`,`source`,`type`)
 ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 -- --------------------------------------------------------
diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master
index 7a32434737..24b1e154cf 100644
--- a/install/tpl/debian_postfix.conf.master
+++ b/install/tpl/debian_postfix.conf.master
@@ -27,7 +27,7 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
+smtpd_sender_restrictions = check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf, {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master
index 017c2f2d69..04690bff70 100644
--- a/install/tpl/fedora_postfix.conf.master
+++ b/install/tpl/fedora_postfix.conf.master
@@ -23,7 +23,7 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
+smtpd_sender_restrictions = check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf, {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master
index 8cb78eba49..7ee0c83568 100644
--- a/install/tpl/gentoo_postfix.conf.master
+++ b/install/tpl/gentoo_postfix.conf.master
@@ -22,7 +22,7 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
+smtpd_sender_restrictions = check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf, {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master
index c469112403..8ee01580be 100644
--- a/install/tpl/opensuse_postfix.conf.master
+++ b/install/tpl/opensuse_postfix.conf.master
@@ -25,7 +25,7 @@ smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_ma
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
 smtpd_helo_required = yes
 smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
-smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
+smtpd_sender_restrictions = check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf, {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
 smtpd_reject_unlisted_sender = no
 smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
 smtpd_etrn_restrictions = permit_mynetworks, reject
diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php
index 1818373637..8cdb95066b 100644
--- a/server/plugins-available/postfix_server_plugin.inc.php
+++ b/server/plugins-available/postfix_server_plugin.inc.php
@@ -159,7 +159,13 @@ class postfix_server_plugin {
 			}
 
 			if ($mail_config['reject_sender_login_mismatch'] == 'y') {
-				array_splice($new_options, 0, 0, array('reject_authenticated_sender_login_mismatch'));
+				// insert before permit_mynetworks
+				for ($i = 0; isset($new_options[$i]); $i++) {
+					if ($new_options[$i] == 'permit_mynetworks') {
+						array_splice($new_options, $i, 0, array('reject_authenticated_sender_login_mismatch'));
+						break;
+					}
+				}
 
 				// insert before permit_sasl_authenticated
 				for ($i = 0; isset($new_options[$i]); $i++) {
-- 
GitLab


From 731a9ecc30ff125f59d04e44be587dd837fe9bdf Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 25 Jan 2021 16:10:11 -0700
Subject: [PATCH 254/441] enforce unique mail_access source/type

---
 interface/web/mail/form/mail_blacklist.tform.php  |  2 +-
 interface/web/mail/form/mail_whitelist.tform.php  |  2 +-
 interface/web/mail/lib/lang/ar_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/ar_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/bg_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/bg_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/br_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/br_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/ca_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/ca_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/cz_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/cz_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/de_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/de_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/dk_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/dk_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/el_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/el_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/en_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/en_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/es_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/es_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/fi_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/fi_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/fr_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/fr_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/hr_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/hr_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/hu_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/hu_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/id_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/id_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/it_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/it_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/ja_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/ja_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/nl_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/nl_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/pl_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/pl_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/pt_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/pt_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/ro_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/ro_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/ru_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/ru_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/se_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/se_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/sk_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/sk_mail_whitelist.lng |  3 +++
 interface/web/mail/lib/lang/tr_mail_blacklist.lng |  3 +++
 interface/web/mail/lib/lang/tr_mail_whitelist.lng |  3 +++
 interface/web/mail/mail_blacklist_edit.php        | 10 ++++++++--
 interface/web/mail/mail_whitelist_edit.php        |  7 ++++++-
 54 files changed, 166 insertions(+), 5 deletions(-)

diff --git a/interface/web/mail/form/mail_blacklist.tform.php b/interface/web/mail/form/mail_blacklist.tform.php
index df29fbd6d9..35272e4cd4 100644
--- a/interface/web/mail/form/mail_blacklist.tform.php
+++ b/interface/web/mail/form/mail_blacklist.tform.php
@@ -98,7 +98,7 @@ $form["tabs"]['blacklist'] = array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'SELECT',
 			'default' => 'y',
-			'value'  => array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client')
+			'value'  => array('recipient' => 'recipient_txt', 'sender' => 'sender_txt', 'client' => 'client_txt')
 		),
 		'active' => array (
 			'datatype' => 'VARCHAR',
diff --git a/interface/web/mail/form/mail_whitelist.tform.php b/interface/web/mail/form/mail_whitelist.tform.php
index 8b570e449d..01f3d5dab7 100644
--- a/interface/web/mail/form/mail_whitelist.tform.php
+++ b/interface/web/mail/form/mail_whitelist.tform.php
@@ -104,7 +104,7 @@ $form["tabs"]['whitelist'] = array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'SELECT',
 			'default' => 'y',
-			'value'  => array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client')
+			'value'  => array('recipient' => 'recipient_txt', 'sender' => 'sender_txt', 'client' => 'client_txt')
 		),
 		'active' => array (
 			'datatype' => 'VARCHAR',
diff --git a/interface/web/mail/lib/lang/ar_mail_blacklist.lng b/interface/web/mail/lib/lang/ar_mail_blacklist.lng
index 6173df6a07..81a1b6d279 100644
--- a/interface/web/mail/lib/lang/ar_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/ar_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Address is empty.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/ar_mail_whitelist.lng b/interface/web/mail/lib/lang/ar_mail_whitelist.lng
index 1cdc15564d..f6fda2d6d4 100644
--- a/interface/web/mail/lib/lang/ar_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/ar_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Address is empty.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/bg_mail_blacklist.lng b/interface/web/mail/lib/lang/bg_mail_blacklist.lng
index 9b04dc85ba..7886cb6fa6 100644
--- a/interface/web/mail/lib/lang/bg_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/bg_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Полето с адреса е празно.';
 $wb['type_txt'] = 'Тип';
 $wb['limit_mailfilter_txt'] = 'Максималният брой за емайл филтри в твоят профил е достигнат.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/bg_mail_whitelist.lng b/interface/web/mail/lib/lang/bg_mail_whitelist.lng
index b17ee61002..deef7ae356 100644
--- a/interface/web/mail/lib/lang/bg_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/bg_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Полето с адреса е празно.';
 $wb['type_txt'] = 'Тип';
 $wb['limit_mailfilter_txt'] = 'Максималният брой на емаил филтри за твоя акаунт е достигнат.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/br_mail_blacklist.lng b/interface/web/mail/lib/lang/br_mail_blacklist.lng
index b72ea94ff3..d33aa6c138 100644
--- a/interface/web/mail/lib/lang/br_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/br_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Destinatário está vazio.';
 $wb['type_txt'] = 'Tipo';
 $wb['limit_mailfilter_txt'] = 'O limite de filtros de email para esta conta foi alcançado.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/br_mail_whitelist.lng b/interface/web/mail/lib/lang/br_mail_whitelist.lng
index 4af2d198b0..f458dbbfb2 100644
--- a/interface/web/mail/lib/lang/br_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/br_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Endereço de email está vazio.';
 $wb['type_txt'] = 'Tipo';
 $wb['limit_mailfilter_txt'] = 'O limite de filtros de email para esta conta foi alcançado.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/ca_mail_blacklist.lng b/interface/web/mail/lib/lang/ca_mail_blacklist.lng
index 20d7f65ad2..b423203321 100644
--- a/interface/web/mail/lib/lang/ca_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/ca_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'L\'adresse est vide.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Le nombre maximal de filtres d\'email pour votre compte a été atteint.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/ca_mail_whitelist.lng b/interface/web/mail/lib/lang/ca_mail_whitelist.lng
index b78c665a10..a85c7939c3 100644
--- a/interface/web/mail/lib/lang/ca_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/ca_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'L\'adresse est vide.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Le nombre maximal de filtres à mails pour votre compte a été atteint.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/cz_mail_blacklist.lng b/interface/web/mail/lib/lang/cz_mail_blacklist.lng
index 7348b738af..e95a23a3de 100644
--- a/interface/web/mail/lib/lang/cz_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/cz_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adresa je prázdná.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Byl dosažen maximální počet e-mail filtrů pro Váš účet.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/cz_mail_whitelist.lng b/interface/web/mail/lib/lang/cz_mail_whitelist.lng
index 3db1076231..e775902fa8 100644
--- a/interface/web/mail/lib/lang/cz_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/cz_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adresa je prázdná.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Byl dosažen maximální počet e-mail filtrů pro Váš účet.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/de_mail_blacklist.lng b/interface/web/mail/lib/lang/de_mail_blacklist.lng
index 42f1da41d7..7cb69f74bc 100644
--- a/interface/web/mail/lib/lang/de_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/de_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adresse ist leer.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Die maximale Anzahl an E-Mail Filter für Ihr Konto wurde erreicht.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/de_mail_whitelist.lng b/interface/web/mail/lib/lang/de_mail_whitelist.lng
index fac0efcb8e..04719f2479 100644
--- a/interface/web/mail/lib/lang/de_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/de_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'E-Mail Adresse ist leer.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Die maximale Anzahl an E-Mail Filtern für Ihr Konto wurde erreicht.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/dk_mail_blacklist.lng b/interface/web/mail/lib/lang/dk_mail_blacklist.lng
index 79ff300aed..708b10fcb4 100644
--- a/interface/web/mail/lib/lang/dk_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/dk_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adresse er tom.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Max. antal af e-mail filtere for din konto er nået.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/dk_mail_whitelist.lng b/interface/web/mail/lib/lang/dk_mail_whitelist.lng
index bb671d84f0..2efac1cfa4 100644
--- a/interface/web/mail/lib/lang/dk_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/dk_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adresse er tom.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Max. antal af email filtere for din konto er nået.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/el_mail_blacklist.lng b/interface/web/mail/lib/lang/el_mail_blacklist.lng
index 003f7462c7..d7b27ff7d7 100644
--- a/interface/web/mail/lib/lang/el_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/el_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Η διεύθυνση είναι κενή.';
 $wb['type_txt'] = 'Τύπος';
 $wb['limit_mailfilter_txt'] = 'Έχετε φτάσει το μέγιστο πλήθος των φίλτρων email για τον λογαριασμό σας.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/el_mail_whitelist.lng b/interface/web/mail/lib/lang/el_mail_whitelist.lng
index 5c3a095a24..601a53434f 100644
--- a/interface/web/mail/lib/lang/el_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/el_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Η διεύθυνση είναι κενή';
 $wb['type_txt'] = 'Τύπος';
 $wb['limit_mailfilter_txt'] = 'Έχετε φτάσει το μέγιστο πλήθος των φίλτρων email για τον λογαριασμό σας.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/en_mail_blacklist.lng b/interface/web/mail/lib/lang/en_mail_blacklist.lng
index 6173df6a07..81a1b6d279 100644
--- a/interface/web/mail/lib/lang/en_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/en_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Address is empty.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/en_mail_whitelist.lng b/interface/web/mail/lib/lang/en_mail_whitelist.lng
index d765aad6a1..351a0574d3 100644
--- a/interface/web/mail/lib/lang/en_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/en_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Address is empty.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/es_mail_blacklist.lng b/interface/web/mail/lib/lang/es_mail_blacklist.lng
index 29353365d6..0956e6f5e4 100644
--- a/interface/web/mail/lib/lang/es_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/es_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'La dirección está vacía.';
 $wb['source_txt'] = 'Dirección en la lista negra';
 $wb['type_txt'] = 'Tipo';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/es_mail_whitelist.lng b/interface/web/mail/lib/lang/es_mail_whitelist.lng
index 8cf5323098..af5362d2e0 100644
--- a/interface/web/mail/lib/lang/es_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/es_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'La dirección está vacía.';
 $wb['type_txt'] = 'Tipo';
 $wb['limit_mailfilter_txt'] = 'Ha alcanzado en su cuenta el número máx. de filtros de correo.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/fi_mail_blacklist.lng b/interface/web/mail/lib/lang/fi_mail_blacklist.lng
index 59aa88bb7e..f24d79d80f 100644
--- a/interface/web/mail/lib/lang/fi_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/fi_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Estetty osoite on tyhjä';
 $wb['type_txt'] = 'Tyyppi';
 $wb['limit_mailfilter_txt'] = 'Käyttäjätunnuksella on jo sallittu määrä suodattimia.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/fi_mail_whitelist.lng b/interface/web/mail/lib/lang/fi_mail_whitelist.lng
index b0d7cfe270..c5d317a42c 100644
--- a/interface/web/mail/lib/lang/fi_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/fi_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Osoite on tyhjä';
 $wb['type_txt'] = 'Tyyppi';
 $wb['limit_mailfilter_txt'] = 'Käyttäjätunnuksella on jo sallittu määrä suodattimia.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/fr_mail_blacklist.lng b/interface/web/mail/lib/lang/fr_mail_blacklist.lng
index 035c228bc6..649d94c1dc 100644
--- a/interface/web/mail/lib/lang/fr_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/fr_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'L’adresse est vide.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Le nombre maximal de filtres d’e-mail pour votre compte a été atteint.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/fr_mail_whitelist.lng b/interface/web/mail/lib/lang/fr_mail_whitelist.lng
index ec11e6c674..bc768e77a1 100644
--- a/interface/web/mail/lib/lang/fr_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/fr_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'L’adresse est vide.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Le nombre maximal de filtres à mails pour votre compte a été atteint.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/hr_mail_blacklist.lng b/interface/web/mail/lib/lang/hr_mail_blacklist.lng
index 6842348ef7..3a542e2a82 100644
--- a/interface/web/mail/lib/lang/hr_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/hr_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adresa je prazna';
 $wb['type_txt'] = 'Vrsta';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/hr_mail_whitelist.lng b/interface/web/mail/lib/lang/hr_mail_whitelist.lng
index 54879fc79c..4d4643e6da 100644
--- a/interface/web/mail/lib/lang/hr_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/hr_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adresa je prazna';
 $wb['type_txt'] = 'Vrsta';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters for your account is reached.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/hu_mail_blacklist.lng b/interface/web/mail/lib/lang/hu_mail_blacklist.lng
index e183910f78..8b97aa868d 100644
--- a/interface/web/mail/lib/lang/hu_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/hu_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Cím üres.';
 $wb['type_txt'] = 'Típus';
 $wb['limit_mailfilter_txt'] = 'Nincs több szűrő lehetőség.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/hu_mail_whitelist.lng b/interface/web/mail/lib/lang/hu_mail_whitelist.lng
index 7cda150e54..9db70ac0eb 100644
--- a/interface/web/mail/lib/lang/hu_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/hu_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Cím mező üres.';
 $wb['type_txt'] = 'Típus';
 $wb['limit_mailfilter_txt'] = 'Nincs több szűrő lehetőség.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/id_mail_blacklist.lng b/interface/web/mail/lib/lang/id_mail_blacklist.lng
index 2271836a3f..4416ce17e4 100644
--- a/interface/web/mail/lib/lang/id_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/id_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Alamat kosong.';
 $wb['type_txt'] = 'Tipe';
 $wb['limit_mailfilter_txt'] = 'Jumlah maks penyaringan email untuk akun Anda telah tercapai.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/id_mail_whitelist.lng b/interface/web/mail/lib/lang/id_mail_whitelist.lng
index d73c11c39c..7eff21f47c 100644
--- a/interface/web/mail/lib/lang/id_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/id_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Alamat kosong.';
 $wb['type_txt'] = 'Tipe';
 $wb['limit_mailfilter_txt'] = 'Jumlah maks filter email untuk akun Anda telah tercapai.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/it_mail_blacklist.lng b/interface/web/mail/lib/lang/it_mail_blacklist.lng
index bb0c21459b..0b4f16a7c4 100644
--- a/interface/web/mail/lib/lang/it_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/it_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Address  vuoto.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters raggiunto per il tuo account.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/it_mail_whitelist.lng b/interface/web/mail/lib/lang/it_mail_whitelist.lng
index e4b151310b..fbc9980fed 100644
--- a/interface/web/mail/lib/lang/it_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/it_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Address  vuoto.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'The max. number of email filters raggiunto per il tuo account.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/ja_mail_blacklist.lng b/interface/web/mail/lib/lang/ja_mail_blacklist.lng
index a012e29b16..f20f0377a7 100644
--- a/interface/web/mail/lib/lang/ja_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/ja_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'アドレスを指定してください';
 $wb['type_txt'] = '種別';
 $wb['limit_mailfilter_txt'] = 'メールフィルターが最大数に達したため、これ以上追加できません。';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/ja_mail_whitelist.lng b/interface/web/mail/lib/lang/ja_mail_whitelist.lng
index 6e903201df..40d9ac32a3 100644
--- a/interface/web/mail/lib/lang/ja_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/ja_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'アドレスを指定してください';
 $wb['type_txt'] = '種別';
 $wb['limit_mailfilter_txt'] = 'メールフィルターが最大数に達したため、これ以上追加できません。';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/nl_mail_blacklist.lng b/interface/web/mail/lib/lang/nl_mail_blacklist.lng
index 1e4f986b60..e5a16aa6e0 100644
--- a/interface/web/mail/lib/lang/nl_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/nl_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adres is niet ingvuld.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Het max. aantal e-mail filters voor uw account is bereikt.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/nl_mail_whitelist.lng b/interface/web/mail/lib/lang/nl_mail_whitelist.lng
index 25b594dba3..c91e095768 100644
--- a/interface/web/mail/lib/lang/nl_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/nl_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adres is niet ingvuld.';
 $wb['type_txt'] = 'Type';
 $wb['limit_mailfilter_txt'] = 'Het max. aantal e-mail filters voor uw account is bereikt.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/pl_mail_blacklist.lng b/interface/web/mail/lib/lang/pl_mail_blacklist.lng
index 5558e5f78f..28eba8e32a 100644
--- a/interface/web/mail/lib/lang/pl_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/pl_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adres jest pusty.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Maksymalna ilość filtrów dla Twojego konta została przekroczona.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/pl_mail_whitelist.lng b/interface/web/mail/lib/lang/pl_mail_whitelist.lng
index 9e4f6f686c..f18521fe7f 100644
--- a/interface/web/mail/lib/lang/pl_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/pl_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adres jest pusty.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Maksymalna ilość filtrów e-mail dla Twojego konta zosała przekroczona.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/pt_mail_blacklist.lng b/interface/web/mail/lib/lang/pt_mail_blacklist.lng
index b51b784e0a..40fc089e0d 100644
--- a/interface/web/mail/lib/lang/pt_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/pt_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Endereço em branco.';
 $wb['type_txt'] = 'Tipo';
 $wb['limit_mailfilter_txt'] = 'O número máximo de filtros de correio para a conta foi atingido..';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/pt_mail_whitelist.lng b/interface/web/mail/lib/lang/pt_mail_whitelist.lng
index f82845095f..678fb82570 100644
--- a/interface/web/mail/lib/lang/pt_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/pt_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Endereço em Branco.';
 $wb['type_txt'] = 'Tipo';
 $wb['limit_mailfilter_txt'] = 'O número máximo de filtros para a conta foi atingido.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/ro_mail_blacklist.lng b/interface/web/mail/lib/lang/ro_mail_blacklist.lng
index cd76a87313..6416e190fe 100644
--- a/interface/web/mail/lib/lang/ro_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/ro_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Address este goala';
 $wb['type_txt'] = 'Tip';
 $wb['limit_mailfilter_txt'] = 'Numarul maxim de filtre pentru contul dumneavoastra';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/ro_mail_whitelist.lng b/interface/web/mail/lib/lang/ro_mail_whitelist.lng
index 8eab139b00..b5ec3d1e92 100644
--- a/interface/web/mail/lib/lang/ro_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/ro_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Addresa e necompletata';
 $wb['type_txt'] = 'Tip';
 $wb['limit_mailfilter_txt'] = 'numarul maxim de filtre pe contul dumneavoastra a fost atins';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/ru_mail_blacklist.lng b/interface/web/mail/lib/lang/ru_mail_blacklist.lng
index 8c022b693e..33ef780ebd 100644
--- a/interface/web/mail/lib/lang/ru_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/ru_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Адрес пустой!';
 $wb['type_txt'] = 'Тип';
 $wb['limit_mailfilter_txt'] = 'Максимальное число почтовых фильтров достигнуто.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/ru_mail_whitelist.lng b/interface/web/mail/lib/lang/ru_mail_whitelist.lng
index 5a32140a83..0e7a8f95b3 100644
--- a/interface/web/mail/lib/lang/ru_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/ru_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Адрес пустой!';
 $wb['type_txt'] = 'Тип';
 $wb['limit_mailfilter_txt'] = 'Максимальное число почтовых фильтров достигнуто.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/se_mail_blacklist.lng b/interface/web/mail/lib/lang/se_mail_blacklist.lng
index 08b62e1e7c..82dc7e3fdc 100644
--- a/interface/web/mail/lib/lang/se_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/se_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adressfältet är tomt.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Det maximala antalet epostfilter för ditt konto är uppnått.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/se_mail_whitelist.lng b/interface/web/mail/lib/lang/se_mail_whitelist.lng
index 3f78c08817..d312ec9470 100644
--- a/interface/web/mail/lib/lang/se_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/se_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adressen är tom.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Maximala antalet epostfilter för ditt konto är uppnått.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/sk_mail_blacklist.lng b/interface/web/mail/lib/lang/sk_mail_blacklist.lng
index d3b5c0cfe5..277a7bf1ec 100644
--- a/interface/web/mail/lib/lang/sk_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/sk_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adresa je prázdna.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Max. počet e-mailových filtrov pre váš účet je dosiahnutý.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/sk_mail_whitelist.lng b/interface/web/mail/lib/lang/sk_mail_whitelist.lng
index 43ce09e77e..77e44841fd 100644
--- a/interface/web/mail/lib/lang/sk_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/sk_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adresa je prázdna.';
 $wb['type_txt'] = 'Typ';
 $wb['limit_mailfilter_txt'] = 'Max. počet e-mailových filtrov pre váš účet je dosiahnutý.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/tr_mail_blacklist.lng b/interface/web/mail/lib/lang/tr_mail_blacklist.lng
index b59a9b8b42..7712ca086d 100644
--- a/interface/web/mail/lib/lang/tr_mail_blacklist.lng
+++ b/interface/web/mail/lib/lang/tr_mail_blacklist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adres boÅŸ olamaz.';
 $wb['type_txt'] = 'Tür';
 $wb['limit_mailfilter_txt'] = 'Hesabınıza ekleyebileceğiniz en fazla e-posta süzgeci sayısına ulaştınız.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Blacklist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/lib/lang/tr_mail_whitelist.lng b/interface/web/mail/lib/lang/tr_mail_whitelist.lng
index 1667809c3e..8159b11edd 100644
--- a/interface/web/mail/lib/lang/tr_mail_whitelist.lng
+++ b/interface/web/mail/lib/lang/tr_mail_whitelist.lng
@@ -7,3 +7,6 @@ $wb['source_error_notempty'] = 'Adres boÅŸ olamaz.';
 $wb['type_txt'] = 'Tür';
 $wb['limit_mailfilter_txt'] = 'Hesabınıza ekleyebileceğiniz en fazla e-posta süzgeci sayısına ulaştınız.';
 $wb['limit_mail_wblist_txt'] = 'The max. number of email white / blacklist for your account is reached.';
+$wb['mail_access_unique'] = 'Whitelist Address already in use.';
+$wb['client_txt'] = 'Client';
+$wb['sender_txt'] = 'Sender';
diff --git a/interface/web/mail/mail_blacklist_edit.php b/interface/web/mail/mail_blacklist_edit.php
index 3c8acb505d..e1cb2de66b 100644
--- a/interface/web/mail/mail_blacklist_edit.php
+++ b/interface/web/mail/mail_blacklist_edit.php
@@ -117,9 +117,15 @@ class page_action extends tform_actions {
 				unset($tmp);
 			}
 		}
-		
+
 		if(substr($this->dataRecord['source'], 0, 1) === '@') $this->dataRecord['source'] = substr($this->dataRecord['source'], 1);
-		
+
+		$rec = $app->db->queryOneRecord("SELECT access_id from mail_access WHERE server_id = ? AND source = ? and type = ?", $this->dataRecord["server_id"], $this->dataRecord["source"], $this->dataRecord["type"]);
+		if(is_array($rec) && isset($rec['access_id'])) {
+			$app->tform->errorMessage .= $app->tform->wordbook["mail_access_unique"]."<br>";
+		}
+		unset($rec);
+
 		parent::onSubmit();
 	}
 
diff --git a/interface/web/mail/mail_whitelist_edit.php b/interface/web/mail/mail_whitelist_edit.php
index bfabbe64d2..81a5d15274 100644
--- a/interface/web/mail/mail_whitelist_edit.php
+++ b/interface/web/mail/mail_whitelist_edit.php
@@ -118,9 +118,14 @@ class page_action extends tform_actions {
 			}
 		}
 
-
 		if(substr($this->dataRecord['source'], 0, 1) === '@') $this->dataRecord['source'] = substr($this->dataRecord['source'], 1);
 
+		$rec = $app->db->queryOneRecord("SELECT access_id from mail_access WHERE server_id = ? AND source = ? and type = ?", $this->dataRecord["server_id"], $this->dataRecord["source"], $this->dataRecord["type"]);
+		if(is_array($rec) && isset($rec['access_id'])) {
+			$app->tform->errorMessage .= $app->tform->wordbook["mail_access_unique"]."<br>";
+		}
+		unset($rec);
+
 		parent::onSubmit();
 	}
 
-- 
GitLab


From 37c37f749ff10e85b885cfdd90eb88f88f8e5ba5 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 26 Jan 2021 12:21:54 +0100
Subject: [PATCH 255/441] - added acme.sh installation to installer - fixed
 wrong certificate path on acme.sh in installer

---
 install/lib/installer_base.lib.php | 44 +++++++++++++++++++++++++-----
 1 file changed, 37 insertions(+), 7 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 50376e455e..fc60889356 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -43,6 +43,15 @@ class installer_base {
 		global $conf; //TODO: maybe $conf  should be passed to constructor
 	}
 
+	private function install_acme() {
+		$install_cmd = 'wget -O -  https://get.acme.sh | sh';
+		$ret = null;
+		$val = 0;
+		exec($install_cmd . ' 2>&1', $ret, $val);
+
+		return ($val == 0 ? true : false);
+	}
+
 	//: TODO  Implement the translation function and language files for the installer.
 	public function lng($text) {
 		return $text;
@@ -2946,6 +2955,21 @@ class installer_base {
 			$acme = explode("\n", shell_exec('which /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh'));
 			$acme = reset($acme);
 
+			if((!$acme || !is_executable($acme)) && (!$le_client || !is_executable($le_client))) {
+				$success = $this->install_acme();
+				if(!$success) {
+					swriteln('Failed installing acme.sh. Will not be able to issue certificate during install.');
+				} else {
+					$acme = explode("\n", shell_exec('which /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh'));
+					$acme = reset($acme);
+					if($acme && is_executable($acme)) {
+						swriteln('Installed acme.sh and using it for certificate creation during install.');
+					} else {
+						swriteln('Failed installing acme.sh. Will not be able to issue certificate during install.');
+					}
+				}
+			}
+
 			$restore_conf_symlink = false;
 
 			// we only need this for apache, so use fixed conf index
@@ -2976,15 +3000,21 @@ class installer_base {
 			$issued_successfully = false;
 
 			// Backup existing ispserver ssl files
-			if(file_exists($ssl_crt_file) || is_link($ssl_crt_file))
-				rename($ssl_crt_file, $ssl_crt_file.'-temporary.bak');
-			if(file_exists($ssl_key_file) || is_link($ssl_key_file))
-				rename($ssl_key_file, $ssl_key_file.'-temporary.bak');
-			if(file_exists($ssl_pem_file) || is_link($ssl_pem_file))
-				rename($ssl_pem_file, $ssl_pem_file.'-temporary.bak');
+			if(file_exists($ssl_crt_file) || is_link($ssl_crt_file)) {
+				rename($ssl_crt_file, $ssl_crt_file . '-temporary.bak');
+			}
+			if(file_exists($ssl_key_file) || is_link($ssl_key_file)) {
+				rename($ssl_key_file, $ssl_key_file . '-temporary.bak');
+			}
+			if(file_exists($ssl_pem_file) || is_link($ssl_pem_file)) {
+				rename($ssl_pem_file, $ssl_pem_file . '-temporary.bak');
+			}
 
 			// Attempt to use Neilpang acme.sh first, as it is now the preferred LE client
 			if (is_executable($acme)) {
+				$acme_cert_dir = dirname($acme) . '/' . $hostname;
+
+				swriteln('acme.sh is installed, overriding certificate path to use ' . $acme_cert_dir);
 
 				$out = null;
 				$ret = null;
@@ -3082,7 +3112,7 @@ class installer_base {
 							rename($ssl_key_file.'-temporary.bak', $ssl_key_file);
 						if(file_exists($ssl_pem_file.'-temporary.bak') || is_link($ssl_pem_file.'-temporary.bak'))
 							rename($ssl_pem_file.'-temporary.bak', $ssl_pem_file);
-						
+
 					}
 				} else {
 					swriteln('Did not find any valid acme client (acme.sh or certbot)');
-- 
GitLab


From 20a0c4409bda5b135a2532b57403c1cf94ab1668 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 26 Jan 2021 13:23:37 +0100
Subject: [PATCH 256/441] - add default setting for unused spam tag method

---
 server/conf/rspamd_users.inc.conf.master | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server/conf/rspamd_users.inc.conf.master b/server/conf/rspamd_users.inc.conf.master
index 96ba9f0838..85cb19a944 100644
--- a/server/conf/rspamd_users.inc.conf.master
+++ b/server/conf/rspamd_users.inc.conf.master
@@ -38,9 +38,11 @@
 		actions {
 		<tmpl_if name='rspamd_spam_tag_method' op='==' value='rewrite_subject'>
 			"rewrite subject" =  <tmpl_var name='rspamd_spam_tag_level'>;
+			"add header" = null
 		</tmpl_if>
 		<tmpl_if name='rspamd_spam_tag_method' op='==' value='add_header'>
 			"add header" =  <tmpl_var name='rspamd_spam_tag_level'>;
+			"rewrite subject" = null
 		</tmpl_if>
 			reject = <tmpl_var name='rspamd_spam_kill_level'>;
 	<tmpl_if name='greylisting'>
-- 
GitLab


From 733b16868d68c634241f84deccce5b33bc387b2a Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 26 Jan 2021 13:24:44 +0100
Subject: [PATCH 257/441] - missing semicolon

---
 server/conf/rspamd_users.inc.conf.master | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/conf/rspamd_users.inc.conf.master b/server/conf/rspamd_users.inc.conf.master
index 85cb19a944..83dd5b2764 100644
--- a/server/conf/rspamd_users.inc.conf.master
+++ b/server/conf/rspamd_users.inc.conf.master
@@ -38,11 +38,11 @@
 		actions {
 		<tmpl_if name='rspamd_spam_tag_method' op='==' value='rewrite_subject'>
 			"rewrite subject" =  <tmpl_var name='rspamd_spam_tag_level'>;
-			"add header" = null
+			"add header" = null;
 		</tmpl_if>
 		<tmpl_if name='rspamd_spam_tag_method' op='==' value='add_header'>
 			"add header" =  <tmpl_var name='rspamd_spam_tag_level'>;
-			"rewrite subject" = null
+			"rewrite subject" = null;
 		</tmpl_if>
 			reject = <tmpl_var name='rspamd_spam_kill_level'>;
 	<tmpl_if name='greylisting'>
-- 
GitLab


From 99c8771891811dc35ac915866271d4422c94177f Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Thu, 28 Jan 2021 20:16:46 +0100
Subject: [PATCH 258/441] Use password form after resetting password

---
 interface/web/login/password_reset.php  | 1 +
 interface/web/login/templates/index.htm | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/interface/web/login/password_reset.php b/interface/web/login/password_reset.php
index 2e1d5e6aad..db4ad71c22 100644
--- a/interface/web/login/password_reset.php
+++ b/interface/web/login/password_reset.php
@@ -153,6 +153,7 @@ if(isset($_POST['username']) && is_string($_POST['username']) && $_POST['usernam
 
 			if($send_result !== false) {
 				$app->tpl->setVar("msg", $wb['pw_reset']);
+				$app->tpl->setInclude('content_tpl', 'templates/index.htm');
 			} else {
 				$app->tpl->setVar("error", $wb['pw_reset_error_smtp_connection']);
 			}
diff --git a/interface/web/login/templates/index.htm b/interface/web/login/templates/index.htm
index e03e58f1f1..64b1825073 100644
--- a/interface/web/login/templates/index.htm
+++ b/interface/web/login/templates/index.htm
@@ -1,3 +1,6 @@
+					<tmpl_if name="msg">
+					<div class="alert alert-success" role="alert"><tmpl_var name="msg"></div>
+					</tmpl_if>
 					<tmpl_if name="error">
 					<div class="alert alert-danger" role="alert"><tmpl_var name="error"></div>
 					</tmpl_if>
-- 
GitLab


From 31199e18782daf4083bb6877cb7c1dd39f085bcd Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 12 Jan 2021 16:41:09 -0700
Subject: [PATCH 259/441] implement per-domain mail relaying

---
 install/dist/lib/fedora.lib.php               | 56 ++-----------------
 install/dist/lib/gentoo.lib.php               |  3 +
 install/dist/lib/opensuse.lib.php             | 53 ++----------------
 install/lib/installer_base.lib.php            | 56 ++-----------------
 .../sql/incremental/upd_dev_collection.sql    |  4 ++
 install/sql/ispconfig3.sql                    |  3 +
 install/tpl/debian_postfix.conf.master        |  8 ++-
 install/tpl/fedora_postfix.conf.master        |  8 ++-
 install/tpl/gentoo_postfix.conf.master        |  8 ++-
 .../mysql-virtual_sender-relayauth.cf.master  | 10 ++++
 .../mysql-virtual_sender-relayhost.cf.master  | 10 ++++
 install/tpl/opensuse_postfix.conf.master      |  8 ++-
 interface/web/mail/form/mail_domain.tform.php | 24 ++++++++
 .../web/mail/lib/lang/ar_mail_domain.lng      |  6 +-
 .../web/mail/lib/lang/bg_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/br_mail_domain.lng      |  3 +
 .../web/mail/lib/lang/ca_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/cz_mail_domain.lng      |  3 +
 .../web/mail/lib/lang/de_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/dk_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/el_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/en_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/es_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/fi_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/fr_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/hr_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/hu_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/id_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/it_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/ja_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/nl_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/pl_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/pt_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/ro_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/ru_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/se_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/sk_mail_domain.lng      |  4 +-
 .../web/mail/lib/lang/tr_mail_domain.lng      |  4 +-
 interface/web/mail/mail_domain_edit.php       |  7 +++
 .../web/mail/templates/mail_domain_edit.htm   | 18 ++++++
 40 files changed, 198 insertions(+), 178 deletions(-)
 create mode 100644 install/tpl/mysql-virtual_sender-relayauth.cf.master
 create mode 100644 install/tpl/mysql-virtual_sender-relayhost.cf.master

diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index 9620bf3561..fdb6c2e717 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -57,58 +57,12 @@ class installer_dist extends installer_base {
 			$this->error("The postfix configuration directory '$config_dir' does not exist.");
 		}
 
-		//* mysql-virtual_domains.cf
-		$this->process_postfix_config('mysql-virtual_domains.cf');
-
-		//* mysql-virtual_forwardings.cf
-		$this->process_postfix_config('mysql-virtual_forwardings.cf');
-
-		//* mysql-virtual_alias_domains.cf
-		$this->process_postfix_config('mysql-virtual_alias_domains.cf');
-
-		//* mysql-virtual_alias_maps.cf
-		$this->process_postfix_config('mysql-virtual_alias_maps.cf');
-
-		//* mysql-virtual_mailboxes.cf
-		$this->process_postfix_config('mysql-virtual_mailboxes.cf');
-
-		//* mysql-virtual_email2email.cf
-		$this->process_postfix_config('mysql-virtual_email2email.cf');
-
-		//* mysql-virtual_transports.cf
-		$this->process_postfix_config('mysql-virtual_transports.cf');
-
-		//* mysql-virtual_recipient.cf
-		$this->process_postfix_config('mysql-virtual_recipient.cf');
-
-		//* mysql-virtual_sender.cf
-		$this->process_postfix_config('mysql-virtual_sender.cf');
-
-		//* mysql-virtual_sender_login_maps.cf
-		$this->process_postfix_config('mysql-virtual_sender_login_maps.cf');
-
-		//* mysql-virtual_client.cf
-		$this->process_postfix_config('mysql-virtual_client.cf');
-
-		//* mysql-virtual_relaydomains.cf
-		$this->process_postfix_config('mysql-virtual_relaydomains.cf');
-
-		//* mysql-virtual_relayrecipientmaps.cf
-		$this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf');
-
-		//* mysql-virtual_outgoing_bcc.cf
-		$this->process_postfix_config('mysql-virtual_outgoing_bcc.cf');
-
-		//* mysql-virtual_policy_greylist.cf
-		$this->process_postfix_config('mysql-virtual_policy_greylist.cf');
-
-		//* mysql-virtual_gids.cf.master
-		$this->process_postfix_config('mysql-virtual_gids.cf');
-
-		//* mysql-virtual_uids.cf
-		$this->process_postfix_config('mysql-virtual_uids.cf');
+		//* Install virtual mappings
+		foreach (glob('tpl/mysql-virtual_*.master') as $filename) {
+			$this->process_postfix_config( basename($filename, '.master') );
+		}
 
-		//* mysql-virtual_alias_domains.cf
+		//* mysql-verify_recipients.cf
 		$this->process_postfix_config('mysql-verify_recipients.cf');
 
 		//* postfix-dkim
diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index f719fbee38..1bd58e0c38 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -63,6 +63,9 @@ class installer extends installer_base
 			$this->process_postfix_config( basename($filename, '.master') );
 		}
 
+		//* mysql-verify_recipients.cf
+		$this->process_postfix_config('mysql-verify_recipients.cf');
+
 		//* Changing mode and group of the new created config files.
 		caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',
 			__FILE__, __LINE__, 'chmod on mysql-virtual_*.cf*', 'chmod on mysql-virtual_*.cf* failed');
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index b9e3a1c575..7332db1699 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -57,55 +57,12 @@ class installer_dist extends installer_base {
 			$this->error("The postfix configuration directory '$config_dir' does not exist.");
 		}
 
-		//* mysql-virtual_domains.cf
-		$this->process_postfix_config('mysql-virtual_domains.cf');
-
-		//* mysql-virtual_forwardings.cf
-		$this->process_postfix_config('mysql-virtual_forwardings.cf');
-
-		//* mysql-virtual_alias_domains.cf
-		$this->process_postfix_config('mysql-virtual_alias_domains.cf');
-
-		//* mysql-virtual_alias_maps.cf
-		$this->process_postfix_config('mysql-virtual_alias_maps.cf');
-
-		//* mysql-virtual_mailboxes.cf
-		$this->process_postfix_config('mysql-virtual_mailboxes.cf');
-
-		//* mysql-virtual_email2email.cf
-		$this->process_postfix_config('mysql-virtual_email2email.cf');
-
-		//* mysql-virtual_transports.cf
-		$this->process_postfix_config('mysql-virtual_transports.cf');
-
-		//* mysql-virtual_recipient.cf
-		$this->process_postfix_config('mysql-virtual_recipient.cf');
-
-		//* mysql-virtual_sender.cf
-		$this->process_postfix_config('mysql-virtual_sender.cf');
-
-		//* mysql-virtual_sender_login_maps.cf
-		$this->process_postfix_config('mysql-virtual_sender_login_maps.cf');
-
-		//* mysql-virtual_client.cf
-		$this->process_postfix_config('mysql-virtual_client.cf');
-
-		//* mysql-virtual_relaydomains.cf
-		$this->process_postfix_config('mysql-virtual_relaydomains.cf');
-
-		//* mysql-virtual_relayrecipientmaps.cf
-		$this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf');
-
-		//* mysql-virtual_policy_greylist.cf
-		$this->process_postfix_config('mysql-virtual_policy_greylist.cf');
-
-		//* mysql-virtual_gids.cf.master
-		$this->process_postfix_config('mysql-virtual_gids.cf');
-
-		//* mysql-virtual_uids.cf
-		$this->process_postfix_config('mysql-virtual_uids.cf');
+		//* Install virtual mappings
+		foreach (glob('tpl/mysql-virtual_*.master') as $filename) {
+			$this->process_postfix_config( basename($filename, '.master') );
+		}
 
-		//* mysql-virtual_alias_domains.cf
+		//* mysql-verify_recipients.cf
 		$this->process_postfix_config('mysql-verify_recipients.cf');
 
 		//* postfix-dkim
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 688fd32a83..16fe665fca 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1060,58 +1060,12 @@ class installer_base {
 		$postfix_version = preg_replace('/.*=\s*/', '', $out[0]);
 		unset($out);
 
-		//* mysql-virtual_domains.cf
-		$this->process_postfix_config('mysql-virtual_domains.cf');
-
-		//* mysql-virtual_forwardings.cf
-		$this->process_postfix_config('mysql-virtual_forwardings.cf');
-
-		//* mysql-virtual_alias_domains.cf
-		$this->process_postfix_config('mysql-virtual_alias_domains.cf');
-
-		//* mysql-virtual_alias_maps.cf
-		$this->process_postfix_config('mysql-virtual_alias_maps.cf');
-
-		//* mysql-virtual_mailboxes.cf
-		$this->process_postfix_config('mysql-virtual_mailboxes.cf');
-
-		//* mysql-virtual_email2email.cf
-		$this->process_postfix_config('mysql-virtual_email2email.cf');
-
-		//* mysql-virtual_transports.cf
-		$this->process_postfix_config('mysql-virtual_transports.cf');
-
-		//* mysql-virtual_recipient.cf
-		$this->process_postfix_config('mysql-virtual_recipient.cf');
-
-		//* mysql-virtual_sender.cf
-		$this->process_postfix_config('mysql-virtual_sender.cf');
-
-		//* mysql-virtual_sender_login_maps.cf
-		$this->process_postfix_config('mysql-virtual_sender_login_maps.cf');
-
-		//* mysql-virtual_client.cf
-		$this->process_postfix_config('mysql-virtual_client.cf');
-
-		//* mysql-virtual_relaydomains.cf
-		$this->process_postfix_config('mysql-virtual_relaydomains.cf');
-
-		//* mysql-virtual_relayrecipientmaps.cf
-		$this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf');
-
-		//* mysql-virtual_outgoing_bcc.cf
-		$this->process_postfix_config('mysql-virtual_outgoing_bcc.cf');
-
-		//* mysql-virtual_policy_greylist.cf
-		$this->process_postfix_config('mysql-virtual_policy_greylist.cf');
-
-		//* mysql-virtual_gids.cf.master
-		$this->process_postfix_config('mysql-virtual_gids.cf');
-
-		//* mysql-virtual_uids.cf
-		$this->process_postfix_config('mysql-virtual_uids.cf');
+		//* Install virtual mappings
+		foreach (glob('tpl/mysql-virtual_*.master') as $filename) {
+			$this->process_postfix_config( basename($filename, '.master') );
+		}
 
-		//* mysql-virtual_alias_domains.cf
+		//* mysql-verify_recipients.cf
 		$this->process_postfix_config('mysql-verify_recipients.cf');
 
 		// test if lmtp if available
diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 90f8139c60..02a588cc88 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -7,3 +7,7 @@ ALTER TABLE mail_access DROP CONSTRAINT `server_id`;
 SET SESSION old_alter_table=1;
 ALTER IGNORE TABLE mail_access ADD UNIQUE KEY `unique_source` (`server_id`,`source`,`type`);
 SET SESSION old_alter_table=0;
+
+ALTER TABLE mail_domain ADD COLUMN `relay_host` varchar(255) NOT NULL default '' AFTER `dkim_public`,
+  ADD COLUMN `relay_user` varchar(255) NOT NULL default '' AFTER `relay_host`,
+  ADD COLUMN `relay_pass` varchar(255) NOT NULL default '' AFTER `relay_user`;
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index baeb079219..587df55382 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -884,6 +884,9 @@ CREATE TABLE `mail_domain` (
   `dkim_selector` varchar(63) NOT NULL DEFAULT 'default',
   `dkim_private` mediumtext NULL,
   `dkim_public` mediumtext NULL,
+  `relay_host` varchar(255) NOT NULL DEFAULT '',
+  `relay_user` varchar(255) NOT NULL DEFAULT '',
+  `relay_pass` varchar(255) NOT NULL DEFAULT '',
   `active` enum('n','y') NOT NULL DEFAULT 'n',
   PRIMARY KEY  (`domain_id`),
   KEY `server_id` (`server_id`,`domain`),
diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master
index 24b1e154cf..42bb3f1510 100644
--- a/install/tpl/debian_postfix.conf.master
+++ b/install/tpl/debian_postfix.conf.master
@@ -24,7 +24,7 @@ transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{conf
 relay_domains = proxy:mysql:{config_dir}/mysql-virtual_relaydomains.cf
 relay_recipient_maps = proxy:mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf
 smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf
-proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
+proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions $smtp_sasl_password_maps $sender_dependent_relayhost_maps
 smtpd_helo_required = yes
 smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions = check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf, {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
@@ -53,3 +53,9 @@ tls_preempt_cipherlist = yes
 address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
+sender_dependent_relayhost_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayhost.cf
+smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, hash:{config_dir}/sasl_passwd
+smtp_sender_dependent_authentication = yes
+smtp_sasl_auth_enable = yes
+smtp_sasl_security_options = noanonymous, noplaintext
+smtp_sasl_tls_security_options = noanonymous
diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master
index 04690bff70..dd232b6d6d 100644
--- a/install/tpl/fedora_postfix.conf.master
+++ b/install/tpl/fedora_postfix.conf.master
@@ -20,7 +20,7 @@ transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{conf
 relay_domains = proxy:mysql:{config_dir}/mysql-virtual_relaydomains.cf
 relay_recipient_maps = proxy:mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf
 smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf
-proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
+proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions $smtp_sasl_password_maps $sender_dependent_relayhost_maps
 smtpd_helo_required = yes
 smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions = check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf, {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
@@ -49,3 +49,9 @@ tls_preempt_cipherlist = yes
 address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
+sender_dependent_relayhost_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayhost.cf
+smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, hash:{config_dir}/sasl_passwd
+smtp_sender_dependent_authentication = yes
+smtp_sasl_auth_enable = yes
+smtp_sasl_security_options = noanonymous, noplaintext
+smtp_sasl_tls_security_options = noanonymous
diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master
index 7ee0c83568..7c337bbb5d 100644
--- a/install/tpl/gentoo_postfix.conf.master
+++ b/install/tpl/gentoo_postfix.conf.master
@@ -19,7 +19,7 @@ transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{conf
 relay_domains = proxy:mysql:{config_dir}/mysql-virtual_relaydomains.cf
 relay_recipient_maps = proxy:mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf
 smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf
-proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
+proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions $smtp_sasl_password_maps $sender_dependent_relayhost_maps
 smtpd_helo_required = yes
 smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions = check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf, {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
@@ -48,3 +48,9 @@ tls_preempt_cipherlist = yes
 address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
+sender_dependent_relayhost_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayhost.cf
+smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, hash:{config_dir}/sasl_passwd
+smtp_sender_dependent_authentication = yes
+smtp_sasl_auth_enable = yes
+smtp_sasl_security_options = noanonymous, noplaintext
+smtp_sasl_tls_security_options = noanonymous
diff --git a/install/tpl/mysql-virtual_sender-relayauth.cf.master b/install/tpl/mysql-virtual_sender-relayauth.cf.master
new file mode 100644
index 0000000000..413607c763
--- /dev/null
+++ b/install/tpl/mysql-virtual_sender-relayauth.cf.master
@@ -0,0 +1,10 @@
+user = {mysql_server_ispconfig_user}
+password = {mysql_server_ispconfig_password}
+dbname = {mysql_server_database}
+hosts = {mysql_server_ip}
+query = SELECT CONCAT(relay_user,':',relay_pass) as credential
+  FROM mail_domain
+  WHERE domain = '%d'
+  AND active = 'y'
+  AND concat(relay_host,relay_user,relay_pass) != ''
+  AND server_id = {server_id}
diff --git a/install/tpl/mysql-virtual_sender-relayhost.cf.master b/install/tpl/mysql-virtual_sender-relayhost.cf.master
new file mode 100644
index 0000000000..3bb4c81330
--- /dev/null
+++ b/install/tpl/mysql-virtual_sender-relayhost.cf.master
@@ -0,0 +1,10 @@
+user = {mysql_server_ispconfig_user}
+password = {mysql_server_ispconfig_password}
+dbname = {mysql_server_database}
+hosts = {mysql_server_ip}
+query = SELECT relay_host as relayhost
+  FROM mail_domain
+  WHERE domain = '%d'
+  AND active = 'y'
+  AND concat(relay_host,relay_user,relay_pass) != ''
+  AND server_id = {server_id}
diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master
index 8ee01580be..c7c282ca14 100644
--- a/install/tpl/opensuse_postfix.conf.master
+++ b/install/tpl/opensuse_postfix.conf.master
@@ -22,7 +22,7 @@ transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{conf
 relay_domains = proxy:mysql:{config_dir}/mysql-virtual_relaydomains.cf
 relay_recipient_maps = proxy:mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf
 smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf
-proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
+proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions $smtp_sasl_password_maps $sender_dependent_relayhost_maps
 smtpd_helo_required = yes
 smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
 smtpd_sender_restrictions = check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf, {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
@@ -51,3 +51,9 @@ tls_preempt_cipherlist = yes
 address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
+sender_dependent_relayhost_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayhost.cf
+smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, hash:{config_dir}/sasl_passwd
+smtp_sender_dependent_authentication = yes
+smtp_sasl_auth_enable = yes
+smtp_sasl_security_options = noanonymous, noplaintext
+smtp_sasl_tls_security_options = noanonymous
diff --git a/interface/web/mail/form/mail_domain.tform.php b/interface/web/mail/form/mail_domain.tform.php
index 5c8fa0185a..6e768193e0 100644
--- a/interface/web/mail/form/mail_domain.tform.php
+++ b/interface/web/mail/form/mail_domain.tform.php
@@ -136,6 +136,30 @@ $form["tabs"]['domain'] = array (
 					'errmsg'=> 'dkim_selector_error'),
 			),
 		),
+		'relay_host' => array(
+				'datatype' => 'VARCHAR',
+				'formtype' => 'TEXT',
+				'default' => '',
+				'value' => '',
+				'width' => '40',
+				'maxlength' => '255'
+		),
+		'relay_user' => array(
+				'datatype' => 'VARCHAR',
+				'formtype' => 'TEXT',
+				'default' => '',
+				'value' => '',
+				'width' => '40',
+				'maxlength' => '255'
+		),
+		'relay_pass' => array(
+				'datatype' => 'VARCHAR',
+				'formtype' => 'TEXT',
+				'default' => '',
+				'value' => '',
+				'width' => '40',
+				'maxlength' => '255'
+		),
 		'active' => array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
diff --git a/interface/web/mail/lib/lang/ar_mail_domain.lng b/interface/web/mail/lib/lang/ar_mail_domain.lng
index 4d99d0fb5e..e53c5d9ec2 100644
--- a/interface/web/mail/lib/lang/ar_mail_domain.lng
+++ b/interface/web/mail/lib/lang/ar_mail_domain.lng
@@ -19,5 +19,7 @@ $wb['dkim_private_key_error'] = 'Invalid DKIM-Private key';
 $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
-$wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this accounte';
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/bg_mail_domain.lng b/interface/web/mail/lib/lang/bg_mail_domain.lng
index 6e30a26494..f2d329a62e 100644
--- a/interface/web/mail/lib/lang/bg_mail_domain.lng
+++ b/interface/web/mail/lib/lang/bg_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['policy_txt'] = 'Спамфилтър';
 $wb['no_policy'] = '- не е разрешен -';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/br_mail_domain.lng b/interface/web/mail/lib/lang/br_mail_domain.lng
index 8cf2cdce65..7371f51894 100644
--- a/interface/web/mail/lib/lang/br_mail_domain.lng
+++ b/interface/web/mail/lib/lang/br_mail_domain.lng
@@ -20,3 +20,6 @@ $wb['no_policy'] = '-desabilitado-';
 $wb['error_not_allowed_server_id'] = 'O servidor selecionado não é permitido para esta conta.';
 $wb['dkim_selector_txt'] = 'Seletor DKIM';
 $wb['dkim_selector_error'] = 'Seletor DKIM é inválido. Utilize apenas caracteres alfanuméricos em minúsculas (a-z ou 0-9) e no máximo 63 caracteres.';
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/ca_mail_domain.lng b/interface/web/mail/lib/lang/ca_mail_domain.lng
index 65d664cf3a..0b701a16c3 100644
--- a/interface/web/mail/lib/lang/ca_mail_domain.lng
+++ b/interface/web/mail/lib/lang/ca_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
 $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/cz_mail_domain.lng b/interface/web/mail/lib/lang/cz_mail_domain.lng
index 2d1adc0343..0c648a68f3 100644
--- a/interface/web/mail/lib/lang/cz_mail_domain.lng
+++ b/interface/web/mail/lib/lang/cz_mail_domain.lng
@@ -20,3 +20,6 @@ $wb['dkim_selector_error'] = 'Neplatný DKIM selektor. Používejte pouze malá
 $wb['policy_txt'] = 'Spamový filtr';
 $wb['no_policy'] = '- nepovoleno -';
 $wb['error_not_allowed_server_id'] = 'Zvolený server není povolen pro tento účet.';
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/de_mail_domain.lng b/interface/web/mail/lib/lang/de_mail_domain.lng
index 13aac42c79..1a64a44231 100644
--- a/interface/web/mail/lib/lang/de_mail_domain.lng
+++ b/interface/web/mail/lib/lang/de_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Ungültiger DKIM-Selector.  Verwenden Sie nur max. 63 alphanumerische Zeichen (a-z oder 0-9)';
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/dk_mail_domain.lng b/interface/web/mail/lib/lang/dk_mail_domain.lng
index f37b81d65e..fcced58e1a 100644
--- a/interface/web/mail/lib/lang/dk_mail_domain.lng
+++ b/interface/web/mail/lib/lang/dk_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
 $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/el_mail_domain.lng b/interface/web/mail/lib/lang/el_mail_domain.lng
index 3973746dfd..3909576a3c 100644
--- a/interface/web/mail/lib/lang/el_mail_domain.lng
+++ b/interface/web/mail/lib/lang/el_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/en_mail_domain.lng b/interface/web/mail/lib/lang/en_mail_domain.lng
index 0190c0ab06..39e22f75b6 100644
--- a/interface/web/mail/lib/lang/en_mail_domain.lng
+++ b/interface/web/mail/lib/lang/en_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['no_policy'] = '- not enabled -';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
 $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/es_mail_domain.lng b/interface/web/mail/lib/lang/es_mail_domain.lng
index 36c5ae5763..bd23b94191 100644
--- a/interface/web/mail/lib/lang/es_mail_domain.lng
+++ b/interface/web/mail/lib/lang/es_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['no_policy'] = '- no habilitado -';
 $wb['policy_txt'] = 'Filtro de spam';
 $wb['server_id_txt'] = 'Servidor';
 $wb['type_txt'] = 'Tipo';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/fi_mail_domain.lng b/interface/web/mail/lib/lang/fi_mail_domain.lng
index 088c768091..d77fe32500 100644
--- a/interface/web/mail/lib/lang/fi_mail_domain.lng
+++ b/interface/web/mail/lib/lang/fi_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/fr_mail_domain.lng b/interface/web/mail/lib/lang/fr_mail_domain.lng
index eebbdc02b1..56efb88aae 100644
--- a/interface/web/mail/lib/lang/fr_mail_domain.lng
+++ b/interface/web/mail/lib/lang/fr_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
 $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/hr_mail_domain.lng b/interface/web/mail/lib/lang/hr_mail_domain.lng
index eb91862b31..2f53c694c8 100644
--- a/interface/web/mail/lib/lang/hr_mail_domain.lng
+++ b/interface/web/mail/lib/lang/hr_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/hu_mail_domain.lng b/interface/web/mail/lib/lang/hu_mail_domain.lng
index 431beb8a01..96a5dc03a5 100644
--- a/interface/web/mail/lib/lang/hu_mail_domain.lng
+++ b/interface/web/mail/lib/lang/hu_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/id_mail_domain.lng b/interface/web/mail/lib/lang/id_mail_domain.lng
index c13968dde8..2979773e8c 100644
--- a/interface/web/mail/lib/lang/id_mail_domain.lng
+++ b/interface/web/mail/lib/lang/id_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/it_mail_domain.lng b/interface/web/mail/lib/lang/it_mail_domain.lng
index 46089adb90..88e2c146df 100644
--- a/interface/web/mail/lib/lang/it_mail_domain.lng
+++ b/interface/web/mail/lib/lang/it_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
 $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/ja_mail_domain.lng b/interface/web/mail/lib/lang/ja_mail_domain.lng
index 787937668c..a96faaa367 100644
--- a/interface/web/mail/lib/lang/ja_mail_domain.lng
+++ b/interface/web/mail/lib/lang/ja_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['no_policy'] = '使わない';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
 $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/nl_mail_domain.lng b/interface/web/mail/lib/lang/nl_mail_domain.lng
index c4fe53c718..0e8a912a71 100644
--- a/interface/web/mail/lib/lang/nl_mail_domain.lng
+++ b/interface/web/mail/lib/lang/nl_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/pl_mail_domain.lng b/interface/web/mail/lib/lang/pl_mail_domain.lng
index e4483a0d64..7ff3c297ff 100644
--- a/interface/web/mail/lib/lang/pl_mail_domain.lng
+++ b/interface/web/mail/lib/lang/pl_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/pt_mail_domain.lng b/interface/web/mail/lib/lang/pt_mail_domain.lng
index 224a38a2e1..092f83f1ca 100644
--- a/interface/web/mail/lib/lang/pt_mail_domain.lng
+++ b/interface/web/mail/lib/lang/pt_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/ro_mail_domain.lng b/interface/web/mail/lib/lang/ro_mail_domain.lng
index ede56e351e..e0543f36ec 100644
--- a/interface/web/mail/lib/lang/ro_mail_domain.lng
+++ b/interface/web/mail/lib/lang/ro_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_selector_txt'] = 'DKIM-Selector';
 $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars';
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/ru_mail_domain.lng b/interface/web/mail/lib/lang/ru_mail_domain.lng
index adc1ac74cb..7567e3c670 100644
--- a/interface/web/mail/lib/lang/ru_mail_domain.lng
+++ b/interface/web/mail/lib/lang/ru_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['dkim_selector_txt'] = 'DKIM-селектор';
 $wb['dkim_selector_error'] = 'Некорректный DKIM-селектор. Используйте только строчные буквенно-цифровые символы (a-z или 0-9) до 63 символов';
 $wb['error_not_allowed_server_id'] = 'Выбранный сервер не доступен для этой учетной записи.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/se_mail_domain.lng b/interface/web/mail/lib/lang/se_mail_domain.lng
index fcd87813ba..7f192224e6 100644
--- a/interface/web/mail/lib/lang/se_mail_domain.lng
+++ b/interface/web/mail/lib/lang/se_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanu
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['no_policy'] = '- ej aktiverat -';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/sk_mail_domain.lng b/interface/web/mail/lib/lang/sk_mail_domain.lng
index dfe8ce8899..ed67d20044 100644
--- a/interface/web/mail/lib/lang/sk_mail_domain.lng
+++ b/interface/web/mail/lib/lang/sk_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['no_policy'] = '- Nie je aktivovaný -';
 $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.';
 $wb['dkim_selector_txt'] = 'DKIM-Selector';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/lib/lang/tr_mail_domain.lng b/interface/web/mail/lib/lang/tr_mail_domain.lng
index 3e7d9cc412..802fdcf94b 100644
--- a/interface/web/mail/lib/lang/tr_mail_domain.lng
+++ b/interface/web/mail/lib/lang/tr_mail_domain.lng
@@ -20,4 +20,6 @@ $wb['dkim_settings_txt'] = 'DomainKeys Tanımlı E-posta (DKIM)';
 $wb['error_not_allowed_server_id'] = 'Seçilmiş sunucuda bu hesap kullanılamaz.';
 $wb['dkim_selector_txt'] = 'DKIM Seçici';
 $wb['dkim_selector_error'] = 'DKIM seçici geçersiz. En fazla 63 karakter uzunluğunda, yalnız küçük İngilizce harf ve rakamları kullanın (a-z ya da 0-9)';
-?>
+$wb['relayhost_txt'] = 'Relayhost';
+$wb['relayhost_user_txt'] = 'Relayhost User';
+$wb['relayhost_password_txt'] = 'Relayhost Password';
diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index 7409bf0c7c..3ea60c08f9 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -215,6 +215,13 @@ class page_action extends tform_actions {
 			$app->tpl->setVar("edit_disabled", 0);
 		}
 
+		// load relayhost-values
+		$sql = "SELECT relay_host, relay_user, relay_pass FROM mail_domain WHERE domain_id = ?";
+		$rec = $app->db->queryOneRecord($sql, $app->functions->intval($_GET['id']));
+		$app->tpl->setVar('relay_host', $rec['relay_host'], true);
+		$app->tpl->setVar('relay_user', $rec['relay_user'], true);
+		$app->tpl->setVar('relay_pass', $rec['relay_pass'], true);
+
 		// load dkim-values
 		$sql = "SELECT domain, dkim_private, dkim_public, dkim_selector FROM mail_domain WHERE domain_id = ?";
 		$rec = $app->db->queryOneRecord($sql, $app->functions->intval($_GET['id']));
diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm
index cb462c9819..676e55f9dc 100644
--- a/interface/web/mail/templates/mail_domain_edit.htm
+++ b/interface/web/mail/templates/mail_domain_edit.htm
@@ -75,6 +75,24 @@
                     {tmpl_var name='policy'}
                 </select></div>
             </div>
+            <div class="form-group">
+                <label for="relay_host" class="col-sm-3 control-label">{tmpl_var name='relayhost_txt'}</label>
+                <div class="col-sm-9">
+                    <input type="text" name="relay_host" id="relay_host" value="{tmpl_var name='relay_host'}" class="form-control" />
+                </div>
+            </div>
+            <div class="form-group">
+                <label for="relay_user" class="col-sm-3 control-label">{tmpl_var name='relayhost_user_txt'}</label>
+                <div class="col-sm-9">
+                    <input type="text" name="relay_user" id="relay_user" value="{tmpl_var name='relay_user'}" class="form-control" />
+                </div>
+            </div>
+            <div class="form-group">
+                <label for="relay_pass" class="col-sm-3 control-label">{tmpl_var name='relayhost_password_txt'}</label>
+                <div class="col-sm-9">
+                    <input type="text" name="relay_pass" id="relay_pass" value="{tmpl_var name='relay_pass'}" class="form-control" />
+                </div>
+            </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
                 <div class="col-sm-9">
-- 
GitLab


From 83246e6892f216319567960d7a40969a088b5f92 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 29 Jan 2021 09:29:17 -0700
Subject: [PATCH 260/441] set umask before calling acme.sh

---
 install/lib/installer_base.lib.php     | 6 ++++++
 server/lib/classes/letsencrypt.inc.php | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 688fd32a83..dabbfd6d79 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -3023,6 +3023,9 @@ class installer_base {
 
 				swriteln('acme.sh is installed, overriding certificate path to use ' . $acme_cert_dir);
 
+				# acme.sh does not set umask, resulting in incorrect permissions (ispconfig issue #6015)
+				$old_umask = umask(0022);
+
 				$out = null;
 				$ret = null;
 				if($conf['nginx']['installed'] == true || $conf['apache']['installed'] == true) {
@@ -3044,6 +3047,7 @@ class installer_base {
 					$acme_chain = "--fullchain-file " . escapeshellarg($ssl_crt_file);
 					exec("$acme --install-cert -d " . escapeshellarg($hostname) . " $acme_key $acme_chain");
 					$issued_successfully = true;
+					umask($old_umask);
 
 					// Make temporary backup of self-signed certs permanent
 					if(file_exists($ssl_crt_file.'-temporary.bak') || is_link($ssl_crt_file.'-temporary.bak'))
@@ -3056,6 +3060,8 @@ class installer_base {
 				} else {
 					swriteln('Issuing certificate via acme.sh failed. Please check that your hostname can be verified by letsencrypt');
 
+					umask($old_umask);
+
 					// Restore temporary backup of self-signed certs
 					if(file_exists($ssl_crt_file.'-temporary.bak') || is_link($ssl_crt_file.'-temporary.bak'))
 						rename($ssl_crt_file.'-temporary.bak', $ssl_crt_file);
diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php
index a118d55769..17bc37826c 100644
--- a/server/lib/classes/letsencrypt.inc.php
+++ b/server/lib/classes/letsencrypt.inc.php
@@ -399,11 +399,13 @@ class letsencrypt {
 		$this->certbot_use_certcommand = false;
 		$letsencrypt_cmd = '';
 		$allow_return_codes = null;
+		$old_umask = umask(0022);  # work around acme.sh permission bug, see #6015
 		if($use_acme) {
 			$letsencrypt_cmd = $this->get_acme_command($temp_domains, $key_file, $bundle_file, $crt_file, $server_type);
 			$allow_return_codes = array(2);
 		} else {
 			$letsencrypt_cmd = $this->get_certbot_command($temp_domains);
+			umask($old_umask);
 		}
 
 		$success = false;
@@ -420,6 +422,7 @@ class letsencrypt {
 		}
 
 		if($use_acme === true) {
+			umask($old_umask);
 			if(!$success) {
 				$app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN);
 				$app->log($letsencrypt_cmd, LOGLEVEL_WARN);
-- 
GitLab


From 12fe2f6a39b46ec7bab55f5b4a03c6e1ec550055 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 29 Jan 2021 09:51:13 -0700
Subject: [PATCH 261/441] set use_acme flag after install

---
 server/lib/classes/letsencrypt.inc.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php
index 17bc37826c..880aa06a21 100644
--- a/server/lib/classes/letsencrypt.inc.php
+++ b/server/lib/classes/letsencrypt.inc.php
@@ -319,6 +319,9 @@ class letsencrypt {
 		} elseif(!$this->get_certbot_script()) {
 			// acme and le missing
 			$this->install_acme();
+			if($this->get_acme_script()) {
+				$use_acme = true;
+			}
 		}
 
 		$tmp = $app->letsencrypt->get_website_certificate_paths($data);
-- 
GitLab


From 76647e89177058d4dfb003822c23695915768444 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 29 Jan 2021 09:58:29 -0700
Subject: [PATCH 262/441] report error if no Let's Encrypt client

---
 server/lib/classes/letsencrypt.inc.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php
index 880aa06a21..a2e6a5c380 100644
--- a/server/lib/classes/letsencrypt.inc.php
+++ b/server/lib/classes/letsencrypt.inc.php
@@ -317,10 +317,14 @@ class letsencrypt {
 		if($this->get_acme_script()) {
 			$use_acme = true;
 		} elseif(!$this->get_certbot_script()) {
+			$app->log("Unable to find Let's Encrypt client, installing acme.sh.", LOGLEVEL_DEBUG);
 			// acme and le missing
 			$this->install_acme();
 			if($this->get_acme_script()) {
 				$use_acme = true;
+			} else {
+				$app->log("Unable to install acme.sh.  Cannot proceed, no Let's Encrypt client found.", LOGLEVEL_WARN);
+				return false;
 			}
 		}
 
-- 
GitLab


From 194edf99c9baad556f111ea8475951496e0c4c38 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Sun, 31 Jan 2021 21:41:10 +0100
Subject: [PATCH 263/441] Use standard_index.html as filename for the template
 index file (#5897)

---
 install/tpl/apache_ispconfig.conf.master        |  1 +
 server/conf/nginx_vhost.conf.master             |  2 +-
 server/plugins-available/apache2_plugin.inc.php | 16 ++++++++--------
 server/plugins-available/nginx_plugin.inc.php   | 16 +++++++++-------
 4 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master
index b1de2a1676..2a7ac0662e 100644
--- a/install/tpl/apache_ispconfig.conf.master
+++ b/install/tpl/apache_ispconfig.conf.master
@@ -3,6 +3,7 @@
 ################################################
 ServerTokens ProductOnly
 ServerSignature Off
+DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm standard_index.html
 
 ################################################
 # ISPConfig Logfile configuration for vlogger
diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index f2b3e0f833..a3b14a58fa 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -79,7 +79,7 @@ server {
 </tmpl_if>
 </tmpl_loop>
 <tmpl_if name='use_proxy' op='!=' value='y'>
-        index index.html index.htm index.php index.cgi index.pl index.xhtml;
+        index index.html index.htm index.php index.cgi index.pl index.xhtml standard_index.html;
 
 <tmpl_if name='ssi' op='==' value='y'>
         location ~ \.shtml$ {
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 26cd14fd36..45594da5f1 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -953,11 +953,11 @@ class apache2_plugin {
 				$app->system->exec_safe('chmod -R a+r ?', $error_page_path);
 			}
 
-			//* Copy the web skeleton files only when there is no index.ph or index.html file yet
-			if(!file_exists($data['new']['document_root'].'/'.$web_folder.'/index.html') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/index.php')) {
+			//* Copy the web skeleton files only when there is no index.php, standard_index.html or index.html file yet
+			if(!file_exists($data['new']['document_root'].'/'.$web_folder.'/index.html') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/index.php') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/standard_index.html')) {
 				if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html_'.substr($conf['language'], 0, 2))) {
-					if(!file_exists($data['new']['document_root'] . '/' . $web_folder . '/index.html')) {
-						$app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html_' . substr($conf['language'], 0, 2), $data['new']['document_root'] . '/' . $web_folder . '/index.html');
+					if(!file_exists($data['new']['document_root'] . '/' . $web_folder . '/standard_index.html')) {
+						$app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html_' . substr($conf['language'], 0, 2), $data['new']['document_root'] . '/' . $web_folder . '/standard_index.html');
 					}
 
 					if(is_file($conf['rootpath'] . '/conf-custom/index/favicon.ico')) {
@@ -968,13 +968,13 @@ class apache2_plugin {
 					}
 				} else {
 					if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html')) {
-						if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html', $data['new']['document_root'].'/' . $web_folder . '/index.html');
+						if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/standard_index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html', $data['new']['document_root'].'/' . $web_folder . '/standard_index.html');
 					} else {
-						if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/standard_index.html_'.substr($conf['language'], 0, 2), $data['new']['document_root'].'/' . $web_folder . '/index.html');
-						if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')){
+						if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/standard_index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/standard_index.html_'.substr($conf['language'], 0, 2), $data['new']['document_root'].'/' . $web_folder . '/standard_index.html');
+						if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')) {
 							if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/favicon.ico')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/favicon.ico', $data['new']['document_root'].'/' . $web_folder . '/');
 						}
-						if(is_file($conf['rootpath'] . '/conf/index/robots.txt')){
+						if(is_file($conf['rootpath'] . '/conf/index/robots.txt')) {
 							if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/robots.txt')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/robots.txt', $data['new']['document_root'].'/' . $web_folder . '/');
 						}
 					}
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 73e788ed43..62a618ce7f 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -791,10 +791,12 @@ class nginx_plugin {
 				$app->system->exec_safe('chmod -R a+r ?', $error_page_path);
 			}
 
-			//* Copy the web skeleton files only when there is no index.ph or index.html file yet
-			if(!file_exists($data['new']['document_root'].'/'.$web_folder.'/index.html') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/index.php')) {
+			//* Copy the web skeleton files only when there is no index.php, standard_index.html or index.html file yet
+			if(!file_exists($data['new']['document_root'].'/'.$web_folder.'/index.html') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/index.php') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/standard_index.html')) {
 				if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html_'.substr($conf['language'], 0, 2))) {
-					if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html_'.substr($conf['language'], 0, 2), $data['new']['document_root'].'/' . $web_folder . '/index.html');
+					if(!file_exists($data['new']['document_root'] . '/' . $web_folder . '/standard_index.html')) {
+						$app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html_' . substr($conf['language'], 0, 2), $data['new']['document_root'] . '/' . $web_folder . '/standard_index.html');
+					}
 
 					if(is_file($conf['rootpath'] . '/conf-custom/index/favicon.ico')) {
 						if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/favicon.ico')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/favicon.ico', $data['new']['document_root'].'/' . $web_folder . '/');
@@ -804,13 +806,13 @@ class nginx_plugin {
 					}
 				} else {
 					if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html')) {
-						if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html', $data['new']['document_root'].'/' . $web_folder . '/index.html');
+						if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/standard_index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html', $data['new']['document_root'].'/' . $web_folder . '/standard_index.html');
 					} else {
-						if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/standard_index.html_'.substr($conf['language'], 0, 2), $data['new']['document_root'].'/' . $web_folder . '/index.html');
-						if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')){
+						if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/standard_index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/standard_index.html_'.substr($conf['language'], 0, 2), $data['new']['document_root'].'/' . $web_folder . '/standard_index.html');
+						if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')) {
 							if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/favicon.ico')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/favicon.ico', $data['new']['document_root'].'/' . $web_folder . '/');
 						}
-						if(is_file($conf['rootpath'] . '/conf/index/robots.txt')){
+						if(is_file($conf['rootpath'] . '/conf/index/robots.txt')) {
 							if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/robots.txt')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/robots.txt', $data['new']['document_root'].'/' . $web_folder . '/');
 						}
 					}
-- 
GitLab


From 41d5645e72e04fa0357d119af6aef411afbfa96b Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Mon, 1 Feb 2021 14:36:34 +0100
Subject: [PATCH 264/441] Disable per_user learning for bayes rspamd

---
 install/tpl/rspamd_classifier-bayes.conf.master | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/tpl/rspamd_classifier-bayes.conf.master b/install/tpl/rspamd_classifier-bayes.conf.master
index 1688d57e21..dcda4a6391 100644
--- a/install/tpl/rspamd_classifier-bayes.conf.master
+++ b/install/tpl/rspamd_classifier-bayes.conf.master
@@ -1,3 +1,3 @@
 autolearn = [-0.01, 5.00];
-per_user = true;
-per_language = true;
\ No newline at end of file
+per_user = false;
+per_language = true;
-- 
GitLab


From fa0db0b9deeda3a9fae328e2ba50490bd7aee5f1 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 2 Feb 2021 08:45:23 -0700
Subject: [PATCH 265/441] jailkit: remove extraneous + chars in jk_init.ini

---
 install/tpl/jk_init.ini.master | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/tpl/jk_init.ini.master b/install/tpl/jk_init.ini.master
index b84aab95b6..9f34d5090d 100644
--- a/install/tpl/jk_init.ini.master
+++ b/install/tpl/jk_init.ini.master
@@ -149,8 +149,8 @@ paths_w_setuid = /bin/ping
 #paths = /usr/bin/X11/xterm, /usr/share/terminfo, /etc/terminfo
 #devices = /dev/pts/0, /dev/pts/1, /dev/pts/2, /dev/pts/3, /dev/pts/4, /dev/ptyb4, /dev/ptya4, /dev/tty, /dev/tty0, /dev/tty4
 
-+# coreutils from:
-+# (echo -ne '\n[coreutils]\ncomment = non-sbin progs from coreutils\npaths = '; dpkg --listfiles coreutils | grep -E '^/bin/|/usr/bin/' | xargs -n1 -i@ echo -n "@, " | sed -e 's/, *$/\n/g' -e 's|/usr/bin/||g' -e 's|/bin/||g') >> /etc/jailkit/jk_init.ini
+# coreutils from:
+# (echo -ne '\n[coreutils]\ncomment = non-sbin progs from coreutils\npaths = '; dpkg --listfiles coreutils | grep -E '^/bin/|/usr/bin/' | xargs -n1 -i@ echo -n "@, " | sed -e 's/, *$/\n/g' -e 's|/usr/bin/||g' -e 's|/bin/||g') >> /etc/jailkit/jk_init.ini
 
 [coreutils]
 comment = non-sbin progs from coreutils
-- 
GitLab


From f0203e44f6b10c85e89d335f05c374dbbd74413d Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 2 Feb 2021 08:45:45 -0700
Subject: [PATCH 266/441] jailkit: add php8_0 section

---
 install/tpl/jk_init.ini.master | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/install/tpl/jk_init.ini.master b/install/tpl/jk_init.ini.master
index 9f34d5090d..e835d2701d 100644
--- a/install/tpl/jk_init.ini.master
+++ b/install/tpl/jk_init.ini.master
@@ -225,3 +225,8 @@ includesections = php_common
 comment = php version 7.4
 paths = /usr/bin/php7.4, /usr/lib/php/7.4/, /usr/lib/php/20190902/, /usr/share/php/7.4/, /etc/php/7.4/cli/, /etc/php/7.4/mods-available/
 includesections = php_common
+
+[php8_0]
+comment = php version 8.0
+paths = /usr/bin/php8.0, /usr/lib/php/8.0/, /usr/lib/php/20200930/, /usr/share/php/8.0/, /etc/php/8.0/cli/, /etc/php/8.0/mods-available/
+includesections = php_common
-- 
GitLab


From 072be2252c5cad71dc3f8aa44693ad7be8f1cf76 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 2 Feb 2021 15:11:05 -0700
Subject: [PATCH 267/441] jailkit: fix bash test (closes #6042)

---
 server/lib/classes/cron.d/600-jailkit_maintenance.inc.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php b/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
index 547b7caa1a..4ef5835e67 100644
--- a/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
+++ b/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
@@ -114,7 +114,8 @@ class cronjob_jailkit_maintenance extends cronjob {
 				if (is_file( $rec['document_root']."/bin/bash" )) {
 					# test that /bin/bash functions in the jail
 print "chroot --userspec ".$rec['system_user'].":".$rec['system_group']." ".$rec['document_root']." /bin/bash -c true 2>/dev/null\n";
-					if (! $app->system->exec_safe("chroot --userspec ?:? ? /bin/bash -c true 2>/dev/null", $rec['system_user'], $rec['system_group'], $rec['document_root'])) {
+					$app->system->exec_safe("chroot --userspec ?:? ? /bin/bash -c true 2>/dev/null", $rec['system_user'], $rec['system_group'], $rec['document_root']);
+					if ($app->system->last_exec_retcode()) {  # return 0 means success
 print "/bin/bash test failed, forcing update\n";
 						$options[] = 'force';
 						# bogus hash will not match, triggering an update
-- 
GitLab


From 783d34c17dbe5a14aaa23199cddf9159438dc451 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 2 Feb 2021 16:13:29 -0700
Subject: [PATCH 268/441] jailkit: enabling due to php_fpm_chroot requires php
 in use (closes #6040)

---
 server/plugins-available/apache2_plugin.inc.php | 4 ++--
 server/plugins-available/nginx_plugin.inc.php   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 45594da5f1..cf69b38818 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -788,15 +788,15 @@ class apache2_plugin {
 		$last_updated = array_unique($last_updated, SORT_REGULAR);
 		sort($last_updated, SORT_STRING);
 		$update_hash = hash('md5', implode(' ', $last_updated));
+		$check_for_jailkit_updates=false;
 
 		// Create jailkit chroot when enabling php_fpm_chroot
-		if($data['new']['php_fpm_chroot'] == 'y' && $data['old']['php_fpm_chroot'] != 'y') {
+		if($data['new']['php_fpm_chroot'] == 'y' && $data['old']['php_fpm_chroot'] != 'y' && $data['new']['php'] != 'no') {
 			$website = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ?', $data['new']['domain_id']);
 			$this->website = array_merge($website, $data['new'], array('new_jailkit_hash' => $update_hash));
 			$this->jailkit_config = $jailkit_config;
 			$this->_setup_jailkit_chroot();
 			$this->_add_jailkit_user();
-			$check_for_jailkit_updates=false;
 		// else delete if unused
 		} elseif ($data['new']['delete_unused_jailkit'] == 'y' && $data['new']['php_fpm_chroot'] != 'y') {
 			$check_for_jailkit_updates=false;
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 62a618ce7f..6ba24ead07 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -626,15 +626,15 @@ class nginx_plugin {
 		$last_updated = array_unique($last_updated, SORT_REGULAR);
 		sort($last_updated, SORT_STRING);
 		$update_hash = hash('md5', implode(' ', $last_updated));
+		$check_for_jailkit_updates=false;
 
 		// Create jailkit chroot when enabling php_fpm_chroot
-		if($data['new']['php_fpm_chroot'] == 'y' && $data['old']['php_fpm_chroot'] != 'y') {
+		if($data['new']['php_fpm_chroot'] == 'y' && $data['old']['php_fpm_chroot'] != 'y' && $data['new']['php'] != 'no') {
 			$website = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ?', $data['new']['domain_id']);
 			$this->website = array_merge($website, $data['new'], array('new_jailkit_hash' => $update_hash));
 			$this->jailkit_config = $jailkit_config;
 			$this->_setup_jailkit_chroot();
 			$this->_add_jailkit_user();
-			$check_for_jailkit_updates=false;
 		// else delete if unused
 		} elseif ($data['new']['delete_unused_jailkit'] == 'y' && $data['new']['php_fpm_chroot'] != 'y') {
 			$check_for_jailkit_updates=false;
-- 
GitLab


From 17c4a07e54f2e81635844ea125a3c0f2b153e8c0 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 2 Feb 2021 17:19:29 -0700
Subject: [PATCH 269/441] jailkit: fix php warnings (closes #6036)

---
 server/lib/classes/system.inc.php | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index a26707b0ae..5a99bbda20 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2412,6 +2412,7 @@ class system{
 
 	public function create_jailkit_chroot($home_dir, $app_sections = array(), $options = array()) {
 		global $app;
+$app->log("create_jailkit_chroot: called for home_dir $home_dir with options: " . print_r($options, true), LOGLEVEL_DEBUG);
 
 		// Disallow operating on root directory
 		if(realpath($home_dir) == '/') {
@@ -2428,6 +2429,9 @@ class system{
 		} elseif(is_string($app_sections)) {
 			$app_sections = preg_split('/[\s,]+/', $app_sections);
 		}
+		if(! is_array($options)) {
+			$options = (is_string($options) ? preg_split('/[\s,]+/', $options) : array());
+		}
 
 		// Change ownership of the chroot directory to root
 		$this->chown($home_dir, 'root');
@@ -2485,6 +2489,7 @@ class system{
 
 	public function create_jailkit_programs($home_dir, $programs = array(), $options = array()) {
 		global $app;
+$app->log("create_jailkit_programs: called for home_dir $home_dir with options: " . print_r($options, true), LOGLEVEL_DEBUG);
 
 		// Disallow operating on root directory
 		if(realpath($home_dir) == '/') {
@@ -2501,6 +2506,9 @@ class system{
 		} elseif(is_string($programs)) {
 			$programs = preg_split('/[\s,]+/', $programs);
 		}
+		if(! is_array($options)) {
+			$options = (is_string($options) ? preg_split('/[\s,]+/', $options) : array());
+		}
 
 		# prohibit ill-advised copying paths known to be sensitive/problematic
 		# (easy to bypass if needed, eg. use /./etc)
-- 
GitLab


From 1070f878c2d6375762bb9217904dadc3837e6b80 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 3 Feb 2021 09:50:34 -0700
Subject: [PATCH 270/441] jailkit: disable php should clean up jailkit (closes
 #6041)

---
 server/plugins-available/apache2_plugin.inc.php | 5 +++--
 server/plugins-available/nginx_plugin.inc.php   | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index cf69b38818..170f8b1b72 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -798,7 +798,8 @@ class apache2_plugin {
 			$this->_setup_jailkit_chroot();
 			$this->_add_jailkit_user();
 		// else delete if unused
-		} elseif ($data['new']['delete_unused_jailkit'] == 'y' && $data['new']['php_fpm_chroot'] != 'y') {
+		} elseif (($data['new']['delete_unused_jailkit'] == 'y' && $data['new']['php_fpm_chroot'] != 'y') ||
+			($data['new']['delete_unused_jailkit'] == 'y' && $data['new']['php'] == 'no')) {
 			$check_for_jailkit_updates=false;
 			$this->_delete_jailkit_if_unused($data['new']['domain_id']);
 			if(is_dir($data['new']['document_root'].'/etc/jailkit')) {
@@ -3820,7 +3821,7 @@ class apache2_plugin {
 		}
 
 		// chroot is used by php-fpm
-		if (isset($parent_domain['php_fpm_chroot']) && $parent_domain['php_fpm_chroot'] == 'y') {
+		if (isset($parent_domain['php_fpm_chroot']) && $parent_domain['php_fpm_chroot'] == 'y' && $parent_domain['php'] != 'no') {
 			return;
 		}
 
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 6ba24ead07..bec59fddc4 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -636,7 +636,8 @@ class nginx_plugin {
 			$this->_setup_jailkit_chroot();
 			$this->_add_jailkit_user();
 		// else delete if unused
-		} elseif ($data['new']['delete_unused_jailkit'] == 'y' && $data['new']['php_fpm_chroot'] != 'y') {
+		} elseif (($data['new']['delete_unused_jailkit'] == 'y' && $data['new']['php_fpm_chroot'] != 'y') ||
+			($data['new']['delete_unused_jailkit'] == 'y' && $data['new']['php'] == 'no')) {
 			$check_for_jailkit_updates=false;
 			$this->_delete_jailkit_if_unused($data['new']['domain_id']);
 			if(is_dir($data['new']['document_root'].'/etc/jailkit')) {
@@ -3599,7 +3600,7 @@ class nginx_plugin {
 		}
 
 		// chroot is used by php-fpm
-		if (isset($parent_domain['php_fpm_chroot']) && $parent_domain['php_fpm_chroot'] == 'y') {
+		if (isset($parent_domain['php_fpm_chroot']) && $parent_domain['php_fpm_chroot'] == 'y' && $parent_domain['php'] != 'no') {
 			return;
 		}
 
-- 
GitLab


From eb7d9ed5ff3f8b589c1c25ff8be4bea42fb9fd68 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 3 Feb 2021 12:41:18 -0700
Subject: [PATCH 271/441] 'Enable receiving' should check disablesmtp

---
 install/tpl/mysql-virtual_email2email.cf.master | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/tpl/mysql-virtual_email2email.cf.master b/install/tpl/mysql-virtual_email2email.cf.master
index 1ae7f9addc..f420a104d9 100644
--- a/install/tpl/mysql-virtual_email2email.cf.master
+++ b/install/tpl/mysql-virtual_email2email.cf.master
@@ -2,8 +2,8 @@ user = {mysql_server_ispconfig_user}
 password = {mysql_server_ispconfig_password}
 dbname = {mysql_server_database}
 hosts = {mysql_server_ip}
-query = SELECT email FROM mail_user WHERE email = '%s' AND forward_in_lda = 'n' AND disabledeliver = 'n' AND postfix = 'y' AND server_id = {server_id}
+query = SELECT email FROM mail_user WHERE email = '%s' AND forward_in_lda = 'n' AND disabledeliver = 'n' AND disablesmtp = 'n' AND server_id = {server_id}
            AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
         UNION
-        SELECT cc AS email FROM mail_user WHERE email = '%s' AND cc != '' AND (forward_in_lda = 'n' OR disabledeliver = 'y') AND postfix = 'y' AND server_id = {server_id}
+        SELECT cc AS email FROM mail_user WHERE email = '%s' AND cc != '' AND (forward_in_lda = 'n' OR disabledeliver = 'y') AND disablesmtp = 'n' AND server_id = {server_id}
            AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
-- 
GitLab


From 8945b60b8dfc7b666da734112efb23d43bd90d93 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 4 Feb 2021 08:25:17 +0100
Subject: [PATCH 272/441] Update openvz_plugin.inc.php

---
 server/plugins-available/openvz_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/openvz_plugin.inc.php b/server/plugins-available/openvz_plugin.inc.php
index f17edb7b8c..4be9c30ebf 100644
--- a/server/plugins-available/openvz_plugin.inc.php
+++ b/server/plugins-available/openvz_plugin.inc.php
@@ -123,7 +123,7 @@ class openvz_plugin {
 
 		//* new diskspace for ploop-containers requieres "vzctl set"
 		if($data['new']['diskspace'] != $data['old']['diskspace']) {
-			escapeshell("vzctl set ? --diskspace ? --save", $veid, $data['new']['diskspace']."G");
+			$app->system->exec_safe("vzctl set ? --diskspace ? --save", $veid, $data['new']['diskspace']."G");
 		}
 
 		//* Apply config changes to the VM
-- 
GitLab


From ac7b2c82f145288e10fbe16a00102e9d35120bdc Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 4 Feb 2021 08:30:08 +0100
Subject: [PATCH 273/441] Update ispconfig3.sql

---
 install/sql/ispconfig3.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 4c059203d1..04082fbeb7 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -2408,7 +2408,7 @@ INSERT INTO `country` (`iso`, `name`, `printable_name`, `iso3`, `numcode`, `eu`)
 ('UG', 'UGANDA', 'Uganda', 'UGA', 800, 'n'),
 ('UA', 'UKRAINE', 'Ukraine', 'UKR', 804, 'n'),
 ('AE', 'UNITED ARAB EMIRATES', 'United Arab Emirates', 'ARE', 784, 'n'),
-('GB', 'UNITED KINGDOM', 'United Kingdom', 'GBR', 826, 'y'),
+('GB', 'UNITED KINGDOM', 'United Kingdom', 'GBR', 826, 'n'),
 ('US', 'UNITED STATES', 'United States', 'USA', 840, 'n'),
 ('UM', 'UNITED STATES MINOR OUTLYING ISLANDS', 'United States Minor Outlying Islands', NULL, NULL, 'n'),
 ('UY', 'URUGUAY', 'Uruguay', 'URY', 858, 'n'),
-- 
GitLab


From a26f17a4948b5e04ed5278096315992b9f6f56c1 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 4 Feb 2021 08:30:54 +0100
Subject: [PATCH 274/441] Update upd_dev_collection.sql

---
 install/sql/incremental/upd_dev_collection.sql | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 7c4c05d887..7d1ec43815 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -16,3 +16,6 @@ DROP TABLE 'software_package';
 DROP TABLE 'software_repo';
 DROP TABLE 'software_update';
 DROP TABLE 'software_update_inst';
+
+-- Brexit
+UPDATE `country` SET `eu` = 'n' WHERE `iso` = 'GB';
-- 
GitLab


From a29401db0d1ceb9cbd19f0fd19f670df5a64eb4a Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Thu, 4 Feb 2021 11:50:25 +0100
Subject: [PATCH 275/441] Add new function for custom config usage for Postfix
 and Dovecot (#5988)

---
 install/lib/installer_base.lib.php       | 6 ++++++
 install/tpl/debian6_dovecot2.conf.master | 4 +++-
 install/tpl/debian_dovecot2.conf.master  | 4 +++-
 install/tpl/fedora_dovecot2.conf.master  | 4 +++-
 install/tpl/postfix_custom.conf.master   | 3 +++
 5 files changed, 18 insertions(+), 3 deletions(-)
 create mode 100644 install/tpl/postfix_custom.conf.master

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 696a7042bd..6188b39708 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1182,6 +1182,12 @@ class installer_base {
 		    $content = strtr($content, $postconf_placeholders);
 		    $postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
 		}
+		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix_custom.conf.master')) {
+			$configfile = 'postfix_custom.conf';
+			$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master');
+			$content = strtr($content, $postconf_placeholders);
+			$postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
+		}
 
 		// Remove comment lines, these would give fatal errors when passed to postconf.
 		$postconf_commands = array_filter($postconf_commands, function($line) { return preg_match('/^[^#]/', $line); });
diff --git a/install/tpl/debian6_dovecot2.conf.master b/install/tpl/debian6_dovecot2.conf.master
index 5032488a6f..55e02fef30 100644
--- a/install/tpl/debian6_dovecot2.conf.master
+++ b/install/tpl/debian6_dovecot2.conf.master
@@ -1,3 +1,4 @@
+# Do not change this file, as changes will be overwritten by any ISPConfig update. Put your custom settings in /etc/dovecot/conf.d/99-custom-config.conf
 listen = *,[::]
 protocols = imap pop3
 auth_mechanisms = plain login
@@ -88,7 +89,7 @@ protocol lmtp {
 #2.3+         group = vmail
 #2.3+         mode = 0660
 #2.3+     }
-#2.3+ 
+#2.3+
 #2.3+     unix_listener stats-writer {
 #2.3+         user = vmail
 #2.3+         group = vmail
@@ -131,3 +132,4 @@ namespace inbox {
     special_use = \Trash
   }
 }
+!include_try conf.d/99-custom-config.conf
diff --git a/install/tpl/debian_dovecot2.conf.master b/install/tpl/debian_dovecot2.conf.master
index 4a44bfbfc6..62bed414fe 100644
--- a/install/tpl/debian_dovecot2.conf.master
+++ b/install/tpl/debian_dovecot2.conf.master
@@ -1,3 +1,4 @@
+# Do not change this file, as changes will be overwritten by any ISPConfig update. Put your custom settings in /etc/dovecot/conf.d/99-custom-config.conf
 listen = *,[::]
 protocols = imap pop3
 auth_mechanisms = plain login
@@ -86,7 +87,7 @@ protocol lmtp {
 #2.3+         group = vmail
 #2.3+         mode = 0660
 #2.3+     }
-#2.3+ 
+#2.3+
 #2.3+     unix_listener stats-writer {
 #2.3+         user = vmail
 #2.3+         group = vmail
@@ -108,3 +109,4 @@ plugin {
   quota_status_nouser = DUNNO
   quota_status_overquota = "552 5.2.2 Mailbox is full"
 }
+!include_try conf.d/99-custom-config.conf
diff --git a/install/tpl/fedora_dovecot2.conf.master b/install/tpl/fedora_dovecot2.conf.master
index 81d71a37fe..4644371450 100644
--- a/install/tpl/fedora_dovecot2.conf.master
+++ b/install/tpl/fedora_dovecot2.conf.master
@@ -1,3 +1,4 @@
+# Do not change this file, as changes will be overwritten by any ISPConfig update. Put your custom settings in /etc/dovecot/conf.d/99-custom-config.conf
 listen = *,[::]
 protocols = imap pop3
 auth_mechanisms = plain login
@@ -82,7 +83,7 @@ protocol lmtp {
 #2.3+         group = vmail
 #2.3+         mode = 0660
 #2.3+     }
-#2.3+ 
+#2.3+
 #2.3+     unix_listener stats-writer {
 #2.3+         user = vmail
 #2.3+         group = vmail
@@ -125,3 +126,4 @@ namespace inbox {
     special_use = \Trash
   }
 }
+!include_try conf.d/99-custom-config.conf
diff --git a/install/tpl/postfix_custom.conf.master b/install/tpl/postfix_custom.conf.master
new file mode 100644
index 0000000000..4f3f2124c8
--- /dev/null
+++ b/install/tpl/postfix_custom.conf.master
@@ -0,0 +1,3 @@
+# You can use this file for custom Postfix settings. The used settings will overrule the settings set by ISPConfig.
+# Use with caution!
+# Put this file in /usr/local/ispconfig/server/conf-custom/install/ and make your changes there.
-- 
GitLab


From 3ed6e17ccea806140d842a11c793be6947ae4ce9 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Thu, 4 Feb 2021 13:28:59 +0100
Subject: [PATCH 276/441] Apply suggestions from !1405

---
 install/lib/installer_base.lib.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 6188b39708..248fcd66c4 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1182,8 +1182,8 @@ class installer_base {
 		    $content = strtr($content, $postconf_placeholders);
 		    $postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
 		}
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix_custom.conf.master')) {
-			$configfile = 'postfix_custom.conf';
+		$configfile = 'postfix_custom.conf';
+		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/' . $configfile . '.master')) {
 			$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master');
 			$content = strtr($content, $postconf_placeholders);
 			$postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
-- 
GitLab


From 530311aedb0e700586810a71e44ef2616ea35377 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Thu, 4 Feb 2021 19:33:36 +0100
Subject: [PATCH 277/441] Copy custom dovecot config from conf-custom

---
 install/lib/installer_base.lib.php       | 4 ++++
 install/tpl/debian6_dovecot2.conf.master | 2 +-
 install/tpl/debian_dovecot2.conf.master  | 2 +-
 install/tpl/dovecot_custom.conf.master   | 3 +++
 install/tpl/fedora_dovecot2.conf.master  | 2 +-
 5 files changed, 10 insertions(+), 3 deletions(-)
 create mode 100644 install/tpl/dovecot_custom.conf.master

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 248fcd66c4..6c33445bbf 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1540,6 +1540,10 @@ class installer_base {
 			} else {
 				copy('tpl/debian_dovecot2.conf.master', $config_dir.'/'.$configfile);
 			}
+			// Copy custom config file
+			if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master')) {
+				copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master', $config_dir.'/conf.d/99-ispconfig-custom-config.conf');
+			}
 			replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
 			replaceLine($config_dir.'/'.$configfile, 'postmaster_address = webmaster@localhost', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
 			if(version_compare($dovecot_version, 2.1, '<')) {
diff --git a/install/tpl/debian6_dovecot2.conf.master b/install/tpl/debian6_dovecot2.conf.master
index 55e02fef30..ae0103ff7b 100644
--- a/install/tpl/debian6_dovecot2.conf.master
+++ b/install/tpl/debian6_dovecot2.conf.master
@@ -132,4 +132,4 @@ namespace inbox {
     special_use = \Trash
   }
 }
-!include_try conf.d/99-custom-config.conf
+!include_try conf.d/99-ispconfig-custom-config.conf
diff --git a/install/tpl/debian_dovecot2.conf.master b/install/tpl/debian_dovecot2.conf.master
index 62bed414fe..1b1198726f 100644
--- a/install/tpl/debian_dovecot2.conf.master
+++ b/install/tpl/debian_dovecot2.conf.master
@@ -109,4 +109,4 @@ plugin {
   quota_status_nouser = DUNNO
   quota_status_overquota = "552 5.2.2 Mailbox is full"
 }
-!include_try conf.d/99-custom-config.conf
+!include_try conf.d/99-ispconfig-custom-config.conf
diff --git a/install/tpl/dovecot_custom.conf.master b/install/tpl/dovecot_custom.conf.master
new file mode 100644
index 0000000000..dab73e5a09
--- /dev/null
+++ b/install/tpl/dovecot_custom.conf.master
@@ -0,0 +1,3 @@
+# You can use this file for custom Dovecot settings. The used settings will overrule the settings set by ISPConfig.
+# Use with caution!
+# Put this file in /usr/local/ispconfig/server/conf-custom/install/ and make your changes there.
diff --git a/install/tpl/fedora_dovecot2.conf.master b/install/tpl/fedora_dovecot2.conf.master
index 4644371450..6e76dfd515 100644
--- a/install/tpl/fedora_dovecot2.conf.master
+++ b/install/tpl/fedora_dovecot2.conf.master
@@ -126,4 +126,4 @@ namespace inbox {
     special_use = \Trash
   }
 }
-!include_try conf.d/99-custom-config.conf
+!include_try conf.d/99-ispconfig-custom-config.conf
-- 
GitLab


From e753de51d12836ae416d4940be0a6cee1b5c933b Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Thu, 4 Feb 2021 19:39:48 +0100
Subject: [PATCH 278/441] Update custom config note (#5988)

---
 install/tpl/debian6_dovecot2.conf.master | 4 +++-
 install/tpl/debian_dovecot2.conf.master  | 4 +++-
 install/tpl/fedora_dovecot2.conf.master  | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/install/tpl/debian6_dovecot2.conf.master b/install/tpl/debian6_dovecot2.conf.master
index ae0103ff7b..91d745bc39 100644
--- a/install/tpl/debian6_dovecot2.conf.master
+++ b/install/tpl/debian6_dovecot2.conf.master
@@ -1,4 +1,6 @@
-# Do not change this file, as changes will be overwritten by any ISPConfig update. Put your custom settings in /etc/dovecot/conf.d/99-custom-config.conf
+# Do not change this file, as changes will be overwritten by any ISPConfig update.
+# Put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master.
+# To start using those changes, do a force upgrade and let it reconfigure your services. (ispconfig_update.sh --force)
 listen = *,[::]
 protocols = imap pop3
 auth_mechanisms = plain login
diff --git a/install/tpl/debian_dovecot2.conf.master b/install/tpl/debian_dovecot2.conf.master
index 1b1198726f..acbb5ccdff 100644
--- a/install/tpl/debian_dovecot2.conf.master
+++ b/install/tpl/debian_dovecot2.conf.master
@@ -1,4 +1,6 @@
-# Do not change this file, as changes will be overwritten by any ISPConfig update. Put your custom settings in /etc/dovecot/conf.d/99-custom-config.conf
+# Do not change this file, as changes will be overwritten by any ISPConfig update.
+# Put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master.
+# To start using those changes, do a force upgrade and let it reconfigure your services. (ispconfig_update.sh --force)
 listen = *,[::]
 protocols = imap pop3
 auth_mechanisms = plain login
diff --git a/install/tpl/fedora_dovecot2.conf.master b/install/tpl/fedora_dovecot2.conf.master
index 6e76dfd515..0b31c23b4e 100644
--- a/install/tpl/fedora_dovecot2.conf.master
+++ b/install/tpl/fedora_dovecot2.conf.master
@@ -1,4 +1,6 @@
-# Do not change this file, as changes will be overwritten by any ISPConfig update. Put your custom settings in /etc/dovecot/conf.d/99-custom-config.conf
+# Do not change this file, as changes will be overwritten by any ISPConfig update.
+# Put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master.
+# To start using those changes, do a force upgrade and let it reconfigure your services. (ispconfig_update.sh --force)
 listen = *,[::]
 protocols = imap pop3
 auth_mechanisms = plain login
-- 
GitLab


From 4228524c9c79f0cc59442391eaca98b6783f0ce6 Mon Sep 17 00:00:00 2001
From: Jan Thiel <jan@hive-it.de>
Date: Fri, 5 Feb 2021 07:35:37 +0100
Subject: [PATCH 279/441] Added missing http2 directive to HTTPS proxy protocol
 config

---
 server/conf/nginx_vhost.conf.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index a3b14a58fa..d5e457b9e3 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -15,7 +15,7 @@ server {
         listen <tmpl_var name='ip_address'>:<tmpl_var name='https_port'> ssl http2;
 <tmpl_if name='use_proxy_protocol' op='==' value='y'>
 <tmpl_if name='proxy_protocol_https' op='>' value='0'>
-        listen <tmpl_var name='ip_address'>:<tmpl_var name='proxy_protocol_https'> ssl proxy_protocol;
+        listen <tmpl_var name='ip_address'>:<tmpl_var name='proxy_protocol_https'> ssl http2 proxy_protocol;
 </tmpl_if>
 </tmpl_if>
 
-- 
GitLab


From 31ad5b7d7617eda6228953c424d6ca082c842a8b Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 5 Feb 2021 09:39:37 -0700
Subject: [PATCH 280/441] ensure /etc/postfix/sasl_passwd exists

---
 install/dist/lib/fedora.lib.php          | 1 +
 install/dist/lib/gentoo.lib.php          | 1 +
 install/dist/lib/opensuse.lib.php        | 1 +
 install/lib/installer_base.lib.php       | 1 +
 install/tpl/debian_postfix.conf.master   | 2 +-
 install/tpl/fedora_postfix.conf.master   | 2 +-
 install/tpl/gentoo_postfix.conf.master   | 2 +-
 install/tpl/opensuse_postfix.conf.master | 2 +-
 8 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index fdb6c2e717..25dc461433 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -162,6 +162,7 @@ class installer_dist extends installer_base {
 		touch($config_dir.'/mime_header_checks');
 		touch($config_dir.'/nested_header_checks');
 		touch($config_dir.'/body_checks');
+		touch($config_dir.'/sasl_passwd');
 
 		//* Create the mailman files
 		if(!is_dir('/var/lib/mailman/data')) exec('mkdir -p /var/lib/mailman/data');
diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index 1bd58e0c38..78dffabf85 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -160,6 +160,7 @@ class installer extends installer_base
 		touch($config_dir.'/mime_header_checks');
 		touch($config_dir.'/nested_header_checks');
 		touch($config_dir.'/body_checks');
+		touch($config_dir.'/sasl_passwd');
 
 		//* Create auxillary postfix conf files
 		$configfile = 'helo_access';
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 7332db1699..3effb1d10c 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -176,6 +176,7 @@ class installer_dist extends installer_base {
 		touch($config_dir.'/mime_header_checks');
 		touch($config_dir.'/nested_header_checks');
 		touch($config_dir.'/body_checks');
+		touch($config_dir.'/sasl_passwd');
 
 		//* Create the mailman files
 		if(!is_dir('/var/lib/mailman/data')) exec('mkdir -p /var/lib/mailman/data');
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 696a7042bd..1666b4c40d 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1200,6 +1200,7 @@ class installer_base {
 		touch($config_dir.'/mime_header_checks');
 		touch($config_dir.'/nested_header_checks');
 		touch($config_dir.'/body_checks');
+		touch($config_dir.'/sasl_passwd');
 
 		//* Create the mailman files
 		if(!is_dir('/var/lib/mailman/data')) exec('mkdir -p /var/lib/mailman/data');
diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master
index 42bb3f1510..5023caf6be 100644
--- a/install/tpl/debian_postfix.conf.master
+++ b/install/tpl/debian_postfix.conf.master
@@ -54,7 +54,7 @@ address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
 sender_dependent_relayhost_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayhost.cf
-smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, hash:{config_dir}/sasl_passwd
+smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, texthash:{config_dir}/sasl_passwd
 smtp_sender_dependent_authentication = yes
 smtp_sasl_auth_enable = yes
 smtp_sasl_security_options = noanonymous, noplaintext
diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master
index dd232b6d6d..c5786c6ea8 100644
--- a/install/tpl/fedora_postfix.conf.master
+++ b/install/tpl/fedora_postfix.conf.master
@@ -50,7 +50,7 @@ address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
 sender_dependent_relayhost_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayhost.cf
-smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, hash:{config_dir}/sasl_passwd
+smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, texthash:{config_dir}/sasl_passwd
 smtp_sender_dependent_authentication = yes
 smtp_sasl_auth_enable = yes
 smtp_sasl_security_options = noanonymous, noplaintext
diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master
index 7c337bbb5d..405640f52a 100644
--- a/install/tpl/gentoo_postfix.conf.master
+++ b/install/tpl/gentoo_postfix.conf.master
@@ -49,7 +49,7 @@ address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
 sender_dependent_relayhost_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayhost.cf
-smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, hash:{config_dir}/sasl_passwd
+smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, texthash:{config_dir}/sasl_passwd
 smtp_sender_dependent_authentication = yes
 smtp_sasl_auth_enable = yes
 smtp_sasl_security_options = noanonymous, noplaintext
diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master
index c7c282ca14..a98f4223e1 100644
--- a/install/tpl/opensuse_postfix.conf.master
+++ b/install/tpl/opensuse_postfix.conf.master
@@ -52,7 +52,7 @@ address_verify_negative_refresh_time=60s
 # needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
 enable_original_recipient = yes
 sender_dependent_relayhost_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayhost.cf
-smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, hash:{config_dir}/sasl_passwd
+smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, texthash:{config_dir}/sasl_passwd
 smtp_sender_dependent_authentication = yes
 smtp_sasl_auth_enable = yes
 smtp_sasl_security_options = noanonymous, noplaintext
-- 
GitLab


From a92cb66cb7a1bd5cd2e8f623bc3ca96e231eb06a Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sat, 6 Feb 2021 14:57:06 +0100
Subject: [PATCH 281/441] Update CONTRIBUTING.md

---
 CONTRIBUTING.md | 344 +++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 281 insertions(+), 63 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b515c5348d..cdfe750be4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,99 +1,318 @@
-# Which code branch to use
+# Contributing to ISPConfig
+ISPConfig is a open source project and community contributions are very welcome. To contribute, please stick to the guidelines.
 
-The master branch is used for code (mostly new features) that shall go into the next major release (e.g. 3.2, 3.3 and so on). The stable branch (e.g. stable-3.1, stable-3.2) is the branch for the current intermediate and bugfix releases. Bugfixes shall be committed to the current stable branch and not the master branch. The stable branch is merged to the master automatically from time to time, please do not submit bugfixes a second time against the master.
+This document is under development and will be continuously improved.
+
+# Issues
+* Before opening a new issue, use the search function to check if there isn't a bug report / feature request already
+* If you are reporting a bug, please share your OS and PHP (CLI) version
+* If you want to report several bugs or request several features, open a separate issue for each one of them.
+
+# Branches
+* Please create an issue for each contribution you want to make.
+* Do not put multiple contributions into a single branch and merge request. Each contribution should have it's own branch.
+* Do not use the develop branch in your forked project for your contribution. Create a separate branch for each issue.
+* Give your branch a name, e. g. `6049-update-the-contributing-doc ` where 6049 is the issue number.
+
+# Merge requests
+Please give your merge request a description that shortly states what it is about. Merge requests without a good title or with missing description will get delayed because it is more effort for us to check the meaning of the changes made.
+Once again: Do not put multiple things into a single merge request. If you for example fix two issues where one affects apache and one mail users, use separate issues and separate merge requests.
+You can group multiple issues in a single merge request if they have the same specific topic, e. g. if you have one issue stating that a language entry in mail users is missing and a second issue that a language entry for server config is missing, you can put both issues into a single branch and merge request. Be sure to include all issue ids (if multiple) into the merge request's description in this case.
+* Open a issue for the bug you want to fix / the feature you want to implement
+* After opening the issue, commit your changes to your branch
+* Note the issue # in every commit
+* Update the documentation (New devs will not have access to this. Please sent an email to docs@ispconfig.org)
+* Add translations for every language
+* Use a short title
+* Write a clear description - for example, when updating the contributing guidelines with issue #6049: \
+"Update of our contributing guidelines \
+Closes #6049"
+* Please be aware that we are not able to accept merge request that do not stick to the coding guidelines. We need to insist on that to keep the code clean and maintainable.
 
 # Some guidelines for web development with php.
 -----------------------------------------------------
-* Unix Line Breaks Only, NO windows breaks please.
-* Tabs to indent lines, NO spaces
-* no accidental _<?php space before, within or after a file
-* every PHP file starts and end with <?php ?> no spaces before or after
-* error_reporting(E_ALL|E_STRICT), yep PHP 5
-* Magic quotes is gone, get used to it now. config = magic_quotes_gpc() Everything must be quoted
-* Don't use ereg, split and other old function -> gone in PHP 5.4
-* Don't use features that are not supported in PHP 5.3, for compatibility with LTS OS releases, ISPConfig must support PHP 5.3+
+* Don't use features that are not supported in PHP 5.4, for compatibility with LTS OS releases, ISPConfig must support PHP 5.4+
 * Don't use shorttags. A Shorttag is <? and that is confusing with <?xml -> always use <?php
 * Don't use namespaces
 * Column names in database tables and database table names are in lowercase
 * Classes for the interface are located in interface/lib/classes/ and loaded with $app->uses() or $app->load() functions.
 * Classes for the server are located in server/lib/classes/ and loaded with $app->uses() or $app->load() functions.
-* please mark any section that need review or work on with /* TODO: short description */
-* Make function / var names on the following way, first word lower, next word(s) first letter upper like. getFirstResult();
-* always a space but NO newline before opening braces, e. g.
-```
-class abc {
-	public function cde() {
-		if($a == $b) {
-			return false;
-		}
-	}
+
+### Indentations
+
+Indentations are always done with tabs. Do **not** use spaces.  
+It is recommended to set your IDE to display tabs with a width of 4 spaces.
+
+### Variable and method / function names
+
+Methods and functions should always be written in camel-case. Variables and properties should always be lowercase instead.
+
+**Correct:**
+```php
+class MyClass {
+    private $issue_list = [];
+
+    private function getMyValue() {
+
+    }
 }
 ```
-* no spaces after function/method or control names, e. g.
-```
-function abc($x, $y) {
-	if($condition == true) {
-		$x = 2;
-	}
+
+**Wrong:**
+```php
+class my_class {
+    private $IssueList = [];
+
+    private function get_my_value() {
+
+    }
 }
 ```
-and NOT
+
+### Blocks
+
+#### Curly braces
+
+Opening curly braces always have to be in the same line as the preceding condition. They are separated by a single space from the closing paranthesis.  
+Closing curly braces are always on a separate line after the last statement in the block. The only exception is a do-while block where the logic is inverted.
+
+Curly braces are **always** to be used. Do not leave them out, even if there is only a single statement in the corresponding block.
+
+**Correct:**
+```php
+if($variable === true) {
+
+}
+
+while($condition) {
+
+}
+
+do {
+
+} while($condition);
 ```
-function abc ($x, $y) {
-	if ( $condition == true ) {
-	
-	}
+
+**Wrong:**
+```php
+if($variable === true){
+
+}
+
+if($variable === true)
+{
+
 }
+
+if($variable === true)
+   $x = 'no braces';
+
+while($condition) { }
 ```
 
-# Commenting style
+#### Short style
+
+The short style of conditional assignments is allowed to be used, but it must not affect readability, e. g. they shall not be nested.
+
+**Allowed:**
+```php
+$a = 0;
+if($condition === true) {
+    $a = 1;
+}
 
-The comments break down into the following types
+$a = ($condition === true ? 1 : 0);
 ```
-// is uses for removing lines and debug dev etc
-/* 
-	is used to comment out blocks
-*/
 
-/** is used to create documentaion
- * thats over 
- * lines
- */
+**Disallowed:**
+```php
+$x = ($condition === true ? ($further == 'foo' ? true : false) : true);
 ```
-If you need to block out a section then use
+
+
+#### Spaces and paranthesis
+
+The rules for using spaces are:
+- no space after `if`/`while` etc. and the following opening paranthesis
+- single space after closing paranthesis and before opening curly brace
+- no spaces at the end of a line
+- no spaces after opening paranthesis and before closing paranthesis
+- single space before and after comparators
+
+**Correct:**
+```php
+if($variable === $condition) {
+
+}
+
+while(($condition !== false || $condition2 === true) && $n <= 15) {
+    $n++;
+}
 ```
-/*
-function redundant_code(){
-	something here
+
+**Wrong:**
+```php
+if ($variable===$condition) {
+
+}
+
+while(($condition!==false||$condition2===true))&&$n<=15){
+
 }
-*/
 ```
-To block out single lines use // and all // are assumed to be redundant test code and NOT comments
 
-// print_r($foo);
+#### Newlines inside of conditions
+
+Breaking up conditions into separate lines can be done if it positively affects readability.
+
+```php
+if($condition === true && ($state === 'completed' || $state === 'pending') && ($processed_by !== null || $process_time < time())) {
 
-Do not use the phpdoc on every function, eg 
+}
 ```
-/**
-* Login a user
-* @param string user  username
-* @param string password of user
-*/
-function login($user, $pass){
-	
+can also be written as
+```php
+if($condition === true
+    && ($state === 'completed' || $state === 'pending')
+    && ($processed_by !== null || $process_time < time())
+    ) {
+
 }
 ```
-as this function is self-explaining, the following clean code will suffice
+This must not be abused, e. g. the following is not allowed:
+
+```php
+if($a == 1
+    || $b == 2) {
+
+    }
 ```
-function login($user, $pass){
-	
-}
+
+### Arrays
+
+#### Short syntax
+
+Please **do** use short array syntax. We have deprecated the old-style array syntax.
+
+**Correct**:
+```php
+$var = [];
+
+$var2 = [
+    'conf' => [
+        'setting1' => 'value1'
+    ]
+];
 ```
 
-# Where to store custom settings
+**Wrong:**
+```php:
+$var = array();
 
-## Interface settings
+$var2 = array(
+    'conf' => array(
+        'setting1' => 'value1'
+    )
+);
+```
+
+#### Spaces and newlines
+
+When defining an empty array, both brackets shall be on the same line. When defining an array with values, the style depends on the values you are going to assign.  
+
+##### List of values
+
+When defining an array with a list of values, e. g. numbers or names, they should be on the same line as the brackets without using new lines, as long as the line does not exceed a total number of characters of about 90. After each comma there has to be a single space.
+
+##### Nested array
+
+When defining a nested array onle the opening bracket is to be on the same line. The closing bracket has to be on a separate line indented by `tabs * level of array`.
+
+##### Examples
+
+```php
+// empty array
+$a = [];
 
+// array with list of values
+$array = [4, 3, 76, 12];
+
+// array with long list of values
+$array = [
+    'This is one entry', 'This is a second one', 'Another one', 'Further entries', 'foo', 'bar', 34, 42, $variable, // newline here for better readability
+    'Next entry', 'the last entry'
+];
+
+// nested array
+$array = [
+    'conf' => [
+        'level' => 1,
+        'settings' => [
+            'window' => 'open',
+            'door' => 'closed
+        ]
+    ]
+];
+```
+
+**Not-to-dos:**
+```php
+$array=[
+];
+
+$array = [
+    1,
+    4,
+    35,
+    23,
+    345,
+    11,
+    221,
+    'further',
+    '...'
+];
+
+$array=['conf'=>['settings'=>['window' => 'open', 'door' => 'closed]]];
+```
+
+### Strings 
+
+Whenever possible use single quotes `'` instead of double qoutes `"`. Try not to embedd variables in string. Concatenate them instead.
+
+**Correct:**
+```php
+// simple text
+$var = 'This is a text';
+
+// array index
+$array['index'] = 'value';
+
+// text with variables
+$var = 'This is a text with ' . $value . ' values inside and at the end: ' . $sum_value;
+
+// dynamic array index
+$idx = 'index' . $key;
+$value = $array[$idx];
+```
+
+**Wrong:**
+```php
+// simple text
+$var = "This is a text";
+
+// array index
+$array["index"] = 'value';
+
+// text with variables
+$var = "This is a text with $value values inside and at the end: {$sum_value}";
+
+// dynamic array index
+$value = $array['index' . $key];
+$value = $array["index{$key}"];
+```
+
+# Where to store custom settings
+## Interface settings
 The recommended place to store global interface settings is the ini style global config system 
 (see system.ini.master file in install/tpl/ to set defaults). The settings file 
 gets stored inside the ispconfig database. Settings can be accessed with the function:
@@ -109,7 +328,6 @@ fields to the file interface/web/admin/form/system_config.tform.php and the corr
 tempalte file in the templates subfolder of the admin module.
 
 ## Server settings
-
 Server settings are stored in the ini style server config system (see server.ini.master template file)
 The settings file gets stored inside the ispconfig database in the server table. Settings can be 
 accessed with the function $app->getconf->get_server_config(....)
-- 
GitLab


From 8bc2bc35e911834ecc13d52068220c2ecef6e091 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sun, 7 Feb 2021 12:52:57 +0100
Subject: [PATCH 282/441] Update CONTRIBUTING.md

---
 CONTRIBUTING.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cdfe750be4..5c168d13c8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,8 +4,8 @@ ISPConfig is a open source project and community contributions are very welcome.
 This document is under development and will be continuously improved.
 
 # Issues
-* Before opening a new issue, use the search function to check if there isn't a bug report / feature request already
-* If you are reporting a bug, please share your OS and PHP (CLI) version
+* Before opening a new issue, use the search function to check if there isn't a bug report / feature request already.
+* If you are reporting a bug, please share your OS and PHP (CLI) version.
 * If you want to report several bugs or request several features, open a separate issue for each one of them.
 
 # Branches
@@ -21,7 +21,7 @@ You can group multiple issues in a single merge request if they have the same sp
 * Open a issue for the bug you want to fix / the feature you want to implement
 * After opening the issue, commit your changes to your branch
 * Note the issue # in every commit
-* Update the documentation (New devs will not have access to this. Please sent an email to docs@ispconfig.org)
+* Update the documentation (New devs will not have access to this. Please send a email to docs@ispconfig.org)
 * Add translations for every language
 * Use a short title
 * Write a clear description - for example, when updating the contributing guidelines with issue #6049: \
-- 
GitLab


From 11d53c9a5b8b0596b857d35b3abbbab1bcd1ed7c Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 8 Feb 2021 10:13:08 -0700
Subject: [PATCH 283/441] filter Junk mail based on X-Spam* headers, not
 Subject

---
 server/conf/autoresponder.master | 4 ++--
 server/conf/sieve_filter.master  | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/server/conf/autoresponder.master b/server/conf/autoresponder.master
index 114db23d64..fc5519a0ac 100644
--- a/server/conf/autoresponder.master
+++ b/server/conf/autoresponder.master
@@ -4,7 +4,7 @@ if ($RETURNCODE==1)
        {
        if (!/^List-Unsubscribe:.*/:h )
        {
-               if (!/^(X-Spam-Flag: YES|X-Spam: Yes|Subject: \*\*\*\s*SPAM\s*\*\*\*.*)/:h )
+               if (!/^(X-Spam-Flag: YES|X-Spam: Yes)/:h )
                {
                   NOW=time
                   if ({start_date} lt $NOW && {end_date} gt $NOW)
@@ -20,4 +20,4 @@ if ($RETURNCODE==1)
                }
        }
        }
-}
\ No newline at end of file
+}
diff --git a/server/conf/sieve_filter.master b/server/conf/sieve_filter.master
index dd2dfb9647..538e8cf328 100644
--- a/server/conf/sieve_filter.master
+++ b/server/conf/sieve_filter.master
@@ -7,7 +7,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
 
 <tmpl_if name="move_junk" op="==" value="y">
 # Move spam to spam folder
-if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes", header :contains "subject" "*** SPAM ***", header :contains "subject" "***SPAM***") {
+if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") {
   fileinto :create "Junk";
   # Stop here so that we do not reply on spams
   stop;
@@ -33,7 +33,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
 
 <tmpl_if name="move_junk" op="==" value="a">
 # Move spam to spam folder
-if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes", header :contains "subject" "*** SPAM ***", header :contains "subject" "***SPAM***") {
+if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") {
   fileinto :create "Junk";
   # Stop here so that we do not reply on spams
   stop;
@@ -46,7 +46,7 @@ if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes",
 #################################################################
 
 # Move spam to spam folder
-if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes", header :contains "subject" "*** SPAM ***", header :contains "subject" "***SPAM***") {
+if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") {
   # Stop here so that we do not reply on spams
   stop;
 }
-- 
GitLab


From 1157b9b249792dd46bc2617a4f25c7f5e183e07a Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 8 Feb 2021 16:59:08 -0700
Subject: [PATCH 284/441] rpsamd: use x-spam-status

---
 install/tpl/rspamd_milter_headers.conf.master | 12 ++++++++++--
 server/conf/autoresponder.master              |  2 +-
 server/conf/sieve_filter.master               |  6 +++---
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/install/tpl/rspamd_milter_headers.conf.master b/install/tpl/rspamd_milter_headers.conf.master
index d399bbf4ec..bd90acd634 100644
--- a/install/tpl/rspamd_milter_headers.conf.master
+++ b/install/tpl/rspamd_milter_headers.conf.master
@@ -1,2 +1,10 @@
-use = ["x-spamd-bar", "x-spam-level", "authentication-results"];
-authenticated_headers = ["authentication-results"];
\ No newline at end of file
+use = ["x-spamd-bar", "x-spam-level", "x-spam-status", "authentication-results"];
+authenticated_headers = ["authentication-results"];
+routines {
+  remove-headers {
+    "X-Spam" = 0;
+    "X-Spamd-Bar" = 0;
+    "X-Spam-Level" = 0;
+    "X-Spam-Status" = 0;
+  }
+}
diff --git a/server/conf/autoresponder.master b/server/conf/autoresponder.master
index fc5519a0ac..8a908f8492 100644
--- a/server/conf/autoresponder.master
+++ b/server/conf/autoresponder.master
@@ -4,7 +4,7 @@ if ($RETURNCODE==1)
        {
        if (!/^List-Unsubscribe:.*/:h )
        {
-               if (!/^(X-Spam-Flag: YES|X-Spam: Yes)/:h )
+               if (!/^(X-Spam-Flag: YES|X-Spam: Yes|X-Spam-Status: Yes)/:h )
                {
                   NOW=time
                   if ({start_date} lt $NOW && {end_date} gt $NOW)
diff --git a/server/conf/sieve_filter.master b/server/conf/sieve_filter.master
index 538e8cf328..16a39ec180 100644
--- a/server/conf/sieve_filter.master
+++ b/server/conf/sieve_filter.master
@@ -7,7 +7,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
 
 <tmpl_if name="move_junk" op="==" value="y">
 # Move spam to spam folder
-if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") {
+if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
   fileinto :create "Junk";
   # Stop here so that we do not reply on spams
   stop;
@@ -33,7 +33,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
 
 <tmpl_if name="move_junk" op="==" value="a">
 # Move spam to spam folder
-if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") {
+if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
   fileinto :create "Junk";
   # Stop here so that we do not reply on spams
   stop;
@@ -46,7 +46,7 @@ if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes")
 #################################################################
 
 # Move spam to spam folder
-if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") {
+if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
   # Stop here so that we do not reply on spams
   stop;
 }
-- 
GitLab


From 4ed15cf925c93c68c97fed57d65fdebdc23b97e6 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Sat, 13 Feb 2021 00:17:23 +0100
Subject: [PATCH 285/441] Improve warning message (#6056)

---
 interface/web/admin/lib/lang/ar_users_list.lng | 2 +-
 interface/web/admin/lib/lang/ca_users_list.lng | 2 +-
 interface/web/admin/lib/lang/en_users_list.lng | 4 ++--
 interface/web/admin/lib/lang/ja_users_list.lng | 2 +-
 interface/web/admin/lib/lang/ro_users_list.lng | 2 +-
 interface/web/admin/lib/lang/sk_users_list.lng | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/interface/web/admin/lib/lang/ar_users_list.lng b/interface/web/admin/lib/lang/ar_users_list.lng
index 4f7a7469b0..fc3f4f6647 100644
--- a/interface/web/admin/lib/lang/ar_users_list.lng
+++ b/interface/web/admin/lib/lang/ar_users_list.lng
@@ -4,6 +4,6 @@ $wb['username_txt'] = 'Username';
 $wb['client_id_txt'] = 'Client ID';
 $wb['active_txt'] = 'Active';
 $wb['add_new_record_txt'] = 'Add new user';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any user settings here. Use the Client- and Reseller settings in the Client module instead. Modifying or changing users or groups here may cause data loss!';
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
 $wb['groups_txt'] = 'Groups';
 ?>
diff --git a/interface/web/admin/lib/lang/ca_users_list.lng b/interface/web/admin/lib/lang/ca_users_list.lng
index dec5cc2c04..feb56b7f4a 100644
--- a/interface/web/admin/lib/lang/ca_users_list.lng
+++ b/interface/web/admin/lib/lang/ca_users_list.lng
@@ -5,5 +5,5 @@ $wb['client_id_txt'] = 'User ID';
 $wb['active_txt'] = 'Active';
 $wb['groups_txt'] = 'Groups';
 $wb['add_new_record_txt'] = 'Add new user';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any user settings here. Use the Client- and Reseller settings in the Client module instead. Modifying or changing users or groups here may cause data loss!';
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
 ?>
diff --git a/interface/web/admin/lib/lang/en_users_list.lng b/interface/web/admin/lib/lang/en_users_list.lng
index cc978c78d0..feb56b7f4a 100644
--- a/interface/web/admin/lib/lang/en_users_list.lng
+++ b/interface/web/admin/lib/lang/en_users_list.lng
@@ -5,5 +5,5 @@ $wb['client_id_txt'] = 'User ID';
 $wb['active_txt'] = 'Active';
 $wb['groups_txt'] = 'Groups';
 $wb['add_new_record_txt'] = 'Add new user';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any user settings here. Use the Client- and Reseller settings in the Client module instead. Modifying or changing users or groups here may cause data loss!';
-?>
\ No newline at end of file
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
+?>
diff --git a/interface/web/admin/lib/lang/ja_users_list.lng b/interface/web/admin/lib/lang/ja_users_list.lng
index 21b07be3c5..ebc24c9518 100644
--- a/interface/web/admin/lib/lang/ja_users_list.lng
+++ b/interface/web/admin/lib/lang/ja_users_list.lng
@@ -4,6 +4,6 @@ $wb['username_txt'] = 'ユーザー名';
 $wb['client_id_txt'] = 'Client ID';
 $wb['active_txt'] = 'Active';
 $wb['add_new_record_txt'] = 'ユーザーを追加する';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any user settings here. Use the Client- and Reseller settings in the Client module instead. Modifying or changing users or groups here may cause data loss!';
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
 $wb['groups_txt'] = 'Groups';
 ?>
diff --git a/interface/web/admin/lib/lang/ro_users_list.lng b/interface/web/admin/lib/lang/ro_users_list.lng
index c928d6b86f..d46bb3c6f7 100644
--- a/interface/web/admin/lib/lang/ro_users_list.lng
+++ b/interface/web/admin/lib/lang/ro_users_list.lng
@@ -4,6 +4,6 @@ $wb['username_txt'] = 'Username';
 $wb['client_id_txt'] = 'Client ID';
 $wb['active_txt'] = 'Active';
 $wb['add_new_record_txt'] = 'Add  user nou';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any user settings here. Use the Client- and Reseller settings in the Client module instead. Modifying or changing users or groups here may cause data loss!';
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
 $wb['groups_txt'] = 'Groups';
 ?>
diff --git a/interface/web/admin/lib/lang/sk_users_list.lng b/interface/web/admin/lib/lang/sk_users_list.lng
index c393f19992..2256b8744c 100644
--- a/interface/web/admin/lib/lang/sk_users_list.lng
+++ b/interface/web/admin/lib/lang/sk_users_list.lng
@@ -4,6 +4,6 @@ $wb['username_txt'] = 'Užívateľské meno';
 $wb['client_id_txt'] = 'Client ID';
 $wb['active_txt'] = 'Active';
 $wb['add_new_record_txt'] = 'Pridať nového užívateľa';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any user settings here. Use the Client- and Reseller settings in the Client module instead. Modifying or changing users or groups here may cause data loss!';
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
 $wb['groups_txt'] = 'Groups';
 ?>
-- 
GitLab


From d6bd0e6bdd5f486bc34a9fea059d3c54a0ab28c1 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@thompol.nl>
Date: Sat, 13 Feb 2021 00:26:09 +0100
Subject: [PATCH 286/441] Improve warning message (#6056)

---
 interface/web/admin/lib/lang/ar_users_list.lng | 2 +-
 interface/web/admin/lib/lang/ca_users_list.lng | 2 +-
 interface/web/admin/lib/lang/en_users_list.lng | 2 +-
 interface/web/admin/lib/lang/ja_users_list.lng | 2 +-
 interface/web/admin/lib/lang/ro_users_list.lng | 2 +-
 interface/web/admin/lib/lang/sk_users_list.lng | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/interface/web/admin/lib/lang/ar_users_list.lng b/interface/web/admin/lib/lang/ar_users_list.lng
index fc3f4f6647..84869c0626 100644
--- a/interface/web/admin/lib/lang/ar_users_list.lng
+++ b/interface/web/admin/lib/lang/ar_users_list.lng
@@ -4,6 +4,6 @@ $wb['username_txt'] = 'Username';
 $wb['client_id_txt'] = 'Client ID';
 $wb['active_txt'] = 'Active';
 $wb['add_new_record_txt'] = 'Add new user';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!';
 $wb['groups_txt'] = 'Groups';
 ?>
diff --git a/interface/web/admin/lib/lang/ca_users_list.lng b/interface/web/admin/lib/lang/ca_users_list.lng
index feb56b7f4a..fb1c7bc6dd 100644
--- a/interface/web/admin/lib/lang/ca_users_list.lng
+++ b/interface/web/admin/lib/lang/ca_users_list.lng
@@ -5,5 +5,5 @@ $wb['client_id_txt'] = 'User ID';
 $wb['active_txt'] = 'Active';
 $wb['groups_txt'] = 'Groups';
 $wb['add_new_record_txt'] = 'Add new user';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!';
 ?>
diff --git a/interface/web/admin/lib/lang/en_users_list.lng b/interface/web/admin/lib/lang/en_users_list.lng
index feb56b7f4a..fb1c7bc6dd 100644
--- a/interface/web/admin/lib/lang/en_users_list.lng
+++ b/interface/web/admin/lib/lang/en_users_list.lng
@@ -5,5 +5,5 @@ $wb['client_id_txt'] = 'User ID';
 $wb['active_txt'] = 'Active';
 $wb['groups_txt'] = 'Groups';
 $wb['add_new_record_txt'] = 'Add new user';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!';
 ?>
diff --git a/interface/web/admin/lib/lang/ja_users_list.lng b/interface/web/admin/lib/lang/ja_users_list.lng
index ebc24c9518..8896b8ccbd 100644
--- a/interface/web/admin/lib/lang/ja_users_list.lng
+++ b/interface/web/admin/lib/lang/ja_users_list.lng
@@ -4,6 +4,6 @@ $wb['username_txt'] = 'ユーザー名';
 $wb['client_id_txt'] = 'Client ID';
 $wb['active_txt'] = 'Active';
 $wb['add_new_record_txt'] = 'ユーザーを追加する';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!';
 $wb['groups_txt'] = 'Groups';
 ?>
diff --git a/interface/web/admin/lib/lang/ro_users_list.lng b/interface/web/admin/lib/lang/ro_users_list.lng
index d46bb3c6f7..a69fd3dccf 100644
--- a/interface/web/admin/lib/lang/ro_users_list.lng
+++ b/interface/web/admin/lib/lang/ro_users_list.lng
@@ -4,6 +4,6 @@ $wb['username_txt'] = 'Username';
 $wb['client_id_txt'] = 'Client ID';
 $wb['active_txt'] = 'Active';
 $wb['add_new_record_txt'] = 'Add  user nou';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!';
 $wb['groups_txt'] = 'Groups';
 ?>
diff --git a/interface/web/admin/lib/lang/sk_users_list.lng b/interface/web/admin/lib/lang/sk_users_list.lng
index 2256b8744c..49746bddaf 100644
--- a/interface/web/admin/lib/lang/sk_users_list.lng
+++ b/interface/web/admin/lib/lang/sk_users_list.lng
@@ -4,6 +4,6 @@ $wb['username_txt'] = 'Užívateľské meno';
 $wb['client_id_txt'] = 'Client ID';
 $wb['active_txt'] = 'Active';
 $wb['add_new_record_txt'] = 'Pridať nového užívateľa';
-$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!' \n Use this page only to create a new admin user, or to modify an existing admin user.;
+$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!';
 $wb['groups_txt'] = 'Groups';
 ?>
-- 
GitLab


From ab256189ee0accdbcb17b030f5bfb9eceb60818d Mon Sep 17 00:00:00 2001
From: Jan Thiel <jan@hive-it.de>
Date: Mon, 15 Feb 2021 12:24:29 +0100
Subject: [PATCH 287/441] Fixes
 https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6052 Skip possible IO
 extensive operations for vhostalias creation on "web" document root

---
 server/plugins-available/nginx_plugin.inc.php | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index bec59fddc4..1c0032b500 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -819,7 +819,11 @@ class nginx_plugin {
 					}
 				}
 			}
-			$app->system->exec_safe('chmod -R a+r ?', $data['new']['document_root'].'/' . $web_folder . '/');
+			// Set the a+r mod to the web_folder.
+			// Skip this for vhostalias if the web_folder is "web". In this case, everything is setup already from the vhost setup
+			if ($data['new']['type'] != 'vhostalias' || $web_folder != "web") {
+				$app->system->exec_safe('chmod -R a+r ?', $data['new']['document_root'].'/' . $web_folder . '/');
+			}
 
 			//** Copy the error documents on update when the error document checkbox has been activated and was deactivated before
 		} elseif ($this->action == 'update' && ($data['new']['type'] == 'vhost' || $data['new']['type'] == 'vhostsubdomain' || $data['new']['type'] == 'vhostalias') && $data['old']['errordocs'] == 0 && $data['new']['errordocs'] == 1) {
@@ -874,7 +878,10 @@ class nginx_plugin {
 
 		if($this->action == 'insert' || $data["new"]["system_user"] != $data["old"]["system_user"]) {
 			// Chown and chmod the directories below the document root
-			$app->system->exec_safe('chown -R ?:? ?', $username, $groupname, $data['new']['document_root'].'/' . $web_folder);
+			// Skip this for vhostalias if the web_folder is "web". In this case, everything is setup already from the vhost setup
+			if ($data['new']['type'] != 'vhostalias' || $web_folder != "web") {
+				$app->system->exec_safe( 'chown -R ?:? ?', $username, $groupname, $data['new']['document_root'] . '/' . $web_folder );
+			}
 			// The document root itself has to be owned by root in normal level and by the web owner in security level 20
 			if($web_config['security_level'] == 20) {
 				$app->system->exec_safe('chown ?:? ?', $username, $groupname, $data['new']['document_root'].'/' . $web_folder);
-- 
GitLab


From 9f4a5807b3a15d9fdb6a0aa7e3bf25458ef15fbc Mon Sep 17 00:00:00 2001
From: Jan Thiel <jan@hive-it.de>
Date: Mon, 15 Feb 2021 12:26:14 +0100
Subject: [PATCH 288/441] Codestyle fixes

---
 server/plugins-available/nginx_plugin.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 1c0032b500..c4073fa3f5 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -821,7 +821,7 @@ class nginx_plugin {
 			}
 			// Set the a+r mod to the web_folder.
 			// Skip this for vhostalias if the web_folder is "web". In this case, everything is setup already from the vhost setup
-			if ($data['new']['type'] != 'vhostalias' || $web_folder != "web") {
+			if ($data['new']['type'] != 'vhostalias' || $web_folder != 'web') {
 				$app->system->exec_safe('chmod -R a+r ?', $data['new']['document_root'].'/' . $web_folder . '/');
 			}
 
@@ -879,7 +879,7 @@ class nginx_plugin {
 		if($this->action == 'insert' || $data["new"]["system_user"] != $data["old"]["system_user"]) {
 			// Chown and chmod the directories below the document root
 			// Skip this for vhostalias if the web_folder is "web". In this case, everything is setup already from the vhost setup
-			if ($data['new']['type'] != 'vhostalias' || $web_folder != "web") {
+			if ($data['new']['type'] != 'vhostalias' || $web_folder != 'web') {
 				$app->system->exec_safe( 'chown -R ?:? ?', $username, $groupname, $data['new']['document_root'] . '/' . $web_folder );
 			}
 			// The document root itself has to be owned by root in normal level and by the web owner in security level 20
-- 
GitLab


From a7f17fc095a56fe21ec5881da248e4f9f6bcd771 Mon Sep 17 00:00:00 2001
From: Jan Thiel <jan@hive-it.de>
Date: Mon, 15 Feb 2021 16:13:50 +0100
Subject: [PATCH 289/441] Add --cert-name option to certbot calls to set
 primary domain instead of --expand Fixes
 https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6061

---
 server/lib/classes/letsencrypt.inc.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php
index a2e6a5c380..2f2ac25483 100644
--- a/server/lib/classes/letsencrypt.inc.php
+++ b/server/lib/classes/letsencrypt.inc.php
@@ -137,6 +137,7 @@ class letsencrypt {
 			return false;
 		}
 
+		$primary_domain = $domains[0];
 		$matches = array();
 		$ret = null;
 		$val = 0;
@@ -158,11 +159,13 @@ class letsencrypt {
 				$webroot_map[$domains[$i]] = '/usr/local/ispconfig/interface/acme';
 			}
 			$webroot_args = "--webroot-map " . escapeshellarg(str_replace(array("\r", "\n"), '', json_encode($webroot_map)));
+			$cert_selection_command = "--cert-name $primary_domain";
 		} else {
 			$webroot_args = "$cmd --webroot-path /usr/local/ispconfig/interface/acme";
+			$cert_selection_command = "--expand";
 		}
 
-		$cmd = $letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server $acme_version --rsa-key-size 4096 --email postmaster@$domain $webroot_args";
+		$cmd = $letsencrypt . " certonly -n --text --agree-tos $cert_selection_command --authenticator webroot --server $acme_version --rsa-key-size 4096 --email postmaster@$primary_domain $webroot_args";
 
 		return $cmd;
 	}
-- 
GitLab


From 7e72c8488f3425dbbc43f8e7977251d8ac32aab6 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Thu, 18 Feb 2021 16:46:51 +0100
Subject: [PATCH 290/441] Use correct folder for symlink check (Fixes #4992)

---
 server/plugins-available/apps_vhost_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/apps_vhost_plugin.inc.php b/server/plugins-available/apps_vhost_plugin.inc.php
index b64adfde6e..3916e14822 100644
--- a/server/plugins-available/apps_vhost_plugin.inc.php
+++ b/server/plugins-available/apps_vhost_plugin.inc.php
@@ -253,7 +253,7 @@ class apps_vhost_plugin {
 			file_put_contents("$vhost_conf_dir/apps.vhost", $content);
 
 			// enabled / disable apps-vhost
-			$vhost_symlink = $web_config['vhost_conf_enabled_dir'].'/000-apps.vhost';
+			$vhost_symlink = $vhost_conf_enabled_dir . '/000-apps.vhost';
 			if(is_link($vhost_symlink) && $web_config['apps_vhost_enabled'] == 'n') {
 				$app->system->unlink($vhost_symlink);
 			}
-- 
GitLab


From 8127d07bfacd0e158a71d3601a985eb8e65759d7 Mon Sep 17 00:00:00 2001
From: Jan Thiel <jan@hive-it.de>
Date: Thu, 18 Feb 2021 17:19:59 +0100
Subject: [PATCH 291/441] Add comment to why --cert-name is added to 0.30 check

---
 server/lib/classes/letsencrypt.inc.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php
index 2f2ac25483..c902b2657f 100644
--- a/server/lib/classes/letsencrypt.inc.php
+++ b/server/lib/classes/letsencrypt.inc.php
@@ -152,13 +152,15 @@ class letsencrypt {
 			$acme_version = 'https://acme-v01.api.letsencrypt.org/directory';
 		}
 		if (version_compare($letsencrypt_version, '0.30', '>=')) {
-			$app->log("LE version is " . $letsencrypt_version . ", so using certificates command", LOGLEVEL_DEBUG);
+			$app->log("LE version is " . $letsencrypt_version . ", so using certificates command and --cert-name instead of --expand", LOGLEVEL_DEBUG);
 			$this->certbot_use_certcommand = true;
 			$webroot_map = array();
 			for($i = 0; $i < count($domains); $i++) {
 				$webroot_map[$domains[$i]] = '/usr/local/ispconfig/interface/acme';
 			}
 			$webroot_args = "--webroot-map " . escapeshellarg(str_replace(array("\r", "\n"), '', json_encode($webroot_map)));
+			// --cert-name might be working with earlier versions of certbot, but there is no safe version since when
+			// Sot for safety reasons we add it to the 0.30 version check as it is documented to work as expected in this version
 			$cert_selection_command = "--cert-name $primary_domain";
 		} else {
 			$webroot_args = "$cmd --webroot-path /usr/local/ispconfig/interface/acme";
-- 
GitLab


From 21db72aa01bbc390ff568f0f7d6d42d5e9ace9b3 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Thu, 18 Feb 2021 17:20:33 +0100
Subject: [PATCH 292/441] Enable http/2 for the panel and Apps vhost.

---
 install/tpl/nginx_apps.vhost.master      | 4 ++--
 install/tpl/nginx_ispconfig.vhost.master | 4 ++--
 server/conf/nginx_apps.vhost.master      | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/install/tpl/nginx_apps.vhost.master b/install/tpl/nginx_apps.vhost.master
index b91d1a16c5..e457c65128 100644
--- a/install/tpl/nginx_apps.vhost.master
+++ b/install/tpl/nginx_apps.vhost.master
@@ -1,6 +1,6 @@
 server {
-        listen {apps_vhost_ip}{apps_vhost_port} {ssl_on};
-        listen [::]:{apps_vhost_port} {ssl_on} ipv6only=on;
+        listen {apps_vhost_ip}{apps_vhost_port} {ssl_on} http2;
+        listen [::]:{apps_vhost_port} {ssl_on} ipv6only=on http2;
 
         {ssl_comment}ssl_protocols TLSv1.2;
         {ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
diff --git a/install/tpl/nginx_ispconfig.vhost.master b/install/tpl/nginx_ispconfig.vhost.master
index dbe44d7064..e1c39ee98b 100644
--- a/install/tpl/nginx_ispconfig.vhost.master
+++ b/install/tpl/nginx_ispconfig.vhost.master
@@ -1,6 +1,6 @@
 server {
-        listen {vhost_port} {ssl_on};
-        listen [::]:{vhost_port} {ssl_on} ipv6only=on;
+        listen {vhost_port} {ssl_on} http2;
+        listen [::]:{vhost_port} {ssl_on} ipv6only=on http2;
 
 		{ssl_comment}ssl_protocols TLSv1.2;
         {ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
diff --git a/server/conf/nginx_apps.vhost.master b/server/conf/nginx_apps.vhost.master
index b91d1a16c5..e457c65128 100644
--- a/server/conf/nginx_apps.vhost.master
+++ b/server/conf/nginx_apps.vhost.master
@@ -1,6 +1,6 @@
 server {
-        listen {apps_vhost_ip}{apps_vhost_port} {ssl_on};
-        listen [::]:{apps_vhost_port} {ssl_on} ipv6only=on;
+        listen {apps_vhost_ip}{apps_vhost_port} {ssl_on} http2;
+        listen [::]:{apps_vhost_port} {ssl_on} ipv6only=on http2;
 
         {ssl_comment}ssl_protocols TLSv1.2;
         {ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
-- 
GitLab


From f71eaa6d0143409acc285c4b1fb58226cd160b43 Mon Sep 17 00:00:00 2001
From: Jan Thiel <jan@hive-it.de>
Date: Thu, 18 Feb 2021 17:23:13 +0100
Subject: [PATCH 293/441] Typo fix

---
 server/lib/classes/letsencrypt.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php
index c902b2657f..559ba79689 100644
--- a/server/lib/classes/letsencrypt.inc.php
+++ b/server/lib/classes/letsencrypt.inc.php
@@ -159,8 +159,8 @@ class letsencrypt {
 				$webroot_map[$domains[$i]] = '/usr/local/ispconfig/interface/acme';
 			}
 			$webroot_args = "--webroot-map " . escapeshellarg(str_replace(array("\r", "\n"), '', json_encode($webroot_map)));
-			// --cert-name might be working with earlier versions of certbot, but there is no safe version since when
-			// Sot for safety reasons we add it to the 0.30 version check as it is documented to work as expected in this version
+			// --cert-name might be working with earlier versions of certbot, but there is no exact version documented
+			// So for safety reasons we add it to the 0.30 version check as it is documented to work as expected in this version
 			$cert_selection_command = "--cert-name $primary_domain";
 		} else {
 			$webroot_args = "$cmd --webroot-path /usr/local/ispconfig/interface/acme";
-- 
GitLab


From 7889e5d07eba36cf169a4c371bb8c21ccb02d851 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sat, 20 Feb 2021 18:50:31 +0100
Subject: [PATCH 294/441] Enable SSL if a cert is present for the Apps vhost
 when installing/updating (#6007)

---
 install/lib/installer_base.lib.php                 | 11 ++++++++++-
 install/tpl/nginx_apps.vhost.master                |  2 +-
 server/conf/nginx_apps.vhost.master                |  2 +-
 server/plugins-available/apps_vhost_plugin.inc.php | 10 ++++------
 4 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 1666b4c40d..cb253947e2 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2553,7 +2553,7 @@ class installer_base {
 			$tpl->setVar('apps_vhost_dir',$conf['web']['website_basedir'].'/apps');
 			$tpl->setVar('apps_vhost_basedir',$conf['web']['website_basedir']);
 			$tpl->setVar('apps_vhost_servername',$apps_vhost_servername);
-			if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
+			if(is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.crt') && is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.key')) {
 				$tpl->setVar('ssl_comment','');
 			} else {
 				$tpl->setVar('ssl_comment','#');
@@ -2636,6 +2636,15 @@ class installer_base {
 			// Dont just copy over the virtualhost template but add some custom settings
 			$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/nginx_apps.vhost.master', 'tpl/nginx_apps.vhost.master');
 
+			// Enable SSL if a cert is in place.
+			if(is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
+				$content = str_replace('{ssl_on}', 'ssl', $content);
+				$content = str_replace('{ssl_comment}', '', $content);
+			} else {
+				$content = str_replace('{ssl_on}', '', $content);
+				$content = str_replace('{ssl_comment}', '#', $content);
+			}
+
 			if($conf['web']['apps_vhost_ip'] == '_default_'){
 				$apps_vhost_ip = '';
 			} else {
diff --git a/install/tpl/nginx_apps.vhost.master b/install/tpl/nginx_apps.vhost.master
index b91d1a16c5..181f4c807e 100644
--- a/install/tpl/nginx_apps.vhost.master
+++ b/install/tpl/nginx_apps.vhost.master
@@ -7,7 +7,7 @@ server {
         {ssl_comment}ssl_certificate_key /usr/local/ispconfig/interface/ssl/ispserver.key;
 
         # redirect to https if accessed with http
-        {ssl_comment}error_page 497 https://$host:{vhost_port}$request_uri;
+        {ssl_comment}error_page 497 https://$host:{apps_vhost_port}$request_uri;
 
         server_name {apps_vhost_servername};
 
diff --git a/server/conf/nginx_apps.vhost.master b/server/conf/nginx_apps.vhost.master
index b91d1a16c5..181f4c807e 100644
--- a/server/conf/nginx_apps.vhost.master
+++ b/server/conf/nginx_apps.vhost.master
@@ -7,7 +7,7 @@ server {
         {ssl_comment}ssl_certificate_key /usr/local/ispconfig/interface/ssl/ispserver.key;
 
         # redirect to https if accessed with http
-        {ssl_comment}error_page 497 https://$host:{vhost_port}$request_uri;
+        {ssl_comment}error_page 497 https://$host:{apps_vhost_port}$request_uri;
 
         server_name {apps_vhost_servername};
 
diff --git a/server/plugins-available/apps_vhost_plugin.inc.php b/server/plugins-available/apps_vhost_plugin.inc.php
index b64adfde6e..2195b607cd 100644
--- a/server/plugins-available/apps_vhost_plugin.inc.php
+++ b/server/plugins-available/apps_vhost_plugin.inc.php
@@ -206,16 +206,14 @@ class apps_vhost_plugin {
 				$use_socket = '#';
 			}
 
-                        /* Check if SSL should be enabled: */
-                        if(is_file('/usr/local/ispconfig/interface/ssl/ispserver.crt') && is_file('/usr/local/ispconfig/interface/ssl/ispserver.key')) {
+            /* Check if SSL should be enabled: */
+            if(is_file('/usr/local/ispconfig/interface/ssl/ispserver.crt') && is_file('/usr/local/ispconfig/interface/ssl/ispserver.key')) {
 				$content = str_replace('{ssl_comment}', '', $content);
 				$content = str_replace('{ssl_on}', 'ssl', $content);
-                                $content = str_replace('{vhost_port}', $web_config['apps_vhost_port'], $content);
-                        } else {
+            } else {
 				$content = str_replace('{ssl_comment}', '#', $content);
 				$content = preg_replace('/(\s)\{ssl_on\}/', '', $content);
-				$content = str_replace('{vhost_port}', $web_config['apps_vhost_port'], $content);
-                        }
+			}
 	 
 			$content = str_replace('{use_tcp}', $use_tcp, $content);
 			$content = str_replace('{use_socket}', $use_socket, $content);
-- 
GitLab


From b74093a0278511e7aab14cb0860b43991a72f9e0 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sat, 20 Feb 2021 19:27:15 +0100
Subject: [PATCH 295/441] Don't disable SSL for Apps vhost (nginx) by default
 (#6017)

---
 install/lib/installer_base.lib.php | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index cb253947e2..956782543b 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2687,10 +2687,6 @@ class installer_base {
 			$content = str_replace('{use_tcp}', $use_tcp, $content);
 			$content = str_replace('{use_socket}', $use_socket, $content);
 
-			// SSL in apps vhost is off by default. Might change later.
-			$content = str_replace('{ssl_on}', '', $content);
-			$content = str_replace('{ssl_comment}', '#', $content);
-
 			// Fix socket path on PHP 7 systems
 			if(file_exists('/var/run/php/php7.0-fpm.sock'))	$content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content);
 			if(file_exists('/var/run/php/php7.1-fpm.sock'))	$content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.1-fpm.sock', $content);
-- 
GitLab


From 08bd30a238bc3f25627aa48e17e38b1c2793063c Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sat, 20 Feb 2021 19:29:33 +0100
Subject: [PATCH 296/441] Replace incorrect variable (#6017)

---
 install/lib/installer_base.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 956782543b..3a0f87af1e 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2637,7 +2637,7 @@ class installer_base {
 			$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/nginx_apps.vhost.master', 'tpl/nginx_apps.vhost.master');
 
 			// Enable SSL if a cert is in place.
-			if(is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
+			if(is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.crt') && is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.key')) {
 				$content = str_replace('{ssl_on}', 'ssl', $content);
 				$content = str_replace('{ssl_comment}', '', $content);
 			} else {
-- 
GitLab


From 8f612a9244b344772b27a34f3c0b0e524df3efc4 Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Sat, 27 Feb 2021 11:33:03 +0100
Subject: [PATCH 297/441] interface/web/mailuser/index.php

---
 interface/web/mailuser/index.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/mailuser/index.php b/interface/web/mailuser/index.php
index 77f5c207aa..a6e2ae2389 100644
--- a/interface/web/mailuser/index.php
+++ b/interface/web/mailuser/index.php
@@ -5,7 +5,7 @@ require_once '../../lib/app.inc.php';
 //* Check permissions for module
 $app->auth->check_module_permissions('mailuser');
 
-$app->uses('tpl, functions');
+$app->uses('tpl');
 
 $app->tpl->newTemplate('form.tpl.htm');
 $app->tpl->setInclude('content_tpl', 'templates/index.htm');
-- 
GitLab


From bd66023353ab60a8e1fb14bfafb0d7388756885e Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Sun, 28 Feb 2021 06:27:27 +0100
Subject: [PATCH 298/441] remoce strtolower from rspamd_url

---
 interface/web/admin/form/server_config.tform.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index 13ab70af3a..1818b2ef3b 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -723,8 +723,7 @@ $form["tabs"]['mail'] = array(
 			'default' => '',
 			'filters'   => array(
 				0 => array( 'event' => 'SAVE', 'type' => 'IDNTOASCII'),
-				1 => array( 'event' => 'SHOW', 'type' => 'IDNTOUTF8'),
-				2 => array( 'event' => 'SAVE', 'type' => 'TOLOWER')
+				1 => array( 'event' => 'SHOW', 'type' => 'IDNTOUTF8')
 			),
 			'value' => '',
 			'width' => '40',
-- 
GitLab


From 783ebe6f4ecd6e822d29972516425bd5a89d56c0 Mon Sep 17 00:00:00 2001
From: Jan Thiel <jan@hive-it.de>
Date: Mon, 1 Mar 2021 09:16:06 +0100
Subject: [PATCH 299/441] Exclude the io expensive calls on vhostsubdomain as
 well.

---
 server/plugins-available/nginx_plugin.inc.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index c4073fa3f5..92d8bac7f9 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -820,8 +820,8 @@ class nginx_plugin {
 				}
 			}
 			// Set the a+r mod to the web_folder.
-			// Skip this for vhostalias if the web_folder is "web". In this case, everything is setup already from the vhost setup
-			if ($data['new']['type'] != 'vhostalias' || $web_folder != 'web') {
+			// Skip this for types where the target vhost already exists if the web_folder is "web". In this case, everything is setup already from the vhost setup
+			if ( ( $data['new']['type'] != 'vhostalias' && $data['new']['type'] != 'vhostsubdomain' ) || $web_folder != 'web') {
 				$app->system->exec_safe('chmod -R a+r ?', $data['new']['document_root'].'/' . $web_folder . '/');
 			}
 
@@ -878,8 +878,8 @@ class nginx_plugin {
 
 		if($this->action == 'insert' || $data["new"]["system_user"] != $data["old"]["system_user"]) {
 			// Chown and chmod the directories below the document root
-			// Skip this for vhostalias if the web_folder is "web". In this case, everything is setup already from the vhost setup
-			if ($data['new']['type'] != 'vhostalias' || $web_folder != 'web') {
+			// Skip this for types where the target vhost already exists if the web_folder is "web". In this case, everything is setup already from the vhost setup
+			if ( ( $data['new']['type'] != 'vhostalias' && $data['new']['type'] != 'vhostsubdomain' ) || $web_folder != 'web') {
 				$app->system->exec_safe( 'chown -R ?:? ?', $username, $groupname, $data['new']['document_root'] . '/' . $web_folder );
 			}
 			// The document root itself has to be owned by root in normal level and by the web owner in security level 20
-- 
GitLab


From 561740d7be363ef2df31e1d1d904ea9516b438a6 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Wed, 3 Mar 2021 09:22:22 +0100
Subject: [PATCH 300/441] Fix query, dns_rr.name does not hold an fqdn

---
 interface/web/dns/dns_dmarc_edit.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php
index b2d07b0a9e..c49b60fc78 100644
--- a/interface/web/dns/dns_dmarc_edit.php
+++ b/interface/web/dns/dns_dmarc_edit.php
@@ -226,8 +226,10 @@ class page_action extends tform_actions {
 
 		$domain_name = rtrim($soa['origin'], '.');
 		// DMARC requieres at least one active dkim-record...
-		$sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND data like 'v=DKIM1;%' AND active='Y'";
-		$temp = $app->db->queryAllRecords($sql, '%._domainkey.'.$domain_name.'.');
+		$sql = "SELECT * FROM dns_rr
+					LEFT JOIN dns_soa ON (dns_rr.zone=dns_soa.id)
+					WHERE dns_rr.name LIKE ? AND dns_soa.origin = ? AND type='TXT' AND data like 'v=DKIM1;%' AND dns_rr.active='Y'";
+		$temp = $app->db->queryAllRecords($sql, '%._domainkey', $soa['origin']);
 		if (empty($temp)) {
 			if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '<br/>' . $app->tform->errorMessage;
 			$app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_dkim_txt'].$email;
-- 
GitLab


From ed1a4e4e53ab552b4a4e36c95f8225d05642d7ba Mon Sep 17 00:00:00 2001
From: Timo Boldt <tb@teuto.net>
Date: Wed, 3 Mar 2021 14:30:54 +0100
Subject: [PATCH 301/441] fixes #6084

---
 interface/lib/app.inc.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php
index 631bd430da..d609835f54 100755
--- a/interface/lib/app.inc.php
+++ b/interface/lib/app.inc.php
@@ -86,6 +86,8 @@ class app {
 	}
 
 	public function initialize_session() {
+		global $conf;
+
 		//* Start the session
 		if($this->_conf['start_session'] == true) {
 			session_name('ISPCSESS');
-- 
GitLab


From c2b34ee6623596e7c1e1c34802b9306a67cf6d23 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 11 Feb 2021 09:04:51 -0700
Subject: [PATCH 302/441] rspamd: strip X-Spam-Flag header

---
 install/tpl/rspamd_milter_headers.conf.master | 1 +
 1 file changed, 1 insertion(+)

diff --git a/install/tpl/rspamd_milter_headers.conf.master b/install/tpl/rspamd_milter_headers.conf.master
index bd90acd634..0205160c25 100644
--- a/install/tpl/rspamd_milter_headers.conf.master
+++ b/install/tpl/rspamd_milter_headers.conf.master
@@ -6,5 +6,6 @@ routines {
     "X-Spamd-Bar" = 0;
     "X-Spam-Level" = 0;
     "X-Spam-Status" = 0;
+    "X-Spam-Flag" = 0;
   }
 }
-- 
GitLab


From 6502a5ba3ae5a7ad79c5576a9d83265598b9b732 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 11 Feb 2021 16:43:35 -0700
Subject: [PATCH 303/441] WIP: rspamd whitelisting and rule priorities

---
 install/lib/installer_base.lib.php            | 120 +++++++-----------
 install/tpl/dkim_whitelist.inc.master         |   5 +
 install/tpl/dmarc_whitelist.inc.master        |   9 ++
 ...ter => rspamd_antivirus_group.conf.master} |   0
 ...nf.master => rspamd_rbl_group.conf.master} |   0
 ....master => rspamd_surbl_group.conf.master} |   0
 install/tpl/rspamd_users.inc.conf.master      |   1 -
 install/tpl/rspamd_whitelist.conf.master      |  38 ++++++
 install/tpl/spf_dkim_whitelist.inc.master     |   8 ++
 install/tpl/spf_whitelist.inc.master          |   6 +
 server/conf/rspamd_users.conf.master          |  25 +---
 11 files changed, 117 insertions(+), 95 deletions(-)
 create mode 100644 install/tpl/dkim_whitelist.inc.master
 create mode 100644 install/tpl/dmarc_whitelist.inc.master
 rename install/tpl/{rspamd_symbols_antivirus.conf.master => rspamd_antivirus_group.conf.master} (100%)
 rename install/tpl/{rspamd_override_rbl.conf.master => rspamd_rbl_group.conf.master} (100%)
 rename install/tpl/{rspamd_override_surbl.conf.master => rspamd_surbl_group.conf.master} (100%)
 delete mode 120000 install/tpl/rspamd_users.inc.conf.master
 create mode 100644 install/tpl/rspamd_whitelist.conf.master
 create mode 100644 install/tpl/spf_dkim_whitelist.inc.master
 create mode 100644 install/tpl/spf_whitelist.inc.master

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 95c6cb87ef..94116e32f8 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1802,6 +1802,10 @@ class installer_base {
 			mkdir('/etc/rspamd/local.d/', 0755, true);
 		}
 
+		if(!is_dir('/etc/rspamd/local.d/maps.d/')){
+			mkdir('/etc/rspamd/local.d/maps.d/', 0755, true);
+		}
+
 		if(!is_dir('/etc/rspamd/override.d/')){
 			mkdir('/etc/rspamd/override.d/', 0755, true);
 		}
@@ -1833,82 +1837,51 @@ class installer_base {
 		$tpl->setLoop('whitelist_ips', $whitelist_ips);
 		wf('/etc/rspamd/local.d/users.conf', $tpl->grab());
 
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_groups.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_groups.conf.master /etc/rspamd/local.d/groups.conf');
-		} else {
-			exec('cp tpl/rspamd_groups.conf.master /etc/rspamd/local.d/groups.conf');
-		}
-
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_antivirus.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_antivirus.conf.master /etc/rspamd/local.d/antivirus.conf');
-		} else {
-			exec('cp tpl/rspamd_antivirus.conf.master /etc/rspamd/local.d/antivirus.conf');
-		}
-
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_classifier-bayes.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_classifier-bayes.conf.master /etc/rspamd/local.d/classifier-bayes.conf');
-		} else {
-			exec('cp tpl/rspamd_classifier-bayes.conf.master /etc/rspamd/local.d/classifier-bayes.conf');
-		}
-
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_greylist.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_greylist.conf.master /etc/rspamd/local.d/greylist.conf');
-		} else {
-			exec('cp tpl/rspamd_greylist.conf.master /etc/rspamd/local.d/greylist.conf');
-		}
-
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_symbols_antivirus.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_symbols_antivirus.conf.master /etc/rspamd/local.d/antivirus_group.conf');
-		} else {
-			exec('cp tpl/rspamd_symbols_antivirus.conf.master /etc/rspamd/local.d/antivirus_group.conf');
-		}
-
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_override_rbl.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_override_rbl.conf.master /etc/rspamd/override.d/rbl_group.conf');
-		} else {
-			exec('cp tpl/rspamd_override_rbl.conf.master /etc/rspamd/override.d/rbl_group.conf');
-		}
-
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_override_surbl.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_override_surbl.conf.master /etc/rspamd/override.d/surbl_group.conf');
-		} else {
-			exec('cp tpl/rspamd_override_surbl.conf.master /etc/rspamd/override.d/surbl_group.conf');
-		}
-
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_mx_check.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_mx_check.conf.master /etc/rspamd/local.d/mx_check.conf');
-		} else {
-			exec('cp tpl/rspamd_mx_check.conf.master /etc/rspamd/local.d/mx_check.conf');
-		}
-
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_redis.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_redis.conf.master /etc/rspamd/local.d/redis.conf');
-		} else {
-			exec('cp tpl/rspamd_redis.conf.master /etc/rspamd/local.d/redis.conf');
-		}
-
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_milter_headers.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_milter_headers.conf.master /etc/rspamd/local.d/milter_headers.conf');
-		} else {
-			exec('cp tpl/rspamd_milter_headers.conf.master /etc/rspamd/local.d/milter_headers.conf');
-		}
-
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_options.inc.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_options.inc.master /etc/rspamd/local.d/options.inc');
-		} else {
-			exec('cp tpl/rspamd_options.inc.master /etc/rspamd/local.d/options.inc');
+		$local_d = array(
+			'groups.conf',
+			'antivirus.conf',
+			'classifier-bayes.conf',
+			'greylist.conf',
+			'mx_check.conf',
+			'redis.conf',
+			'milter_headers.conf',
+			'options.inc',
+			'neural.conf',
+			'neural_group.conf',
+			'group.conf',
+		);
+		foreach ($local_d as $f) {
+			if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
+				exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/local.d/${f}");
+			} else {
+				exec("cp tpl/rspamd_${f}.master /etc/rspamd/local.d/${f}");
+			}
 		}
 
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_neural.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_neural.conf.master /etc/rspamd/local.d/neural.conf');
-		} else {
-			exec('cp tpl/rspamd_neural.conf.master /etc/rspamd/local.d/neural.conf');
+		$override_d = array(
+			'rbl_group.conf',
+			'surbl_group.conf',
+		);
+		foreach ($override_d as $f) {
+			if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
+				exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/override.d/${f}");
+			} else {
+				exec("cp tpl/rspamd_{f}.master /etc/rspamd/override.d/${f}");
+			}
 		}
 
-		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_neural_group.conf.master')) {
-			exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_neural_group.conf.master /etc/rspamd/local.d/neural_group.conf');
-		} else {
-			exec('cp tpl/rspamd_neural_group.conf.master /etc/rspamd/local.d/neural_group.conf');
+		$maps_d = array(
+			'dkim_whitelist.inc',
+			'dmarc_whitelist.inc',
+			'spf_dkim_whitelist.inc',
+			'spf_whitelist.inc',
+		);
+		foreach ($maps_d as $f) {
+			if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
+				exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/local.d/maps.d/");
+			} else {
+				exec("cp tpl/rspamd_${f}.master /etc/rspamd/local.d/maps.d/");
+			}
 		}
 
 		$tpl = new tpl();
@@ -1916,8 +1889,9 @@ class installer_base {
 		$tpl->setVar('dkim_path', $mail_config['dkim_path']);
 		wf('/etc/rspamd/local.d/dkim_signing.conf', $tpl->grab());
 
-		exec('chmod a+r /etc/rspamd/local.d/* /etc/rspamd/override.d/*');
+		exec('chmod a+r /etc/rspamd/local.d/* /etc/rspamd/local.d/maps.d/* /etc/rspamd/override.d/*');
 
+		# unneccesary, since this was done above?
 		$command = 'usermod -a -G amavis _rspamd';
 		caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 
diff --git a/install/tpl/dkim_whitelist.inc.master b/install/tpl/dkim_whitelist.inc.master
new file mode 100644
index 0000000000..e9049c3ea8
--- /dev/null
+++ b/install/tpl/dkim_whitelist.inc.master
@@ -0,0 +1,5 @@
+# Domain whitelist via valid DKIM policy
+# (Prefer to spf_dkim_whitelist for domains that use both SPF and DKIM.)
+
+ispconfig.org
+
diff --git a/install/tpl/dmarc_whitelist.inc.master b/install/tpl/dmarc_whitelist.inc.master
new file mode 100644
index 0000000000..a8d866467b
--- /dev/null
+++ b/install/tpl/dmarc_whitelist.inc.master
@@ -0,0 +1,9 @@
+# Domain whitelist via valid DMARC policy (aligned SPF and/or aligned DKIM)
+
+comodo.com
+geotrust.com
+geotrusteurope.com
+howtoforge.com
+ispconfig.org
+letsencrypt.org
+
diff --git a/install/tpl/rspamd_symbols_antivirus.conf.master b/install/tpl/rspamd_antivirus_group.conf.master
similarity index 100%
rename from install/tpl/rspamd_symbols_antivirus.conf.master
rename to install/tpl/rspamd_antivirus_group.conf.master
diff --git a/install/tpl/rspamd_override_rbl.conf.master b/install/tpl/rspamd_rbl_group.conf.master
similarity index 100%
rename from install/tpl/rspamd_override_rbl.conf.master
rename to install/tpl/rspamd_rbl_group.conf.master
diff --git a/install/tpl/rspamd_override_surbl.conf.master b/install/tpl/rspamd_surbl_group.conf.master
similarity index 100%
rename from install/tpl/rspamd_override_surbl.conf.master
rename to install/tpl/rspamd_surbl_group.conf.master
diff --git a/install/tpl/rspamd_users.inc.conf.master b/install/tpl/rspamd_users.inc.conf.master
deleted file mode 120000
index 30bb52fd8e..0000000000
--- a/install/tpl/rspamd_users.inc.conf.master
+++ /dev/null
@@ -1 +0,0 @@
-../../server/conf/rspamd_users.inc.conf.master
\ No newline at end of file
diff --git a/install/tpl/rspamd_whitelist.conf.master b/install/tpl/rspamd_whitelist.conf.master
new file mode 100644
index 0000000000..6b4647a948
--- /dev/null
+++ b/install/tpl/rspamd_whitelist.conf.master
@@ -0,0 +1,38 @@
+rules {
+  "ISPC_WHITELIST_SPF" = {
+    valid_spf = true;
+    domains = [
+      "$LOCAL_CONFDIR/local.d/maps.d/spf_whitelist.inc.ispc"
+    ];
+    score = -2.0
+    inverse_symbol = "ISPC_BLACKLIST_SPF";
+  }
+
+  "ISPC_WHITELIST_DKIM" = {
+    valid_dkim = true;
+    domains = [
+      "$LOCAL_CONFDIR/local.d/maps.d/dkim_whitelist.inc.ispc"
+    ];
+    score = -2.0;
+    inverse_symbol = "ISPC_BLACKLIST_DKIM";
+  }
+
+  "ISPC_WHITELIST_SPF_DKIM" = {
+    valid_spf = true;
+    valid_dkim = true;
+    domains = [
+      "$LOCAL_CONFDIR/local.d/maps.d/spf_dkim_whitelist.inc.ispc"
+    ];
+    score = -4.0;
+    inverse_symbol = "ISPC_BLACKLIST_SPF_DKIM";
+  }
+
+  "ISPC_WHITELIST_DMARC" = {
+    valid_dmarc = true;
+    domains = [
+      "$LOCAL_CONFDIR/local.d/maps.d/dmarc_whitelist.inc.ispc"
+    ];
+    score = -7.0;
+    inverse_symbol = "ISPC_BLACKLIST_DMARC";
+  }
+}
diff --git a/install/tpl/spf_dkim_whitelist.inc.master b/install/tpl/spf_dkim_whitelist.inc.master
new file mode 100644
index 0000000000..cfb3be3177
--- /dev/null
+++ b/install/tpl/spf_dkim_whitelist.inc.master
@@ -0,0 +1,8 @@
+# Domain whitelist via valid SPF policy AND valid DKIM policy
+# (Prefer to spf_whitelist or dkim_whitelist for domains that use both SPF and DKIM.)
+
+comodo.com
+geotrust.com
+geotrusteurope.com
+letsencrypt.org
+
diff --git a/install/tpl/spf_whitelist.inc.master b/install/tpl/spf_whitelist.inc.master
new file mode 100644
index 0000000000..8eda01c8d6
--- /dev/null
+++ b/install/tpl/spf_whitelist.inc.master
@@ -0,0 +1,6 @@
+# Domain whitelist via valid SPF policy
+# (Prefer to spf_dkim_whitelist for domains that use both SPF and DKIM.)
+
+howtoforge.com
+ispconfig.org
+
diff --git a/server/conf/rspamd_users.conf.master b/server/conf/rspamd_users.conf.master
index 73d437d6cb..d7ab2d8b50 100644
--- a/server/conf/rspamd_users.conf.master
+++ b/server/conf/rspamd_users.conf.master
@@ -1,41 +1,24 @@
 settings {
 	authenticated {
-		priority = 10;
+		priority = 9;
 		authenticated = yes;
-		#apply "default" { groups_disabled = ["rbl", "spf"]; }
 		apply "default" {
-			#symbols_enabled = [];
 			symbols_disabled = [];
-			#groups_enabled = [];
-			groups_disabled = ["rbl"];
+			groups_disabled = ["rbl", "spf"];
 		}
 	}
 	whitelist {
-		priority = 10;
+		priority = 7;
 		rcpt = "postmaster";
 		rcpt = "hostmaster";
 		rcpt = "abuse";
 		want_spam = yes;
 	}
 	whitelist-ip {
-		priority = 10;
+		priority = 5;
 <tmpl_loop name="whitelist_ips">
 		ip = "<tmpl_var name='ip'>";
 </tmpl_loop>
-		
-		want_spam = yes;
-	}
-#	whitelist-timmehosting {
-#		priority = 20;
-#		from = "@xxx";
-#		from = "@xxx";
-#		want_spam = yes;
-#	}
-	whitelist-ca {
-		priority = 20;
-		from = "@comodo.com";
-		from = "@geotrust.com";
-		from = "@geotrusteurope.com";
 		want_spam = yes;
 	}
 	.include(try=true; glob=true) "$LOCAL_CONFDIR/local.d/users/*.conf"
-- 
GitLab


From b59dc3fa70433e62815835b9fd803cdca4b1f0be Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 17 Feb 2021 14:44:33 -0700
Subject: [PATCH 304/441] WIP: rspamd whitelisting and rule priorities

---
 install/lib/installer_base.lib.php            | 34 ++++++++++++-------
 ...aster => rspamd_dkim_whitelist.inc.master} |  0
 ...ster => rspamd_dmarc_whitelist.inc.master} |  1 -
 install/tpl/rspamd_options.inc.master         |  9 ++++-
 ...r => rspamd_spf_dkim_whitelist.inc.master} |  3 +-
 ...master => rspamd_spf_whitelist.inc.master} |  0
 install/update.php                            |  2 ++
 server/conf/rspamd_users.conf.master          | 11 ++----
 8 files changed, 35 insertions(+), 25 deletions(-)
 rename install/tpl/{dkim_whitelist.inc.master => rspamd_dkim_whitelist.inc.master} (100%)
 rename install/tpl/{dmarc_whitelist.inc.master => rspamd_dmarc_whitelist.inc.master} (90%)
 rename install/tpl/{spf_dkim_whitelist.inc.master => rspamd_spf_dkim_whitelist.inc.master} (64%)
 rename install/tpl/{spf_whitelist.inc.master => rspamd_spf_whitelist.inc.master} (100%)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 94116e32f8..d1d1ee6019 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1814,6 +1814,7 @@ class installer_base {
 			$mail_config['dkim_path'] = substr($mail_config['dkim_path'], 0, strlen($mail_config['dkim_path'])-1);
 		}
 		$dkim_domains = $this->db->queryAllRecords('SELECT `dkim_selector`, `domain` FROM ?? WHERE `dkim` = ? ORDER BY `domain` ASC', $conf['mysql']['database'] . '.mail_domain', 'y');
+		# should move maps to local.d/maps.d/ ?
 		$fpp = fopen('/etc/rspamd/local.d/dkim_domains.map', 'w');
 		$fps = fopen('/etc/rspamd/local.d/dkim_selectors.map', 'w');
 		foreach($dkim_domains as $dkim_domain) {
@@ -1824,19 +1825,28 @@ class installer_base {
 		fclose($fps);
 		unset($dkim_domains);
 
+		# local.d templates with template tags
 		$tpl = new tpl();
-		$tpl->newTemplate('rspamd_users.conf.master');
+		$tpl->newTemplate('rspamd_dkim_signing.conf.master');
+		$tpl->setVar('dkim_path', $mail_config['dkim_path']);
+		wf('/etc/rspamd/local.d/dkim_signing.conf', $tpl->grab());
+
+		$tpl = new tpl();
+		$tpl->newTemplate('rspamd_options.inc.master');
 
-		$whitelist_ips = array();
-		$ips = $this->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ?", $conf['server_id']);
+echo "\nDEBUGGING local_addrs LOOP\n\n";
+sleep(1);
+		$local_addrs = array();
+		$ips = $this->db->queryAllRecords('SELECT `ip_address`, `ip_type` FROM ?? WHERE `server_id` = ?', $conf['mysql']['database'].'.server_ip', $conf['server_id']);
 		if(is_array($ips) && !empty($ips)){
 			foreach($ips as $ip){
-				$whitelist_ips[] = array('ip' => $ip['ip_address']);
+				$local_addrs[] = array('quoted_ip' => "\"".$ip['ip_address']."\",\n");
 			}
 		}
-		$tpl->setLoop('whitelist_ips', $whitelist_ips);
-		wf('/etc/rspamd/local.d/users.conf', $tpl->grab());
+		$tpl->setLoop('local_addrs', $local_addrs);
+		wf('/etc/rspamd/local.d/options.inc', $tpl->grab());
 
+		# local.d templates without template tags
 		$local_d = array(
 			'groups.conf',
 			'antivirus.conf',
@@ -1845,10 +1855,10 @@ class installer_base {
 			'mx_check.conf',
 			'redis.conf',
 			'milter_headers.conf',
-			'options.inc',
 			'neural.conf',
 			'neural_group.conf',
-			'group.conf',
+			'users.conf',
+			'groups.conf',
 		);
 		foreach ($local_d as $f) {
 			if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
@@ -1858,6 +1868,7 @@ class installer_base {
 			}
 		}
 
+		# override.d templates without template tags
 		$override_d = array(
 			'rbl_group.conf',
 			'surbl_group.conf',
@@ -1866,10 +1877,11 @@ class installer_base {
 			if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
 				exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/override.d/${f}");
 			} else {
-				exec("cp tpl/rspamd_{f}.master /etc/rspamd/override.d/${f}");
+				exec("cp tpl/rspamd_${f}.master /etc/rspamd/override.d/${f}");
 			}
 		}
 
+		# local.d/maps.d templates without template tags
 		$maps_d = array(
 			'dkim_whitelist.inc',
 			'dmarc_whitelist.inc',
@@ -1884,10 +1896,6 @@ class installer_base {
 			}
 		}
 
-		$tpl = new tpl();
-		$tpl->newTemplate('rspamd_dkim_signing.conf.master');
-		$tpl->setVar('dkim_path', $mail_config['dkim_path']);
-		wf('/etc/rspamd/local.d/dkim_signing.conf', $tpl->grab());
 
 		exec('chmod a+r /etc/rspamd/local.d/* /etc/rspamd/local.d/maps.d/* /etc/rspamd/override.d/*');
 
diff --git a/install/tpl/dkim_whitelist.inc.master b/install/tpl/rspamd_dkim_whitelist.inc.master
similarity index 100%
rename from install/tpl/dkim_whitelist.inc.master
rename to install/tpl/rspamd_dkim_whitelist.inc.master
diff --git a/install/tpl/dmarc_whitelist.inc.master b/install/tpl/rspamd_dmarc_whitelist.inc.master
similarity index 90%
rename from install/tpl/dmarc_whitelist.inc.master
rename to install/tpl/rspamd_dmarc_whitelist.inc.master
index a8d866467b..498fbc971f 100644
--- a/install/tpl/dmarc_whitelist.inc.master
+++ b/install/tpl/rspamd_dmarc_whitelist.inc.master
@@ -5,5 +5,4 @@ geotrust.com
 geotrusteurope.com
 howtoforge.com
 ispconfig.org
-letsencrypt.org
 
diff --git a/install/tpl/rspamd_options.inc.master b/install/tpl/rspamd_options.inc.master
index 69e40365b7..c6a1603c20 100644
--- a/install/tpl/rspamd_options.inc.master
+++ b/install/tpl/rspamd_options.inc.master
@@ -1,4 +1,11 @@
-local_addrs = "127.0.0.0/8, ::1";
+# Addrs local to this server.
+local_addrs = [
+		"127.0.0.0/8",
+		"::1",
+<tmpl_loop name="local_addrs">	<tmpl_var name='quoted_ip'></tmpl_loop>];
+
+# This list is generated by ISPConfig, place custom addresses/networks in local_networks.inc.
+local_networks = "/etc/rspamd/local.d/local_networks.inc";
 
 dns {
 	nameserver = ["127.0.0.1:53:10"];
diff --git a/install/tpl/spf_dkim_whitelist.inc.master b/install/tpl/rspamd_spf_dkim_whitelist.inc.master
similarity index 64%
rename from install/tpl/spf_dkim_whitelist.inc.master
rename to install/tpl/rspamd_spf_dkim_whitelist.inc.master
index cfb3be3177..42d5c8fd85 100644
--- a/install/tpl/spf_dkim_whitelist.inc.master
+++ b/install/tpl/rspamd_spf_dkim_whitelist.inc.master
@@ -4,5 +4,6 @@
 comodo.com
 geotrust.com
 geotrusteurope.com
-letsencrypt.org
+# letsencrypt is in rspamd's default spf_dkim_whitelist, only needed if strict:
+#letsencrypt.org both:1.0
 
diff --git a/install/tpl/spf_whitelist.inc.master b/install/tpl/rspamd_spf_whitelist.inc.master
similarity index 100%
rename from install/tpl/spf_whitelist.inc.master
rename to install/tpl/rspamd_spf_whitelist.inc.master
diff --git a/install/update.php b/install/update.php
index 46031f77bb..e821eac203 100644
--- a/install/update.php
+++ b/install/update.php
@@ -254,6 +254,8 @@ prepareDBDump();
 
 //* initialize the database
 $inst->db = new db();
+$inst->db->setDBData($conf['mysql']["host"], $conf['mysql']["ispconfig_user"], $conf['mysql']["ispconfig_password"], $conf['mysql']["port"]);
+$inst->db->setDBName($conf['mysql']['database']);
 
 //* initialize the master DB, if we have a multiserver setup
 if($conf['mysql']['master_slave_setup'] == 'y') {
diff --git a/server/conf/rspamd_users.conf.master b/server/conf/rspamd_users.conf.master
index d7ab2d8b50..ba16bc8b12 100644
--- a/server/conf/rspamd_users.conf.master
+++ b/server/conf/rspamd_users.conf.master
@@ -1,6 +1,6 @@
 settings {
 	authenticated {
-		priority = 9;
+		priority = 10;
 		authenticated = yes;
 		apply "default" {
 			symbols_disabled = [];
@@ -8,19 +8,12 @@ settings {
 		}
 	}
 	whitelist {
-		priority = 7;
+		priority = 5;
 		rcpt = "postmaster";
 		rcpt = "hostmaster";
 		rcpt = "abuse";
 		want_spam = yes;
 	}
-	whitelist-ip {
-		priority = 5;
-<tmpl_loop name="whitelist_ips">
-		ip = "<tmpl_var name='ip'>";
-</tmpl_loop>
-		want_spam = yes;
-	}
 	.include(try=true; glob=true) "$LOCAL_CONFDIR/local.d/users/*.conf"
 	.include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/users.local.conf"
 }
-- 
GitLab


From 282e5ec8f02531cabe908f485742a2910a851bef Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 18 Feb 2021 11:00:03 -0700
Subject: [PATCH 305/441] rspamd: server ips in local_addrs

---
 install/lib/installer_base.lib.php             |  6 ++----
 install/tpl/rspamd_options.inc.master          | 13 +------------
 install/tpl/rspamd_users.conf.master           |  1 -
 server/conf/rspamd_options.inc.master          | 12 ++++++++++++
 server/plugins-available/rspamd_plugin.inc.php | 12 ++++++------
 5 files changed, 21 insertions(+), 23 deletions(-)
 mode change 100644 => 120000 install/tpl/rspamd_options.inc.master
 delete mode 120000 install/tpl/rspamd_users.conf.master
 create mode 100644 server/conf/rspamd_options.inc.master

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index d1d1ee6019..c3aadefa83 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1834,8 +1834,6 @@ class installer_base {
 		$tpl = new tpl();
 		$tpl->newTemplate('rspamd_options.inc.master');
 
-echo "\nDEBUGGING local_addrs LOOP\n\n";
-sleep(1);
 		$local_addrs = array();
 		$ips = $this->db->queryAllRecords('SELECT `ip_address`, `ip_type` FROM ?? WHERE `server_id` = ?', $conf['mysql']['database'].'.server_ip', $conf['server_id']);
 		if(is_array($ips) && !empty($ips)){
@@ -1890,9 +1888,9 @@ sleep(1);
 		);
 		foreach ($maps_d as $f) {
 			if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
-				exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/local.d/maps.d/");
+				exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/local.d/maps.d/${f}");
 			} else {
-				exec("cp tpl/rspamd_${f}.master /etc/rspamd/local.d/maps.d/");
+				exec("cp tpl/rspamd_${f}.master /etc/rspamd/local.d/maps.d/${f}");
 			}
 		}
 
diff --git a/install/tpl/rspamd_options.inc.master b/install/tpl/rspamd_options.inc.master
deleted file mode 100644
index c6a1603c20..0000000000
--- a/install/tpl/rspamd_options.inc.master
+++ /dev/null
@@ -1,12 +0,0 @@
-# Addrs local to this server.
-local_addrs = [
-		"127.0.0.0/8",
-		"::1",
-<tmpl_loop name="local_addrs">	<tmpl_var name='quoted_ip'></tmpl_loop>];
-
-# This list is generated by ISPConfig, place custom addresses/networks in local_networks.inc.
-local_networks = "/etc/rspamd/local.d/local_networks.inc";
-
-dns {
-	nameserver = ["127.0.0.1:53:10"];
-}
diff --git a/install/tpl/rspamd_options.inc.master b/install/tpl/rspamd_options.inc.master
new file mode 120000
index 0000000000..7cc72e81b2
--- /dev/null
+++ b/install/tpl/rspamd_options.inc.master
@@ -0,0 +1 @@
+../../server/conf/rspamd_options.inc.master
\ No newline at end of file
diff --git a/install/tpl/rspamd_users.conf.master b/install/tpl/rspamd_users.conf.master
deleted file mode 120000
index 3aa7af3185..0000000000
--- a/install/tpl/rspamd_users.conf.master
+++ /dev/null
@@ -1 +0,0 @@
-../../server/conf/rspamd_users.conf.master
\ No newline at end of file
diff --git a/server/conf/rspamd_options.inc.master b/server/conf/rspamd_options.inc.master
new file mode 100644
index 0000000000..c6a1603c20
--- /dev/null
+++ b/server/conf/rspamd_options.inc.master
@@ -0,0 +1,12 @@
+# Addrs local to this server.
+local_addrs = [
+		"127.0.0.0/8",
+		"::1",
+<tmpl_loop name="local_addrs">	<tmpl_var name='quoted_ip'></tmpl_loop>];
+
+# This list is generated by ISPConfig, place custom addresses/networks in local_networks.inc.
+local_networks = "/etc/rspamd/local.d/local_networks.inc";
+
+dns {
+	nameserver = ["127.0.0.1:53:10"];
+}
diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index e9a6cdd633..16cc9e598a 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -459,17 +459,17 @@ class rspamd_plugin {
 
 		if(is_dir('/etc/rspamd')) {
 			$tpl = new tpl();
-			$tpl->newTemplate('rspamd_users.conf.master');
+			$tpl->newTemplate('rspamd_options.inc.master');
 
-			$whitelist_ips = array();
-			$ips = $app->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ?", $conf['server_id']);
+			$local_addrs = array();
+			$ips = $app->db->queryAllRecords('SELECT `ip_address`, `ip_type` FROM ?? WHERE `server_id` = ?', $conf['mysql']['database'].'.server_ip', $conf['server_id']);
 			if(is_array($ips) && !empty($ips)){
 				foreach($ips as $ip){
-					$whitelist_ips[] = array('ip' => $ip['ip_address']);
+					$local_addrs[] = array('quoted_ip' => "\"".$ip['ip_address']."\",\n");
 				}
 			}
-			$tpl->setLoop('whitelist_ips', $whitelist_ips);
-			$app->system->file_put_contents('/etc/rspamd/local.d/users.conf', $tpl->grab());
+			$tpl->setLoop('local_addrs', $local_addrs);
+			$app->system->file_put_contents('/etc/rspamd/local.d/options.inc', $tpl->grab());
 
 			if($mail_config['content_filter'] == 'rspamd'){
 				$app->services->restartServiceDelayed('rspamd', 'reload');
-- 
GitLab


From 8a03bc6b42d24dbe024cbe6cbe80c5d14ae030d0 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Wed, 3 Mar 2021 20:22:26 +0100
Subject: [PATCH 306/441] dns_rr.name can be just the first part, or the full
 fqdn

---
 interface/web/dns/dns_dmarc_edit.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php
index c49b60fc78..00df3e88c0 100644
--- a/interface/web/dns/dns_dmarc_edit.php
+++ b/interface/web/dns/dns_dmarc_edit.php
@@ -228,8 +228,8 @@ class page_action extends tform_actions {
 		// DMARC requieres at least one active dkim-record...
 		$sql = "SELECT * FROM dns_rr
 					LEFT JOIN dns_soa ON (dns_rr.zone=dns_soa.id)
-					WHERE dns_rr.name LIKE ? AND dns_soa.origin = ? AND type='TXT' AND data like 'v=DKIM1;%' AND dns_rr.active='Y'";
-		$temp = $app->db->queryAllRecords($sql, '%._domainkey', $soa['origin']);
+					WHERE dns_soa.origin = ? AND dns_rr.name LIKE ? AND type='TXT' AND data like 'v=DKIM1;%' AND dns_rr.active='Y'";
+		$temp = $app->db->queryAllRecords($sql, $soa['origin'], '%._domainkey%');
 		if (empty($temp)) {
 			if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '<br/>' . $app->tform->errorMessage;
 			$app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_dkim_txt'].$email;
-- 
GitLab


From 366b1ad510318fa74e24db76c537a837f54d4846 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Wed, 3 Mar 2021 20:22:32 +0100
Subject: [PATCH 307/441] Also relate spf record check to a soa

---
 interface/web/dns/dns_dmarc_edit.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php
index 00df3e88c0..e194aeb835 100644
--- a/interface/web/dns/dns_dmarc_edit.php
+++ b/interface/web/dns/dns_dmarc_edit.php
@@ -236,8 +236,10 @@ class page_action extends tform_actions {
 		}
 
 		// ... and an active spf-record (this breaks the current draft but DMARC is useless if you use DKIM or SPF
-		$sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND (data LIKE 'v=spf1%' AND active = 'y')";
-		$temp = $app->db->queryAllRecords($sql, $domain_name.'.');
+		$sql = "SELECT * FROM dns_rr
+					LEFT JOIN dns_soa ON (dns_rr.zone=dns_soa.id)
+					WHERE dns_soa.origin = ? AND (dns_rr.name LIKE ? OR dns_rr.name = '') AND type='TXT' AND data like 'v=spf1%' AND dns_rr.active='Y'";
+		$temp = $app->db->queryAllRecords($sql, $soa['origin'], $soa['origin']);
 		// abort if more than 1 active spf-records (backward-compatibility)
 		if (is_array($temp[1])) {
 			if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '<br/>' . $app->tform->errorMessage;
-- 
GitLab


From 50bf96a8b248311d7e8449bcdf9d2b6fdaa6b44b Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 2 Mar 2021 14:06:04 -0700
Subject: [PATCH 308/441] rspamd: no priority collisions

---
 server/conf/rspamd_options.inc.master          |  4 ++--
 server/plugins-available/rspamd_plugin.inc.php | 11 +++++------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/server/conf/rspamd_options.inc.master b/server/conf/rspamd_options.inc.master
index c6a1603c20..537816c803 100644
--- a/server/conf/rspamd_options.inc.master
+++ b/server/conf/rspamd_options.inc.master
@@ -1,7 +1,7 @@
 # Addrs local to this server.
 local_addrs = [
-		"127.0.0.0/8",
-		"::1",
+	"127.0.0.0/8",
+	"::1",
 <tmpl_loop name="local_addrs">	<tmpl_var name='quoted_ip'></tmpl_loop>];
 
 # This list is generated by ISPConfig, place custom addresses/networks in local_networks.inc.
diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index 16cc9e598a..09ed09a436 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -224,11 +224,10 @@ class rspamd_plugin {
 				unlink($settings_file);
 			}
 		} else {
-			$settings_priority = 20;
 			if(isset($data[$use_data]['priority'])) {
-				$settings_priority = intval($data[$use_data]['priority']);
-			} elseif($is_domain === true) {
-				$settings_priority = 18;
+				$settings_priority = ($is_domain ? 10 : 20) + intval($data[$use_data]['priority']);
+			} else {
+				$settings_priority = ($is_domain ? 10 : 20) + 5;
 			}
 
 			// get policy for entry
@@ -405,8 +404,8 @@ class rspamd_plugin {
 					$tpl->newTemplate('rspamd_wblist.inc.conf.master');
 					$tpl->setVar('list_scope', ($global_filter ? 'global' : 'spamfilter'));
 					$tpl->setVar('record_id', $record_id);
-					// we need to add 10 to priority to avoid mailbox/domain spamfilter settings overriding white/blacklists
-					$tpl->setVar('priority', intval($data['new']['priority']) + ($global_filter ? 10 : 20));
+					// add 30/40 to priority to avoid collisions and prefer white/blacklists above mailbox/domain spamfilter settings
+					$tpl->setVar('priority', intval($data['new']['priority']) + ($global_filter ? 30 : 40));
 					$tpl->setVar('from', $filter_from);
 					$tpl->setVar('recipient', $filter_rcpt);
 					$tpl->setVar('hostname', $filter['hostname']);
-- 
GitLab


From 16fbcda5ff79b6db2c219280b4a9e5570550572f Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 3 Mar 2021 17:16:38 -0700
Subject: [PATCH 309/441] rspamd_users.conf.master is an install template

---
 {server/conf => install/tpl}/rspamd_users.conf.master | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {server/conf => install/tpl}/rspamd_users.conf.master (100%)

diff --git a/server/conf/rspamd_users.conf.master b/install/tpl/rspamd_users.conf.master
similarity index 100%
rename from server/conf/rspamd_users.conf.master
rename to install/tpl/rspamd_users.conf.master
-- 
GitLab


From faa306e6c6705d3b36db7ee26a99dc5b3d663fdf Mon Sep 17 00:00:00 2001
From: Helmo <rink@initfour.nl>
Date: Thu, 4 Mar 2021 19:05:26 +0000
Subject: [PATCH 310/441] Minor md tweaks

---
 CONTRIBUTING.md | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5c168d13c8..27377de6e6 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -32,7 +32,7 @@ Closes #6049"
 # Some guidelines for web development with php.
 -----------------------------------------------------
 * Don't use features that are not supported in PHP 5.4, for compatibility with LTS OS releases, ISPConfig must support PHP 5.4+
-* Don't use shorttags. A Shorttag is <? and that is confusing with <?xml -> always use <?php
+* Don't use shorttags. A Shorttag is `<?` and that is confusing with `<?xml` -> always use `<?php`
 * Don't use namespaces
 * Column names in database tables and database table names are in lowercase
 * Classes for the interface are located in interface/lib/classes/ and loaded with $app->uses() or $app->load() functions.
@@ -40,7 +40,7 @@ Closes #6049"
 
 ### Indentations
 
-Indentations are always done with tabs. Do **not** use spaces.  
+Indentations are always done with tabs. Do **not** use spaces.
 It is recommended to set your IDE to display tabs with a width of 4 spaces.
 
 ### Variable and method / function names
@@ -73,7 +73,7 @@ class my_class {
 
 #### Curly braces
 
-Opening curly braces always have to be in the same line as the preceding condition. They are separated by a single space from the closing paranthesis.  
+Opening curly braces always have to be in the same line as the preceding condition. They are separated by a single space from the closing paranthesis.
 Closing curly braces are always on a separate line after the last statement in the block. The only exception is a do-while block where the logic is inverted.
 
 Curly braces are **always** to be used. Do not leave them out, even if there is only a single statement in the corresponding block.
@@ -206,7 +206,7 @@ $var2 = [
 ```
 
 **Wrong:**
-```php:
+```php
 $var = array();
 
 $var2 = array(
@@ -218,7 +218,7 @@ $var2 = array(
 
 #### Spaces and newlines
 
-When defining an empty array, both brackets shall be on the same line. When defining an array with values, the style depends on the values you are going to assign.  
+When defining an empty array, both brackets shall be on the same line. When defining an array with values, the style depends on the values you are going to assign.
 
 ##### List of values
 
-- 
GitLab


From cc843666f8fb8a6173cca69177001e8845837591 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 4 Mar 2021 15:13:41 -0700
Subject: [PATCH 311/441] append rather than replace _rspamd supplemental
 groups

---
 install/lib/installer_base.lib.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 95c6cb87ef..7103c28192 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1793,9 +1793,9 @@ class installer_base {
 		}
 
 		if(is_user('_rspamd') && is_group('amavis')) {
-			exec("usermod -G amavis _rspamd");
+			exec("usermod -a -G amavis _rspamd");
 		} elseif(is_user('rspamd') && is_group('amavis')) {
-			exec("usermod -G amavis rspamd");
+			exec("usermod -a -G amavis rspamd");
 		}
 
 		if(!is_dir('/etc/rspamd/local.d/')){
-- 
GitLab


From 412cee02b24c6dd8ef84eafb40d0d7c0ae4355d3 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sun, 7 Mar 2021 13:13:05 +0000
Subject: [PATCH 312/441] Fix proxy re-sets to No redirect (#6086)

---
 interface/web/sites/templates/web_vhost_domain_redirect.htm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/sites/templates/web_vhost_domain_redirect.htm b/interface/web/sites/templates/web_vhost_domain_redirect.htm
index 597b427a4a..b21f297f20 100644
--- a/interface/web/sites/templates/web_vhost_domain_redirect.htm
+++ b/interface/web/sites/templates/web_vhost_domain_redirect.htm
@@ -86,7 +86,7 @@
                 jQuery('#redirect_type option[value="redirect"]').hide();
                 jQuery('#redirect_type option[value="permanent"]').hide();
 				//jQuery('#redirect_type option[value="proxy"]').hide();
-                if(selected != "no" && selected != "" && selected != "R" && selected != "L" && selected != "R,L" && selected != "R=301,L") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected');
+                if(selected != "no" && selected != "" && selected != "R" && selected != "L" && selected != "R,L" && selected != "R=301,L" && selected != "proxy") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected');
 				jQuery('.nginx').hide();
             }
         });
-- 
GitLab


From 9da76fd1d886c8c6ae172c73714f2455e54767b4 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@amsterdamtech.nl>
Date: Sun, 7 Mar 2021 14:36:31 +0100
Subject: [PATCH 313/441] Add global option to disable/enable welcome email
 messages (#1804)

---
 install/tpl/system.ini.master                |  1 +
 server/plugins-available/mail_plugin.inc.php | 41 ++++++++++----------
 2 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master
index bbd78e6b3a..99ca0693f5 100644
--- a/install/tpl/system.ini.master
+++ b/install/tpl/system.ini.master
@@ -16,6 +16,7 @@ webmail_url=/webmail
 dkim_path=/var/lib/amavis/dkim
 smtp_enabled=y
 smtp_host=localhost
+enable_welcome_mail=y
 
 [monitor]
 
diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php
index fb00166021..0d2e52c4fc 100644
--- a/server/plugins-available/mail_plugin.inc.php
+++ b/server/plugins-available/mail_plugin.inc.php
@@ -136,7 +136,7 @@ class mail_plugin {
 			$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Trash'", $data["new"]["email"]);
 			$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Junk'", $data["new"]["email"]);
 			$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Drafts'", $data["new"]["email"]);
-			
+
 			$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? INBOX'", $data["new"]["email"]);
 			$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? Sent'", $data["new"]["email"]);
 			$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? Trash'", $data["new"]["email"]);
@@ -150,26 +150,26 @@ class mail_plugin {
 				$app->log('Created Directory: '.$maildomain_path, LOGLEVEL_DEBUG);
 				$maildomain_path .= '/Maildir';
 			}
-					
+
 			//* When the mail user dir exists but it is not a valid maildir, move it to corrupted maildir folder
 			if(!empty($maildomain_path) && is_dir($maildomain_path) && !is_dir($maildomain_path.'/new') && !is_dir($maildomain_path.'/cur')) {
 				if(!is_dir($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'])) $app->system->mkdirpath($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'], 0700, $mail_config['mailuser_name'], $mail_config['mailuser_group']);
 				$app->system->exec_safe("su -c ? vmail", "mv -f " . $data['new']['maildir']." ".$mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id']);
 				$app->log('Moved invalid maildir to corrupted Maildirs folder: '.$data['new']['maildir'], LOGLEVEL_WARN);
 			}
-	
+
 			//* Create the maildir, if it doesn not exist, set permissions, set quota.
 			if(!empty($maildomain_path) && !is_dir($maildomain_path)) {
-	
+
 				$app->system->maildirmake($maildomain_path, $user, '', $group);
-	
+
 				//* This is to fix the maildrop quota not being rebuilt after the quota is changed.
 				if($mail_config['pop3_imap_daemon'] != 'dovecot') {
 					if(is_dir($maildomain_path)) $app->system->exec_safe("su -c ? ?", "maildirmake -q ".$data['new']['quota']."S ".$maildomain_path, $user); // Avoid maildirmake quota bug, see debian bug #214911
 					$app->log('Created Maildir: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".$maildomain_path."' ".$user, LOGLEVEL_DEBUG);
 				}
 			}
-	
+
 			if(!is_dir($data['new']['maildir'].'/.Sent')) {
 				$app->system->maildirmake($maildomain_path, $user, 'Sent', $group);
 			}
@@ -182,11 +182,11 @@ class mail_plugin {
 			if(!is_dir($data['new']['maildir'].'/.Junk')) {
 				$app->system->maildirmake($maildomain_path, $user, 'Junk', $group);
 			}
-	
+
 			// Set permissions now recursive
 			$app->system->exec_safe('chown -R ?:? ?', $user, $group, $data['new']['maildir']);
 			$app->log('Set ownership on '.$data['new']['maildir'], LOGLEVEL_DEBUG);
-	
+
 			//* Set the maildir quota
 			if(is_dir($data['new']['maildir'].'/new') && $mail_config['pop3_imap_daemon'] != 'dovecot') {
 				if($data['new']['quota'] > 0) {
@@ -263,9 +263,10 @@ class mail_plugin {
 			$additionalParameters = '-f '.$matches[1];
 		}
 
-		// Send the welcome email only on a "master" mail server to avoid duplicate emails
+		// Send the welcome email only on a "master" mail server to avoid duplicate emails, and only send them when welcome emails are enabled.
 		// (bypass the normal ispcmail class when creating mail accounts)
-		if($conf['mirror_server_id'] == 0) mail($mailTarget, $mailSubject, $welcome_mail_message, $mailHeaders, $additionalParameters);
+		$global_config = $app->getconf->get_global_config('mail');
+		if($conf['mirror_server_id'] == 0 && $global_config['enable_welcome_mail'] == 'y') mail($mailTarget, $mailSubject, $welcome_mail_message, $mailHeaders, $additionalParameters);
 
 	}
 
@@ -278,7 +279,7 @@ class mail_plugin {
 
 		// Maildir-Format must not be changed on this way !!
 		$data['new']['maildir_format'] = $data['old']['maildir_format'];
-		
+
 		$maildomain_path = $data['new']['maildir'];
 		$tmp_basepath = $data['new']['maildir'];
 		$tmp_basepath_parts = explode('/', $tmp_basepath);
@@ -332,7 +333,7 @@ class mail_plugin {
 				$app->system->exec_safe('mv -f ? ?'. $data['old']['maildir'], $data['new']['maildir']);
 				$app->log('Moved Maildir from: '.$data['old']['maildir'].' to '.$data['new']['maildir'], LOGLEVEL_DEBUG);
 			}
-				
+
 			//* Create the maildir, if it doesn not exist, set permissions, set quota.
 			if(!is_dir($data['new']['maildir'].'/mdbox')) {
 				$app->system->exec_safe("su -c 'doveadm mailbox create -u ? INBOX'", $data["new"]["email"]);
@@ -340,7 +341,7 @@ class mail_plugin {
 				$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Trash'", $data["new"]["email"]);
 				$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Junk'", $data["new"]["email"]);
 				$app->system->exec_safe("su -c 'doveadm mailbox create -u ? Drafts'", $data["new"]["email"]);
-					
+
 				$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? INBOX'", $data["new"]["email"]);
 				$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? Sent'", $data["new"]["email"]);
 				$app->system->exec_safe("su -c 'doveadm mailbox subscribe -u ? Trash'", $data["new"]["email"]);
@@ -355,18 +356,18 @@ class mail_plugin {
 				$app->log('Created Directory: '.$base_path, LOGLEVEL_DEBUG);
 				$maildomain_path .= '/Maildir';
 			}
-	
+
 			//* When the mail user dir exists but it is not a valid maildir, move it to corrupted maildir folder
 			if(!empty($maildomain_path) && is_dir($maildomain_path) && !is_dir($maildomain_path.'/new') && !is_dir($maildomain_path.'/cur')) {
 				if(!is_dir($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'])) $app->system->mkdirpath($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'], 0700, $mail_config['mailuser_name'], $mail_config['mailuser_group']);
 				$app->system->exec_safe("su -c ? ?", "mv -f ".$data['new']['maildir']." ".$mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'], 'vmail');
 				$app->log('Moved invalid maildir to corrupted Maildirs folder: '.$data['new']['maildir'], LOGLEVEL_WARN);
 			}
-	
+
 			//* Create the maildir, if it doesn not exist, set permissions, set quota.
 			if(!empty($maildomain_path) && !is_dir($maildomain_path.'/new')) {
 				$app->system->maildirmake($maildomain_path, $user, '', $group);
-	
+
 				//* This is to fix the maildrop quota not being rebuilt after the quota is changed.
 				if($mail_config['pop3_imap_daemon'] != 'dovecot') {
 					if($data['new']['quota'] > 0) {
@@ -378,7 +379,7 @@ class mail_plugin {
 					}
 				}
 			}
-	
+
 			if(!is_dir($data['new']['maildir'].'/.Sent')) {
 				$app->system->maildirmake($maildomain_path, $user, 'Sent', $group);
 			}
@@ -391,11 +392,11 @@ class mail_plugin {
 			if(!is_dir($data['new']['maildir'].'/.Junk')) {
 				$app->system->maildirmake($maildomain_path, $user, 'Junk', $group);
 			}
-	
+
 			// Set permissions now recursive
 			$app->system->exec_safe('chown -R ?:? ?', $user, $group, $data['new']['maildir']);
 			$app->log('Set ownership on '.$data['new']['maildir'], LOGLEVEL_DEBUG);
-	
+
 			// Move mailbox, if domain has changed and delete old mailbox
 			if($data['new']['maildir'] != $data['old']['maildir'] && is_dir($data['old']['maildir'])) {
 				if(is_dir($data['new']['maildir'])) {
@@ -487,7 +488,7 @@ class mail_plugin {
 		} else {
 			$app->log('Possible security violation when deleting the mail domain mailfilter directory: '.$old_maildomain_path, LOGLEVEL_ERROR);
 		}
-		
+
 		//* Delete the mail-backups
 		$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
 		$backup_dir = $server_config['backup_dir'];
-- 
GitLab


From 81008bd557dff8fdab53c741a04015f8cbe528e9 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@amsterdamtech.nl>
Date: Sun, 7 Mar 2021 15:06:17 +0100
Subject: [PATCH 314/441] Add UI option to disable/enable welcome email
 messages (#1804)

---
 interface/web/admin/form/system_config.tform.php     |  6 ++++++
 interface/web/admin/lib/lang/ar_system_config.lng    |  1 +
 interface/web/admin/lib/lang/bg_system_config.lng    |  1 +
 interface/web/admin/lib/lang/br_system_config.lng    |  1 +
 interface/web/admin/lib/lang/ca_system_config.lng    |  1 +
 interface/web/admin/lib/lang/cz_system_config.lng    |  1 +
 interface/web/admin/lib/lang/de_system_config.lng    |  1 +
 interface/web/admin/lib/lang/dk_system_config.lng    |  1 +
 interface/web/admin/lib/lang/el_system_config.lng    |  1 +
 interface/web/admin/lib/lang/en_system_config.lng    |  1 +
 interface/web/admin/lib/lang/es_system_config.lng    |  1 +
 interface/web/admin/lib/lang/fi_system_config.lng    |  1 +
 interface/web/admin/lib/lang/fr_system_config.lng    |  1 +
 interface/web/admin/lib/lang/hr_system_config.lng    |  1 +
 interface/web/admin/lib/lang/hu_system_config.lng    |  1 +
 interface/web/admin/lib/lang/id_system_config.lng    |  1 +
 interface/web/admin/lib/lang/it_system_config.lng    |  1 +
 interface/web/admin/lib/lang/ja_system_config.lng    |  1 +
 interface/web/admin/lib/lang/nl_system_config.lng    |  1 +
 interface/web/admin/lib/lang/pl_system_config.lng    |  1 +
 interface/web/admin/lib/lang/pt_system_config.lng    |  1 +
 interface/web/admin/lib/lang/ro_system_config.lng    |  1 +
 interface/web/admin/lib/lang/ru_system_config.lng    |  1 +
 interface/web/admin/lib/lang/se_system_config.lng    |  1 +
 interface/web/admin/lib/lang/sk_system_config.lng    |  1 +
 interface/web/admin/lib/lang/tr_system_config.lng    |  1 +
 .../web/admin/templates/system_config_mail_edit.htm  | 12 +++++++++---
 27 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index 88d0fef26c..9b5ac17f15 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -267,6 +267,12 @@ $form["tabs"]['mail'] = array (
 			'default' => 'n',
 			'value' => array(0 => 'n', 1 => 'y')
 		),
+		'enable_welcome_mail' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
 		'mailbox_show_autoresponder_tab' => array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
diff --git a/interface/web/admin/lib/lang/ar_system_config.lng b/interface/web/admin/lib/lang/ar_system_config.lng
index 7d3df7fbf8..7e0901e600 100644
--- a/interface/web/admin/lib/lang/ar_system_config.lng
+++ b/interface/web/admin/lib/lang/ar_system_config.lng
@@ -23,6 +23,7 @@ $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)';
 $wb['webdavuser_prefix_txt'] = 'Webdav user prefix';
 $wb['webdavuser_prefix_error_regex'] = 'Char not allowed in webdav user prefix.';
 $wb['webftp_url_txt'] = 'WebFTP URL';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Mailing list URL';
diff --git a/interface/web/admin/lib/lang/bg_system_config.lng b/interface/web/admin/lib/lang/bg_system_config.lng
index f99465e1b6..161fafd836 100644
--- a/interface/web/admin/lib/lang/bg_system_config.lng
+++ b/interface/web/admin/lib/lang/bg_system_config.lng
@@ -22,6 +22,7 @@ $wb['webftp_url_txt'] = 'WebFTP URL';
 $wb['dashboard_atom_url_admin_txt'] = 'Dashboard atom feed URL (admin)';
 $wb['dashboard_atom_url_reseller_txt'] = 'Dashboard atom feed URL (reseller)';
 $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Разреши различни имена за вход';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Мейлинг лист адрес URL';
diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng
index 58ffca080b..de491ad969 100644
--- a/interface/web/admin/lib/lang/br_system_config.lng
+++ b/interface/web/admin/lib/lang/br_system_config.lng
@@ -24,6 +24,7 @@ $wb['ftpuser_prefix_error_regex'] = 'Caractere não permitido para o prefixo de
 $wb['shelluser_prefix_error_regex'] = 'Caractere não permitido para o prefixo de usuário shell.';
 $wb['webdavuser_prefix_error_regex'] = 'Caractere não permitido para o prefixo de usuário Webdav.';
 $wb['dblist_phpmyadmin_link_txt'] = 'Link para o PHPMyAdmin';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Permitir nome de usuário personalizado';
 $wb['mailboxlist_webmail_link_txt'] = 'Link para o Webmail';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Exibir aba de auto-resposta nos detalhes da conta de email';
diff --git a/interface/web/admin/lib/lang/ca_system_config.lng b/interface/web/admin/lib/lang/ca_system_config.lng
index d8bc0e2d48..1a223de73e 100644
--- a/interface/web/admin/lib/lang/ca_system_config.lng
+++ b/interface/web/admin/lib/lang/ca_system_config.lng
@@ -24,6 +24,7 @@ $wb['ftpuser_prefix_error_regex'] = 'Char not allowed in ftp user prefix.';
 $wb['shelluser_prefix_error_regex'] = 'Char not allowed in shell user prefix.';
 $wb['webdavuser_prefix_error_regex'] = 'Char not allowed in webdav user prefix.';
 $wb['dblist_phpmyadmin_link_txt'] = 'Link to phpmyadmin in DB list';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailboxlist_webmail_link_txt'] = 'Link to webmail in Mailbox list';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng
index 7db312097c..5ff737c939 100644
--- a/interface/web/admin/lib/lang/cz_system_config.lng
+++ b/interface/web/admin/lib/lang/cz_system_config.lng
@@ -25,6 +25,7 @@ $wb['new_domain_txt'] = 'HTML vytvořit novou doménu';
 $wb['webftp_url_txt'] = 'WebFTP URL';
 $wb['admin_mail_txt'] = 'E-mail Administrátora';
 $wb['admin_name_txt'] = 'Jméno Administrátora';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Povolit vlastní přihlašovací jméno u e-mailové schránky';
 $wb['mailmailinglist_link_txt'] = 'Ikonový odkaz na aplikaci E-mailových konferencí seznamu e-mailových konferencí';
 $wb['mailmailinglist_url_txt'] = 'E-mailové konference URL';
diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng
index 4a862a2d4a..8c30b71a1a 100644
--- a/interface/web/admin/lib/lang/de_system_config.lng
+++ b/interface/web/admin/lib/lang/de_system_config.lng
@@ -31,6 +31,7 @@ $wb['use_domain_module_txt'] = 'Domain Limits im Kundenmodul benutzen, um neue D
 $wb['use_domain_module_hint'] = 'Falls Sie die Domain Limits benutzen, können Ihre Kunden nur eine der Domains auswählen, die der Admin für sie angelegt hat. Die Kunden können das Domain-Feld nicht frei editieren. Sie müssen sich neu einloggen, wenn Sie diesen Wert ändern.';
 $wb['new_domain_txt'] = 'HTML Text zum Anlegen einer neuen Domain';
 $wb['webftp_url_txt'] = 'WebFTP URL';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Abweichenden Login Namen erlauben';
 $wb['mailmailinglist_link_txt'] = 'Link zur Mailingliste in der Mailinglisten Übersicht';
 $wb['mailmailinglist_url_txt'] = 'Mailinglisten URL';
diff --git a/interface/web/admin/lib/lang/dk_system_config.lng b/interface/web/admin/lib/lang/dk_system_config.lng
index eb96004421..a179749ba9 100644
--- a/interface/web/admin/lib/lang/dk_system_config.lng
+++ b/interface/web/admin/lib/lang/dk_system_config.lng
@@ -22,6 +22,7 @@ $wb['ftpuser_prefix_error_regex'] = 'Char ikke tilladt i ftp bruger prefix.';
 $wb['shelluser_prefix_error_regex'] = 'Char ikke tilladt i shell bruger prefix.';
 $wb['webdavuser_prefix_error_regex'] = 'Char ikke tilladt i webdav bruger prefix.';
 $wb['dblist_phpmyadmin_link_txt'] = 'Link til phpmyadmin i DB liste';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Tillad brugerdefinerede login-navn';
 $wb['mailboxlist_webmail_link_txt'] = 'Link til webmail i Postboks liste';
 $wb['webmail_url_txt'] = 'Webmail URL';
diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng
index 68e10e37fc..d7282be3af 100644
--- a/interface/web/admin/lib/lang/el_system_config.lng
+++ b/interface/web/admin/lib/lang/el_system_config.lng
@@ -23,6 +23,7 @@ $wb['use_domain_module_txt'] = 'Χρήση του αρθρώματος-domain γ
 $wb['use_domain_module_hint'] = 'Αν χρησιμοποιήσετε αυτό το άρθρωμα, οι πελάτες σας μπορούν μόνο να διαλέξουν ένα από τα domains που δημιούργησε για αυτούς ο διαχειριστής. Δεν μπορούν να επεξεργαστούν ελεύθερα τα πεδία του domain.Πρέπει να επανασυνδεθείτε αν αλλάξετε αυτή την τιμή, για να γίνουν οι αλλαγές σας, ορατές.';
 $wb['new_domain_txt'] = 'HTML για την δημιουργία domain';
 $wb['webftp_url_txt'] = 'URL του WebFTP';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Αποδοχή  προσαρμοσμένου ονόματος login';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'URL της Mailing list ';
diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng
index 4493913fb0..a8a553e19e 100644
--- a/interface/web/admin/lib/lang/en_system_config.lng
+++ b/interface/web/admin/lib/lang/en_system_config.lng
@@ -24,6 +24,7 @@ $wb['ftpuser_prefix_error_regex'] = 'Char not allowed in ftp user prefix.';
 $wb['shelluser_prefix_error_regex'] = 'Char not allowed in shell user prefix.';
 $wb['webdavuser_prefix_error_regex'] = 'Char not allowed in webdav user prefix.';
 $wb['dblist_phpmyadmin_link_txt'] = 'Link to phpmyadmin in DB list';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailboxlist_webmail_link_txt'] = 'Link to webmail in Mailbox list';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show Autoresponder tab in Mailbox detail';
diff --git a/interface/web/admin/lib/lang/es_system_config.lng b/interface/web/admin/lib/lang/es_system_config.lng
index a001999dd4..6534f22953 100644
--- a/interface/web/admin/lib/lang/es_system_config.lng
+++ b/interface/web/admin/lib/lang/es_system_config.lng
@@ -29,6 +29,7 @@ $wb['default_dnsserver_txt'] = 'Servidor DNS por defecto';
 $wb['default_mailserver_txt'] = 'Servidor de correo por defecto';
 $wb['default_slave_dnsserver_txt'] = 'Servidor DNS secundario por defecto';
 $wb['default_webserver_txt'] = 'Servidor web por defecto';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Permitir nombre de inicio de sesión personalizado';
 $wb['f5_to_reload_js_txt'] = 'Si modifica esto, deberá pulsar F5 para que el explorador cargue las librerías JavaScript o incluso necesitará borrar la caché de su explorador.';
 $wb['ftpuser_prefix_error_regex'] = 'Carácter no permitido en el prefijo de usuario de FTP.';
diff --git a/interface/web/admin/lib/lang/fi_system_config.lng b/interface/web/admin/lib/lang/fi_system_config.lng
index eb7863fd53..6932854a2d 100644
--- a/interface/web/admin/lib/lang/fi_system_config.lng
+++ b/interface/web/admin/lib/lang/fi_system_config.lng
@@ -23,6 +23,7 @@ $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)';
 $wb['webdavuser_prefix_txt'] = 'Webdav user prefix';
 $wb['webdavuser_prefix_error_regex'] = 'Char not allowed in webdav user prefix.';
 $wb['webftp_url_txt'] = 'WebFTP URL';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Mailing list URL';
diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng
index cfecf8e27f..2cc6394dc6 100644
--- a/interface/web/admin/lib/lang/fr_system_config.lng
+++ b/interface/web/admin/lib/lang/fr_system_config.lng
@@ -16,6 +16,7 @@ $wb['ftpuser_prefix_error_regex'] = 'Caractère non autorisé dans le préfixe d
 $wb['shelluser_prefix_error_regex'] = 'Caractère non autorisé dans le préfixe de l’utilisateur Shell.';
 $wb['webdavuser_prefix_error_regex'] = 'Caractère non autorisé dans le préfixe utilisateur WebDAV.';
 $wb['dblist_phpmyadmin_link_txt'] = 'Lien vers PHPMyAdmin dans la liste des bases';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Autoriser les noms d’utilisateurs personnalisés';
 $wb['mailboxlist_webmail_link_txt'] = 'Lien vers le Webmail dans la liste des boîtes mail';
 $wb['webmail_url_txt'] = 'URL du Webmail';
diff --git a/interface/web/admin/lib/lang/hr_system_config.lng b/interface/web/admin/lib/lang/hr_system_config.lng
index 3f6486ae53..2c70c62191 100644
--- a/interface/web/admin/lib/lang/hr_system_config.lng
+++ b/interface/web/admin/lib/lang/hr_system_config.lng
@@ -23,6 +23,7 @@ $wb['webftp_url_txt'] = 'WebFTP URL';
 $wb['dashboard_atom_url_admin_txt'] = 'RSS URL za početnu stranicu (admin)';
 $wb['dashboard_atom_url_reseller_txt'] = 'RSS URL za početnu stranicu (reseller)';
 $wb['dashboard_atom_url_client_txt'] = 'RSS URL za početnu stranicu (client)';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Dozvoli izbor korisničkog imena';
 $wb['mailmailinglist_link_txt'] = 'Link na mailing listu u Mailing listi';
 $wb['mailmailinglist_url_txt'] = 'URL mailing liste';
diff --git a/interface/web/admin/lib/lang/hu_system_config.lng b/interface/web/admin/lib/lang/hu_system_config.lng
index 6b1a29ee46..7187d55d58 100644
--- a/interface/web/admin/lib/lang/hu_system_config.lng
+++ b/interface/web/admin/lib/lang/hu_system_config.lng
@@ -27,6 +27,7 @@ $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Mailing list URL';
 $wb['admin_mail_txt'] = 'Administrators e-mail';
 $wb['admin_name_txt'] = 'Administrators name';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['maintenance_mode_txt'] = 'Maintenance Mode';
 $wb['maintenance_mode_exclude_ips_txt'] = 'Exclude IP\'s from maintenance';
diff --git a/interface/web/admin/lib/lang/id_system_config.lng b/interface/web/admin/lib/lang/id_system_config.lng
index f034f9bd76..b08d5ca60b 100644
--- a/interface/web/admin/lib/lang/id_system_config.lng
+++ b/interface/web/admin/lib/lang/id_system_config.lng
@@ -23,6 +23,7 @@ $wb['use_domain_module_txt'] = 'Gunakan modul domain untuk menambahkan domain ba
 $wb['use_domain_module_hint'] = 'Jika Anda menggunakan modul ini, pelanggan Anda hanya dapat memilih salah satu domain yang dibuat oleh admin untuk mereka. Mereka tidak bisa menyunting dengan bebas kolom domain. Anda harus masuk kembali setelah mengubah nilai ini, agar perubahannya terlihat.';
 $wb['new_domain_txt'] = 'HTML untuk membuat domain baru';
 $wb['webftp_url_txt'] = 'URL WebFTP';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Mailing list URL';
diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng
index 42f878a54d..873ef5838b 100644
--- a/interface/web/admin/lib/lang/it_system_config.lng
+++ b/interface/web/admin/lib/lang/it_system_config.lng
@@ -23,6 +23,7 @@ $wb['webftp_url_txt'] = 'WebFTP URL';
 $wb['dashboard_atom_url_admin_txt'] = 'Dashboard atom feed URL (admin)';
 $wb['dashboard_atom_url_reseller_txt'] = 'Dashboard atom feed URL (reseller)';
 $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Mailing list URL';
diff --git a/interface/web/admin/lib/lang/ja_system_config.lng b/interface/web/admin/lib/lang/ja_system_config.lng
index f50ffb5114..cf36675239 100644
--- a/interface/web/admin/lib/lang/ja_system_config.lng
+++ b/interface/web/admin/lib/lang/ja_system_config.lng
@@ -23,6 +23,7 @@ $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)';
 $wb['webdavuser_prefix_txt'] = 'Webdav user prefix';
 $wb['webdavuser_prefix_error_regex'] = 'Char not allowed in webdav user prefix.';
 $wb['webftp_url_txt'] = 'WebFTP URL';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Mailing list URL';
diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng
index 4078be986e..b36b12ec4b 100644
--- a/interface/web/admin/lib/lang/nl_system_config.lng
+++ b/interface/web/admin/lib/lang/nl_system_config.lng
@@ -26,6 +26,7 @@ $wb['use_domain_module_txt'] = 'Gebruik de domein-module om nieuwe domeinen toe
 $wb['use_domain_module_hint'] = 'Als u deze module gebruikt, kunnen uw klanten alleen de domeinen selecteren die de administrator heeft aangemaakt. klanten kunnen het domein-veld zelf niet wijzigen. Na opnieuw ingelogd te zijn zullen de wijzigingen zichtbaar zijn.';
 $wb['new_domain_txt'] = 'HTML om een nieuw domein te maken';
 $wb['webftp_url_txt'] = 'WebFTP URL';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Mailing list URL';
diff --git a/interface/web/admin/lib/lang/pl_system_config.lng b/interface/web/admin/lib/lang/pl_system_config.lng
index c94313bdcb..26adecad6c 100644
--- a/interface/web/admin/lib/lang/pl_system_config.lng
+++ b/interface/web/admin/lib/lang/pl_system_config.lng
@@ -22,6 +22,7 @@ $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)';
 $wb['webdavuser_prefix_txt'] = 'Prefiks użytkownika webdav';
 $wb['webdavuser_prefix_error_regex'] = 'Niedozwolony znak w prefiksie użytkownika webdav.';
 $wb['webftp_url_txt'] = 'Link do WebFTP';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Zezwalaj na dowolnÄ… nazwÄ™ loginu';
 $wb['mailmailinglist_link_txt'] = 'Link do listy mailingowej na liście list mailingowych';
 $wb['mailmailinglist_url_txt'] = 'URL listy mailingowej';
diff --git a/interface/web/admin/lib/lang/pt_system_config.lng b/interface/web/admin/lib/lang/pt_system_config.lng
index 39e4dc93f2..6a0fb181d9 100644
--- a/interface/web/admin/lib/lang/pt_system_config.lng
+++ b/interface/web/admin/lib/lang/pt_system_config.lng
@@ -23,6 +23,7 @@ $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)';
 $wb['webdavuser_prefix_txt'] = 'Webdav user prefix';
 $wb['webdavuser_prefix_error_regex'] = 'Char not allowed in webdav user prefix.';
 $wb['webftp_url_txt'] = 'WebFTP URL';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Mailing list URL';
diff --git a/interface/web/admin/lib/lang/ro_system_config.lng b/interface/web/admin/lib/lang/ro_system_config.lng
index 2b819a013e..abf206d1af 100644
--- a/interface/web/admin/lib/lang/ro_system_config.lng
+++ b/interface/web/admin/lib/lang/ro_system_config.lng
@@ -23,6 +23,7 @@ $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)';
 $wb['webdavuser_prefix_txt'] = 'Webdav user prefix';
 $wb['webdavuser_prefix_error_regex'] = 'Char not allowed in webdav user prefix.';
 $wb['webftp_url_txt'] = 'WebFTP URL';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Mailing list URL';
diff --git a/interface/web/admin/lib/lang/ru_system_config.lng b/interface/web/admin/lib/lang/ru_system_config.lng
index 3aee07ff2e..3f6653ba25 100644
--- a/interface/web/admin/lib/lang/ru_system_config.lng
+++ b/interface/web/admin/lib/lang/ru_system_config.lng
@@ -23,6 +23,7 @@ $wb['webftp_url_txt'] = 'URL WebFTP';
 $wb['dashboard_atom_url_admin_txt'] = 'Dashboard atom feed URL (admin)';
 $wb['dashboard_atom_url_reseller_txt'] = 'Dashboard atom feed URL (reseller)';
 $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Разрешить пользовательское имя входа в систему';
 $wb['mailmailinglist_link_txt'] = 'Ссылка на почтовую рассылку в списке рассылок';
 $wb['mailmailinglist_url_txt'] = 'URL почтовой рассылки';
diff --git a/interface/web/admin/lib/lang/se_system_config.lng b/interface/web/admin/lib/lang/se_system_config.lng
index d075f87509..f581c015e7 100644
--- a/interface/web/admin/lib/lang/se_system_config.lng
+++ b/interface/web/admin/lib/lang/se_system_config.lng
@@ -23,6 +23,7 @@ $wb['dashboard_atom_url_client_txt'] = 'Kontrolpanelens nyhetsflöde URL (kund)'
 $wb['webdavuser_prefix_txt'] = 'Prefix för WebDAV-användare';
 $wb['webdavuser_prefix_error_regex'] = 'Otillåtet tecken i prefix för WebDAV-användare';
 $wb['webftp_url_txt'] = 'WebbFTP URL';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Tillåt valfritt inloggningsnamn';
 $wb['mailmailinglist_link_txt'] = 'Länka till epostlista i listan över epostlistor';
 $wb['mailmailinglist_url_txt'] = 'Adress till epostlista';
diff --git a/interface/web/admin/lib/lang/sk_system_config.lng b/interface/web/admin/lib/lang/sk_system_config.lng
index ef4cc3fef9..b1004aba86 100644
--- a/interface/web/admin/lib/lang/sk_system_config.lng
+++ b/interface/web/admin/lib/lang/sk_system_config.lng
@@ -23,6 +23,7 @@ $wb['use_domain_module_txt'] = 'Use the domain-module to add new domains';
 $wb['use_domain_module_hint'] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They cannot free edit the domain-field.You have to re-login after changing this value, to make the changes visible.';
 $wb['new_domain_txt'] = 'HTML to create a new domain';
 $wb['webftp_url_txt'] = 'WebFTP URL';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Mailing list URL';
diff --git a/interface/web/admin/lib/lang/tr_system_config.lng b/interface/web/admin/lib/lang/tr_system_config.lng
index 3bb9c82b0a..c801792625 100644
--- a/interface/web/admin/lib/lang/tr_system_config.lng
+++ b/interface/web/admin/lib/lang/tr_system_config.lng
@@ -24,6 +24,7 @@ $wb['ftpuser_prefix_error_regex'] = 'FTP kullanıcısı ön ekinde izin verilmey
 $wb['shelluser_prefix_error_regex'] = 'Kabuk kullanıcısı ön ekinde izin verilmeyen karakterler var';
 $wb['webdavuser_prefix_error_regex'] = 'Webdav kullanıcısı ön ekinde izin verilmeyen karakterler var.';
 $wb['dblist_phpmyadmin_link_txt'] = 'Veritabanı listesinde phpMyAdmin bağlantısı';
+$wb['enable_welcome_mail_txt'] = 'Enable welcome email';
 $wb['enable_custom_login_txt'] = 'Özel oturum açma kullanıcı adı kullanılabilsin';
 $wb['mailboxlist_webmail_link_txt'] = 'E-posta kutusu listesinde Webmail bağlantısı';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'E-posta hesabı ayrıntılarında otoyanıtlayıcı sekmesi görüntülensin';
diff --git a/interface/web/admin/templates/system_config_mail_edit.htm b/interface/web/admin/templates/system_config_mail_edit.htm
index af0a7a25ca..4aa7ee3944 100644
--- a/interface/web/admin/templates/system_config_mail_edit.htm
+++ b/interface/web/admin/templates/system_config_mail_edit.htm
@@ -4,6 +4,12 @@
                     {tmpl_var name='enable_custom_login'}
                 </div>
             </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">{tmpl_var name='enable_welcome_mail_txt'}</label>
+                <div class="col-sm-9">
+                    {tmpl_var name='enable_welcome_mail'}
+                </div>
+            </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='mailbox_show_autoresponder_tab_txt'}</label>
                 <div class="col-sm-9">
@@ -77,10 +83,10 @@
                     {tmpl_var name='default_mailserver'}
                 </select></div>
             </div>
-        
-            
+
+
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
-            
+
         <div class="clear"><div class="right">
             <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/system_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
             <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/users_list.php">{tmpl_var name='btn_cancel_txt'}</button>
-- 
GitLab


From 89bc625afe40185b211af2245e35c7f1f0466eb0 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Sun, 7 Mar 2021 17:34:57 +0000
Subject: [PATCH 315/441] Update ajax_get_ip.php

---
 interface/web/sites/ajax_get_ip.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/sites/ajax_get_ip.php b/interface/web/sites/ajax_get_ip.php
index 36127caf2d..986fd8d335 100644
--- a/interface/web/sites/ajax_get_ip.php
+++ b/interface/web/sites/ajax_get_ip.php
@@ -45,7 +45,7 @@ $ip_type = $_GET['ip_type'];
 	$web_config = $app->getconf->get_server_config($server_id, 'web');
 	
 	$tmp = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ?", $client_group_id);
-	$sql = "SELECT ip_address FROM server_ip WHERE ip_type = ? AND server_id = ? AND (client_id = 0 OR client_id=?)";
+	$sql = "SELECT ip_address FROM server_ip WHERE ip_type = ? AND server_id = ? AND virtualhost = 'y' AND (client_id = 0 OR client_id=?)";
 
 	$ips = $app->db->queryAllRecords($sql, $ip_type, $server_id, $tmp['client_id']);
 	// $ip_select = "<option value=''></option>";
-- 
GitLab


From 86f8f38c7664eaa9d4cd0b748ccda8a9fcc3f085 Mon Sep 17 00:00:00 2001
From: Thom Pol <>
Date: Sun, 7 Mar 2021 22:26:08 +0100
Subject: [PATCH 316/441] Add client limits for SMTP relay settings (#6088)

---
 interface/web/client/form/client.tform.php    |  7 +++
 .../web/client/form/client_template.tform.php | 10 +++-
 interface/web/client/form/reseller.tform.php  |  6 +++
 .../client/templates/client_edit_limits.htm   |  6 +++
 .../templates/client_template_edit_limits.htm |  6 +++
 .../client/templates/reseller_edit_limits.htm |  6 +++
 interface/web/mail/mail_domain_edit.php       | 52 ++++++++++---------
 .../web/mail/templates/mail_domain_edit.htm   | 28 +++++-----
 8 files changed, 81 insertions(+), 40 deletions(-)

diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index 7ad9aecac6..83464112d5 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.tform.php
@@ -938,6 +938,13 @@ $form["tabs"]['limits'] = array (
 			'rows'  => '',
 			'cols'  => ''
 		),
+		'limit_relayhost' => array (
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'n',
+			'valuelimit' => 'client:limit_relayhost',
+			'value'  => array(0 => 'n', 1 => 'y')
+		),
         'default_xmppserver' => array (
             'datatype' => 'INTEGER',
             'formtype' => 'SELECT',
diff --git a/interface/web/client/form/client_template.tform.php b/interface/web/client/form/client_template.tform.php
index 5883cce56c..ea8fb7d27e 100644
--- a/interface/web/client/form/client_template.tform.php
+++ b/interface/web/client/form/client_template.tform.php
@@ -353,7 +353,15 @@ $form["tabs"]['limits'] = array (
 			'maxlength' => '10',
 			'rows'  => '',
 			'cols'  => ''
-		),/*
+		),
+		'limit_relayhost' => array (
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'n',
+			'valuelimit' => 'client:limit_relayhost',
+			'value'  => array(0 => 'n', 1 => 'y')
+		),
+		/*
         'default_xmppserver' => array (
             'datatype' => 'INTEGER',
             'formtype' => 'SELECT',
diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php
index 8c94132b3b..f2f88343bf 100644
--- a/interface/web/client/form/reseller.tform.php
+++ b/interface/web/client/form/reseller.tform.php
@@ -936,6 +936,12 @@ $form["tabs"]['limits'] = array (
 			'rows'  => '',
 			'cols'  => ''
 		),
+		'limit_relayhost' => array (
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'n',
+			'value'  => array(0 => 'n', 1 => 'y')
+		),
         'default_xmppserver' => array (
             'datatype' => 'INTEGER',
             'formtype' => 'SELECT',
diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm
index 39512208b4..2b4b134a5a 100644
--- a/interface/web/client/templates/client_edit_limits.htm
+++ b/interface/web/client/templates/client_edit_limits.htm
@@ -235,6 +235,12 @@
                     <label for="limit_spamfilter_policy" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_policy_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" class="form-control" /></div>
 				</div>
+				<div class="form-group">
+						<label class="col-sm-3 control-label">{tmpl_var name='limit_relayhost_txt'}</label>
+						<div class="col-sm-9">
+								{tmpl_var name='limit_relayhost'}
+						</div>
+				</div>
       </div>
   </div>
   </div>
diff --git a/interface/web/client/templates/client_template_edit_limits.htm b/interface/web/client/templates/client_template_edit_limits.htm
index 4573e4b0d6..680bc427d8 100644
--- a/interface/web/client/templates/client_template_edit_limits.htm
+++ b/interface/web/client/templates/client_template_edit_limits.htm
@@ -192,6 +192,12 @@
                     <label for="limit_spamfilter_policy" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_policy_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" class="form-control" /></div>
 				</div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">{tmpl_var name='limit_relayhost_txt'}</label>
+            <div class="col-sm-9">
+                {tmpl_var name='limit_relayhost'}
+            </div>
+        </div>
 			</div>
       </div>
   </div>
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm
index ff185ce9a4..fa2c3705c9 100644
--- a/interface/web/client/templates/reseller_edit_limits.htm
+++ b/interface/web/client/templates/reseller_edit_limits.htm
@@ -236,6 +236,12 @@
                     <label for="limit_spamfilter_policy" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_policy_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" class="form-control" /></div>
 				</div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">{tmpl_var name='limit_relayhost_txt'}</label>
+            <div class="col-sm-9">
+                {tmpl_var name='limit_relayhost'}
+            </div>
+        </div>
 			</div>
       </div>
   </div>
diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index 3ea60c08f9..e74a60ed94 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -216,23 +216,25 @@ class page_action extends tform_actions {
 		}
 
 		// load relayhost-values
-		$sql = "SELECT relay_host, relay_user, relay_pass FROM mail_domain WHERE domain_id = ?";
-		$rec = $app->db->queryOneRecord($sql, $app->functions->intval($_GET['id']));
-		$app->tpl->setVar('relay_host', $rec['relay_host'], true);
-		$app->tpl->setVar('relay_user', $rec['relay_user'], true);
-		$app->tpl->setVar('relay_pass', $rec['relay_pass'], true);
+		if ($client["limit_relayhost"] == 'y') {
+			$sql = "SELECT relay_host, relay_user, relay_pass FROM mail_domain WHERE domain_id = ?";
+			$rec = $app->db->queryOneRecord($sql, $app->functions->intval($_GET['id']));
+			$app->tpl->setVar('relay_host', $rec['relay_host'], true);
+			$app->tpl->setVar('relay_user', $rec['relay_user'], true);
+			$app->tpl->setVar('relay_pass', $rec['relay_pass'], true);
+		}
 
 		// load dkim-values
 		$sql = "SELECT domain, dkim_private, dkim_public, dkim_selector FROM mail_domain WHERE domain_id = ?";
 		$rec = $app->db->queryOneRecord($sql, $app->functions->intval($_GET['id']));
 		$dns_key = str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"),'',$rec['dkim_public']);
-                
+
                 $keyparts = str_split('v=DKIM1; t=s; p=' . $dns_key, 200);
                 array_walk($keyparts, function(&$value, $key) { $value = '"'.$value.'"'; } );
                 $dkim_txt = implode('', $keyparts);
 
 		$dns_record = $rec['dkim_selector'] . '._domainkey.' . $rec['domain'] . '. 3600  IN  TXT   '.$dkim_txt;
-                
+
 		$app->tpl->setVar('dkim_selector', $rec['dkim_selector'], true);
 		$app->tpl->setVar('dkim_private', $rec['dkim_private'], true);
 		$app->tpl->setVar('dkim_public', $rec['dkim_public'], true);
@@ -263,7 +265,7 @@ class page_action extends tform_actions {
 		if($_SESSION["s"]["user"]["typ"] != 'admin') {
 			// Get the limits of the client
 			$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
-			$client = $app->db->queryOneRecord("SELECT client.mail_servers, limit_maildomain, default_mailserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+			$client = $app->db->queryOneRecord("SELECT client.mail_servers, limit_maildomain, default_mailserver, limit_relayhost FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
 			// When the record is updated
 			if($this->id > 0) {
 				// restore the server ID if the user is not admin and record is edited
@@ -296,7 +298,7 @@ class page_action extends tform_actions {
 			$this->dataRecord["domain"] = $app->functions->idn_encode($this->dataRecord["domain"]);
 			$this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]);
 		}
-		
+
 		//* server_id must be > 0
 		if(isset($this->dataRecord["server_id"]) && $this->dataRecord["server_id"] < 1) $app->tform->errorMessage .= $app->lng("server_id_0_error_txt");
 
@@ -305,7 +307,7 @@ class page_action extends tform_actions {
 
 	function onAfterInsert() {
 		global $app, $conf;
-		
+
 		$domain = $app->functions->idn_encode($this->dataRecord["domain"]);
 
 		// Spamfilter policy
@@ -319,10 +321,10 @@ class page_action extends tform_actions {
 				$tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id);
 				// We create a new record
 				$insert_data = array(
-					"sys_userid" => $_SESSION["s"]["user"]["userid"], 
+					"sys_userid" => $_SESSION["s"]["user"]["userid"],
 					"sys_groupid" => $tmp_domain["sys_groupid"],
-					"sys_perm_user" => 'riud', 
-					"sys_perm_group" => 'riud', 
+					"sys_perm_user" => 'riud',
+					"sys_perm_group" => 'riud',
 					"sys_perm_other" => '',
 					"server_id" => $this->dataRecord["server_id"],
 					"priority" => 5,
@@ -350,7 +352,7 @@ class page_action extends tform_actions {
 
 	function onBeforeUpdate() {
 		global $app, $conf;
-		
+
 		$domain = $app->functions->idn_encode($this->dataRecord["domain"]);
 
 		//* Check if the server has been changed
@@ -381,7 +383,7 @@ class page_action extends tform_actions {
 		global $app, $conf;
 
 		$domain = $app->functions->idn_encode($this->dataRecord["domain"]);
-		
+
 		// Spamfilter policy
 		$policy_id = $app->functions->intval($this->dataRecord["policy"]);
 		$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $domain);
@@ -393,10 +395,10 @@ class page_action extends tform_actions {
 				$tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id);
 				// We create a new record
 				$insert_data = array(
-					"sys_userid" => $_SESSION["s"]["user"]["userid"], 
+					"sys_userid" => $_SESSION["s"]["user"]["userid"],
 					"sys_groupid" => $tmp_domain["sys_groupid"],
-					"sys_perm_user" => 'riud', 
-					"sys_perm_group" => 'riud', 
+					"sys_perm_user" => 'riud',
+					"sys_perm_group" => 'riud',
 					"sys_perm_other" => '',
 					"server_id" => $this->dataRecord["server_id"],
 					"priority" => 5,
@@ -447,7 +449,7 @@ class page_action extends tform_actions {
 
 			//* Update the mailinglist
 			$app->db->query("UPDATE mail_mailinglist SET sys_userid = ?, sys_groupid = ? WHERE domain = ?", $client_user_id, $sys_groupid, $this->oldDataRecord['domain']);
-			
+
 			//* Update fetchmail accounts
 			$fetchmail = $app->db->queryAllRecords("SELECT * FROM mail_get WHERE destination like ?", '%@' . $this->oldDataRecord['domain']);
 			if(is_array($fetchmail)) {
@@ -456,7 +458,7 @@ class page_action extends tform_actions {
 					$app->db->datalogUpdate('mail_get', array("destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailget_id', $rec['mailget_id']);
 				}
 			}
-			
+
 			//* Delete the old spamfilter record
 			$tmp = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $this->oldDataRecord["domain"]);
 			$app->db->datalogDelete('spamfilter_users', 'id', $tmp["id"]);
@@ -467,10 +469,10 @@ class page_action extends tform_actions {
 		//* update dns-record when the dkim record was changed
 		// NOTE: only if the domain-name was not changed
 		if ( $this->dataRecord['active'] == 'y' && $domain ==  $this->oldDataRecord['domain'] ) {
-			$dkim_active = @($this->dataRecord['dkim'] == 'y') ? true : false; 
+			$dkim_active = @($this->dataRecord['dkim'] == 'y') ? true : false;
 			$selector = @($this->dataRecord['dkim_selector'] != $this->oldDataRecord['dkim_selector']) ? true : false;
 			$dkim_private = @($this->dataRecord['dkim_private'] != $this->oldDataRecord['dkim_private']) ? true : false;
-			
+
 			$soaDomain = $domain.'.';
 			while ((!isset($soa) && (substr_count($soaDomain,'.') > 1))) {
 				$soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $soaDomain);
@@ -493,7 +495,7 @@ class page_action extends tform_actions {
 						$soa_id = $app->functions->intval($soa['zone']);
 						$serial = $app->validate_dns->increase_serial($soa["serial"]);
 						$app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id);
-					}	
+					}
 				}
 		}
 
@@ -510,8 +512,8 @@ class page_action extends tform_actions {
 				$app->db->datalogDelete('dns_rr', 'id', $r['id']);
 			}
 		}
-		
-		// also delete a dsn-records with same selector 
+
+		// also delete a dsn-records with same selector
 		$sql = "SELECT * from dns_rr WHERE name ? AND data LIKE 'v=DKIM1%' AND " . $app->tform->getAuthSQL('r');
 		$rec = $app->db->queryAllRecords($sql, '._domainkey.'.$dataRecord['dkim_selector'].'.', $dataRecord['domain']);
 		if (is_array($rec))
diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm
index 676e55f9dc..c024fa023b 100644
--- a/interface/web/mail/templates/mail_domain_edit.htm
+++ b/interface/web/mail/templates/mail_domain_edit.htm
@@ -75,24 +75,26 @@
                     {tmpl_var name='policy'}
                 </select></div>
             </div>
-            <div class="form-group">
+            <tmpl_if name="limit_relayhost" op="==" value="y">
+              <div class="form-group">
                 <label for="relay_host" class="col-sm-3 control-label">{tmpl_var name='relayhost_txt'}</label>
                 <div class="col-sm-9">
-                    <input type="text" name="relay_host" id="relay_host" value="{tmpl_var name='relay_host'}" class="form-control" />
+                  <input type="text" name="relay_host" id="relay_host" value="{tmpl_var name='relay_host'}" class="form-control" />
                 </div>
-            </div>
-            <div class="form-group">
+              </div>
+              <div class="form-group">
                 <label for="relay_user" class="col-sm-3 control-label">{tmpl_var name='relayhost_user_txt'}</label>
                 <div class="col-sm-9">
-                    <input type="text" name="relay_user" id="relay_user" value="{tmpl_var name='relay_user'}" class="form-control" />
+                  <input type="text" name="relay_user" id="relay_user" value="{tmpl_var name='relay_user'}" class="form-control" />
                 </div>
-            </div>
-            <div class="form-group">
+              </div>
+              <div class="form-group">
                 <label for="relay_pass" class="col-sm-3 control-label">{tmpl_var name='relayhost_password_txt'}</label>
                 <div class="col-sm-9">
-                    <input type="text" name="relay_pass" id="relay_pass" value="{tmpl_var name='relay_pass'}" class="form-control" />
+                  <input type="text" name="relay_pass" id="relay_pass" value="{tmpl_var name='relay_pass'}" class="form-control" />
                 </div>
-            </div>
+              </div>
+            </tmpl_if>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
                 <div class="col-sm-9">
@@ -131,7 +133,7 @@
 
             </div>
 
-        
+
 
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
         <input type="hidden" name="type" value="local">
@@ -150,11 +152,11 @@
 			domain_id : domain_id,
 			dkim_public : dkim_public,
 			dkim_selector : dkim_selector,
-			type : "create_dkim" 
+			type : "create_dkim"
 		}, function(data) {
                         var dkim_txt = 'v=DKIM1; t=s; p=' + data['dns_record'].replace(/(\r\n|\n|\r)/gm, "");
 			var dns=data['dkim_selector'] + '._domainkey.' + data['domain'] + '. 3600   IN	TXT	' + dkim_txt.match(new RegExp('.{1,' + '200' + '}', 'g')).map(chunk =>  '"' + chunk + '"').join('');
-                        
+
 			$("#dkim_selector").val(data.dkim_selector);
 			$("#dkim_public").val(data.dkim_public);
 			$("#dkim_private").val(data.dkim_private);
@@ -162,5 +164,3 @@
 		});
 	};
 </script>
-
-
-- 
GitLab


From 7010250a07ab3068a1cf6abbb36c63fa8b0e1d0d Mon Sep 17 00:00:00 2001
From: Thom Pol <>
Date: Sun, 7 Mar 2021 22:45:12 +0100
Subject: [PATCH 317/441] Add function to disable per domain relaying globally
 (#6088)

---
 install/tpl/system.ini.master                        |  1 +
 interface/web/admin/form/system_config.tform.php     |  6 ++++++
 interface/web/admin/lib/lang/ar_system_config.lng    |  1 +
 interface/web/admin/lib/lang/bg_system_config.lng    |  1 +
 interface/web/admin/lib/lang/br_system_config.lng    |  1 +
 interface/web/admin/lib/lang/ca_system_config.lng    |  1 +
 interface/web/admin/lib/lang/cz_system_config.lng    |  1 +
 interface/web/admin/lib/lang/de_system_config.lng    |  1 +
 interface/web/admin/lib/lang/dk_system_config.lng    |  1 +
 interface/web/admin/lib/lang/el_system_config.lng    |  1 +
 interface/web/admin/lib/lang/en_system_config.lng    |  4 +---
 interface/web/admin/lib/lang/es_system_config.lng    |  1 +
 interface/web/admin/lib/lang/fi_system_config.lng    |  1 +
 interface/web/admin/lib/lang/fr_system_config.lng    |  1 +
 interface/web/admin/lib/lang/hr_system_config.lng    |  1 +
 interface/web/admin/lib/lang/hu_system_config.lng    |  1 +
 interface/web/admin/lib/lang/id_system_config.lng    |  1 +
 interface/web/admin/lib/lang/it_system_config.lng    |  1 +
 interface/web/admin/lib/lang/ja_system_config.lng    |  1 +
 interface/web/admin/lib/lang/nl_system_config.lng    |  1 +
 interface/web/admin/lib/lang/pl_system_config.lng    |  1 +
 interface/web/admin/lib/lang/pt_system_config.lng    |  1 +
 interface/web/admin/lib/lang/ro_system_config.lng    |  1 +
 interface/web/admin/lib/lang/ru_system_config.lng    |  1 +
 interface/web/admin/lib/lang/se_system_config.lng    |  1 +
 interface/web/admin/lib/lang/sk_system_config.lng    |  1 +
 interface/web/admin/lib/lang/tr_system_config.lng    |  4 +---
 .../web/admin/templates/system_config_mail_edit.htm  | 12 +++++++++---
 interface/web/mail/mail_domain_edit.php              |  8 ++++++++
 interface/web/mail/templates/mail_domain_edit.htm    |  2 ++
 30 files changed, 51 insertions(+), 9 deletions(-)

diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master
index bbd78e6b3a..9d53aed778 100644
--- a/install/tpl/system.ini.master
+++ b/install/tpl/system.ini.master
@@ -8,6 +8,7 @@
 
 [mail]
 enable_custom_login=n
+show_per_domain_relay_options=n
 mailbox_show_autoresponder_tab=y
 mailbox_show_mail_filter_tab=y
 mailbox_show_custom_rules_tab=y
diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index 88d0fef26c..50abaf4db7 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -267,6 +267,12 @@ $form["tabs"]['mail'] = array (
 			'default' => 'n',
 			'value' => array(0 => 'n', 1 => 'y')
 		),
+		'show_per_domain_relay_options' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'n',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
 		'mailbox_show_autoresponder_tab' => array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
diff --git a/interface/web/admin/lib/lang/ar_system_config.lng b/interface/web/admin/lib/lang/ar_system_config.lng
index 7d3df7fbf8..8013ccf673 100644
--- a/interface/web/admin/lib/lang/ar_system_config.lng
+++ b/interface/web/admin/lib/lang/ar_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/bg_system_config.lng b/interface/web/admin/lib/lang/bg_system_config.lng
index f99465e1b6..70edb7bdeb 100644
--- a/interface/web/admin/lib/lang/bg_system_config.lng
+++ b/interface/web/admin/lib/lang/bg_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng
index 58ffca080b..9a3ef795ef 100644
--- a/interface/web/admin/lib/lang/br_system_config.lng
+++ b/interface/web/admin/lib/lang/br_system_config.lng
@@ -26,6 +26,7 @@ $wb['webdavuser_prefix_error_regex'] = 'Caractere não permitido para o prefixo
 $wb['dblist_phpmyadmin_link_txt'] = 'Link para o PHPMyAdmin';
 $wb['enable_custom_login_txt'] = 'Permitir nome de usuário personalizado';
 $wb['mailboxlist_webmail_link_txt'] = 'Link para o Webmail';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Exibir aba de auto-resposta nos detalhes da conta de email';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Exibir aba de filtro de emails nos detalhes da conta de email';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Exibir aba de filtros personalizados de email nos detalhes da conta de email';
diff --git a/interface/web/admin/lib/lang/ca_system_config.lng b/interface/web/admin/lib/lang/ca_system_config.lng
index d8bc0e2d48..f4f55f567a 100644
--- a/interface/web/admin/lib/lang/ca_system_config.lng
+++ b/interface/web/admin/lib/lang/ca_system_config.lng
@@ -26,6 +26,7 @@ $wb['webdavuser_prefix_error_regex'] = 'Char not allowed in webdav user prefix.'
 $wb['dblist_phpmyadmin_link_txt'] = 'Link to phpmyadmin in DB list';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailboxlist_webmail_link_txt'] = 'Link to webmail in Mailbox list';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng
index 7db312097c..1331a11ae8 100644
--- a/interface/web/admin/lib/lang/cz_system_config.lng
+++ b/interface/web/admin/lib/lang/cz_system_config.lng
@@ -48,6 +48,7 @@ $wb['use_combobox_txt'] = 'Použití jQuery UI Combobox';
 $wb['use_loadindicator_txt'] = 'Použití indikátoru zatížení';
 $wb['f5_to_reload_js_txt'] = 'Pokud vypnete tuto volbu, zřejmě budete muset používat klávesu F5, aby internetový prohlížeč znovu načetl JavaScript knihovny nebo budete muset ručně vyprázdňovat mezipaměť (cache) vašeho internetového prohlížeče.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Ukázat kartu automatická odpověď v podrobnostech u poštovní schránky';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Ukázat kartu poštovní filtry v podrobnostech u poštovní schránky';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Ukázat kartu vlastní pravidla v podrobnostech u poštovní schránky';
diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng
index 4a862a2d4a..4f62e16e53 100644
--- a/interface/web/admin/lib/lang/de_system_config.lng
+++ b/interface/web/admin/lib/lang/de_system_config.lng
@@ -51,6 +51,7 @@ $wb['f5_to_reload_js_txt'] = 'Wenn Sie den Wert ändern, müssen Sie F5 drücken
 $wb['phpmyadmin_url_error_regex'] = 'Falsche phpMyAdmin URL';
 $wb['client_username_web_check_disabled_txt'] = 'Deaktiviere die Kunden Benutzernamen Überprüfung für den Begriff <b>web<b>.';
 $wb['backups_include_into_web_quota_txt'] = 'Backups in Web Quota hinzuzählen.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Zeige Autoresponder Reiter in E-Mail Kontodetails';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Zeige E-Mail Filter Reiter in E-Mail Kontodetails';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Zeige Benutzerregel Reiter in E-Mail Kontodetails';
diff --git a/interface/web/admin/lib/lang/dk_system_config.lng b/interface/web/admin/lib/lang/dk_system_config.lng
index eb96004421..f308bb7286 100644
--- a/interface/web/admin/lib/lang/dk_system_config.lng
+++ b/interface/web/admin/lib/lang/dk_system_config.lng
@@ -48,6 +48,7 @@ $wb['use_combobox_txt'] = 'Brug jQuery UI Combobox';
 $wb['use_loadindicator_txt'] = 'Brug Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'Hvis du ændrer dette, kan du blive nødt til at trykke på F5 for at browseren genindlæser JavaScript-biblioteker eller tømme browserens cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Deaktiver klient-brugernavns check for ordet \'web\'.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Vis autoresponder tab i mail kontooplysninger';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Vis mail filter tab i mail kontooplysninger';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Vis custom mailfilter tab i mail kontooplysninger';
diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng
index 68e10e37fc..a3d622b6b6 100644
--- a/interface/web/admin/lib/lang/el_system_config.lng
+++ b/interface/web/admin/lib/lang/el_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Χρήση Load Indicator (ενδεικτή φό
 $wb['f5_to_reload_js_txt'] = 'Αν το αλλάξετε, ίσως πρέπει να πατήσετε το F5 για να κάνετε τον φυλλομετρητη να ξαναφορτώσει τις βιβλιοθήκες JavaScript ή να αδείασετε την cache του φυλλομετρητή.';
 $wb['client_username_web_check_disabled_txt'] = 'Απενεργοποίηση ελέγχου στο όνομα χρήστη για την λέξη \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Εμφάνιση της καρτέλας Αυτόματης Απάντησης στις λεπτομέρειες του λογαριασμού mail';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Εμφάνιση της καρτέλας Φίλτρα mail στις λεπτομέρειες του λογαριασμού mail';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Εμφάνιση της καρτέλας Προσαρμοσμένοι Κανόνες στις λεπτομέρειες του λογαριασμού mail';
diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng
index 4493913fb0..8b38c84331 100644
--- a/interface/web/admin/lib/lang/en_system_config.lng
+++ b/interface/web/admin/lib/lang/en_system_config.lng
@@ -26,9 +26,6 @@ $wb['webdavuser_prefix_error_regex'] = 'Char not allowed in webdav user prefix.'
 $wb['dblist_phpmyadmin_link_txt'] = 'Link to phpmyadmin in DB list';
 $wb['enable_custom_login_txt'] = 'Allow custom login name';
 $wb['mailboxlist_webmail_link_txt'] = 'Link to webmail in Mailbox list';
-$wb['mailbox_show_autoresponder_tab_txt'] = 'Show Autoresponder tab in Mailbox detail';
-$wb['mailbox_show_mail_filter_tab_txt'] = 'Show Mail Filter tab in Mailbox detail';
-$wb['mailbox_show_custom_rules_tab_txt'] = 'Show Custom Rules tab in Mailbox detail';
 $wb['webmail_url_txt'] = 'Webmail URL';
 $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list';
 $wb['mailmailinglist_url_txt'] = 'Mailing list URL';
@@ -55,6 +52,7 @@ $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/es_system_config.lng b/interface/web/admin/lib/lang/es_system_config.lng
index a001999dd4..1a942ae226 100644
--- a/interface/web/admin/lib/lang/es_system_config.lng
+++ b/interface/web/admin/lib/lang/es_system_config.lng
@@ -34,6 +34,7 @@ $wb['f5_to_reload_js_txt'] = 'Si modifica esto, deberá pulsar F5 para que el ex
 $wb['ftpuser_prefix_error_regex'] = 'Carácter no permitido en el prefijo de usuario de FTP.';
 $wb['ftpuser_prefix_txt'] = 'Prefijo del usuario de FTP';
 $wb['login_link_error_regex'] = 'Enlace incorrecto para el inicio de sesión personalizado';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Mostrar la pestaña del auto-respondedor en los detalles de la cuenta de correo';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Mostrar la pestaña filtro de correo personalizado en los detalles de la cuenta de correo';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Mostrar la pestaña filtro de correo en los detalles de la cuenta de correo';
diff --git a/interface/web/admin/lib/lang/fi_system_config.lng b/interface/web/admin/lib/lang/fi_system_config.lng
index eb7863fd53..e547669f5c 100644
--- a/interface/web/admin/lib/lang/fi_system_config.lng
+++ b/interface/web/admin/lib/lang/fi_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng
index cfecf8e27f..1b52bd93d0 100644
--- a/interface/web/admin/lib/lang/fr_system_config.lng
+++ b/interface/web/admin/lib/lang/fr_system_config.lng
@@ -48,6 +48,7 @@ $wb['use_combobox_txt'] = 'Use jQuery UI Combobox';
 $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word ’web’.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/hr_system_config.lng b/interface/web/admin/lib/lang/hr_system_config.lng
index 3f6486ae53..7e6e88a4a5 100644
--- a/interface/web/admin/lib/lang/hr_system_config.lng
+++ b/interface/web/admin/lib/lang/hr_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/hu_system_config.lng b/interface/web/admin/lib/lang/hu_system_config.lng
index 6b1a29ee46..a489a0ab7d 100644
--- a/interface/web/admin/lib/lang/hu_system_config.lng
+++ b/interface/web/admin/lib/lang/hu_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/id_system_config.lng b/interface/web/admin/lib/lang/id_system_config.lng
index f034f9bd76..adffcb7c5a 100644
--- a/interface/web/admin/lib/lang/id_system_config.lng
+++ b/interface/web/admin/lib/lang/id_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng
index 42f878a54d..7e0c71d998 100644
--- a/interface/web/admin/lib/lang/it_system_config.lng
+++ b/interface/web/admin/lib/lang/it_system_config.lng
@@ -48,6 +48,7 @@ $wb['use_combobox_txt'] = 'Use jQuery UI Combobox';
 $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/ja_system_config.lng b/interface/web/admin/lib/lang/ja_system_config.lng
index f50ffb5114..a17551b587 100644
--- a/interface/web/admin/lib/lang/ja_system_config.lng
+++ b/interface/web/admin/lib/lang/ja_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng
index 4078be986e..08574f6471 100644
--- a/interface/web/admin/lib/lang/nl_system_config.lng
+++ b/interface/web/admin/lib/lang/nl_system_config.lng
@@ -17,6 +17,7 @@ $wb['shelluser_prefix_error_regex'] = 'Char niet toegestaan in shell gebruiker v
 $wb['webdavuser_prefix_error_regex'] = 'Char niet toegestaan in webdav gebruiker voorvoegsel.';
 $wb['dblist_phpmyadmin_link_txt'] = 'Link naar phpmyadmin in DB lijst';
 $wb['mailboxlist_webmail_link_txt'] = 'Link naar webmail in Mailbox lijst';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/pl_system_config.lng b/interface/web/admin/lib/lang/pl_system_config.lng
index c94313bdcb..c32dd70c6c 100644
--- a/interface/web/admin/lib/lang/pl_system_config.lng
+++ b/interface/web/admin/lib/lang/pl_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Użyj wskaźnika ładowania';
 $wb['f5_to_reload_js_txt'] = 'Jeżeli zmienisz to, możesz potrzebować wcisnąć F5 lub wyczyścić cache aby przeglądarka przeładowała biblioteki JavaScript.';
 $wb['client_username_web_check_disabled_txt'] = 'Wyłącz sprawdzanie nazwy klienta w poszukiwaniu słowa -web-.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Pokaż zakładkę autorespondera w szczegółach konta email.';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Pokaż zakładkę filtra email w szczegółach konta email.';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Pokaż zakładkę własnych filtrów email w szczegółach konta email.';
diff --git a/interface/web/admin/lib/lang/pt_system_config.lng b/interface/web/admin/lib/lang/pt_system_config.lng
index 39e4dc93f2..732e23b7e9 100644
--- a/interface/web/admin/lib/lang/pt_system_config.lng
+++ b/interface/web/admin/lib/lang/pt_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/ro_system_config.lng b/interface/web/admin/lib/lang/ro_system_config.lng
index 2b819a013e..333dbb895e 100644
--- a/interface/web/admin/lib/lang/ro_system_config.lng
+++ b/interface/web/admin/lib/lang/ro_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/ru_system_config.lng b/interface/web/admin/lib/lang/ru_system_config.lng
index 3aee07ff2e..4764b04cad 100644
--- a/interface/web/admin/lib/lang/ru_system_config.lng
+++ b/interface/web/admin/lib/lang/ru_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Использовать индикатор за
 $wb['f5_to_reload_js_txt'] = 'Если вы измените это, вам, возможно, придется нажать F5, чтобы перезагрузить в браузере JavaScript-библиотеи или очистить кэш браузера.';
 $wb['client_username_web_check_disabled_txt'] = 'Отключить проверку логина клиента для слова \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Включить резервное копирование файлов в веб-квоту.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Показывать вкладку автоответчика в деталях учетной записи электронной почты';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Показывать вкладку почтового фильтра в деталях учетной записи электронной почты';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Показывать вкладку пользовательского почтового фильтра в деталях учетной записи электронной почты';
diff --git a/interface/web/admin/lib/lang/se_system_config.lng b/interface/web/admin/lib/lang/se_system_config.lng
index d075f87509..74be416152 100644
--- a/interface/web/admin/lib/lang/se_system_config.lng
+++ b/interface/web/admin/lib/lang/se_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Använd laddningsindikator';
 $wb['f5_to_reload_js_txt'] = 'Om du ändrar detta kan du behöva trycka F5 för att ladda om javascript, eller rensa din webbläsarcache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Visa autosvarsfliken vid detaljerna för epostkonto';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Visa epostfilterfliken vid detaljerna för epostkonto';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/sk_system_config.lng b/interface/web/admin/lib/lang/sk_system_config.lng
index ef4cc3fef9..0ab9904872 100644
--- a/interface/web/admin/lib/lang/sk_system_config.lng
+++ b/interface/web/admin/lib/lang/sk_system_config.lng
@@ -51,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Use Load Indicator';
 $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.';
 $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.';
 $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
diff --git a/interface/web/admin/lib/lang/tr_system_config.lng b/interface/web/admin/lib/lang/tr_system_config.lng
index 3bb9c82b0a..5a6e70ce81 100644
--- a/interface/web/admin/lib/lang/tr_system_config.lng
+++ b/interface/web/admin/lib/lang/tr_system_config.lng
@@ -26,9 +26,6 @@ $wb['webdavuser_prefix_error_regex'] = 'Webdav kullanıcısı ön ekinde izin ve
 $wb['dblist_phpmyadmin_link_txt'] = 'Veritabanı listesinde phpMyAdmin bağlantısı';
 $wb['enable_custom_login_txt'] = 'Özel oturum açma kullanıcı adı kullanılabilsin';
 $wb['mailboxlist_webmail_link_txt'] = 'E-posta kutusu listesinde Webmail bağlantısı';
-$wb['mailbox_show_autoresponder_tab_txt'] = 'E-posta hesabı ayrıntılarında otoyanıtlayıcı sekmesi görüntülensin';
-$wb['mailbox_show_mail_filter_tab_txt'] = 'E-posta hesabı ayrıntılarında e-posta süzgeci sekmesi görüntülensin';
-$wb['mailbox_show_custom_rules_tab_txt'] = 'E-posta hesabı ayrıntılarında isteğe bağlı e-posta süzgeci sekmesi görüntülensin';
 $wb['webmail_url_txt'] = 'Webmail Adresi';
 $wb['mailmailinglist_link_txt'] = 'E-posta Listeleri listesinde E-posta Listesi bağlantısı';
 $wb['mailmailinglist_url_txt'] = 'E-posta Listesi Adresi';
@@ -54,6 +51,7 @@ $wb['use_loadindicator_txt'] = 'Yük Göstergesi Kullanılsın';
 $wb['f5_to_reload_js_txt'] = 'Bu değer değiştirildiğinde, web tarayıcının JavaScript kitaplıklarını yeniden yüklemesi için F5 tuşuna basmalı ya da web tarayıcının ön belleğini temizlemelisiniz.';
 $wb['client_username_web_check_disabled_txt'] = 'Müşteri kullanıcı adında \'web\' sözcüğü denetimi devre dışı bırakılsın.';
 $wb['backups_include_into_web_quota_txt'] = 'Yedek dosyaları web kotasına katılsın.';
+$wb['show_per_domain_relay_options_txt'] = 'Show per domain relay options';
 $wb['mailbox_show_autoresponder_tab_txt'] = 'E-posta hesabı ayrıntılarında otoyanıtlayıcı sekmesi görüntülensin';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'E-posta hesabı ayrıntılarında e-posta süzgeci sekmesi görüntülensin';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'E-posta hesabı ayrıntılarında isteğe bağlı e-posta süzgeci sekmesi görüntülensin';
diff --git a/interface/web/admin/templates/system_config_mail_edit.htm b/interface/web/admin/templates/system_config_mail_edit.htm
index af0a7a25ca..00134e6511 100644
--- a/interface/web/admin/templates/system_config_mail_edit.htm
+++ b/interface/web/admin/templates/system_config_mail_edit.htm
@@ -4,6 +4,12 @@
                     {tmpl_var name='enable_custom_login'}
                 </div>
             </div>
+            <div class="form-group">
+              <label class="col-sm-3 control-label">{tmpl_var name='show_per_domain_relay_options_txt'}</label>
+              <div class="col-sm-9">
+                {tmpl_var name='show_per_domain_relay_options'}
+              </div>
+            </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='mailbox_show_autoresponder_tab_txt'}</label>
                 <div class="col-sm-9">
@@ -77,10 +83,10 @@
                     {tmpl_var name='default_mailserver'}
                 </select></div>
             </div>
-        
-            
+
+
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
-            
+
         <div class="clear"><div class="right">
             <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/system_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
             <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/users_list.php">{tmpl_var name='btn_cancel_txt'}</button>
diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index e74a60ed94..ffa4eebc59 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -190,6 +190,14 @@ class page_action extends tform_actions {
 			$app->tpl->setVar("domain_module", 0);
 		}
 
+		// Check wether per domain relaying is enabled or not
+		$global_config = $app->getconf->get_global_config('mail');
+		if($global_config['show_per_domain_relay_options'] == 'n' {
+			$app->tpl->setVar("show_per_domain_relay_options", 1);
+		} else {
+			$app->tpl->setVar("show_per_domain_relay_options", 0);
+		}
+
 
 		// Get the spamfilter policys for the user
 		$tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = ?", '@' . $this->dataRecord["domain"]);
diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm
index c024fa023b..1be612436f 100644
--- a/interface/web/mail/templates/mail_domain_edit.htm
+++ b/interface/web/mail/templates/mail_domain_edit.htm
@@ -75,6 +75,7 @@
                     {tmpl_var name='policy'}
                 </select></div>
             </div>
+            <tmpl_if name="show_per_domain_relay_options">
             <tmpl_if name="limit_relayhost" op="==" value="y">
               <div class="form-group">
                 <label for="relay_host" class="col-sm-3 control-label">{tmpl_var name='relayhost_txt'}</label>
@@ -95,6 +96,7 @@
                 </div>
               </div>
             </tmpl_if>
+            </tmpl_if>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
                 <div class="col-sm-9">
-- 
GitLab


From ce4c98c57ef2d88e6ed0e14ebb56d166b2192740 Mon Sep 17 00:00:00 2001
From: Thom Pol <>
Date: Sun, 7 Mar 2021 22:47:06 +0100
Subject: [PATCH 318/441] Fix syntax error

---
 interface/web/mail/mail_domain_edit.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index ffa4eebc59..eebb7b0848 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -192,7 +192,7 @@ class page_action extends tform_actions {
 
 		// Check wether per domain relaying is enabled or not
 		$global_config = $app->getconf->get_global_config('mail');
-		if($global_config['show_per_domain_relay_options'] == 'n' {
+		if($global_config['show_per_domain_relay_options'] == 'n') {
 			$app->tpl->setVar("show_per_domain_relay_options", 1);
 		} else {
 			$app->tpl->setVar("show_per_domain_relay_options", 0);
-- 
GitLab


From d86787264fd3acd53a19025333d70a79ee53b3de Mon Sep 17 00:00:00 2001
From: Thom Pol <>
Date: Mon, 8 Mar 2021 00:14:05 +0100
Subject: [PATCH 319/441] Add limit_relayhost column (#6088)

---
 install/sql/incremental/upd_dev_collection.sql | 4 ++++
 install/sql/ispconfig3.sql                     | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 7d1ec43815..71efb3085e 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -19,3 +19,7 @@ DROP TABLE 'software_update_inst';
 
 -- Brexit
 UPDATE `country` SET `eu` = 'n' WHERE `iso` = 'GB';
+
+-- Add limit for per domain relaying
+ALTER TABLE `client` ADD `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_spamfilter_policy`;
+ALTER TABLE `client_template` ADD `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_spamfilter_policy`;
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 04082fbeb7..006beb6b53 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -185,6 +185,7 @@ CREATE TABLE `client` (
   `limit_spamfilter_wblist` int(11) NOT NULL DEFAULT '0',
   `limit_spamfilter_user` int(11) NOT NULL DEFAULT '0',
   `limit_spamfilter_policy` int(11) NOT NULL DEFAULT '0',
+  `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n',
   `default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1',
   `xmpp_servers` text,
   `limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1',
@@ -317,6 +318,7 @@ CREATE TABLE `client_template` (
   `limit_spamfilter_wblist` int(11) NOT NULL default '0',
   `limit_spamfilter_user` int(11) NOT NULL default '0',
   `limit_spamfilter_policy` int(11) NOT NULL default '0',
+  `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n',
   `default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1',
   `xmpp_servers` text,
   `limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1',
-- 
GitLab


From f80634486a6da9187b1948c353147cbf845279d6 Mon Sep 17 00:00:00 2001
From: Thom Pol <>
Date: Mon, 8 Mar 2021 00:36:23 +0100
Subject: [PATCH 320/441] Fix limit check for per domain relaying (#6088)

---
 interface/web/mail/mail_domain_edit.php           | 12 ++++++++++--
 interface/web/mail/templates/mail_domain_edit.htm |  2 +-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index eebb7b0848..360487ef1a 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -192,12 +192,20 @@ class page_action extends tform_actions {
 
 		// Check wether per domain relaying is enabled or not
 		$global_config = $app->getconf->get_global_config('mail');
-		if($global_config['show_per_domain_relay_options'] == 'n') {
+		if($global_config['show_per_domain_relay_options'] == 'y') {
 			$app->tpl->setVar("show_per_domain_relay_options", 1);
 		} else {
 			$app->tpl->setVar("show_per_domain_relay_options", 0);
 		}
 
+		// Get the limits of the client
+    $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
+    $client = $app->db->queryOneRecord("SELECT limit_relayhost FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+		if ($client["limit_relayhost"] == 'y' || $_SESSION["s"]["user"]["typ"] == 'admin') {
+			$app->tpl->setVar("limit_relayhost", 1);
+		} else {
+			$app->tpl->setVar("limit_relayhost", 0);
+		}
 
 		// Get the spamfilter policys for the user
 		$tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = ?", '@' . $this->dataRecord["domain"]);
@@ -273,7 +281,7 @@ class page_action extends tform_actions {
 		if($_SESSION["s"]["user"]["typ"] != 'admin') {
 			// Get the limits of the client
 			$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
-			$client = $app->db->queryOneRecord("SELECT client.mail_servers, limit_maildomain, default_mailserver, limit_relayhost FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+			$client = $app->db->queryOneRecord("SELECT client.mail_servers, limit_maildomain, default_mailserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
 			// When the record is updated
 			if($this->id > 0) {
 				// restore the server ID if the user is not admin and record is edited
diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm
index 1be612436f..3486dcfff2 100644
--- a/interface/web/mail/templates/mail_domain_edit.htm
+++ b/interface/web/mail/templates/mail_domain_edit.htm
@@ -76,7 +76,7 @@
                 </select></div>
             </div>
             <tmpl_if name="show_per_domain_relay_options">
-            <tmpl_if name="limit_relayhost" op="==" value="y">
+            <tmpl_if name="limit_relayhost">
               <div class="form-group">
                 <label for="relay_host" class="col-sm-3 control-label">{tmpl_var name='relayhost_txt'}</label>
                 <div class="col-sm-9">
-- 
GitLab


From 5691d4d259aedf0c8ee94c2e3f22fb82a674abf9 Mon Sep 17 00:00:00 2001
From: Thom Pol <>
Date: Mon, 8 Mar 2021 00:43:19 +0100
Subject: [PATCH 321/441] Add missing translations (#6088)

---
 interface/web/client/lib/lang/ar_client.lng          | 1 +
 interface/web/client/lib/lang/ar_client_template.lng | 1 +
 interface/web/client/lib/lang/ar_reseller.lng        | 1 +
 interface/web/client/lib/lang/bg_client.lng          | 1 +
 interface/web/client/lib/lang/bg_client_template.lng | 1 +
 interface/web/client/lib/lang/bg_reseller.lng        | 1 +
 interface/web/client/lib/lang/br_client.lng          | 1 +
 interface/web/client/lib/lang/br_client_template.lng | 1 +
 interface/web/client/lib/lang/br_reseller.lng        | 1 +
 interface/web/client/lib/lang/ca_client.lng          | 1 +
 interface/web/client/lib/lang/ca_client_template.lng | 1 +
 interface/web/client/lib/lang/ca_reseller.lng        | 1 +
 interface/web/client/lib/lang/cz_client.lng          | 1 +
 interface/web/client/lib/lang/cz_client_template.lng | 1 +
 interface/web/client/lib/lang/cz_reseller.lng        | 1 +
 interface/web/client/lib/lang/de_client.lng          | 1 +
 interface/web/client/lib/lang/de_client_template.lng | 1 +
 interface/web/client/lib/lang/de_reseller.lng        | 1 +
 interface/web/client/lib/lang/dk_client.lng          | 1 +
 interface/web/client/lib/lang/dk_client_template.lng | 1 +
 interface/web/client/lib/lang/dk_reseller.lng        | 1 +
 interface/web/client/lib/lang/el_client.lng          | 1 +
 interface/web/client/lib/lang/el_client_template.lng | 1 +
 interface/web/client/lib/lang/el_reseller.lng        | 1 +
 interface/web/client/lib/lang/en_client.lng          | 1 +
 interface/web/client/lib/lang/en_client_template.lng | 1 +
 interface/web/client/lib/lang/en_reseller.lng        | 1 +
 interface/web/client/lib/lang/es_client.lng          | 1 +
 interface/web/client/lib/lang/es_client_template.lng | 1 +
 interface/web/client/lib/lang/es_reseller.lng        | 1 +
 interface/web/client/lib/lang/fi_client.lng          | 1 +
 interface/web/client/lib/lang/fi_client_template.lng | 1 +
 interface/web/client/lib/lang/fi_reseller.lng        | 1 +
 interface/web/client/lib/lang/fr_client.lng          | 1 +
 interface/web/client/lib/lang/fr_client_template.lng | 1 +
 interface/web/client/lib/lang/fr_reseller.lng        | 1 +
 interface/web/client/lib/lang/hr_client.lng          | 1 +
 interface/web/client/lib/lang/hr_client_template.lng | 1 +
 interface/web/client/lib/lang/hr_reseller.lng        | 1 +
 interface/web/client/lib/lang/hu_client.lng          | 1 +
 interface/web/client/lib/lang/hu_client_template.lng | 1 +
 interface/web/client/lib/lang/hu_reseller.lng        | 1 +
 interface/web/client/lib/lang/id_client.lng          | 1 +
 interface/web/client/lib/lang/id_client_template.lng | 1 +
 interface/web/client/lib/lang/id_reseller.lng        | 1 +
 interface/web/client/lib/lang/it_client.lng          | 1 +
 interface/web/client/lib/lang/it_client_template.lng | 1 +
 interface/web/client/lib/lang/it_reseller.lng        | 1 +
 interface/web/client/lib/lang/ja_client.lng          | 1 +
 interface/web/client/lib/lang/ja_client_template.lng | 1 +
 interface/web/client/lib/lang/ja_reseller.lng        | 1 +
 interface/web/client/lib/lang/nl_client.lng          | 1 +
 interface/web/client/lib/lang/nl_client_template.lng | 1 +
 interface/web/client/lib/lang/nl_reseller.lng        | 1 +
 interface/web/client/lib/lang/pl_client.lng          | 1 +
 interface/web/client/lib/lang/pl_client_template.lng | 1 +
 interface/web/client/lib/lang/pl_reseller.lng        | 1 +
 interface/web/client/lib/lang/pt_client.lng          | 1 +
 interface/web/client/lib/lang/pt_client_template.lng | 1 +
 interface/web/client/lib/lang/pt_reseller.lng        | 1 +
 interface/web/client/lib/lang/ro_client.lng          | 1 +
 interface/web/client/lib/lang/ro_client_template.lng | 1 +
 interface/web/client/lib/lang/ro_reseller.lng        | 1 +
 interface/web/client/lib/lang/ru_client.lng          | 1 +
 interface/web/client/lib/lang/ru_client_template.lng | 1 +
 interface/web/client/lib/lang/ru_reseller.lng        | 1 +
 interface/web/client/lib/lang/se_client.lng          | 1 +
 interface/web/client/lib/lang/se_client_template.lng | 1 +
 interface/web/client/lib/lang/se_reseller.lng        | 1 +
 interface/web/client/lib/lang/sk_client.lng          | 1 +
 interface/web/client/lib/lang/sk_client_template.lng | 1 +
 interface/web/client/lib/lang/sk_reseller.lng        | 1 +
 interface/web/client/lib/lang/tr_client.lng          | 1 +
 interface/web/client/lib/lang/tr_client_template.lng | 1 +
 interface/web/client/lib/lang/tr_reseller.lng        | 1 +
 75 files changed, 75 insertions(+)

diff --git a/interface/web/client/lib/lang/ar_client.lng b/interface/web/client/lib/lang/ar_client.lng
index fde7171aa2..6de8fa1138 100644
--- a/interface/web/client/lib/lang/ar_client.lng
+++ b/interface/web/client/lib/lang/ar_client.lng
@@ -38,6 +38,7 @@ $wb['company_txt'] = 'Company';
 $wb['title_txt'] = 'Title';
 $wb['firstname_txt'] = 'Firstname';
 $wb['surname_txt'] = 'Surname';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/ar_client_template.lng b/interface/web/client/lib/lang/ar_client_template.lng
index fe67603b19..d1050a8251 100644
--- a/interface/web/client/lib/lang/ar_client_template.lng
+++ b/interface/web/client/lib/lang/ar_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_mailquota_txt'] = 'Mailbox quota';
 $wb['limit_spamfilter_wblist_txt'] = 'Max. number of spamfilter white / blacklist filters';
 $wb['limit_spamfilter_user_txt'] = 'Max. number of spamfilter users';
 $wb['limit_spamfilter_policy_txt'] = 'Max. number of spamfilter policies';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/ar_reseller.lng b/interface/web/client/lib/lang/ar_reseller.lng
index afd557ab18..4d21c7d173 100644
--- a/interface/web/client/lib/lang/ar_reseller.lng
+++ b/interface/web/client/lib/lang/ar_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Company';
 $wb['title_txt'] = 'Title';
 $wb['firstname_txt'] = 'Firstname';
 $wb['surname_txt'] = 'Surname';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/bg_client.lng b/interface/web/client/lib/lang/bg_client.lng
index d9e5c1de61..5d696dd320 100644
--- a/interface/web/client/lib/lang/bg_client.lng
+++ b/interface/web/client/lib/lang/bg_client.lng
@@ -38,6 +38,7 @@ $wb['title_txt'] = 'Обръщение';
 $wb['firstname_txt'] = 'Име';
 $wb['surname_txt'] = 'Фамилия';
 $wb['limit_client_txt'] = 'Макс. брой клиенти';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/bg_client_template.lng b/interface/web/client/lib/lang/bg_client_template.lng
index 0ca56504f1..222554fbfd 100644
--- a/interface/web/client/lib/lang/bg_client_template.lng
+++ b/interface/web/client/lib/lang/bg_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_spamfilter_wblist_txt'] = 'Макс. брой на spamfilter white /
 $wb['limit_spamfilter_user_txt'] = 'Макс. брой на spamfilter users';
 $wb['limit_spamfilter_policy_txt'] = 'Макс. брой на spamfilter policys';
 $wb['limit_client_txt'] = 'Макс. брой на Клиентите';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/bg_reseller.lng b/interface/web/client/lib/lang/bg_reseller.lng
index d34dff83d6..d8489b5817 100644
--- a/interface/web/client/lib/lang/bg_reseller.lng
+++ b/interface/web/client/lib/lang/bg_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Компания';
 $wb['title_txt'] = 'Обръщение';
 $wb['firstname_txt'] = 'Първо име ';
 $wb['surname_txt'] = 'Фамилия';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/br_client.lng b/interface/web/client/lib/lang/br_client.lng
index 4d2928459d..f5f735a9dc 100644
--- a/interface/web/client/lib/lang/br_client.lng
+++ b/interface/web/client/lib/lang/br_client.lng
@@ -40,6 +40,7 @@ $wb['company_txt'] = 'Empresa';
 $wb['title_txt'] = 'Cargo';
 $wb['firstname_txt'] = 'Nome';
 $wb['surname_txt'] = 'Sobrenome';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Limite de domínios';
 $wb['limit_subdomain_txt'] = 'Limite de subdomínios';
 $wb['limit_webquota_txt'] = 'Limite da cota de sites';
diff --git a/interface/web/client/lib/lang/br_client_template.lng b/interface/web/client/lib/lang/br_client_template.lng
index 3c866f48e7..af4824fad1 100644
--- a/interface/web/client/lib/lang/br_client_template.lng
+++ b/interface/web/client/lib/lang/br_client_template.lng
@@ -19,6 +19,7 @@ $wb['limit_mailquota_txt'] = 'Cota da conta de email';
 $wb['limit_spamfilter_wblist_txt'] = 'Limite de filtros anti-spam "lista de permissões/lista de bloqueio"';
 $wb['limit_spamfilter_user_txt'] = 'Limite de filtros anti-spam para conta de email';
 $wb['limit_spamfilter_policy_txt'] = 'Limite de políticas anti-spam';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Limite de domínios';
 $wb['limit_subdomain_txt'] = 'Limite de subdomínios';
 $wb['limit_webquota_txt'] = 'Limite da cota de site';
diff --git a/interface/web/client/lib/lang/br_reseller.lng b/interface/web/client/lib/lang/br_reseller.lng
index 9dacacda44..b7cc452623 100644
--- a/interface/web/client/lib/lang/br_reseller.lng
+++ b/interface/web/client/lib/lang/br_reseller.lng
@@ -40,6 +40,7 @@ $wb['company_txt'] = 'Empresa';
 $wb['title_txt'] = 'Título';
 $wb['firstname_txt'] = 'Nome';
 $wb['surname_txt'] = 'Sobrenome';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Limite de domínios';
 $wb['limit_subdomain_txt'] = 'Limite de subdomínios';
 $wb['limit_webquota_txt'] = 'Cota de sites';
diff --git a/interface/web/client/lib/lang/ca_client.lng b/interface/web/client/lib/lang/ca_client.lng
index 56b6718749..cc8276ac20 100644
--- a/interface/web/client/lib/lang/ca_client.lng
+++ b/interface/web/client/lib/lang/ca_client.lng
@@ -37,6 +37,7 @@ $wb['title_txt'] = 'Titre';
 $wb['firstname_txt'] = 'Prénom';
 $wb['surname_txt'] = 'Nom';
 $wb['limit_client_txt'] = 'Nombre maximal de clients';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Nombre maximal de domaines';
 $wb['limit_subdomain_txt'] = 'Nombre maximal de sous-domaines';
 $wb['limit_webquota_txt'] = 'Limite du quota web';
diff --git a/interface/web/client/lib/lang/ca_client_template.lng b/interface/web/client/lib/lang/ca_client_template.lng
index c72d067822..9328b422aa 100644
--- a/interface/web/client/lib/lang/ca_client_template.lng
+++ b/interface/web/client/lib/lang/ca_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_spamfilter_wblist_txt'] = 'Nombre maximal de liste blanches/noires d\
 $wb['limit_spamfilter_user_txt'] = 'Nombre maximal d\'utilisateurs du filtre antispam';
 $wb['limit_spamfilter_policy_txt'] = 'Nombre maximal de règles du filtre antispam';
 $wb['limit_client_txt'] = 'Nombre maximal de clients';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Nombre maximal de domaines';
 $wb['limit_subdomain_txt'] = 'Nombre maximal de sous-domaines';
 $wb['limit_webquota_txt'] = 'Limite du quota web';
diff --git a/interface/web/client/lib/lang/ca_reseller.lng b/interface/web/client/lib/lang/ca_reseller.lng
index de734d385b..6e39d6741f 100644
--- a/interface/web/client/lib/lang/ca_reseller.lng
+++ b/interface/web/client/lib/lang/ca_reseller.lng
@@ -36,6 +36,7 @@ $wb['company_txt'] = 'Entreprise';
 $wb['title_txt'] = 'Titre';
 $wb['firstname_txt'] = 'Prénom';
 $wb['surname_txt'] = 'Nom';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Nombre maximal de domaines';
 $wb['limit_subdomain_txt'] = 'Nombre maximal de sous-domaines';
 $wb['limit_webquota_txt'] = 'Limite du quota web';
diff --git a/interface/web/client/lib/lang/cz_client.lng b/interface/web/client/lib/lang/cz_client.lng
index c6bc86a59d..6c6bb093ad 100644
--- a/interface/web/client/lib/lang/cz_client.lng
+++ b/interface/web/client/lib/lang/cz_client.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Společnost';
 $wb['title_txt'] = 'Titul';
 $wb['firstname_txt'] = 'Jméno';
 $wb['surname_txt'] = 'Příjmení';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/cz_client_template.lng b/interface/web/client/lib/lang/cz_client_template.lng
index 812a8e2766..addc035022 100644
--- a/interface/web/client/lib/lang/cz_client_template.lng
+++ b/interface/web/client/lib/lang/cz_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_mailquota_txt'] = 'Kvóta e-mailové schránky';
 $wb['limit_spamfilter_wblist_txt'] = 'Max. počet spamfiltrových bílých / černých listinových filtrů';
 $wb['limit_spamfilter_user_txt'] = 'Max. počet spamflitrových uživatelů';
 $wb['limit_spamfilter_policy_txt'] = 'Max. počet spamfiltrových politik';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/cz_reseller.lng b/interface/web/client/lib/lang/cz_reseller.lng
index 79888530b0..2ae6860b32 100644
--- a/interface/web/client/lib/lang/cz_reseller.lng
+++ b/interface/web/client/lib/lang/cz_reseller.lng
@@ -36,6 +36,7 @@ $wb['company_txt'] = 'Společnost';
 $wb['title_txt'] = 'Titul';
 $wb['firstname_txt'] = 'Jméno';
 $wb['surname_txt'] = 'Příjmení';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/de_client.lng b/interface/web/client/lib/lang/de_client.lng
index cce0b03b68..077e3f3265 100644
--- a/interface/web/client/lib/lang/de_client.lng
+++ b/interface/web/client/lib/lang/de_client.lng
@@ -37,6 +37,7 @@ $wb['title_txt'] = 'Titel';
 $wb['firstname_txt'] = 'Vorname';
 $wb['surname_txt'] = 'Nachname';
 $wb['limit_client_txt'] = 'Max. Anzahl an Kunden';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Max. Anzahl an Domains';
 $wb['limit_subdomain_txt'] = 'Max. Anzahl an Subdomains';
 $wb['limit_webquota_txt'] = 'Max. Webbeschränkung';
diff --git a/interface/web/client/lib/lang/de_client_template.lng b/interface/web/client/lib/lang/de_client_template.lng
index aaf26f9996..6ca0f25579 100644
--- a/interface/web/client/lib/lang/de_client_template.lng
+++ b/interface/web/client/lib/lang/de_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_spamfilter_wblist_txt'] = 'Max. Anzahl an Spamfilter (White-/Blacklis
 $wb['limit_spamfilter_user_txt'] = 'Max. Anzahl Spamfilter Benutzer';
 $wb['limit_spamfilter_policy_txt'] = 'Max. Anzahl an Spamfilter Richtlinien';
 $wb['limit_client_txt'] = 'Max. Anzahl an Kunden';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Max. Anzahl an Domains';
 $wb['limit_subdomain_txt'] = 'Max. Anzahl an Subdomains';
 $wb['limit_webquota_txt'] = 'Max. Speicherplatzbeschränkung';
diff --git a/interface/web/client/lib/lang/de_reseller.lng b/interface/web/client/lib/lang/de_reseller.lng
index 5d6a8f134f..c5536ceec9 100644
--- a/interface/web/client/lib/lang/de_reseller.lng
+++ b/interface/web/client/lib/lang/de_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Firma';
 $wb['title_txt'] = 'Titel';
 $wb['firstname_txt'] = 'Vorname';
 $wb['surname_txt'] = 'Nachname';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Max. Anzahl an Domains';
 $wb['limit_subdomain_txt'] = 'Max. Anzahl an Subdomains';
 $wb['limit_webquota_txt'] = 'Max. Speicherplatzbeschränkung';
diff --git a/interface/web/client/lib/lang/dk_client.lng b/interface/web/client/lib/lang/dk_client.lng
index fc83620acb..aebe9a9bdd 100644
--- a/interface/web/client/lib/lang/dk_client.lng
+++ b/interface/web/client/lib/lang/dk_client.lng
@@ -38,6 +38,7 @@ $wb['company_txt'] = 'Firma';
 $wb['title_txt'] = 'Titel';
 $wb['firstname_txt'] = 'Fornavn';
 $wb['surname_txt'] = 'Efternavn';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webkvote';
diff --git a/interface/web/client/lib/lang/dk_client_template.lng b/interface/web/client/lib/lang/dk_client_template.lng
index fa9399197f..64a8b30874 100644
--- a/interface/web/client/lib/lang/dk_client_template.lng
+++ b/interface/web/client/lib/lang/dk_client_template.lng
@@ -18,6 +18,7 @@ $wb['limit_mailquota_txt'] = 'Postboks kvota';
 $wb['limit_spamfilter_wblist_txt'] = 'Max. antal af spamfilter white/blacklist filtere';
 $wb['limit_spamfilter_user_txt'] = 'Max. antal af spamfilter brugere';
 $wb['limit_spamfilter_policy_txt'] = 'Max. antal af spamfilter politikker';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webkvote';
diff --git a/interface/web/client/lib/lang/dk_reseller.lng b/interface/web/client/lib/lang/dk_reseller.lng
index 19babe52d4..ef37da2c8e 100644
--- a/interface/web/client/lib/lang/dk_reseller.lng
+++ b/interface/web/client/lib/lang/dk_reseller.lng
@@ -38,6 +38,7 @@ $wb['company_txt'] = 'Firma';
 $wb['title_txt'] = 'Titel';
 $wb['firstname_txt'] = 'Fornavn';
 $wb['surname_txt'] = 'Efternavn';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webkvote';
diff --git a/interface/web/client/lib/lang/el_client.lng b/interface/web/client/lib/lang/el_client.lng
index 3d61198d3d..468c6e29af 100644
--- a/interface/web/client/lib/lang/el_client.lng
+++ b/interface/web/client/lib/lang/el_client.lng
@@ -38,6 +38,7 @@ $wb['company_txt'] = 'Εταιρία';
 $wb['title_txt'] = 'Τίτλος';
 $wb['firstname_txt'] = 'Όνομα';
 $wb['surname_txt'] = 'Επίθετο';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Όριο domain';
 $wb['limit_subdomain_txt'] = 'Όριο subdomain';
 $wb['limit_webquota_txt'] = 'Όριο χώρου web';
diff --git a/interface/web/client/lib/lang/el_client_template.lng b/interface/web/client/lib/lang/el_client_template.lng
index 7d05bd4cc8..9b6333deaa 100644
--- a/interface/web/client/lib/lang/el_client_template.lng
+++ b/interface/web/client/lib/lang/el_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_mailquota_txt'] = 'Όριο θυρίδας';
 $wb['limit_spamfilter_wblist_txt'] = 'Όριο spamfilter white / blacklist';
 $wb['limit_spamfilter_user_txt'] = 'Όριο χρηστών spamfilter';
 $wb['limit_spamfilter_policy_txt'] = 'Όριο πολιτικών spamfilter';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Όριο domain';
 $wb['limit_subdomain_txt'] = 'Όριο subdomain';
 $wb['limit_webquota_txt'] = 'Όριο χώρου web';
diff --git a/interface/web/client/lib/lang/el_reseller.lng b/interface/web/client/lib/lang/el_reseller.lng
index 9aa37a6333..2a4ae26bdf 100644
--- a/interface/web/client/lib/lang/el_reseller.lng
+++ b/interface/web/client/lib/lang/el_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Εταιρία';
 $wb['title_txt'] = 'Τίτλος';
 $wb['firstname_txt'] = 'Όνομα';
 $wb['surname_txt'] = 'Επίθετο';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Όριο Domain';
 $wb['limit_subdomain_txt'] = 'Όριο Subdomain';
 $wb['limit_webquota_txt'] = 'Όριο Χώρου Web';
diff --git a/interface/web/client/lib/lang/en_client.lng b/interface/web/client/lib/lang/en_client.lng
index ee5f3675bd..0f38b60dd9 100644
--- a/interface/web/client/lib/lang/en_client.lng
+++ b/interface/web/client/lib/lang/en_client.lng
@@ -40,6 +40,7 @@ $wb['company_txt'] = 'Company';
 $wb['title_txt'] = 'Title';
 $wb['firstname_txt'] = 'Firstname';
 $wb['surname_txt'] = 'Surname';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/en_client_template.lng b/interface/web/client/lib/lang/en_client_template.lng
index bfccedcf1e..8cb93a9966 100644
--- a/interface/web/client/lib/lang/en_client_template.lng
+++ b/interface/web/client/lib/lang/en_client_template.lng
@@ -19,6 +19,7 @@ $wb['limit_mailquota_txt'] = 'Mailbox quota';
 $wb['limit_spamfilter_wblist_txt'] = 'Max. number of spamfilter white / blacklist filters';
 $wb['limit_spamfilter_user_txt'] = 'Max. number of spamfilter users';
 $wb['limit_spamfilter_policy_txt'] = 'Max. number of spamfilter policies';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/en_reseller.lng b/interface/web/client/lib/lang/en_reseller.lng
index c2315c67b4..8e09ae1b4d 100644
--- a/interface/web/client/lib/lang/en_reseller.lng
+++ b/interface/web/client/lib/lang/en_reseller.lng
@@ -40,6 +40,7 @@ $wb['company_txt'] = 'Company';
 $wb['title_txt'] = 'Title';
 $wb['firstname_txt'] = 'Firstname';
 $wb['surname_txt'] = 'Surname';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/es_client.lng b/interface/web/client/lib/lang/es_client.lng
index 645a533a51..6fe418a1d6 100644
--- a/interface/web/client/lib/lang/es_client.lng
+++ b/interface/web/client/lib/lang/es_client.lng
@@ -79,6 +79,7 @@ $wb['limit_dns_slave_zone_error_notint'] = 'El límite de zonas esclavas de dns
 $wb['limit_dns_slave_zone_txt'] = 'Cantidad máxima de zonas secundarias de DNS';
 $wb['limit_dns_zone_error_notint'] = 'El límite de zonas DNS debe ser un número.';
 $wb['limit_dns_zone_txt'] = 'Cantidad máxima de zonas DNS';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_fetchmail_txt'] = 'Cantidad máx. de recogedores de correo';
 $wb['limit_ftp_user_error_notint'] = 'El límite de usuarios de FTP debe ser un número.';
diff --git a/interface/web/client/lib/lang/es_client_template.lng b/interface/web/client/lib/lang/es_client_template.lng
index 17c73de969..0c2a4700fd 100644
--- a/interface/web/client/lib/lang/es_client_template.lng
+++ b/interface/web/client/lib/lang/es_client_template.lng
@@ -35,6 +35,7 @@ $wb['limit_dns_slave_zone_error_notint'] = 'El límite de zonas esclavas de dns
 $wb['limit_dns_slave_zone_txt'] = 'Cantidad máx. de zonas secundarias de DNS';
 $wb['limit_dns_zone_error_notint'] = 'El límite de zonas DNS debe ser un número.';
 $wb['limit_dns_zone_txt'] = 'Cantidad máx. de zonas DNS';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_domainmodule_txt'] = 'Límites del módulo de dominio';
 $wb['limit_fetchmail_txt'] = 'Cantidad máx. de recuperadores de correo';
diff --git a/interface/web/client/lib/lang/es_reseller.lng b/interface/web/client/lib/lang/es_reseller.lng
index d2553ce83c..2d96fe2bdc 100644
--- a/interface/web/client/lib/lang/es_reseller.lng
+++ b/interface/web/client/lib/lang/es_reseller.lng
@@ -85,6 +85,7 @@ $wb['limit_dns_slave_zone_error_notint'] = 'El límite de zonas esclavas de dns
 $wb['limit_dns_slave_zone_txt'] = 'Cantidad máxima de zonas secundarias de DNS';
 $wb['limit_dns_zone_error_notint'] = 'El límite de zonas DNS debe ser un número.';
 $wb['limit_dns_zone_txt'] = 'Cantidad máxima de zonas DNS';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_domainmodule_error_notint'] = 'El límite del módulo de dominio debe ser un número.';
 $wb['limit_domainmodule_txt'] = 'Límites del módulo de dominio';
diff --git a/interface/web/client/lib/lang/fi_client.lng b/interface/web/client/lib/lang/fi_client.lng
index c0c0a5ba3a..b373a7f10f 100644
--- a/interface/web/client/lib/lang/fi_client.lng
+++ b/interface/web/client/lib/lang/fi_client.lng
@@ -37,6 +37,7 @@ $wb['title_txt'] = 'Otsikko';
 $wb['firstname_txt'] = 'Etunimi';
 $wb['surname_txt'] = 'Sukunimi';
 $wb['limit_client_txt'] = 'Asiakkaiden määrä';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Verkkotunnuksien määrä';
 $wb['limit_subdomain_txt'] = 'Aliverkkotunnuksien määrä';
 $wb['limit_webquota_txt'] = 'Kotisivutila';
diff --git a/interface/web/client/lib/lang/fi_client_template.lng b/interface/web/client/lib/lang/fi_client_template.lng
index d24182806b..68d9c0bead 100644
--- a/interface/web/client/lib/lang/fi_client_template.lng
+++ b/interface/web/client/lib/lang/fi_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_spamfilter_wblist_txt'] = 'Roskapostisuodattimen estolistojen määr
 $wb['limit_spamfilter_user_txt'] = 'Roskapostisuodattimen käyttäjien määrä';
 $wb['limit_spamfilter_policy_txt'] = 'Roskapostisuodattimen kohtelutapojen määrä';
 $wb['limit_client_txt'] = 'Asiakkaiden määrä';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Verkkotunnuksien raja';
 $wb['limit_subdomain_txt'] = 'Aliverkkotunnuksien raja';
 $wb['limit_webquota_txt'] = 'Kotisivutilan raja';
diff --git a/interface/web/client/lib/lang/fi_reseller.lng b/interface/web/client/lib/lang/fi_reseller.lng
index 06e2ef5fca..d0e4eedcfe 100644
--- a/interface/web/client/lib/lang/fi_reseller.lng
+++ b/interface/web/client/lib/lang/fi_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Yritys';
 $wb['title_txt'] = 'Titteli';
 $wb['firstname_txt'] = 'Etunimi';
 $wb['surname_txt'] = 'Sukunimi';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Verkkotunnusraja';
 $wb['limit_subdomain_txt'] = 'Aliverkkotunnusraja';
 $wb['limit_webquota_txt'] = 'WWW-levytila';
diff --git a/interface/web/client/lib/lang/fr_client.lng b/interface/web/client/lib/lang/fr_client.lng
index 4ef9a64eeb..61b9e800b5 100644
--- a/interface/web/client/lib/lang/fr_client.lng
+++ b/interface/web/client/lib/lang/fr_client.lng
@@ -37,6 +37,7 @@ $wb['title_txt'] = 'Titre';
 $wb['firstname_txt'] = 'Prénom';
 $wb['surname_txt'] = 'Nom';
 $wb['limit_client_txt'] = 'Nombre maximal de clients';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Nombre maximal de domaines';
 $wb['limit_subdomain_txt'] = 'Nombre maximal de sous-domaines';
 $wb['limit_webquota_txt'] = 'Limite du quota web';
diff --git a/interface/web/client/lib/lang/fr_client_template.lng b/interface/web/client/lib/lang/fr_client_template.lng
index e443eb7801..f09e408cc9 100644
--- a/interface/web/client/lib/lang/fr_client_template.lng
+++ b/interface/web/client/lib/lang/fr_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_spamfilter_wblist_txt'] = 'Nombre maximal de liste blanches/noires d
 $wb['limit_spamfilter_user_txt'] = 'Nombre maximal d’utilisateurs du filtre antispam';
 $wb['limit_spamfilter_policy_txt'] = 'Nombre maximal de règles du filtre antispam';
 $wb['limit_client_txt'] = 'Nombre maximal de clients';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Nombre maximal de domaines';
 $wb['limit_subdomain_txt'] = 'Nombre maximal de sous-domaines';
 $wb['limit_webquota_txt'] = 'Limite du quota web';
diff --git a/interface/web/client/lib/lang/fr_reseller.lng b/interface/web/client/lib/lang/fr_reseller.lng
index 448a91ea39..ef5d956d33 100644
--- a/interface/web/client/lib/lang/fr_reseller.lng
+++ b/interface/web/client/lib/lang/fr_reseller.lng
@@ -36,6 +36,7 @@ $wb['company_txt'] = 'Entreprise';
 $wb['title_txt'] = 'Titre';
 $wb['firstname_txt'] = 'Prénom';
 $wb['surname_txt'] = 'Nom';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Nombre maximal de domaines';
 $wb['limit_subdomain_txt'] = 'Nombre maximal de sous-domaines';
 $wb['limit_webquota_txt'] = 'Limite du quota web';
diff --git a/interface/web/client/lib/lang/hr_client.lng b/interface/web/client/lib/lang/hr_client.lng
index aac50a2f2a..bdfcb839d3 100644
--- a/interface/web/client/lib/lang/hr_client.lng
+++ b/interface/web/client/lib/lang/hr_client.lng
@@ -38,6 +38,7 @@ $wb['company_txt'] = 'Poduzeće';
 $wb['title_txt'] = 'Naziv';
 $wb['firstname_txt'] = 'Ime';
 $wb['surname_txt'] = 'Prezime';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domena';
 $wb['limit_subdomain_txt'] = 'limit_poddomena';
 $wb['limit_webquota_txt'] = 'limit_prostora';
diff --git a/interface/web/client/lib/lang/hr_client_template.lng b/interface/web/client/lib/lang/hr_client_template.lng
index 4a2cd0500c..23ff2def63 100644
--- a/interface/web/client/lib/lang/hr_client_template.lng
+++ b/interface/web/client/lib/lang/hr_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_mailquota_txt'] = 'Veličina mailboxa';
 $wb['limit_spamfilter_wblist_txt'] = 'Maksimalan broj spamfilter white / blacklist filtera';
 $wb['limit_spamfilter_user_txt'] = 'Maksimalan broj spamfilter korisnika';
 $wb['limit_spamfilter_policy_txt'] = 'Maksimalan broj spamfilter pravila';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domena';
 $wb['limit_subdomain_txt'] = 'limit_poddomena';
 $wb['limit_webquota_txt'] = 'limit_prostora';
diff --git a/interface/web/client/lib/lang/hr_reseller.lng b/interface/web/client/lib/lang/hr_reseller.lng
index 9b01f30b2d..24c84e5c23 100644
--- a/interface/web/client/lib/lang/hr_reseller.lng
+++ b/interface/web/client/lib/lang/hr_reseller.lng
@@ -38,6 +38,7 @@ $wb['company_txt'] = 'Poduzeće';
 $wb['title_txt'] = 'Naziv';
 $wb['firstname_txt'] = 'Ime';
 $wb['surname_txt'] = 'Prezime';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domena';
 $wb['limit_subdomain_txt'] = 'limit_poddomena';
 $wb['limit_webquota_txt'] = 'limit_prostora';
diff --git a/interface/web/client/lib/lang/hu_client.lng b/interface/web/client/lib/lang/hu_client.lng
index 402e5adf04..9d3aba88b9 100644
--- a/interface/web/client/lib/lang/hu_client.lng
+++ b/interface/web/client/lib/lang/hu_client.lng
@@ -37,6 +37,7 @@ $wb['title_txt'] = 'Titulus';
 $wb['firstname_txt'] = 'Keresztnév';
 $wb['surname_txt'] = 'Vezetéknév';
 $wb['limit_client_txt'] = 'Max. number of Clients';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/hu_client_template.lng b/interface/web/client/lib/lang/hu_client_template.lng
index 9300d945b6..63a1766054 100644
--- a/interface/web/client/lib/lang/hu_client_template.lng
+++ b/interface/web/client/lib/lang/hu_client_template.lng
@@ -14,6 +14,7 @@ $wb['limit_mailquota_txt'] = 'Mailbox quota';
 $wb['limit_spamfilter_wblist_txt'] = 'Max. number of spamfilter white / blacklist filters';
 $wb['limit_spamfilter_user_txt'] = 'Max. number of spamfilter users';
 $wb['limit_spamfilter_policy_txt'] = 'Max. number of spamfilter policies';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/hu_reseller.lng b/interface/web/client/lib/lang/hu_reseller.lng
index 5970b80d46..ed67fba886 100644
--- a/interface/web/client/lib/lang/hu_reseller.lng
+++ b/interface/web/client/lib/lang/hu_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Cég';
 $wb['title_txt'] = 'Titulus';
 $wb['firstname_txt'] = 'Keresztnév';
 $wb['surname_txt'] = 'Vezetéknév';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/id_client.lng b/interface/web/client/lib/lang/id_client.lng
index c7b5cafa43..f4c3bd974c 100644
--- a/interface/web/client/lib/lang/id_client.lng
+++ b/interface/web/client/lib/lang/id_client.lng
@@ -38,6 +38,7 @@ $wb['company_txt'] = 'Perusahaan';
 $wb['title_txt'] = 'Judul';
 $wb['firstname_txt'] = 'Nama depan';
 $wb['surname_txt'] = 'Nama belakang';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'batasan domain';
 $wb['limit_subdomain_txt'] = 'batasan subdomain';
 $wb['limit_webquota_txt'] = 'batasan kuota web';
diff --git a/interface/web/client/lib/lang/id_client_template.lng b/interface/web/client/lib/lang/id_client_template.lng
index 007b4af0da..b6ecb87e26 100644
--- a/interface/web/client/lib/lang/id_client_template.lng
+++ b/interface/web/client/lib/lang/id_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_mailquota_txt'] = 'Kuota Mailbox';
 $wb['limit_spamfilter_wblist_txt'] = 'Jumlah maks filter white/blacklist spamfilter';
 $wb['limit_spamfilter_user_txt'] = 'Jumlah maks pengguna spamfilter';
 $wb['limit_spamfilter_policy_txt'] = 'Jumlah maks kebijakan spamfilter';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'batasan domain';
 $wb['limit_subdomain_txt'] = 'batasan subdomain';
 $wb['limit_webquota_txt'] = 'batasan kuota web';
diff --git a/interface/web/client/lib/lang/id_reseller.lng b/interface/web/client/lib/lang/id_reseller.lng
index 11b0d95d74..58450627ed 100644
--- a/interface/web/client/lib/lang/id_reseller.lng
+++ b/interface/web/client/lib/lang/id_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Perusahaan';
 $wb['title_txt'] = 'Judul';
 $wb['firstname_txt'] = 'Nama Depan';
 $wb['surname_txt'] = 'Nama Belakang';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'batasan domain';
 $wb['limit_subdomain_txt'] = 'batasan subdomain';
 $wb['limit_webquota_txt'] = 'batasan kuota web';
diff --git a/interface/web/client/lib/lang/it_client.lng b/interface/web/client/lib/lang/it_client.lng
index 6ad3f11a20..19b2a18b4a 100644
--- a/interface/web/client/lib/lang/it_client.lng
+++ b/interface/web/client/lib/lang/it_client.lng
@@ -36,6 +36,7 @@ $wb['title_txt'] = 'Titolo';
 $wb['firstname_txt'] = 'Nome';
 $wb['surname_txt'] = 'Cognome';
 $wb['limit_client_txt'] = 'Numero massimo clienti';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/it_client_template.lng b/interface/web/client/lib/lang/it_client_template.lng
index bc1f90052a..45f4779183 100644
--- a/interface/web/client/lib/lang/it_client_template.lng
+++ b/interface/web/client/lib/lang/it_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_spamfilter_wblist_txt'] = 'Num. massimo filtri spam white / blacklist
 $wb['limit_spamfilter_user_txt'] = 'Num. massimo utenti spamfilter';
 $wb['limit_spamfilter_policy_txt'] = 'Num. massimo policys spamfilter';
 $wb['limit_client_txt'] = 'Num. massimo clienti';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/it_reseller.lng b/interface/web/client/lib/lang/it_reseller.lng
index a90a2d8078..f023dcf54d 100644
--- a/interface/web/client/lib/lang/it_reseller.lng
+++ b/interface/web/client/lib/lang/it_reseller.lng
@@ -36,6 +36,7 @@ $wb['company_txt'] = 'Azienda';
 $wb['title_txt'] = 'Titolo';
 $wb['firstname_txt'] = 'Nome';
 $wb['surname_txt'] = 'Cognome';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/ja_client.lng b/interface/web/client/lib/lang/ja_client.lng
index be88a575cd..6d25b13ce1 100644
--- a/interface/web/client/lib/lang/ja_client.lng
+++ b/interface/web/client/lib/lang/ja_client.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = '社名';
 $wb['title_txt'] = '役職';
 $wb['firstname_txt'] = '名';
 $wb['surname_txt'] = 'å§“';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/ja_client_template.lng b/interface/web/client/lib/lang/ja_client_template.lng
index ca83bda97a..768e56cc42 100644
--- a/interface/web/client/lib/lang/ja_client_template.lng
+++ b/interface/web/client/lib/lang/ja_client_template.lng
@@ -14,6 +14,7 @@ $wb['limit_mailquota_txt'] = 'メールボックスの容量';
 $wb['limit_spamfilter_wblist_txt'] = '迷惑メールのホワイトリスト、ブラックリストフィルターの最大数';
 $wb['limit_spamfilter_user_txt'] = 'スパムフィルターユーザーの最大数';
 $wb['limit_spamfilter_policy_txt'] = '迷惑メールフィルタのポリシーの最大数';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/ja_reseller.lng b/interface/web/client/lib/lang/ja_reseller.lng
index 1b89262493..1c5851bdfc 100644
--- a/interface/web/client/lib/lang/ja_reseller.lng
+++ b/interface/web/client/lib/lang/ja_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = '社名';
 $wb['title_txt'] = '役職';
 $wb['firstname_txt'] = '名';
 $wb['surname_txt'] = 'å§“';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/nl_client.lng b/interface/web/client/lib/lang/nl_client.lng
index 1f4e5d70a1..9d0160da32 100644
--- a/interface/web/client/lib/lang/nl_client.lng
+++ b/interface/web/client/lib/lang/nl_client.lng
@@ -39,6 +39,7 @@ $wb['company_txt'] = 'Bedrijfsnaam';
 $wb['title_txt'] = 'Titel';
 $wb['firstname_txt'] = 'Voornaam';
 $wb['surname_txt'] = 'Achternaam';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limiet_domein';
 $wb['limit_subdomain_txt'] = 'limiet_subdomein';
 $wb['limit_webquota_txt'] = 'limiet_webquota';
diff --git a/interface/web/client/lib/lang/nl_client_template.lng b/interface/web/client/lib/lang/nl_client_template.lng
index 423b4d7b94..d6bfd660e2 100644
--- a/interface/web/client/lib/lang/nl_client_template.lng
+++ b/interface/web/client/lib/lang/nl_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_mailquota_txt'] = 'Mailbox quota';
 $wb['limit_spamfilter_wblist_txt'] = 'Max. aantal spamfilter white / blacklist filters';
 $wb['limit_spamfilter_user_txt'] = 'Max. aantal spamfilter gebruikers';
 $wb['limit_spamfilter_policy_txt'] = 'Max. aantal spamfilter policys';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limiet_domein';
 $wb['limit_subdomain_txt'] = 'limiet_subdomein';
 $wb['limit_webquota_txt'] = 'limiet_webquota';
diff --git a/interface/web/client/lib/lang/nl_reseller.lng b/interface/web/client/lib/lang/nl_reseller.lng
index 637dddc65d..1cb2abbd9c 100644
--- a/interface/web/client/lib/lang/nl_reseller.lng
+++ b/interface/web/client/lib/lang/nl_reseller.lng
@@ -38,6 +38,7 @@ $wb['company_txt'] = 'Bedrijfnaam';
 $wb['title_txt'] = 'Titel';
 $wb['firstname_txt'] = 'Voornaam';
 $wb['surname_txt'] = 'Achternaam';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limiet_domein';
 $wb['limit_subdomain_txt'] = 'limiet_subdomein';
 $wb['limit_webquota_txt'] = 'limiet_webquota';
diff --git a/interface/web/client/lib/lang/pl_client.lng b/interface/web/client/lib/lang/pl_client.lng
index c040e787ae..67ea97fbe6 100644
--- a/interface/web/client/lib/lang/pl_client.lng
+++ b/interface/web/client/lib/lang/pl_client.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Firma';
 $wb['title_txt'] = 'Tytuł';
 $wb['firstname_txt'] = 'ImiÄ™';
 $wb['surname_txt'] = 'Nazwisko';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Limit domen';
 $wb['limit_subdomain_txt'] = 'Limit subdomen';
 $wb['limit_webquota_txt'] = 'Limit pojemności www';
diff --git a/interface/web/client/lib/lang/pl_client_template.lng b/interface/web/client/lib/lang/pl_client_template.lng
index 5945310d0c..95e2b48d5d 100644
--- a/interface/web/client/lib/lang/pl_client_template.lng
+++ b/interface/web/client/lib/lang/pl_client_template.lng
@@ -14,6 +14,7 @@ $wb['limit_mailquota_txt'] = 'Pojemność skrzynki';
 $wb['limit_spamfilter_wblist_txt'] = 'Maksymalna ilość filtrów spamu białej / czarnej listy';
 $wb['limit_spamfilter_user_txt'] = 'Maksymalna ilość filtrów spamu użytkowników';
 $wb['limit_spamfilter_policy_txt'] = 'Maksymalna ilość polityk filtrów spamu';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domen';
 $wb['limit_subdomain_txt'] = 'limit_subdomen';
 $wb['limit_webquota_txt'] = 'limit_pojemnosci_www';
diff --git a/interface/web/client/lib/lang/pl_reseller.lng b/interface/web/client/lib/lang/pl_reseller.lng
index 2762ebc15b..8ada7b86c7 100644
--- a/interface/web/client/lib/lang/pl_reseller.lng
+++ b/interface/web/client/lib/lang/pl_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Firma';
 $wb['title_txt'] = 'Tytuł';
 $wb['firstname_txt'] = 'ImiÄ™';
 $wb['surname_txt'] = 'Nazwisko';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domen';
 $wb['limit_subdomain_txt'] = 'limit_subdomen';
 $wb['limit_webquota_txt'] = 'limit_pojemnosci_www';
diff --git a/interface/web/client/lib/lang/pt_client.lng b/interface/web/client/lib/lang/pt_client.lng
index 8ce7235079..6b41a2fe3a 100644
--- a/interface/web/client/lib/lang/pt_client.lng
+++ b/interface/web/client/lib/lang/pt_client.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Empresa';
 $wb['title_txt'] = 'Título';
 $wb['firstname_txt'] = 'Nome';
 $wb['surname_txt'] = 'Sobrenome';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limite_dominio';
 $wb['limit_subdomain_txt'] = 'limit_subdominio';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/pt_client_template.lng b/interface/web/client/lib/lang/pt_client_template.lng
index b774a8c410..98cda03d0a 100644
--- a/interface/web/client/lib/lang/pt_client_template.lng
+++ b/interface/web/client/lib/lang/pt_client_template.lng
@@ -14,6 +14,7 @@ $wb['limit_mailquota_txt'] = 'Espaço de Caixa de Correio';
 $wb['limit_spamfilter_wblist_txt'] = 'Número máximo de spamfilter permitidos /lista negra';
 $wb['limit_spamfilter_user_txt'] = 'Número máx de utilizadors spamfilter';
 $wb['limit_spamfilter_policy_txt'] = 'Número máx de políticas spamfilter';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limite_dominio';
 $wb['limit_subdomain_txt'] = 'limite_subdominio';
 $wb['limit_webquota_txt'] = 'limite_webquota';
diff --git a/interface/web/client/lib/lang/pt_reseller.lng b/interface/web/client/lib/lang/pt_reseller.lng
index 965a446ffb..eeb8f69c05 100644
--- a/interface/web/client/lib/lang/pt_reseller.lng
+++ b/interface/web/client/lib/lang/pt_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Empresa';
 $wb['title_txt'] = 'Título';
 $wb['firstname_txt'] = 'Nome';
 $wb['surname_txt'] = 'Sobrenome';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limite_domínio';
 $wb['limit_subdomain_txt'] = 'limite_subdomínio';
 $wb['limit_webquota_txt'] = 'limite_webquota';
diff --git a/interface/web/client/lib/lang/ro_client.lng b/interface/web/client/lib/lang/ro_client.lng
index 5ee1d8aaf6..fdf112f7af 100644
--- a/interface/web/client/lib/lang/ro_client.lng
+++ b/interface/web/client/lib/lang/ro_client.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Companie';
 $wb['title_txt'] = 'Titlu';
 $wb['firstname_txt'] = 'Prenume';
 $wb['surname_txt'] = 'Nume';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limita_domeniu';
 $wb['limit_subdomain_txt'] = 'limita_subdomeniu';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/ro_client_template.lng b/interface/web/client/lib/lang/ro_client_template.lng
index 65e110c2ab..77c024db64 100644
--- a/interface/web/client/lib/lang/ro_client_template.lng
+++ b/interface/web/client/lib/lang/ro_client_template.lng
@@ -14,6 +14,7 @@ $wb['limit_mailquota_txt'] = 'Mailbox quota';
 $wb['limit_spamfilter_wblist_txt'] = 'Max. number of spamfilter white / blacklist filters';
 $wb['limit_spamfilter_user_txt'] = 'Max. number of spamfilter users';
 $wb['limit_spamfilter_policy_txt'] = 'Max. number of spamfilter policies';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/ro_reseller.lng b/interface/web/client/lib/lang/ro_reseller.lng
index afd557ab18..4d21c7d173 100644
--- a/interface/web/client/lib/lang/ro_reseller.lng
+++ b/interface/web/client/lib/lang/ro_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Company';
 $wb['title_txt'] = 'Title';
 $wb['firstname_txt'] = 'Firstname';
 $wb['surname_txt'] = 'Surname';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/ru_client.lng b/interface/web/client/lib/lang/ru_client.lng
index 70456bd255..920020e9f4 100644
--- a/interface/web/client/lib/lang/ru_client.lng
+++ b/interface/web/client/lib/lang/ru_client.lng
@@ -37,6 +37,7 @@ $wb['title_txt'] = 'Заголовок';
 $wb['firstname_txt'] = 'Имя';
 $wb['surname_txt'] = 'Фамилия';
 $wb['limit_client_txt'] = 'Макс. количество клиентов';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Лимит доменов';
 $wb['limit_subdomain_txt'] = 'Лимит поддоменов';
 $wb['limit_webquota_txt'] = 'Лимит Web-квоты';
diff --git a/interface/web/client/lib/lang/ru_client_template.lng b/interface/web/client/lib/lang/ru_client_template.lng
index e540984824..94842e9155 100644
--- a/interface/web/client/lib/lang/ru_client_template.lng
+++ b/interface/web/client/lib/lang/ru_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_spamfilter_wblist_txt'] = 'Макс. количество прави
 $wb['limit_spamfilter_user_txt'] = 'Макс. количество пользователей спам-фильтра';
 $wb['limit_spamfilter_policy_txt'] = 'Макс. количество правил спам-фильтра';
 $wb['limit_client_txt'] = 'Макс. количество клиентов';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Макс. количество доменов';
 $wb['limit_subdomain_txt'] = 'Лимит поддоменов';
 $wb['limit_webquota_txt'] = 'Лимит Web-квоты';
diff --git a/interface/web/client/lib/lang/ru_reseller.lng b/interface/web/client/lib/lang/ru_reseller.lng
index 4b90d0347a..aeac8ab7d7 100644
--- a/interface/web/client/lib/lang/ru_reseller.lng
+++ b/interface/web/client/lib/lang/ru_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Компания';
 $wb['title_txt'] = 'Заголовок';
 $wb['firstname_txt'] = 'Имя';
 $wb['surname_txt'] = 'Фамилия';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'Лимит доменов';
 $wb['limit_subdomain_txt'] = 'Лимит поддоменов';
 $wb['limit_webquota_txt'] = 'Лимит Web-квоты';
diff --git a/interface/web/client/lib/lang/se_client.lng b/interface/web/client/lib/lang/se_client.lng
index bf585054cd..f9a9b8ef4c 100644
--- a/interface/web/client/lib/lang/se_client.lng
+++ b/interface/web/client/lib/lang/se_client.lng
@@ -38,6 +38,7 @@ $wb['title_txt'] = 'Titel';
 $wb['firstname_txt'] = 'Förnamn';
 $wb['surname_txt'] = 'Efternamn';
 $wb['limit_client_txt'] = 'Max antal kunder';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'domängräns';
 $wb['limit_subdomain_txt'] = 'underdomängräns';
 $wb['limit_webquota_txt'] = 'webbsideskvot';
diff --git a/interface/web/client/lib/lang/se_client_template.lng b/interface/web/client/lib/lang/se_client_template.lng
index c9001e42e2..ffffed1971 100644
--- a/interface/web/client/lib/lang/se_client_template.lng
+++ b/interface/web/client/lib/lang/se_client_template.lng
@@ -15,6 +15,7 @@ $wb['limit_spamfilter_wblist_txt'] = 'Max. number of spamfilter white / blacklis
 $wb['limit_spamfilter_user_txt'] = 'Max. number of spamfilter users';
 $wb['limit_spamfilter_policy_txt'] = 'Max. number of spamfilter policies';
 $wb['limit_client_txt'] = 'Max. number of Clients';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/se_reseller.lng b/interface/web/client/lib/lang/se_reseller.lng
index afd557ab18..4d21c7d173 100644
--- a/interface/web/client/lib/lang/se_reseller.lng
+++ b/interface/web/client/lib/lang/se_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Company';
 $wb['title_txt'] = 'Title';
 $wb['firstname_txt'] = 'Firstname';
 $wb['surname_txt'] = 'Surname';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/sk_client.lng b/interface/web/client/lib/lang/sk_client.lng
index cfaced0561..980ae85335 100644
--- a/interface/web/client/lib/lang/sk_client.lng
+++ b/interface/web/client/lib/lang/sk_client.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Spoločnosť';
 $wb['title_txt'] = 'Názov';
 $wb['firstname_txt'] = 'Krstné meno';
 $wb['surname_txt'] = 'Priezvisko';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domén';
 $wb['limit_subdomain_txt'] = 'limit_subdomén';
 $wb['limit_webquota_txt'] = 'limit_webkvóta';
diff --git a/interface/web/client/lib/lang/sk_client_template.lng b/interface/web/client/lib/lang/sk_client_template.lng
index 9a602da093..14172a1f62 100644
--- a/interface/web/client/lib/lang/sk_client_template.lng
+++ b/interface/web/client/lib/lang/sk_client_template.lng
@@ -14,6 +14,7 @@ $wb['limit_mailquota_txt'] = 'Kvóta schránky';
 $wb['limit_spamfilter_wblist_txt'] = 'Max. počet Spamfilter bielych / čiernych listín filtrov';
 $wb['limit_spamfilter_user_txt'] = 'Max. počet poUžívateľských Spamfilterov';
 $wb['limit_spamfilter_policy_txt'] = 'Max. number of spamfilter policies';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domén';
 $wb['limit_subdomain_txt'] = 'limit_subdomén';
 $wb['limit_webquota_txt'] = 'limit_webkvôt';
diff --git a/interface/web/client/lib/lang/sk_reseller.lng b/interface/web/client/lib/lang/sk_reseller.lng
index 47dbd4f64c..040ffc47ca 100644
--- a/interface/web/client/lib/lang/sk_reseller.lng
+++ b/interface/web/client/lib/lang/sk_reseller.lng
@@ -37,6 +37,7 @@ $wb['company_txt'] = 'Spoločnosť';
 $wb['title_txt'] = 'Nadpis';
 $wb['firstname_txt'] = 'Krstné meno';
 $wb['surname_txt'] = 'Priezvisko';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domén';
 $wb['limit_subdomain_txt'] = 'limit_subdomén';
 $wb['limit_webquota_txt'] = 'limit_webkvóta';
diff --git a/interface/web/client/lib/lang/tr_client.lng b/interface/web/client/lib/lang/tr_client.lng
index a922525b67..5e6e55f543 100644
--- a/interface/web/client/lib/lang/tr_client.lng
+++ b/interface/web/client/lib/lang/tr_client.lng
@@ -40,6 +40,7 @@ $wb['company_txt'] = 'KuruluÅŸ';
 $wb['title_txt'] = 'Unvan';
 $wb['firstname_txt'] = 'Ad';
 $wb['surname_txt'] = 'Soyad';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/tr_client_template.lng b/interface/web/client/lib/lang/tr_client_template.lng
index 64b54bb30e..84c7fa0543 100644
--- a/interface/web/client/lib/lang/tr_client_template.lng
+++ b/interface/web/client/lib/lang/tr_client_template.lng
@@ -19,6 +19,7 @@ $wb['limit_mailquota_txt'] = 'E-posta Kutusu Kotası';
 $wb['limit_spamfilter_wblist_txt'] = 'En Fazla Önemsiz İleti Beyaz/Kara Liste Süzgeci Sayısı';
 $wb['limit_spamfilter_user_txt'] = 'En Fazla Önemsiz İleti Süzgeci Kullanıcı Sayısı';
 $wb['limit_spamfilter_policy_txt'] = 'En Fazla Önemsiz İleti Süzgeci Kuralı Sayısı';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
diff --git a/interface/web/client/lib/lang/tr_reseller.lng b/interface/web/client/lib/lang/tr_reseller.lng
index 023bc08197..169d8c5ea4 100644
--- a/interface/web/client/lib/lang/tr_reseller.lng
+++ b/interface/web/client/lib/lang/tr_reseller.lng
@@ -40,6 +40,7 @@ $wb['company_txt'] = 'KuruluÅŸ';
 $wb['title_txt'] = 'Unvan';
 $wb['firstname_txt'] = 'Adı';
 $wb['surname_txt'] = 'Soyadı';
+$wb['limit_relayhost_txt'] = 'Show SMTP relay host options';
 $wb['limit_domain_txt'] = 'limit_domain';
 $wb['limit_subdomain_txt'] = 'limit_subdomain';
 $wb['limit_webquota_txt'] = 'limit_webquota';
-- 
GitLab


From 77d6c59041f96fa1c1156b8588a6bbe59ff20bf4 Mon Sep 17 00:00:00 2001
From: Thom Pol <>
Date: Mon, 8 Mar 2021 01:14:12 +0100
Subject: [PATCH 322/441] Move relay check to logical place (#6088)

---
 interface/web/mail/mail_domain_edit.php | 34 ++++++++++++-------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index 360487ef1a..aedc1f1043 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -190,23 +190,6 @@ class page_action extends tform_actions {
 			$app->tpl->setVar("domain_module", 0);
 		}
 
-		// Check wether per domain relaying is enabled or not
-		$global_config = $app->getconf->get_global_config('mail');
-		if($global_config['show_per_domain_relay_options'] == 'y') {
-			$app->tpl->setVar("show_per_domain_relay_options", 1);
-		} else {
-			$app->tpl->setVar("show_per_domain_relay_options", 0);
-		}
-
-		// Get the limits of the client
-    $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
-    $client = $app->db->queryOneRecord("SELECT limit_relayhost FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
-		if ($client["limit_relayhost"] == 'y' || $_SESSION["s"]["user"]["typ"] == 'admin') {
-			$app->tpl->setVar("limit_relayhost", 1);
-		} else {
-			$app->tpl->setVar("limit_relayhost", 0);
-		}
-
 		// Get the spamfilter policys for the user
 		$tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = ?", '@' . $this->dataRecord["domain"]);
 		$sql = "SELECT id, policy_name FROM spamfilter_policy WHERE ".$app->tform->getAuthSQL('r')." ORDER BY policy_name";
@@ -231,6 +214,23 @@ class page_action extends tform_actions {
 			$app->tpl->setVar("edit_disabled", 0);
 		}
 
+		// Check wether per domain relaying is enabled or not
+		$global_config = $app->getconf->get_global_config('mail');
+		if($global_config['show_per_domain_relay_options'] == 'y') {
+			$app->tpl->setVar("show_per_domain_relay_options", 1);
+		} else {
+			$app->tpl->setVar("show_per_domain_relay_options", 0);
+		}
+
+		// Get the limits of the client
+		$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
+		$client = $app->db->queryOneRecord("SELECT limit_relayhost FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+		if ($client["limit_relayhost"] == 'y' || $_SESSION["s"]["user"]["typ"] == 'admin') {
+			$app->tpl->setVar("limit_relayhost", 1);
+		} else {
+			$app->tpl->setVar("limit_relayhost", 0);
+		}
+
 		// load relayhost-values
 		if ($client["limit_relayhost"] == 'y') {
 			$sql = "SELECT relay_host, relay_user, relay_pass FROM mail_domain WHERE domain_id = ?";
-- 
GitLab


From fc69abab6dce6133f7e04d1552a5873c24c5e688 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 9 Mar 2021 16:05:26 -0700
Subject: [PATCH 323/441] ispcmail: STARTTLS resets smtp connection and
 requires second EHLO

---
 interface/lib/classes/ispcmail.inc.php | 6 ++++--
 server/lib/classes/ispcmail.inc.php    | 3 +++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/interface/lib/classes/ispcmail.inc.php b/interface/lib/classes/ispcmail.inc.php
index fbf5f84dca..f5aa359577 100644
--- a/interface/lib/classes/ispcmail.inc.php
+++ b/interface/lib/classes/ispcmail.inc.php
@@ -612,6 +612,9 @@ class ispcmail {
 			if (stream_socket_enable_crypto($this->_smtp_conn, true, $crypto_method) != true) {
 				return false;
 			}
+
+			fputs($this->_smtp_conn, 'HELO ' . $this->smtp_helo . $this->_crlf);
+			$response = fgets($this->_smtp_conn, 515);
 		}
 
 		//AUTH LOGIN
@@ -824,8 +827,7 @@ class ispcmail {
 				else $rec_string .= $recip;
 			}
 			$to = $this->_encodeHeader($rec_string, $this->mail_charset);
-			//$result = mail($to, $subject, $this->body, implode($this->_crlf, $headers));
-			$result = mail($to, $enc_subject, $this->body, implode($this->_crlf, $headers));
+			$result = mail($to, $enc_subject, $this->body, implode($this->_crlf, $headers), "-f $this->_mail_sender");
 		}
 
 		// Reset the subject in case mail is resent
diff --git a/server/lib/classes/ispcmail.inc.php b/server/lib/classes/ispcmail.inc.php
index 2b3dc78cfc..f5aa359577 100644
--- a/server/lib/classes/ispcmail.inc.php
+++ b/server/lib/classes/ispcmail.inc.php
@@ -612,6 +612,9 @@ class ispcmail {
 			if (stream_socket_enable_crypto($this->_smtp_conn, true, $crypto_method) != true) {
 				return false;
 			}
+
+			fputs($this->_smtp_conn, 'HELO ' . $this->smtp_helo . $this->_crlf);
+			$response = fgets($this->_smtp_conn, 515);
 		}
 
 		//AUTH LOGIN
-- 
GitLab


From 3a8be5d6940bee7f2b1c728d4cc5b312925056e6 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 9 Mar 2021 16:36:15 -0700
Subject: [PATCH 324/441] bind: create slave subdirectory recursively

---
 server/plugins-available/bind_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index 017203f67b..76b3582379 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -452,7 +452,7 @@ class bind_plugin {
 
 		//* Ensure that the named slave directory is writable by the named user
 		$slave_record_dir = $dns_config['bind_zonefiles_dir'].'/'.$this->slave_zone_file_prefix();
-		if(!@is_dir($slave_record_dir)) mkdir($slave_record_dir, 0770);
+		if(!@is_dir($slave_record_dir)) mkdir($slave_record_dir, 0770, true);
 		chown($slave_record_dir, $dns_config['bind_user']);
 		chgrp($slave_record_dir, $dns_config['bind_group']);
 
-- 
GitLab


From fd5edc4f675e073090f70dd4ca2d46f816a1ee19 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 9 Mar 2021 17:04:40 -0700
Subject: [PATCH 325/441] don't rename postfix/dovecot local config override
 templates

---
 install/lib/update.lib.php | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index 33b89786a6..d88d64d6cd 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -473,12 +473,22 @@ function checkAndRenameCustomTemplates($default_prompt='no') {
 		'/usr/local/ispconfig/server/conf-custom/install',
 	);
 
+	$override_templates = array(
+		'postfix_custom.conf.master',
+		'dovecot_custom.conf.master',
+	);
+
 	$found_templates = array();
+	$found_override_templates = array();
 	foreach ($template_directories as $dir) {
 		if (!is_dir($dir)) { continue; }
 		foreach (glob("$dir/*.master") as $f) {
 			if (is_file($f)) {
-				$found_templates[] = $f;
+				if (in_array( basename($f), $override_templates )) {
+					$found_override_templates[] = $f;
+				} else {
+					$found_templates[] = $f;
+				}
 			}
 		}
 	}
@@ -501,6 +511,11 @@ function checkAndRenameCustomTemplates($default_prompt='no') {
 		}
 	}
 
+	if (count($found_override_templates) > 0) {
+		echo "The following local config override templates were found, be sure to incorporate upstream changes if needed:\n\n";
+		echo implode("\n", $found_override_templates) . "\n\n";
+	}
+
 	return $ret;
 }
 
-- 
GitLab


From 3f665700e9cabe33580dfefcfde3c21f8619ccd4 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 10 Mar 2021 06:49:47 +0000
Subject: [PATCH 326/441] Apply 1 suggestion(s) to 1 file(s)

---
 server/lib/classes/letsencrypt.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php
index 559ba79689..5f918f016d 100644
--- a/server/lib/classes/letsencrypt.inc.php
+++ b/server/lib/classes/letsencrypt.inc.php
@@ -167,7 +167,7 @@ class letsencrypt {
 			$cert_selection_command = "--expand";
 		}
 
-		$cmd = $letsencrypt . " certonly -n --text --agree-tos $cert_selection_command --authenticator webroot --server $acme_version --rsa-key-size 4096 --email postmaster@$primary_domain $webroot_args";
+		$cmd = $letsencrypt . " certonly -n --text --agree-tos $cert_selection_command --authenticator webroot --server $acme_version --rsa-key-size 4096 --email webmaster@$primary_domain $webroot_args";
 
 		return $cmd;
 	}
-- 
GitLab


From 44cf3d18264c349252918e527b6d07f75c5c86c3 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 10 Mar 2021 12:54:54 +0000
Subject: [PATCH 327/441] Apply 1 suggestion(s) to 1 file(s)

---
 install/tpl/jk_init.ini.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/tpl/jk_init.ini.master b/install/tpl/jk_init.ini.master
index 274c0388df..c1b19326e6 100644
--- a/install/tpl/jk_init.ini.master
+++ b/install/tpl/jk_init.ini.master
@@ -185,7 +185,7 @@ paths = env
 [php]
 comment = default php version and libraries
 paths = /usr/bin/php
-includesections = php_common
+includesections = php_common, php7_3
 
 [php_common]
 comment = common php directories and libraries
-- 
GitLab


From 3f2704af6c7684acfe8db55a0c5d3d803abd1dad Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 10 Mar 2021 14:29:12 +0100
Subject: [PATCH 328/441] - add chekc whether to delete rspamd conf file for
 user

---
 server/plugins-available/rspamd_plugin.inc.php | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index 09ed09a436..c9bfedf322 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -220,7 +220,17 @@ class rspamd_plugin {
 		$settings_file = $this->users_config_dir . str_replace('@', '_', $settings_name) . '.conf';
 		//$app->log('Settings file for rspamd is ' . $settings_file, LOGLEVEL_WARN);
 		if($mode === 'delete') {
-			if(is_file($settings_file)) {
+			$delete_file = true;
+			if($type === 'spamfilter_user') {
+				$search_for_policy[] = $email_address;
+				$search_for_policy[] = substr($email_address, strpos($email_address, '@'));
+
+				$policy = $app->db->queryOneRecord("SELECT p.* FROM spamfilter_users as u INNER JOIN spamfilter_policy as p ON (p.id = u.policy_id) WHERE u.server_id = ? AND u.email IN ? ORDER BY u.priority DESC", $conf['server_id'], $search_for_policy);
+				if($policy) {
+					$delete_file = false;
+				}
+			}
+			if($delete_file === true && is_file($settings_file)) {
 				unlink($settings_file);
 			}
 		} else {
-- 
GitLab


From 0c3e00e722fb0cb75554fe81b2fa9e89ce21793b Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 10 Mar 2021 15:13:27 +0100
Subject: [PATCH 329/441] - update all depending entries on domain update

---
 interface/web/mail/mail_domain_edit.php       | 40 +++++++++----------
 .../plugins-available/rspamd_plugin.inc.php   | 28 ++++++++++++-
 2 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index 3ea60c08f9..7794023255 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -226,13 +226,13 @@ class page_action extends tform_actions {
 		$sql = "SELECT domain, dkim_private, dkim_public, dkim_selector FROM mail_domain WHERE domain_id = ?";
 		$rec = $app->db->queryOneRecord($sql, $app->functions->intval($_GET['id']));
 		$dns_key = str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"),'',$rec['dkim_public']);
-                
+
                 $keyparts = str_split('v=DKIM1; t=s; p=' . $dns_key, 200);
                 array_walk($keyparts, function(&$value, $key) { $value = '"'.$value.'"'; } );
                 $dkim_txt = implode('', $keyparts);
 
 		$dns_record = $rec['dkim_selector'] . '._domainkey.' . $rec['domain'] . '. 3600  IN  TXT   '.$dkim_txt;
-                
+
 		$app->tpl->setVar('dkim_selector', $rec['dkim_selector'], true);
 		$app->tpl->setVar('dkim_private', $rec['dkim_private'], true);
 		$app->tpl->setVar('dkim_public', $rec['dkim_public'], true);
@@ -296,7 +296,7 @@ class page_action extends tform_actions {
 			$this->dataRecord["domain"] = $app->functions->idn_encode($this->dataRecord["domain"]);
 			$this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]);
 		}
-		
+
 		//* server_id must be > 0
 		if(isset($this->dataRecord["server_id"]) && $this->dataRecord["server_id"] < 1) $app->tform->errorMessage .= $app->lng("server_id_0_error_txt");
 
@@ -305,7 +305,7 @@ class page_action extends tform_actions {
 
 	function onAfterInsert() {
 		global $app, $conf;
-		
+
 		$domain = $app->functions->idn_encode($this->dataRecord["domain"]);
 
 		// Spamfilter policy
@@ -319,10 +319,10 @@ class page_action extends tform_actions {
 				$tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id);
 				// We create a new record
 				$insert_data = array(
-					"sys_userid" => $_SESSION["s"]["user"]["userid"], 
+					"sys_userid" => $_SESSION["s"]["user"]["userid"],
 					"sys_groupid" => $tmp_domain["sys_groupid"],
-					"sys_perm_user" => 'riud', 
-					"sys_perm_group" => 'riud', 
+					"sys_perm_user" => 'riud',
+					"sys_perm_group" => 'riud',
 					"sys_perm_other" => '',
 					"server_id" => $this->dataRecord["server_id"],
 					"priority" => 5,
@@ -350,7 +350,7 @@ class page_action extends tform_actions {
 
 	function onBeforeUpdate() {
 		global $app, $conf;
-		
+
 		$domain = $app->functions->idn_encode($this->dataRecord["domain"]);
 
 		//* Check if the server has been changed
@@ -381,7 +381,7 @@ class page_action extends tform_actions {
 		global $app, $conf;
 
 		$domain = $app->functions->idn_encode($this->dataRecord["domain"]);
-		
+
 		// Spamfilter policy
 		$policy_id = $app->functions->intval($this->dataRecord["policy"]);
 		$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $domain);
@@ -393,10 +393,10 @@ class page_action extends tform_actions {
 				$tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id);
 				// We create a new record
 				$insert_data = array(
-					"sys_userid" => $_SESSION["s"]["user"]["userid"], 
+					"sys_userid" => $_SESSION["s"]["user"]["userid"],
 					"sys_groupid" => $tmp_domain["sys_groupid"],
-					"sys_perm_user" => 'riud', 
-					"sys_perm_group" => 'riud', 
+					"sys_perm_user" => 'riud',
+					"sys_perm_group" => 'riud',
 					"sys_perm_other" => '',
 					"server_id" => $this->dataRecord["server_id"],
 					"priority" => 5,
@@ -422,7 +422,7 @@ class page_action extends tform_actions {
 			//* Update the mailboxes
 			$mailusers = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE email like ?", '%@' . $this->oldDataRecord['domain']);
 			$sys_groupid = $app->functions->intval((isset($this->dataRecord['client_group_id']))?$this->dataRecord['client_group_id']:$this->oldDataRecord['sys_groupid']);
-			$tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $client_group_id);
+			$tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $sys_groupid);
 			$client_user_id = $app->functions->intval(($tmp['userid'] > 0)?$tmp['userid']:1);
 			if(is_array($mailusers)) {
 				foreach($mailusers as $rec) {
@@ -447,7 +447,7 @@ class page_action extends tform_actions {
 
 			//* Update the mailinglist
 			$app->db->query("UPDATE mail_mailinglist SET sys_userid = ?, sys_groupid = ? WHERE domain = ?", $client_user_id, $sys_groupid, $this->oldDataRecord['domain']);
-			
+
 			//* Update fetchmail accounts
 			$fetchmail = $app->db->queryAllRecords("SELECT * FROM mail_get WHERE destination like ?", '%@' . $this->oldDataRecord['domain']);
 			if(is_array($fetchmail)) {
@@ -456,7 +456,7 @@ class page_action extends tform_actions {
 					$app->db->datalogUpdate('mail_get', array("destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailget_id', $rec['mailget_id']);
 				}
 			}
-			
+
 			//* Delete the old spamfilter record
 			$tmp = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $this->oldDataRecord["domain"]);
 			$app->db->datalogDelete('spamfilter_users', 'id', $tmp["id"]);
@@ -467,10 +467,10 @@ class page_action extends tform_actions {
 		//* update dns-record when the dkim record was changed
 		// NOTE: only if the domain-name was not changed
 		if ( $this->dataRecord['active'] == 'y' && $domain ==  $this->oldDataRecord['domain'] ) {
-			$dkim_active = @($this->dataRecord['dkim'] == 'y') ? true : false; 
+			$dkim_active = @($this->dataRecord['dkim'] == 'y') ? true : false;
 			$selector = @($this->dataRecord['dkim_selector'] != $this->oldDataRecord['dkim_selector']) ? true : false;
 			$dkim_private = @($this->dataRecord['dkim_private'] != $this->oldDataRecord['dkim_private']) ? true : false;
-			
+
 			$soaDomain = $domain.'.';
 			while ((!isset($soa) && (substr_count($soaDomain,'.') > 1))) {
 				$soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $soaDomain);
@@ -493,7 +493,7 @@ class page_action extends tform_actions {
 						$soa_id = $app->functions->intval($soa['zone']);
 						$serial = $app->validate_dns->increase_serial($soa["serial"]);
 						$app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id);
-					}	
+					}
 				}
 		}
 
@@ -510,8 +510,8 @@ class page_action extends tform_actions {
 				$app->db->datalogDelete('dns_rr', 'id', $r['id']);
 			}
 		}
-		
-		// also delete a dsn-records with same selector 
+
+		// also delete a dsn-records with same selector
 		$sql = "SELECT * from dns_rr WHERE name ? AND data LIKE 'v=DKIM1%' AND " . $app->tform->getAuthSQL('r');
 		$rec = $app->db->queryAllRecords($sql, '._domainkey.'.$dataRecord['dkim_selector'].'.', $dataRecord['domain']);
 		if (is_array($rec))
diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index c9bfedf322..d9b62f858a 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -139,7 +139,7 @@ class rspamd_plugin {
 		$app->plugins->registerEvent('mail_forwarding_delete', $this->plugin_name, 'user_settings_update');
 	}
 
-	function user_settings_update($event_name, $data) {
+	function user_settings_update($event_name, $data, $internal = false) {
 		global $app, $conf;
 
 		if(!is_dir('/etc/rspamd')) {
@@ -206,6 +206,23 @@ class rspamd_plugin {
 			return;
 		}
 
+		$entries_to_update = [
+			'mail_user' => [],
+			'mail_forwarding' => []
+		];
+		if($is_domain === true) {
+			// get all child records to update / delete
+			$mailusers = $app->db->queryAllRecords("SELECT mu.* FROM mail_user as mu LEFT JOIN spamfilter_users as su ON (su.email = mu.email) WHERE mu.email LIKE ? AND su.id IS NULL", '%' . $email_address);
+			if(is_array($mailusers) && !empty($mailusers)) {
+				$entries_to_update['mail_user'] = $mailusers;
+			}
+
+			$forwardings = $app->db->queryAllRecords("SELECT mf.* FROM mail_forwarding as mf LEFT JOIN spamfilter_users as su ON (su.email = mf.source) WHERE mf.source LIKE ? AND su.id IS NULL", '%' . $email_address);
+			if(is_array($forwardings) && !empty($forwardings)) {
+				$entries_to_update['mail_forwarding'] = $forwardings;
+			}
+		}
+
 		$old_settings_name = $settings_name;
 		$settings_name = $app->functions->idn_encode($settings_name);
 
@@ -328,7 +345,14 @@ class rspamd_plugin {
 			}
 		}
 
-		if($mail_config['content_filter'] == 'rspamd'){
+		foreach($entries_to_update['mail_user'] as $entry) {
+			$this->user_settings_update('mail_user_' . $mode, $entry, true);
+		}
+		foreach($entries_to_update['mail_forwarding'] as $entry) {
+			$this->user_settings_update('mail_forwarding_' . $mode, $entry, true);
+		}
+
+		if($internal !== true && $mail_config['content_filter'] == 'rspamd'){
 			$app->services->restartServiceDelayed('rspamd', 'reload');
 		}
 	}
-- 
GitLab


From 0362bafa2f1b3b939cf72f2347b7f38ba27f361e Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 10 Mar 2021 15:14:12 +0100
Subject: [PATCH 330/441] - added check

---
 server/plugins-available/rspamd_plugin.inc.php | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index d9b62f858a..e369f5cdaf 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -345,11 +345,13 @@ class rspamd_plugin {
 			}
 		}
 
-		foreach($entries_to_update['mail_user'] as $entry) {
-			$this->user_settings_update('mail_user_' . $mode, $entry, true);
-		}
-		foreach($entries_to_update['mail_forwarding'] as $entry) {
-			$this->user_settings_update('mail_forwarding_' . $mode, $entry, true);
+		if($is_domain === true) {
+			foreach($entries_to_update['mail_user'] as $entry) {
+				$this->user_settings_update('mail_user_' . $mode, $entry, true);
+			}
+			foreach($entries_to_update['mail_forwarding'] as $entry) {
+				$this->user_settings_update('mail_forwarding_' . $mode, $entry, true);
+			}
 		}
 
 		if($internal !== true && $mail_config['content_filter'] == 'rspamd'){
-- 
GitLab


From cd029fa6b89b6224a2165354ffbc290beff6ca41 Mon Sep 17 00:00:00 2001
From: Thom Pol <>
Date: Wed, 10 Mar 2021 23:26:16 +0100
Subject: [PATCH 331/441] Don't remove current value if client does not have
 rights to see/change relayhost settings

---
 interface/web/mail/mail_domain_edit.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index aedc1f1043..2d4ee1bc3e 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -285,8 +285,14 @@ class page_action extends tform_actions {
 			// When the record is updated
 			if($this->id > 0) {
 				// restore the server ID if the user is not admin and record is edited
-				$tmp = $app->db->queryOneRecord("SELECT server_id FROM mail_domain WHERE domain_id = ?", $this->id);
+				$tmp = $app->db->queryOneRecord("SELECT server_id, relay_host, relay_user, relay_pass FROM mail_domain WHERE domain_id = ?", $this->id);
 				$this->dataRecord["server_id"] = $tmp["server_id"];
+
+				// set the settings to current if not provided (or cleared due to limits)
+				if($this->dataRecord['relay_host'] == '') $this->dataRecord['relay_host'] = $tmp['relay_host'];
+				if($this->dataRecord['relay_user'] == '') $this->dataRecord['relay_user'] = $tmp['relay_user'];
+				if($this->dataRecord['relay_pass'] == '') $this->dataRecord['relay_pass'] = $tmp['relay_pass'];
+
 				unset($tmp);
 				// When the record is inserted
 			} else {
-- 
GitLab


From 6b059d8176f8436744826f40c46669eea31ff481 Mon Sep 17 00:00:00 2001
From: Thom Pol <>
Date: Thu, 11 Mar 2021 13:08:40 +0100
Subject: [PATCH 332/441] Hide limit for usage of relay host when this is
 globally disabled

---
 .../web/client/templates/client_edit_limits.htm    |  2 ++
 .../templates/client_template_edit_limits.htm      | 14 ++++++++------
 .../web/client/templates/reseller_edit_limits.htm  | 14 ++++++++------
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm
index 2b4b134a5a..b7a0ccf69c 100644
--- a/interface/web/client/templates/client_edit_limits.htm
+++ b/interface/web/client/templates/client_edit_limits.htm
@@ -235,12 +235,14 @@
                     <label for="limit_spamfilter_policy" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_policy_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" class="form-control" /></div>
 				</div>
+				<tmpl_if name="show_per_domain_relay_options">
 				<div class="form-group">
 						<label class="col-sm-3 control-label">{tmpl_var name='limit_relayhost_txt'}</label>
 						<div class="col-sm-9">
 								{tmpl_var name='limit_relayhost'}
 						</div>
 				</div>
+			</tmpl_if>
       </div>
   </div>
   </div>
diff --git a/interface/web/client/templates/client_template_edit_limits.htm b/interface/web/client/templates/client_template_edit_limits.htm
index 680bc427d8..8aa6d87ac7 100644
--- a/interface/web/client/templates/client_template_edit_limits.htm
+++ b/interface/web/client/templates/client_template_edit_limits.htm
@@ -192,12 +192,14 @@
                     <label for="limit_spamfilter_policy" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_policy_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" class="form-control" /></div>
 				</div>
-        <div class="form-group">
-            <label class="col-sm-3 control-label">{tmpl_var name='limit_relayhost_txt'}</label>
-            <div class="col-sm-9">
-                {tmpl_var name='limit_relayhost'}
-            </div>
-        </div>
+        <tmpl_if name="show_per_domain_relay_options">
+				<div class="form-group">
+						<label class="col-sm-3 control-label">{tmpl_var name='limit_relayhost_txt'}</label>
+						<div class="col-sm-9">
+								{tmpl_var name='limit_relayhost'}
+						</div>
+				</div>
+			</tmpl_if>
 			</div>
       </div>
   </div>
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm
index fa2c3705c9..cbc8c38c57 100644
--- a/interface/web/client/templates/reseller_edit_limits.htm
+++ b/interface/web/client/templates/reseller_edit_limits.htm
@@ -236,12 +236,14 @@
                     <label for="limit_spamfilter_policy" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_policy_txt'}</label>
                     <div class="col-sm-9"><input type="text" name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" class="form-control" /></div>
 				</div>
-        <div class="form-group">
-            <label class="col-sm-3 control-label">{tmpl_var name='limit_relayhost_txt'}</label>
-            <div class="col-sm-9">
-                {tmpl_var name='limit_relayhost'}
-            </div>
-        </div>
+        <tmpl_if name="show_per_domain_relay_options">
+				<div class="form-group">
+						<label class="col-sm-3 control-label">{tmpl_var name='limit_relayhost_txt'}</label>
+						<div class="col-sm-9">
+								{tmpl_var name='limit_relayhost'}
+						</div>
+				</div>
+			</tmpl_if>
 			</div>
       </div>
   </div>
-- 
GitLab


From 1deb325d85edb4f95157c9f9e3acde21297aa841 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 11 Mar 2021 13:54:43 +0100
Subject: [PATCH 333/441] - fixed update of entries

---
 server/plugins-available/rspamd_plugin.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index e369f5cdaf..41f6b08f40 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -347,10 +347,10 @@ class rspamd_plugin {
 
 		if($is_domain === true) {
 			foreach($entries_to_update['mail_user'] as $entry) {
-				$this->user_settings_update('mail_user_' . $mode, $entry, true);
+				$this->user_settings_update('mail_user_' . $mode, ['old' => $entry, 'new' => $entry], true);
 			}
 			foreach($entries_to_update['mail_forwarding'] as $entry) {
-				$this->user_settings_update('mail_forwarding_' . $mode, $entry, true);
+				$this->user_settings_update('mail_forwarding_' . $mode, ['old' => $entry, 'new' => $entry], true);
 			}
 		}
 
-- 
GitLab


From 73836bc7b8d0282ad041e4b748438d3adc9bd379 Mon Sep 17 00:00:00 2001
From: Thom Pol <>
Date: Thu, 11 Mar 2021 15:13:16 +0100
Subject: [PATCH 334/441] Fix global enabling/disabling of relay host options

---
 .../web/admin/form/system_config.tform.php    |  1 +
 interface/web/client/client_edit.php          | 44 ++++++++++-------
 interface/web/client/client_template_edit.php | 20 ++++++--
 interface/web/client/reseller_edit.php        | 48 +++++++++++--------
 4 files changed, 71 insertions(+), 42 deletions(-)

diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index f66a48cb12..c7d15ffcf4 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -277,6 +277,7 @@ $form["tabs"]['mail'] = array (
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
 			'default' => 'n',
+			'value'    => array(0 => 'n', 1 => 'y')
 		),
 		'mailbox_show_autoresponder_tab' => array (
 			'datatype' => 'VARCHAR',
diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index bbc7849f1f..3d2e4e805d 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -92,7 +92,7 @@ class page_action extends tform_actions {
 				}
 			}
 		}
-		
+
 		//* Resellers shall not be able to create another reseller
 		if($_SESSION["s"]["user"]["typ"] == 'user') {
 			$this->dataRecord['limit_client'] = 0;
@@ -181,18 +181,26 @@ class page_action extends tform_actions {
 
 		$app->tpl->setVar('template_additional_list', $text);
 		$app->tpl->setVar('app_module', 'client');
-		
+
+		// Check wether per domain relaying is enabled or not
+		$global_config = $app->getconf->get_global_config('mail');
+		if($global_config['show_per_domain_relay_options'] == 'y') {
+			$app->tpl->setVar("show_per_domain_relay_options", 1);
+		} else {
+			$app->tpl->setVar("show_per_domain_relay_options", 0);
+		}
+
 
 		//* Set the 'customer no' default value
 		if($this->id == 0) {
-			
+
 			if($app->auth->is_admin()) {
 				//* Logged in User is admin
 				//* get the system config
 				$app->uses('getconf');
 				$system_config = $app->getconf->get_global_config();
 				if($system_config['misc']['customer_no_template'] != '') {
-				
+
 					//* Set customer no default
 					$customer_no = $app->functions->intval($system_config['misc']['customer_no_start']+$system_config['misc']['customer_no_counter']);
 					$customer_no_string = str_replace('[CUSTOMER_NO]',$customer_no,$system_config['misc']['customer_no_template']);
@@ -203,7 +211,7 @@ class page_action extends tform_actions {
 				//* get the record of the reseller
 				$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
 				$reseller = $app->db->queryOneRecord("SELECT client.client_id, client.customer_no_template, client.customer_no_counter, client.customer_no_start FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ?", $client_group_id);
-				
+
 				if($reseller['customer_no_template'] != '') {
 					if(isset($this->dataRecord['customer_no'])&& $this->dataRecord['customer_no']!='') $customer_no_string = $this->dataRecord['customer_no'];
 					else {
@@ -215,7 +223,7 @@ class page_action extends tform_actions {
 				}
 			}
 		}
-		
+
 		if($app->auth->is_admin()) {
 			// Fill the client select field
 			$sql = "SELECT client.client_id, sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 AND client.limit_client != 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
@@ -234,7 +242,7 @@ class page_action extends tform_actions {
 			}
 			$app->tpl->setVar("parent_client_id", $client_select);
 		}
-		
+
 		parent::onShowEnd();
 
 	}
@@ -317,7 +325,7 @@ class page_action extends tform_actions {
 			$app->uses('client_templates');
 			$app->client_templates->update_client_templates($this->id, $this->_template_additional);
 		}
-		
+
 		if($this->dataRecord['customer_no'] == $this->dataRecord['customer_no_org']) {
 			if($app->auth->is_admin()) {
 				//* Logged in User is admin
@@ -325,7 +333,7 @@ class page_action extends tform_actions {
 				$app->uses('getconf');
 				$system_config = $app->getconf->get_global_config();
 				if($system_config['misc']['customer_no_template'] != '') {
-				
+
 					//* save new counter value
 					$system_config['misc']['customer_no_counter']++;
 					$system_config_str = $app->ini_parser->get_ini_string($system_config);
@@ -336,7 +344,7 @@ class page_action extends tform_actions {
 				//* get the record of the reseller
 				$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
 				$reseller = $app->db->queryOneRecord("SELECT client.client_id, client.customer_no_template, client.customer_no_counter, client.customer_no_start FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ?", $client_group_id);
-				
+
 				if($reseller['customer_no_template'] != '') {
 					//* save new counter value
 					$customer_no_counter = $app->functions->intval($reseller['customer_no_counter']+1);
@@ -344,7 +352,7 @@ class page_action extends tform_actions {
 				}
 			}
 		}
-		
+
 		//* Send welcome email
 		$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
 		$sql = "SELECT * FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ?";
@@ -369,7 +377,7 @@ class page_action extends tform_actions {
 					$subject = str_replace('{'.$key.'}', $val, $subject);
 				}
 			}
-			
+
 			//* Get sender address
 			if($app->auth->is_admin()) {
 				$app->uses('getconf');
@@ -384,7 +392,7 @@ class page_action extends tform_actions {
 			//* Send the email
 			$app->functions->mail($client['email'], $subject, $message, $from);
 		}
-		
+
 
 		parent::onAfterInsert();
 	}
@@ -466,7 +474,7 @@ class page_action extends tform_actions {
 						$active_col = 'disablesmtp';
 						$reverse = true;
 					}
-					
+
 					if(!isset($prev_active[$current])) $prev_active[$current] = array();
 					if(!isset($prev_sysuser[$current])) $prev_sysuser[$current] = array();
 
@@ -498,7 +506,7 @@ class page_action extends tform_actions {
 						$active_col = 'disablesmtp';
 						$reverse = true;
 					}
-					
+
 					$entries = $app->db->queryAllRecords('SELECT ?? as `id` FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $current, $sys_groupid);
 					foreach($entries as $item) {
 						$set_active = ($reverse == true ? 'n' : 'y');
@@ -551,14 +559,14 @@ class page_action extends tform_actions {
 			$sql = "UPDATE sys_user SET modules = ? WHERE client_id = ?";
 			$app->db->query($sql, $modules, $client_id);
 		}
-		
+
 		//* Client has been moved to another reseller
 		if($_SESSION['s']['user']['typ'] == 'admin' && isset($this->dataRecord['parent_client_id']) && $this->dataRecord['parent_client_id'] != $this->oldDataRecord['parent_client_id']) {
 			//* Get groupid of the client
 			$tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $this->id);
 			$groupid = $tmp['groupid'];
 			unset($tmp);
-			
+
 			//* Remove sys_user of old reseller from client group
 			if($this->oldDataRecord['parent_client_id'] > 0) {
 				//* get userid of the old reseller remove it from the group of the client
@@ -566,7 +574,7 @@ class page_action extends tform_actions {
 				$app->auth->remove_group_from_user($tmp['userid'], $groupid);
 				unset($tmp);
 			}
-			
+
 			//* Add sys_user of new reseller to client group
 			if($this->dataRecord['parent_client_id'] > 0) {
 				//* get userid of the reseller and add it to the group of the client
diff --git a/interface/web/client/client_template_edit.php b/interface/web/client/client_template_edit.php
index 8ae08b965e..dc43d90de3 100644
--- a/interface/web/client/client_template_edit.php
+++ b/interface/web/client/client_template_edit.php
@@ -51,19 +51,31 @@ $app->load('tform_actions');
 
 class page_action extends tform_actions {
 
-	
+
 	function onSubmit() {
 		global $app;
-		
+
 		//* Resellers shall not be able to create another reseller or set reseller specific settings
 		if($_SESSION["s"]["user"]["typ"] == 'user') {
 			$this->dataRecord['limit_client'] = 0;
 			$this->dataRecord['limit_domainmodule'] = 0;
 		}
-		
+
 		parent::onSubmit();
 	}
-	
+
+	function onShowEnd() {
+		global $app;
+		// Check wether per domain relaying is enabled or not
+		$global_config = $app->getconf->get_global_config('mail');
+		if($global_config['show_per_domain_relay_options'] == 'y') {
+			$app->tpl->setVar("show_per_domain_relay_options", 1);
+		} else {
+			$app->tpl->setVar("show_per_domain_relay_options", 0);
+		}
+		parent::onShowEnd();
+	}
+
 	function onBeforeUpdate() {
 		global $app;
 
diff --git a/interface/web/client/reseller_edit.php b/interface/web/client/reseller_edit.php
index 3078e01fbc..78ee149e77 100644
--- a/interface/web/client/reseller_edit.php
+++ b/interface/web/client/reseller_edit.php
@@ -94,7 +94,7 @@ class page_action extends tform_actions {
 				}
 			}
 		}
-		
+
 		if($this->id != 0) {
 			$this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ?', $this->id);
 			if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) {
@@ -175,21 +175,29 @@ class page_action extends tform_actions {
 
 		$app->tpl->setVar('template_additional_list', $text);
 		$app->tpl->setVar('app_module', 'client');
-		
+
+		// Check wether per domain relaying is enabled or not
+		$global_config = $app->getconf->get_global_config('mail');
+		if($global_config['show_per_domain_relay_options'] == 'y') {
+			$app->tpl->setVar("show_per_domain_relay_options", 1);
+		} else {
+			$app->tpl->setVar("show_per_domain_relay_options", 0);
+		}
+
 		//* Set the 'customer no' default value
 		if($this->id == 0) {
 			//* get the system config
 			$app->uses('getconf');
 			$system_config = $app->getconf->get_global_config();
 			if($system_config['misc']['customer_no_template'] != '') {
-				
+
 				//* Set customer no default
 				$customer_no = $app->functions->intval($system_config['misc']['customer_no_start']+$system_config['misc']['customer_no_counter']);
 				$customer_no_string = str_replace('[CUSTOMER_NO]',$customer_no,$system_config['misc']['customer_no_template']);
 				$app->tpl->setVar('customer_no',$customer_no_string);
 			}
 		}
-		
+
 		parent::onShowEnd();
 
 	}
@@ -200,9 +208,9 @@ class page_action extends tform_actions {
 	*/
 	function onAfterInsert() {
 		global $app, $conf;
-		
+
 		$app->uses('auth');
-		
+
 		// Create the group for the reseller
 		$groupid = $app->db->datalogInsert('sys_group', array("name" => $this->dataRecord["username"], "description" => '', "client_id" => $this->id), 'groupid');
 		$groups = $groupid;
@@ -217,7 +225,7 @@ class page_action extends tform_actions {
 		$language = $this->dataRecord["language"];
 
 		$password = $app->auth->crypt_password(stripslashes($password));
-		
+
 		// 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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
@@ -238,26 +246,26 @@ class page_action extends tform_actions {
 
 		$sql = "UPDATE client SET default_mailserver = ?, default_webserver = ?, default_dnsserver = ?, default_slave_dnsserver = ?, default_dbserver = ? WHERE client_id = ?";
 		$app->db->query($sql, $default_mailserver, $default_webserver, $default_dnsserver, $default_dnsserver, $default_dbserver, $this->id);
-		
+
 		if(isset($this->dataRecord['template_master'])) {
 			$app->uses('client_templates');
 			$app->client_templates->update_client_templates($this->id, $this->_template_additional);
 		}
-		
+
 		if($this->dataRecord['customer_no'] == $this->dataRecord['customer_no_org']) {
 			//* get the system config
 			$app->uses('getconf');
 			$system_config = $app->getconf->get_global_config();
 			if($system_config['misc']['customer_no_template'] != '') {
-				
+
 				//* save new counter value
 				$system_config['misc']['customer_no_counter']++;
 				$system_config_str = $app->ini_parser->get_ini_string($system_config);
 				$app->db->datalogUpdate('sys_ini', array("config" => $system_config_str), 'sysini_id', 1);
-				
+
 			}
 		}
-		
+
 		//* Send welcome email
 		$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
 		$sql = "SELECT * FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ?";
@@ -283,7 +291,7 @@ class page_action extends tform_actions {
 					$subject = str_replace('{'.$key.'}', $val, $subject);
 				}
 			}
-			
+
 			//* Get sender address
 			if($app->auth->is_admin()) {
 				$app->uses('getconf');
@@ -311,7 +319,7 @@ class page_action extends tform_actions {
 		global $app, $conf;
 
 		$app->uses('auth');
-		
+
 		// username changed
 		if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) {
 			$username = $this->dataRecord["username"];
@@ -328,7 +336,7 @@ class page_action extends tform_actions {
 		if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
 			$password = $this->dataRecord["password"];
 			$client_id = $this->id;
-			
+
 			$password = $app->auth->crypt_password(stripslashes($password));
 			$sql = "UPDATE sys_user SET passwort = ? WHERE client_id = ?";
 			$app->db->query($sql, $password, $client_id);
@@ -357,12 +365,12 @@ class page_action extends tform_actions {
 			$sql = "UPDATE sys_user SET modules = ? WHERE client_id = ?";
 			$app->db->query($sql, $modules, $client_id);
 		}
-		
+
 		if(isset($this->dataRecord['template_master'])) {
 			$app->uses('client_templates');
 			$app->client_templates->update_client_templates($this->id, $this->_template_additional);
 		}
-		
+
 		if(!isset($this->dataRecord['locked'])) $this->dataRecord['locked'] = 'n';
 		if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["locked"] != $this->oldDataRecord['locked']) {
 			/** lock all the things like web, mail etc. - easy to extend */
@@ -412,7 +420,7 @@ class page_action extends tform_actions {
 						$active_col = 'disablesmtp';
 						$reverse = true;
 					}
-					
+
 					if(!isset($prev_active[$current])) $prev_active[$current] = array();
 					if(!isset($prev_sysuser[$current])) $prev_sysuser[$current] = array();
 
@@ -444,7 +452,7 @@ class page_action extends tform_actions {
 						$active_col = 'disablesmtp';
 						$reverse = true;
 					}
-					
+
 					$entries = $app->db->queryAllRecords('SELECT ?? as `id` FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $current, $sys_groupid);
 					foreach($entries as $item) {
 						$set_active = ($reverse == true ? 'n' : 'y');
@@ -469,7 +477,7 @@ class page_action extends tform_actions {
 			unset($entries);
 			unset($to_disable);
 		}
-		
+
 		if(!isset($this->dataRecord['canceled'])) $this->dataRecord['canceled'] = 'n';
 		if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["canceled"] != $this->oldDataRecord['canceled']) {
 			if($this->dataRecord['canceled'] == 'y') {
-- 
GitLab


From 3c5d2328daf31077c640931314cf9e30185e6a1e Mon Sep 17 00:00:00 2001
From: Thom Pol <>
Date: Thu, 11 Mar 2021 15:41:17 +0100
Subject: [PATCH 335/441] Fix critical error with new custom Postfix config

---
 install/lib/installer_base.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 6302571cf9..6de768f7e5 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1177,7 +1177,7 @@ class installer_base {
 		}
 		$configfile = 'postfix_custom.conf';
 		if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/' . $configfile . '.master')) {
-			$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master');
+			$content = file_get_contents($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master');
 			$content = strtr($content, $postconf_placeholders);
 			$postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
 		}
-- 
GitLab


From 1b0fea4985d76c5cf2061037866d3094a978e82f Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 3 Mar 2021 16:46:44 -0700
Subject: [PATCH 336/441] rspam: add fields to set redis servers and password

---
 install/lib/installer_base.lib.php            | 50 +++++++++++-----
 .../tpl/rspamd_classifier-bayes.conf.master   |  4 +-
 install/tpl/rspamd_dkim_signing.conf.master   |  5 +-
 install/tpl/rspamd_greylist.conf.master       |  1 -
 install/tpl/rspamd_mx_check.conf.master       |  3 +-
 install/tpl/rspamd_neural.conf.master         |  3 +-
 install/tpl/rspamd_redis.conf.master          |  2 +-
 install/tpl/server.ini.master                 |  4 ++
 .../web/admin/form/server_config.tform.php    | 53 +++++++++++++++-
 .../web/admin/lib/lang/ar_server_config.lng   |  8 +++
 .../web/admin/lib/lang/bg_server_config.lng   |  8 +++
 .../web/admin/lib/lang/br_server_config.lng   |  8 +++
 .../web/admin/lib/lang/ca_server_config.lng   |  8 +++
 .../web/admin/lib/lang/cz_server_config.lng   |  8 +++
 .../web/admin/lib/lang/de_server_config.lng   |  8 +++
 .../web/admin/lib/lang/dk_server_config.lng   |  8 +++
 .../web/admin/lib/lang/el_server_config.lng   |  8 +++
 .../web/admin/lib/lang/en_server_config.lng   |  8 +++
 .../web/admin/lib/lang/es_server_config.lng   |  8 +++
 .../web/admin/lib/lang/fi_server_config.lng   |  8 +++
 .../web/admin/lib/lang/fr_server_config.lng   |  8 +++
 .../web/admin/lib/lang/hr_server_config.lng   |  8 +++
 .../web/admin/lib/lang/hu_server_config.lng   |  8 +++
 .../web/admin/lib/lang/id_server_config.lng   |  8 +++
 .../web/admin/lib/lang/it_server_config.lng   |  8 +++
 .../web/admin/lib/lang/ja_server_config.lng   |  8 +++
 .../web/admin/lib/lang/nl_server_config.lng   |  8 +++
 .../web/admin/lib/lang/pl_server_config.lng   |  8 +++
 .../web/admin/lib/lang/pt_server_config.lng   |  8 +++
 .../web/admin/lib/lang/ro_server_config.lng   |  8 +++
 .../web/admin/lib/lang/ru_server_config.lng   |  8 +++
 .../web/admin/lib/lang/se_server_config.lng   |  8 +++
 .../web/admin/lib/lang/sk_server_config.lng   |  8 +++
 .../web/admin/lib/lang/tr_server_config.lng   | 11 ++++
 .../templates/server_config_mail_edit.htm     | 20 +++++++
 .../conf/rspamd_classifier-bayes.conf.master  | 15 +++++
 server/conf/rspamd_dkim_signing.conf.master   |  4 ++
 server/conf/rspamd_redis.conf.master          |  4 ++
 .../plugins-available/rspamd_plugin.inc.php   | 60 +++++++++++++------
 39 files changed, 384 insertions(+), 47 deletions(-)
 mode change 100644 => 120000 install/tpl/rspamd_classifier-bayes.conf.master
 mode change 100644 => 120000 install/tpl/rspamd_dkim_signing.conf.master
 delete mode 100644 install/tpl/rspamd_greylist.conf.master
 mode change 100644 => 120000 install/tpl/rspamd_redis.conf.master
 create mode 100644 server/conf/rspamd_classifier-bayes.conf.master
 create mode 100644 server/conf/rspamd_dkim_signing.conf.master
 create mode 100644 server/conf/rspamd_redis.conf.master

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 6de768f7e5..2bbd99a339 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1825,33 +1825,48 @@ class installer_base {
 		fclose($fps);
 		unset($dkim_domains);
 
-		# local.d templates with template tags
-		$tpl = new tpl();
-		$tpl->newTemplate('rspamd_dkim_signing.conf.master');
-		$tpl->setVar('dkim_path', $mail_config['dkim_path']);
-		wf('/etc/rspamd/local.d/dkim_signing.conf', $tpl->grab());
-
-		$tpl = new tpl();
-		$tpl->newTemplate('rspamd_options.inc.master');
-
+		# look up values for use in template tags
 		$local_addrs = array();
 		$ips = $this->db->queryAllRecords('SELECT `ip_address`, `ip_type` FROM ?? WHERE `server_id` = ?', $conf['mysql']['database'].'.server_ip', $conf['server_id']);
 		if(is_array($ips) && !empty($ips)){
 			foreach($ips as $ip){
-				$local_addrs[] = array('quoted_ip' => "\"".$ip['ip_address']."\",\n");
+				$local_addrs[] = array(
+					'ip' => $ip['ip_address'],
+					'quoted_ip' => "\"".$ip['ip_address']."\",\n"
+				);
 			}
 		}
-		$tpl->setLoop('local_addrs', $local_addrs);
-		wf('/etc/rspamd/local.d/options.inc', $tpl->grab());
+
+		# local.d templates with template tags
+		# note: ensure these template files are in server/conf/ and symlinked in install/tpl/
+		$local_d = array(
+			'dkim_signing.conf',
+			'options.inc',
+			'redis.conf',
+			'classifier-bayes.conf',
+		);
+		foreach ($local_d as $f) {
+			$tpl = new tpl();
+			$tpl->newTemplate("rspamd_${f}.master");
+
+			$tpl->setVar('dkim_path', $mail_config['dkim_path']);
+			$tpl->setVar('rspamd_redis_servers', $mail_config['rspamd_redis_servers']);
+			$tpl->setVar('rspamd_redis_password', $mail_config['rspamd_redis_password']);
+			$tpl->setVar('rspamd_redis_bayes_servers', $mail_config['rspamd_redis_bayes_servers']);
+			$tpl->setVar('rspamd_redis_bayes_password', $mail_config['rspamd_redis_bayes_password']);
+			if(count($local_addrs) > 0) {
+				$tpl->setLoop('local_addrs', $local_addrs);
+			}
+
+			wf("/etc/rspamd/local.d/${f}", $tpl->grab());
+		}
+
 
 		# local.d templates without template tags
 		$local_d = array(
 			'groups.conf',
 			'antivirus.conf',
-			'classifier-bayes.conf',
-			'greylist.conf',
 			'mx_check.conf',
-			'redis.conf',
 			'milter_headers.conf',
 			'neural.conf',
 			'neural_group.conf',
@@ -1894,6 +1909,11 @@ class installer_base {
 			}
 		}
 
+		# rename rspamd templates we no longer use
+		if(file_exists("/etc/rspamd/local.d/greylist.conf")) {
+			rename("/etc/rspamd/local.d/greylist.conf", "/etc/rspamd/local.d/greylist.old");
+		}
+
 
 		exec('chmod a+r /etc/rspamd/local.d/* /etc/rspamd/local.d/maps.d/* /etc/rspamd/override.d/*');
 
diff --git a/install/tpl/rspamd_classifier-bayes.conf.master b/install/tpl/rspamd_classifier-bayes.conf.master
deleted file mode 100644
index dcda4a6391..0000000000
--- a/install/tpl/rspamd_classifier-bayes.conf.master
+++ /dev/null
@@ -1,3 +0,0 @@
-autolearn = [-0.01, 5.00];
-per_user = false;
-per_language = true;
diff --git a/install/tpl/rspamd_classifier-bayes.conf.master b/install/tpl/rspamd_classifier-bayes.conf.master
new file mode 120000
index 0000000000..b532472294
--- /dev/null
+++ b/install/tpl/rspamd_classifier-bayes.conf.master
@@ -0,0 +1 @@
+../../server/conf/rspamd_classifier-bayes.conf.master
\ No newline at end of file
diff --git a/install/tpl/rspamd_dkim_signing.conf.master b/install/tpl/rspamd_dkim_signing.conf.master
deleted file mode 100644
index 10d89e7495..0000000000
--- a/install/tpl/rspamd_dkim_signing.conf.master
+++ /dev/null
@@ -1,4 +0,0 @@
-try_fallback = false;
-use_esld = false;
-path_map = "/etc/rspamd/local.d/dkim_domains.map";
-selector_map = "/etc/rspamd/local.d/dkim_selectors.map";
diff --git a/install/tpl/rspamd_dkim_signing.conf.master b/install/tpl/rspamd_dkim_signing.conf.master
new file mode 120000
index 0000000000..ebc6d4ace8
--- /dev/null
+++ b/install/tpl/rspamd_dkim_signing.conf.master
@@ -0,0 +1 @@
+../../server/conf/rspamd_dkim_signing.conf.master
\ No newline at end of file
diff --git a/install/tpl/rspamd_greylist.conf.master b/install/tpl/rspamd_greylist.conf.master
deleted file mode 100644
index 74ea715a22..0000000000
--- a/install/tpl/rspamd_greylist.conf.master
+++ /dev/null
@@ -1 +0,0 @@
-servers = "127.0.0.1:6379";
\ No newline at end of file
diff --git a/install/tpl/rspamd_mx_check.conf.master b/install/tpl/rspamd_mx_check.conf.master
index 0a628f9c83..0c71ecb26b 100644
--- a/install/tpl/rspamd_mx_check.conf.master
+++ b/install/tpl/rspamd_mx_check.conf.master
@@ -1,9 +1,8 @@
 enabled = true;
-servers = "localhost";
 key_prefix = "rmx";
 symbol_bad_mx = "MX_INVALID";
 symbol_no_mx = "MX_MISSING";
 symbol_good_mx = "MX_GOOD";
 expire = 86400;
 expire_novalid = 7200;
-greylist_invalid = false;
\ No newline at end of file
+greylist_invalid = false;
diff --git a/install/tpl/rspamd_neural.conf.master b/install/tpl/rspamd_neural.conf.master
index 76f8a6d344..9047212cd3 100644
--- a/install/tpl/rspamd_neural.conf.master
+++ b/install/tpl/rspamd_neural.conf.master
@@ -1,4 +1,3 @@
-servers = 127.0.0.1:6379;
 enabled = true;
 
 rules {
@@ -28,4 +27,4 @@ rules {
     symbol_ham = "NEURAL_HAM_SHORT";
     ann_expire = 1d;
   }
-}
\ No newline at end of file
+}
diff --git a/install/tpl/rspamd_redis.conf.master b/install/tpl/rspamd_redis.conf.master
deleted file mode 100644
index b908af9f5e..0000000000
--- a/install/tpl/rspamd_redis.conf.master
+++ /dev/null
@@ -1 +0,0 @@
-servers = "127.0.0.1";
\ No newline at end of file
diff --git a/install/tpl/rspamd_redis.conf.master b/install/tpl/rspamd_redis.conf.master
new file mode 120000
index 0000000000..df7de6da3c
--- /dev/null
+++ b/install/tpl/rspamd_redis.conf.master
@@ -0,0 +1 @@
+../../server/conf/rspamd_redis.conf.master
\ No newline at end of file
diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master
index 028fb68a6b..39f8276cf1 100644
--- a/install/tpl/server.ini.master
+++ b/install/tpl/server.ini.master
@@ -40,6 +40,10 @@ dkim_path=/var/lib/amavis/dkim
 dkim_strength=1024
 content_filter=amavis
 rspamd_password=
+rspamd_redis_servers=127.0.0.1
+rspamd_redis_passwd=
+rspamd_redis_bayes_servers=127.0.0.1
+rspamd_redis_bayes_passwd=
 pop3_imap_daemon=courier
 mail_filter_syntax=maildrop
 mailuser_uid=5000
diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index 1818b2ef3b..d5133f2a01 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -481,8 +481,57 @@ $form["tabs"]['mail'] = array(
 			'value' => '',
 			'width' => '40',
 			'maxlength' => '255',
-			'filters'   => array( 0 => array( 'event' => 'SAVE',
-												'type' => 'TRIM'),
+			'filters'   => array(
+					0 => array( 'event' => 'SAVE',
+						'type' => 'TRIM'),
+			),
+		),
+		'rspamd_redis_servers' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '127.0.0.1',
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255',
+			'filters'   => array(
+					0 => array( 'event' => 'SAVE',
+						'type' => 'TRIM'),
+			),
+		),
+		'rspamd_redis_password' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '',
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255',
+			'filters'   => array(
+					0 => array( 'event' => 'SAVE',
+						'type' => 'TRIM'),
+			),
+		),
+		'rspamd_redis_bayes_servers' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '127.0.0.1',
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255',
+			'filters'   => array(
+					0 => array( 'event' => 'SAVE',
+						'type' => 'TRIM'),
+			),
+		),
+		'rspamd_redis_bayes_password' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '',
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255',
+			'filters'   => array(
+					0 => array( 'event' => 'SAVE',
+						'type' => 'TRIM'),
 			),
 		),
 		'rspamd_available' => array(
diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng
index b95b3567e6..ac03605279 100644
--- a/interface/web/admin/lib/lang/ar_server_config.lng
+++ b/interface/web/admin/lib/lang/ar_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng
index fcd34e7292..b9d6e648ce 100644
--- a/interface/web/admin/lib/lang/bg_server_config.lng
+++ b/interface/web/admin/lib/lang/bg_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng
index 0e8d43ca8e..ac551c588c 100644
--- a/interface/web/admin/lib/lang/br_server_config.lng
+++ b/interface/web/admin/lib/lang/br_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Filtro de conteúdo';
 $wb['rspamd_url_txt'] = 'URL do RSPAMD';
 $wb['rspamd_user_txt'] = 'Usuário RSPAMD';
 $wb['rspamd_password_txt'] = 'Senha RSPAMD';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Habilitar protocolo PROXY';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'Porta HTTP protocolo PROXY';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'Porta HTTPS protocolo PROXY';
diff --git a/interface/web/admin/lib/lang/ca_server_config.lng b/interface/web/admin/lib/lang/ca_server_config.lng
index 2e02e31c6b..25ed761836 100644
--- a/interface/web/admin/lib/lang/ca_server_config.lng
+++ b/interface/web/admin/lib/lang/ca_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng
index 633db75fbd..6da8dfc0bb 100644
--- a/interface/web/admin/lib/lang/cz_server_config.lng
+++ b/interface/web/admin/lib/lang/cz_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Filtr obsahu';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd heslo';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng
index e287b9a622..d0b43059c4 100644
--- a/interface/web/admin/lib/lang/de_server_config.lng
+++ b/interface/web/admin/lib/lang/de_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content-Filter';
 $wb['rspamd_url_txt'] = 'Rspamd-URL';
 $wb['rspamd_user_txt'] = 'Rspamd-Benutzer';
 $wb['rspamd_password_txt'] = 'Rspamd-Passwort';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/dk_server_config.lng b/interface/web/admin/lib/lang/dk_server_config.lng
index 77a29251d5..b1ebcec391 100644
--- a/interface/web/admin/lib/lang/dk_server_config.lng
+++ b/interface/web/admin/lib/lang/dk_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng
index 0913624503..b147f15e5c 100644
--- a/interface/web/admin/lib/lang/el_server_config.lng
+++ b/interface/web/admin/lib/lang/el_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng
index 3df6f02dfb..4125b2648e 100644
--- a/interface/web/admin/lib/lang/en_server_config.lng
+++ b/interface/web/admin/lib/lang/en_server_config.lng
@@ -324,6 +324,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng
index fadf3180c0..67e77efac8 100644
--- a/interface/web/admin/lib/lang/es_server_config.lng
+++ b/interface/web/admin/lib/lang/es_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng
index ec974d3249..dac02a14b7 100644
--- a/interface/web/admin/lib/lang/fi_server_config.lng
+++ b/interface/web/admin/lib/lang/fi_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng
index a413c4214d..0599b8bbed 100644
--- a/interface/web/admin/lib/lang/fr_server_config.lng
+++ b/interface/web/admin/lib/lang/fr_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng
index 4eb3574d45..e0894ceb82 100644
--- a/interface/web/admin/lib/lang/hr_server_config.lng
+++ b/interface/web/admin/lib/lang/hr_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng
index 73f0181f3d..97774f9ecd 100644
--- a/interface/web/admin/lib/lang/hu_server_config.lng
+++ b/interface/web/admin/lib/lang/hu_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng
index 3555ba3288..814e963f64 100644
--- a/interface/web/admin/lib/lang/id_server_config.lng
+++ b/interface/web/admin/lib/lang/id_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng
index 39b7161ddf..f9e30f3937 100644
--- a/interface/web/admin/lib/lang/it_server_config.lng
+++ b/interface/web/admin/lib/lang/it_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng
index a50922639c..52ac44a351 100644
--- a/interface/web/admin/lib/lang/ja_server_config.lng
+++ b/interface/web/admin/lib/lang/ja_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng
index 9ef50bb6c1..e9e412b609 100644
--- a/interface/web/admin/lib/lang/nl_server_config.lng
+++ b/interface/web/admin/lib/lang/nl_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng
index af839bb2e3..f9d43d3bfd 100644
--- a/interface/web/admin/lib/lang/pl_server_config.lng
+++ b/interface/web/admin/lib/lang/pl_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng
index 6b581c8593..468413a1de 100644
--- a/interface/web/admin/lib/lang/pt_server_config.lng
+++ b/interface/web/admin/lib/lang/pt_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng
index e15c99fb67..e20fb9ee9f 100644
--- a/interface/web/admin/lib/lang/ro_server_config.lng
+++ b/interface/web/admin/lib/lang/ro_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng
index 3465d2120d..1799b075f4 100644
--- a/interface/web/admin/lib/lang/ru_server_config.lng
+++ b/interface/web/admin/lib/lang/ru_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng
index 9bbbcc80ac..fe3c2e9234 100644
--- a/interface/web/admin/lib/lang/se_server_config.lng
+++ b/interface/web/admin/lib/lang/se_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng
index 1b96cf57ad..bc7f9f514b 100644
--- a/interface/web/admin/lib/lang/sk_server_config.lng
+++ b/interface/web/admin/lib/lang/sk_server_config.lng
@@ -316,6 +316,14 @@ $wb['content_filter_txt'] = 'Content Filter';
 $wb['rspamd_url_txt'] = 'Rspamd URL';
 $wb['rspamd_user_txt'] = 'Rspamd User';
 $wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng
index 84210ce9b8..0d0c84f2c7 100644
--- a/interface/web/admin/lib/lang/tr_server_config.lng
+++ b/interface/web/admin/lib/lang/tr_server_config.lng
@@ -310,6 +310,17 @@ $wb['log_retention_error_ispositive'] = 'Günlük tutma süresi 0 değerinden b
 $wb['php_default_hide_txt'] = 'Hide Default PHP-Version in selectbox';
 $wb['php_default_name_txt'] = 'Varsayılan PHP Sürümü Açıklaması';
 $wb['php_default_name_error_empty'] = 'Varsayılan PHP sürümü açıklaması boş olamaz';
+$wb['rspamd_url_txt'] = 'Rspamd URL';
+$wb['rspamd_user_txt'] = 'Rspamd User';
+$wb['rspamd_password_txt'] = 'Rspamd Password';
+$wb['rspamd_redis_servers_txt'] = 'Redis Servers';
+$wb['tooltip_rspamd_redis_servers_txt'] = 'Redis server(s) which Rspamd will use.  Eg. \'127.0.0.1\', \'localhost:6379\' or \'/var/run/redis/redis-server.sock\'.';
+$wb['rspamd_redis_password_txt'] = 'Redis Password';
+$wb['tooltip_rspamd_redis_password_txt'] = 'Password for Redis Servers (leave blank if unused).';
+$wb['rspamd_redis_bayes_servers_txt'] = 'Redis Servers for Bayes';
+$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd will use for Bayes if different (otherwise leave blank).  Eg. \'localhost:6378\' or \'/var/run/redis-bayes/redis-server.sock\'.';
+$wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes';
+$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).';
 $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
 $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
 $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm
index 76ed5ef4fb..0eac988961 100644
--- a/interface/web/admin/templates/server_config_mail_edit.htm
+++ b/interface/web/admin/templates/server_config_mail_edit.htm
@@ -61,6 +61,26 @@
                 <label for="rspamd_password" class="col-sm-3 control-label">{tmpl_var name='rspamd_password_txt'}</label>
                 <div class="col-sm-9"><input type="text" name="rspamd_password" id="rspamd_password" value="{tmpl_var name='rspamd_password'}" class="form-control" /></div>
 			</div>
+			<div class="form-group rspamd">
+                <label for="rspamd_redis_servers" class="col-sm-3 control-label">{tmpl_var name='rspamd_redis_servers_txt'}</label>
+                <div class="col-sm-9" data-toggle="tooltip" title="{tmpl_var name='tooltip_rspamd_redis_servers_txt'}">
+			<input type="text" name="rspamd_redis_servers" id="rspamd_redis_servers" value="{tmpl_var name='rspamd_redis_servers'}" class="form-control" /></div>
+			</div>
+			<div class="form-group rspamd">
+                <label for="rspamd_redis_password" class="col-sm-3 control-label">{tmpl_var name='rspamd_redis_password_txt'}</label>
+                <div class="col-sm-9" data-toggle="tooltip" title="{tmpl_var name='tooltip_rspamd_redis_password_txt'}">
+			<input type="text" name="rspamd_redis_password" id="rspamd_redis_password" value="{tmpl_var name='rspamd_redis_password'}" class="form-control" /></div>
+			</div>
+			<div class="form-group rspamd">
+                <label for="rspamd_redis_bayes_servers" class="col-sm-3 control-label">{tmpl_var name='rspamd_redis_bayes_servers_txt'}</label>
+                <div class="col-sm-9" data-toggle="tooltip" title="{tmpl_var name='tooltip_rspamd_redis_bayes_servers_txt'}">
+			<input type="text" name="rspamd_redis_bayes_servers" id="rspamd_redis_bayes_servers" value="{tmpl_var name='rspamd_redis_bayes_servers'}" class="form-control" /></div>
+			</div>
+			<div class="form-group rspamd">
+                <label for="rspamd_redis_bayes_password" class="col-sm-3 control-label">{tmpl_var name='rspamd_redis_bayes_password_txt'}</label>
+                <div class="col-sm-9" data-toggle="tooltip" title="{tmpl_var name='tooltip_rspamd_redis_bayes_password_txt'}">
+			<input type="text" name="rspamd_redis_bayes_password" id="rspamd_redis_bayes_password" value="{tmpl_var name='rspamd_redis_bayes_password'}" class="form-control" /></div>
+			</div>
             <div class="form-group">
                 <label for="mailuser_uid" class="col-sm-3 control-label">{tmpl_var name='mailuser_uid_txt'}</label>
                 <div class="col-sm-9"><input type="text" name="mailuser_uid" id="mailuser_uid" value="{tmpl_var name='mailuser_uid'}" class="form-control" /></div></div>
diff --git a/server/conf/rspamd_classifier-bayes.conf.master b/server/conf/rspamd_classifier-bayes.conf.master
new file mode 100644
index 0000000000..48dc9f6b53
--- /dev/null
+++ b/server/conf/rspamd_classifier-bayes.conf.master
@@ -0,0 +1,15 @@
+backend = "redis";
+<tmpl_if name="rspamd_redis_bayes_servers">
+servers = "<tmpl_var name='rspamd_redis_bayes_servers'>";
+</tmpl_if>
+<tmpl_if name="rspamd_redis_bayes_password">
+password = "<tmpl_var name='rspamd_redis_bayes_password'>";
+</tmpl_if>
+autolearn {
+  spam_threshold = 9.0; # When to learn spam (score >= threshold)
+  ham_threshold = -1.5; # When to learn ham (score <= threshold)
+  check_balance = true; # Check spam and ham balance
+  min_balance = 0.9; # Keep diff for spam/ham learns for at least this value
+}
+per_user = false;
+per_language = true;
diff --git a/server/conf/rspamd_dkim_signing.conf.master b/server/conf/rspamd_dkim_signing.conf.master
new file mode 100644
index 0000000000..10d89e7495
--- /dev/null
+++ b/server/conf/rspamd_dkim_signing.conf.master
@@ -0,0 +1,4 @@
+try_fallback = false;
+use_esld = false;
+path_map = "/etc/rspamd/local.d/dkim_domains.map";
+selector_map = "/etc/rspamd/local.d/dkim_selectors.map";
diff --git a/server/conf/rspamd_redis.conf.master b/server/conf/rspamd_redis.conf.master
new file mode 100644
index 0000000000..08b7f8ca90
--- /dev/null
+++ b/server/conf/rspamd_redis.conf.master
@@ -0,0 +1,4 @@
+servers = "<tmpl_var name='rspamd_redis_servers'>";
+<tmpl_if name="rspamd_redis_password">
+password = "<tmpl_var name='rspamd_redis_password'>";
+</tmpl_if>
diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index 41f6b08f40..1e931d87cc 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -120,10 +120,14 @@ class rspamd_plugin {
 		$app->plugins->registerEvent('mail_access_update', $this->plugin_name, 'spamfilter_wblist_update');
 		$app->plugins->registerEvent('mail_access_delete', $this->plugin_name, 'spamfilter_wblist_delete');
 
+		//* server
+		$app->plugins->registerEvent('server_insert', $this->plugin_name, 'server_update');
+		$app->plugins->registerEvent('server_update', $this->plugin_name, 'server_update');
+
 		//* server ip
-		$app->plugins->registerEvent('server_ip_insert', $this->plugin_name, 'server_ip');
-		$app->plugins->registerEvent('server_ip_update', $this->plugin_name, 'server_ip');
-		$app->plugins->registerEvent('server_ip_delete', $this->plugin_name, 'server_ip');
+		$app->plugins->registerEvent('server_ip_insert', $this->plugin_name, 'server_update');
+		$app->plugins->registerEvent('server_ip_update', $this->plugin_name, 'server_update');
+		$app->plugins->registerEvent('server_ip_delete', $this->plugin_name, 'server_update');
 
 		//* spamfilter_users
 		$app->plugins->registerEvent('spamfilter_users_insert', $this->plugin_name, 'user_settings_update');
@@ -483,28 +487,50 @@ class rspamd_plugin {
 		}
 	}
 
-	function server_ip($event_name, $data) {
+	function server_update($event_name, $data) {
 		global $app, $conf;
 
-		// get the config
-		$app->uses("getconf,system");
+		if(!is_dir('/etc/rspamd')) {
+			return;
+		}
+
 		$app->load('tpl');
 
 		$mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail');
 
-		if(is_dir('/etc/rspamd')) {
-			$tpl = new tpl();
-			$tpl->newTemplate('rspamd_options.inc.master');
+		$local_addrs = array();
+		$ips = $app->db->queryAllRecords('SELECT `ip_address`, `ip_type` FROM ?? WHERE `server_id` = ?', $conf['mysql']['database'].'.server_ip', $conf['server_id']);
+		if(is_array($ips) && !empty($ips)){
+			foreach($ips as $ip){
+				$local_addrs[] = array(
+					'ip' => $ip['ip_address'],
+					'quoted_ip' => "\"".$ip['ip_address']."\",\n",
+				);
+			}
+		}
 
-			$local_addrs = array();
-			$ips = $app->db->queryAllRecords('SELECT `ip_address`, `ip_type` FROM ?? WHERE `server_id` = ?', $conf['mysql']['database'].'.server_ip', $conf['server_id']);
-			if(is_array($ips) && !empty($ips)){
-				foreach($ips as $ip){
-					$local_addrs[] = array('quoted_ip' => "\"".$ip['ip_address']."\",\n");
-				}
+		# local.d templates with template tags
+		# note: ensure these template files are in server/conf/ and symlinked in install/tpl/
+		$local_d = array(
+			'dkim_signing.conf',
+			'options.inc',
+			'redis.conf',
+			'classifier-bayes.conf',
+		);
+		foreach ($local_d as $f) {
+			$tpl = new tpl();
+			$tpl->newTemplate("rspamd_${f}.master");
+
+			$tpl->setVar('dkim_path', $mail_config['dkim_path']);
+			$tpl->setVar('rspamd_redis_servers', $mail_config['rspamd_redis_servers']);
+			$tpl->setVar('rspamd_redis_password', $mail_config['rspamd_redis_password']);
+			$tpl->setVar('rspamd_redis_bayes_servers', $mail_config['rspamd_redis_bayes_servers']);
+			$tpl->setVar('rspamd_redis_bayes_password', $mail_config['rspamd_redis_bayes_password']);
+			if(count($local_addrs) > 0) {
+				$tpl->setLoop('local_addrs', $local_addrs);
 			}
-			$tpl->setLoop('local_addrs', $local_addrs);
-			$app->system->file_put_contents('/etc/rspamd/local.d/options.inc', $tpl->grab());
+
+			$app->system->file_put_contents("/etc/rspamd/local.d/${f}", $tpl->grab());
 
 			if($mail_config['content_filter'] == 'rspamd'){
 				$app->services->restartServiceDelayed('rspamd', 'reload');
-- 
GitLab


From 504cfcf5bb2776bc0a3f3dbab5d583a467753b8e Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 4 Mar 2021 17:08:55 -0700
Subject: [PATCH 337/441] rspamd: set permissions on files containing passwords

---
 install/lib/installer_base.lib.php             | 4 +++-
 server/plugins-available/rspamd_plugin.inc.php | 5 +++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 2bbd99a339..6981984f97 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1914,8 +1914,10 @@ class installer_base {
 			rename("/etc/rspamd/local.d/greylist.conf", "/etc/rspamd/local.d/greylist.old");
 		}
 
-
 		exec('chmod a+r /etc/rspamd/local.d/* /etc/rspamd/local.d/maps.d/* /etc/rspamd/override.d/*');
+		# protect passwords in these files
+		exec('chgrp _rspamd /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf /etc/rspamd/local.d/worker-controller.inc');
+		exec('chmod 640 /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf /etc/rspamd/local.d/worker-controller.inc');
 
 		# unneccesary, since this was done above?
 		$command = 'usermod -a -G amavis _rspamd';
diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index 1e931d87cc..cd478492a8 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -536,6 +536,11 @@ class rspamd_plugin {
 				$app->services->restartServiceDelayed('rspamd', 'reload');
 			}
 		}
+
+		# protect passwords in these files
+		exec('chgrp _rspamd /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf /etc/rspamd/local.d/worker-controller.inc');
+		exec('chmod 640 /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf /etc/rspamd/local.d/worker-controller.inc');
+
 	}
 
 	private function _is_valid_ip_address($ip) {
-- 
GitLab


From 33019cd9a0b243bc13773626f7fec70fb4f1bbd4 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 11 Mar 2021 17:36:06 +0100
Subject: [PATCH 338/441] - added sql update file

---
 install/sql/incremental/upd_0093.sql | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 install/sql/incremental/upd_0093.sql

diff --git a/install/sql/incremental/upd_0093.sql b/install/sql/incremental/upd_0093.sql
new file mode 100644
index 0000000000..71efb3085e
--- /dev/null
+++ b/install/sql/incremental/upd_0093.sql
@@ -0,0 +1,25 @@
+ALTER TABLE `remote_user` MODIFY `remote_password` VARCHAR(200) NOT NULL DEFAULT '';
+
+ALTER TABLE `client` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
+ALTER TABLE `client_template` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
+
+ALTER TABLE mail_access DROP CONSTRAINT `server_id`;
+SET SESSION old_alter_table=1;
+ALTER IGNORE TABLE mail_access ADD UNIQUE KEY `unique_source` (`server_id`,`source`,`type`);
+SET SESSION old_alter_table=0;
+
+ALTER TABLE mail_domain ADD COLUMN `relay_host` varchar(255) NOT NULL default '' AFTER `dkim_public`,
+  ADD COLUMN `relay_user` varchar(255) NOT NULL default '' AFTER `relay_host`,
+  ADD COLUMN `relay_pass` varchar(255) NOT NULL default '' AFTER `relay_user`;
+-- Purge apps & addons installer (#5795)
+DROP TABLE 'software_package';
+DROP TABLE 'software_repo';
+DROP TABLE 'software_update';
+DROP TABLE 'software_update_inst';
+
+-- Brexit
+UPDATE `country` SET `eu` = 'n' WHERE `iso` = 'GB';
+
+-- Add limit for per domain relaying
+ALTER TABLE `client` ADD `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_spamfilter_policy`;
+ALTER TABLE `client_template` ADD `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_spamfilter_policy`;
-- 
GitLab


From 72a3334c1201cce67e7a215bd793f6a979bfd1c3 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@amsterdamtech.nl>
Date: Thu, 11 Mar 2021 19:08:09 +0100
Subject: [PATCH 339/441] Copy custom dovecot config on Debian 6+ sytems
 (#6096)

---
 install/dist/lib/debian60.lib.php | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php
index 154c6b99c4..d76a45c2d3 100644
--- a/install/dist/lib/debian60.lib.php
+++ b/install/dist/lib/debian60.lib.php
@@ -33,7 +33,7 @@ class installer extends installer_base {
 	public function configure_dovecot()
 	{
 		global $conf;
-	
+
 		$virtual_transport = 'dovecot';
 
 		$configure_lmtp = false;
@@ -48,7 +48,7 @@ class installer extends installer_base {
 			$tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']);
 			$ini_array = ini_to_array(stripslashes($tmp['config']));
 			// ini_array needs not to be checked, because already done in update.php -> updateDbAndIni()
-			
+
 			if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
 				$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
 				$configure_lmtp = true;
@@ -108,6 +108,10 @@ class installer extends installer_base {
 			} else {
 				copy('tpl/debian6_dovecot2.conf.master', $config_dir.'/'.$configfile);
 			}
+			// Copy custom config file
+			if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master')) {
+				copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master', $config_dir.'/conf.d/99-ispconfig-custom-config.conf');
+			}
 			replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
 			replaceLine($config_dir.'/'.$configfile, 'postmaster_address = webmaster@localhost', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
 			if(version_compare($dovecot_version,2.1) < 0) {
@@ -123,7 +127,7 @@ class installer extends installer_base {
 			if(version_compare($dovecot_version,2.3) >= 0) {
 				// Remove deprecated setting(s)
 				removeLine($config_dir.'/'.$configfile, 'ssl_protocols =');
-				
+
 				// Check if we have a dhparams file and if not, create it
 				if(!file_exists('/etc/dovecot/dh.pem')) {
 					swriteln('Creating new DHParams file, this takes several minutes. Do not interrupt the script.');
@@ -146,7 +150,7 @@ class installer extends installer_base {
 				$content = str_replace('#2.3+ ','',$content);
 				file_put_contents($config_dir.'/'.$configfile,$content);
 				unset($content);
-				
+
 			} else {
 				// remove settings which are not supported in Dovecot < 2.3
 				removeLine($config_dir.'/'.$configfile, 'ssl_min_protocol =');
@@ -159,7 +163,7 @@ class installer extends installer_base {
 				copy('tpl/debian6_dovecot.conf.master', $config_dir.'/'.$configfile);
 			}
 		}
-		
+
 		$dovecot_protocols = 'imap pop3';
 
 		//* dovecot-lmtpd
@@ -196,7 +200,7 @@ class installer extends installer_base {
 		chmod($config_dir.'/'.$configfile, 0600);
 		chown($config_dir.'/'.$configfile, 'root');
 		chgrp($config_dir.'/'.$configfile, 'root');
-		
+
 		// Dovecot shall ignore mounts in website directory
 		if(is_installed('doveadm')) exec("doveadm mount add '/var/www/*' ignore > /dev/null 2> /dev/null");
 
-- 
GitLab


From 581bb48b2d7e3adba2444ac0611381f47620023b Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@amsterdamtech.nl>
Date: Thu, 11 Mar 2021 19:10:41 +0100
Subject: [PATCH 340/441] Add trailing space so line is removed when parsing
 the config

---
 install/tpl/debian6_dovecot2.conf.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/tpl/debian6_dovecot2.conf.master b/install/tpl/debian6_dovecot2.conf.master
index 91d745bc39..7aae62db40 100644
--- a/install/tpl/debian6_dovecot2.conf.master
+++ b/install/tpl/debian6_dovecot2.conf.master
@@ -91,7 +91,7 @@ protocol lmtp {
 #2.3+         group = vmail
 #2.3+         mode = 0660
 #2.3+     }
-#2.3+
+#2.3+ 
 #2.3+     unix_listener stats-writer {
 #2.3+         user = vmail
 #2.3+         group = vmail
-- 
GitLab


From 1429c8f385eef85340717f8d83eefbc6a0352b84 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 11 Mar 2021 22:20:06 +0100
Subject: [PATCH 341/441] - remove collection entries

---
 .../sql/incremental/upd_dev_collection.sql    | 25 -------------------
 1 file changed, 25 deletions(-)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 71efb3085e..e69de29bb2 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1,25 +0,0 @@
-ALTER TABLE `remote_user` MODIFY `remote_password` VARCHAR(200) NOT NULL DEFAULT '';
-
-ALTER TABLE `client` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
-ALTER TABLE `client_template` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
-
-ALTER TABLE mail_access DROP CONSTRAINT `server_id`;
-SET SESSION old_alter_table=1;
-ALTER IGNORE TABLE mail_access ADD UNIQUE KEY `unique_source` (`server_id`,`source`,`type`);
-SET SESSION old_alter_table=0;
-
-ALTER TABLE mail_domain ADD COLUMN `relay_host` varchar(255) NOT NULL default '' AFTER `dkim_public`,
-  ADD COLUMN `relay_user` varchar(255) NOT NULL default '' AFTER `relay_host`,
-  ADD COLUMN `relay_pass` varchar(255) NOT NULL default '' AFTER `relay_user`;
--- Purge apps & addons installer (#5795)
-DROP TABLE 'software_package';
-DROP TABLE 'software_repo';
-DROP TABLE 'software_update';
-DROP TABLE 'software_update_inst';
-
--- Brexit
-UPDATE `country` SET `eu` = 'n' WHERE `iso` = 'GB';
-
--- Add limit for per domain relaying
-ALTER TABLE `client` ADD `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_spamfilter_policy`;
-ALTER TABLE `client_template` ADD `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_spamfilter_policy`;
-- 
GitLab


From 908f26b5749c021f191f577a100558bedcf38aec Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 12 Mar 2021 16:09:34 +0000
Subject: [PATCH 342/441] Resolve "standard_index.html is not in DirectoryIndex
 list"

---
 install/tpl/apache_ispconfig.conf.master | 3 +++
 server/conf/apache_ispconfig.conf.master | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master
index 2a7ac0662e..c968abf367 100644
--- a/install/tpl/apache_ispconfig.conf.master
+++ b/install/tpl/apache_ispconfig.conf.master
@@ -1,3 +1,6 @@
+# Important: A copy of this file exists in server/conf/ folder.
+# Edit both files when applying changes.
+
 ################################################
 # ISPConfig General Apache Options
 ################################################
diff --git a/server/conf/apache_ispconfig.conf.master b/server/conf/apache_ispconfig.conf.master
index b1de2a1676..2b6038c54a 100644
--- a/server/conf/apache_ispconfig.conf.master
+++ b/server/conf/apache_ispconfig.conf.master
@@ -1,8 +1,12 @@
+# Important: A copy of this file exists in install/tpl/ folder.
+# Edit both files when applying changes.
+
 ################################################
 # ISPConfig General Apache Options
 ################################################
 ServerTokens ProductOnly
 ServerSignature Off
+DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm standard_index.html
 
 ################################################
 # ISPConfig Logfile configuration for vlogger
-- 
GitLab


From c95537e7e991a4ef559a83d051c3f50cf1a30f53 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@amsterdamtech.nl>
Date: Sat, 13 Mar 2021 08:51:00 +0100
Subject: [PATCH 343/441] Remove broken function (#6103)

---
 .../software_update_plugin.inc.php            | 227 ------------------
 1 file changed, 227 deletions(-)

diff --git a/server/plugins-available/software_update_plugin.inc.php b/server/plugins-available/software_update_plugin.inc.php
index 211951685d..18db6dffac 100644
--- a/server/plugins-available/software_update_plugin.inc.php
+++ b/server/plugins-available/software_update_plugin.inc.php
@@ -39,243 +39,16 @@ class software_update_plugin {
 		global $conf;
 
 		return true;
-
 	}
 
-
 	/*
 	 	This function is called when the plugin is loaded
 	*/
 
 	public function onLoad() {
 		global $app;
-
-		/*
-		Register for the events
-		*/
-
-		$app->plugins->registerEvent('software_update_inst_insert', $this->plugin_name, 'process');
-		//$app->plugins->registerEvent('software_update_inst_update',$this->plugin_name,'process');
-		//$app->plugins->registerEvent('software_update_inst_delete',$this->plugin_name,'process');
-
 		//* Register for actions
 		$app->plugins->registerAction('os_update', $this->plugin_name, 'os_update');
-
-
-	}
-
-	private function set_install_status($inst_id, $status) {
-		global $app;
-
-		$app->db->query("UPDATE software_update_inst SET status = ? WHERE software_update_inst_id = ?", $status, $inst_id);
-		$app->dbmaster->query("UPDATE software_update_inst SET status = ? WHERE software_update_inst_id = ?", $status, $inst_id);
-	}
-
-	public function process($event_name, $data) {
-		global $app, $conf;
-
-		//* Get the info of the package:
-		$software_update_id = intval($data["new"]["software_update_id"]);
-		$software_update = $app->db->queryOneRecord("SELECT * FROM software_update WHERE software_update_id = ?", $software_update_id);
-		$software_package = $app->db->queryOneRecord("SELECT * FROM software_package WHERE package_name = ?", $software_update['package_name']);
-
-		if($software_package['package_type'] == 'ispconfig' && !$conf['software_updates_enabled'] == true) {
-			$app->log('Software Updates not enabled on this server. To enable updates, set $conf["software_updates_enabled"] = true; in config.inc.php', LOGLEVEL_WARN);
-			$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-			return false;
-		}
-
-		$installuser = '';
-		if($software_package['package_type'] == 'ispconfig') {
-			$installuser = '';
-		} elseif ($software_package['package_type'] == 'app') {
-			$installuser = 'ispapps';
-		} else {
-			$app->log('package_type not supported', LOGLEVEL_WARN);
-			$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-			return false;
-		}
-
-		$temp_dir = '/tmp/'.md5(uniqid(rand()));
-		$app->log("The temp dir is $temp_dir", LOGLEVEL_DEBUG);
-		mkdir($temp_dir);
-		if($installuser != '') chown($temp_dir, $installuser);
-
-		if(!is_dir($temp_dir)) {
-			$app->log("Unable to create temp directory.", LOGLEVEL_WARN);
-			$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-			return false;
-		}
-
-		//* Replace placeholders in download URL
-		$software_update["update_url"] = str_replace('{key}', $software_package['package_key'], $software_update["update_url"]);
-
-		//* Download the update package
-		if($installuser == '') {
-			$cmd = "cd ? && wget ?";
-			$app->system->exec_safe($cmd, $temp_dir, $software_update["update_url"]);
-		} else {
-			$cmd = "cd $temp_dir && wget ".$software_update["update_url"];
-			$app->system->exec_safe("su -c ? ?", $cmd, $installuser);
-		}
-		$app->log("Downloading the update file from: ".$software_update["update_url"], LOGLEVEL_DEBUG);
-
-		//$url_parts = parse_url($software_update["update_url"]);
-		//$update_filename = basename($url_parts["path"]);
-		//* Find the name of the zip file which contains the app.
-		$tmp_dir_handle = dir($temp_dir);
-		$update_filename = '';
-		while (false !== ($t = $tmp_dir_handle->read())) {
-			if($t != '.' && $t != '..' && is_file($temp_dir.'/'.$t) && substr($t, -4) == '.zip') {
-				$update_filename = $t;
-			}
-		}
-		$tmp_dir_handle->close();
-		unset($tmp_dir_handle);
-		unset($t);
-
-		if($update_filename == '') {
-			$app->log("No package file found. Download failed? Installation aborted.", LOGLEVEL_WARN);
-			$app->system->exec_safe("rm -rf ?", $temp_dir);
-			$app->log("Deleting the temp directory $temp_dir", LOGLEVEL_DEBUG);
-			$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-			return false;
-		}
-
-		$app->log("The update filename is $update_filename", LOGLEVEL_DEBUG);
-
-		if(is_file($temp_dir.'/'.$update_filename)) {
-
-			//* Checking the md5sum
-			if(md5_file($temp_dir.'/'.$update_filename) != $software_update["update_md5"]) {
-				$app->log("The md5 sum of the downloaded file is incorrect. Update aborted.", LOGLEVEL_WARN);
-				$app->system->exec_safe("rm -rf ", $temp_dir);
-				$app->log("Deleting the temp directory $temp_dir", LOGLEVEL_DEBUG);
-				$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-				return false;
-			} else {
-				$app->log("MD5 checksum of the downloaded file verified.", LOGLEVEL_DEBUG);
-			}
-
-
-			//* unpacking the update
-			
-			if($installuser == '') {
-				$cmd = "cd ? && unzip ?";
-				$app->system->exec_safe($cmd, $temp_dir, $update_filename);
-			} else {
-				$cmd = "cd $temp_dir && unzip $update_filename";
-				$app->system->exec_safe("su -c ? ?", $cmd, $installuser);
-			}
-
-			//* Create a database, if the package requires one
-			if($software_package['package_type'] == 'app' && $software_package['package_requires_db'] == 'mysql') {
-
-				$app->uses('ini_parser');
-				$package_config = $app->ini_parser->parse_ini_string(stripslashes($software_package['package_config']));
-
-				$this->create_app_db($package_config['mysql']);
-				$app->log("Creating the app DB.", LOGLEVEL_DEBUG);
-
-				//* Load the sql dump into the database
-				if(is_file($temp_dir.'/setup.sql')) {
-					$db_config = $package_config['mysql'];
-					if( $db_config['database_user'] != '' &&
-						$db_config['database_password'] != '' &&
-						$db_config['database_name'] != '' &&
-						$db_config['database_host'] != '') {
-						$app->system->exec_safe("mysql --default-character-set=utf8 --force -h ? -u ? ? < ?", $db_config['database_host'], $db_config['database_user'], $db_config['database_name'], $temp_dir.'/setup.sql');
-						$app->log("Loading setup.sql dump into the app db.", LOGLEVEL_DEBUG);
-					}
-				}
-
-			}
-
-			//* Save the package config file as app.ini
-			if($software_package['package_config'] != '') {
-				file_put_contents($temp_dir.'/app.ini', $software_package['package_config']);
-				$app->log("Writing ".$temp_dir.'/app.ini', LOGLEVEL_DEBUG);
-			}
-
-			if(is_file($temp_dir.'/setup.sh')) {
-				// Execute the setup script
-				$app->system->exec_safe('chmod +x ?', $temp_dir.'/setup.sh');
-				$app->log("Executing setup.sh file in directory $temp_dir", LOGLEVEL_DEBUG);
-				
-				if($installuser == '') {
-					$cmd = 'cd ? && ./setup.sh > package_install.log';
-					$app->system->exec_safe($cmd, $temp_dir);
-				} else {
-					$cmd = 'cd '.$temp_dir.' && ./setup.sh > package_install.log';
-					$app->system->exec_safe("su -c ? ?", $cmd, $installuser);
-				}
-
-				$log_data = @file_get_contents("{$temp_dir}/package_install.log");
-				if(preg_match("'.*\[OK\]\s*$'is", $log_data)) {
-					$app->log("Installation successful", LOGLEVEL_DEBUG);
-					$app->log($log_data, LOGLEVEL_DEBUG);
-					$this->set_install_status($data["new"]["software_update_inst_id"], "installed");
-				} else {
-					$app->log("Installation failed:\n\n" . $log_data, LOGLEVEL_WARN);
-					$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-				}
-			} else {
-				$app->log("setup.sh file not found", LOGLEVEL_ERROR);
-				$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-			}
-		} else {
-			$app->log("Download of the update file failed", LOGLEVEL_WARN);
-			$this->set_install_status($data["new"]["software_update_inst_id"], "failed");
-		}
-
-		if($temp_dir != '' && $temp_dir != '/') $app->system->exec_safe("rm -rf ?", $temp_dir);
-		$app->log("Deleting the temp directory $temp_dir", LOGLEVEL_DEBUG);
-	}
-
-	private function create_app_db($db_config) {
-		global $app, $conf;
-
-		if( $db_config['database_user'] != '' &&
-			$db_config['database_password'] != '' &&
-			$db_config['database_name'] != '' &&
-			$db_config['database_host'] != '') {
-
-			if(!include ISPC_LIB_PATH.'/mysql_clientdb.conf') {
-				$app->log('Unable to open'.ISPC_LIB_PATH.'/mysql_clientdb.conf', LOGLEVEL_ERROR);
-				return;
-			}
-
-			if($db_config['database_user'] == 'root') {
-				$app->log('User root not allowed for App databases', LOGLEVEL_WARNING);
-				return;
-			}
-
-			//* Connect to the database
-			$link = mysqli_connect($clientdb_host, $clientdb_user, $clientdb_password);
-			if (!$link) {
-				$app->log('Unable to connect to the database'.mysqli_connect_error(), LOGLEVEL_ERROR);
-				return;
-			}
-
-			$query_charset_table = '';
-
-			//* Create the new database
-			if (mysqli_query($link,'CREATE DATABASE '.mysqli_real_escape_string($link, $db_config['database_name']).$query_charset_table, $link)) {
-				$app->log('Created MySQL database: '.$db_config['database_name'], LOGLEVEL_DEBUG);
-			} else {
-				$app->log('Unable to connect to the database'.mysqli_error($link), LOGLEVEL_ERROR);
-			}
-
-			if(mysqli_query("GRANT ALL ON ".mysqli_real_escape_string($link, $db_config['database_name']).".* TO '".mysqli_real_escape_string($link, $db_config['database_user'])."'@'".$db_config['database_host']."' IDENTIFIED BY '".mysqli_real_escape_string($link, $db_config['database_password'])."';", $link)) {
-				$app->log('Created MySQL user: '.$db_config['database_user'], LOGLEVEL_DEBUG);
-			} else {
-				$app->log('Unable to create database user'.$db_config['database_user'].' '.mysqli_error($link), LOGLEVEL_ERROR);
-			}
-
-			mysqli_close($link);
-
-		}
-
 	}
 
 	//* Operating system update
-- 
GitLab


From eed63b31712824f34ba681a1a1c70aac161014af Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@amsterdamtech.nl>
Date: Sat, 13 Mar 2021 09:14:47 +0100
Subject: [PATCH 344/441] Add check if conf.d folder for Dovecot exists

---
 install/dist/lib/debian60.lib.php  | 3 +++
 install/lib/installer_base.lib.php | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php
index d76a45c2d3..981e6cff92 100644
--- a/install/dist/lib/debian60.lib.php
+++ b/install/dist/lib/debian60.lib.php
@@ -110,6 +110,9 @@ class installer extends installer_base {
 			}
 			// Copy custom config file
 			if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master')) {
+				if(!@is_dir($config_dir . '/conf.d')) {
+					mkdir($config_dir . '/conf.d');
+				}
 				copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master', $config_dir.'/conf.d/99-ispconfig-custom-config.conf');
 			}
 			replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 6de768f7e5..5617826313 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1536,6 +1536,9 @@ class installer_base {
 			}
 			// Copy custom config file
 			if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master')) {
+				if(!@is_dir($config_dir . '/conf.d')) {
+					mkdir($config_dir . '/conf.d');
+				}
 				copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master', $config_dir.'/conf.d/99-ispconfig-custom-config.conf');
 			}
 			replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
-- 
GitLab


From a219f2cdf8d814996d9b5f5c9fa98c797ff358d5 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sat, 13 Mar 2021 19:21:43 +0000
Subject: [PATCH 345/441] Update .gitlab/issue_templates/Bug.md

---
 .gitlab/issue_templates/Bug.md | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/.gitlab/issue_templates/Bug.md b/.gitlab/issue_templates/Bug.md
index 751016f70a..6496339845 100644
--- a/.gitlab/issue_templates/Bug.md
+++ b/.gitlab/issue_templates/Bug.md
@@ -1,16 +1,25 @@
+<!-- Before creating a bug report, please:
+- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
+- Do not ask support questions here. If you are unsure if your problem is a bug, post a thread on the forum: https://www.howtoforge.com/community/#ispconfig-3.23
+- Make sure to remove any content from the description that you did not add. For example, if there are no related log entries, remove the whole "Related log entries" part.
+-->
+
 ## short description
 What is happening and what is wrong with that?
 
+## steps to reproduce
+1. [First step]
+2. [Second step]
+3. [and so on...]
+
 ## correct behaviour
 What should happen instead?
 
 ## environment
-Server OS: (debian/ubuntu/centos/...)  
-Server OS version: (wheezy/trusty/centos6/...)
-ISPConfig version: (3.0.5.4/3.1.5/3.1dev/...)
+Server OS + version: (Debian 10/Ubuntu 20.04 /CentOS 8/...)  
+ISPConfig version: (3.1.15p3/3.2.3/3.2dev/...)
 _you can use `grep 'ISPC_APP_VERSION' /usr/local/ispconfig/server/lib/config.inc.php` to get it from the command line_
-
-If it might be related to the problem  
+Software version of the related software:
 ```
 insert the output of `nginx -v` or `apachectl -v` here
 ```
@@ -24,18 +33,15 @@ if you want to post code snippets, please use
 ```  
 your code  
 ```
-or attach a code file. Best is to create a merge request of course.  
+or attach a code file. Best is to create a merge request of course.
 
 ## references
-if you know of related bugs or feature requests, please reference them by using `#<bugnumber>`, e. g. #123  
-if you have done a merge request already, please reference it by using `!<mergenumber>`, e. g. !12  
+if you know of related bugs or feature requests, please reference them by using `#<issuenumber>`, e. g. #6105
+if you have done a merge request already, please reference it by using `!<mergenumber>`, e. g. !1444 
 if you know of a forum post on howtoforge.com that deals with this topic, just add the link to the forum topic here
 
 ## screenshots
 optional, of course.  
 Add screenshots of the problem by clicking "Attach a file" on the bottom right.
 
-## log entries
-```
-apache / nginx error.log lines (if related)
-```
\ No newline at end of file
+## Related log entries
-- 
GitLab


From 5d091e6b71d16f2b19abaf30f17117b79ba733f5 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sat, 13 Mar 2021 20:14:13 +0000
Subject: [PATCH 346/441] Update .gitlab/issue_templates/Bug.md

---
 .gitlab/issue_templates/Bug.md | 30 ++++++++++++++----------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/.gitlab/issue_templates/Bug.md b/.gitlab/issue_templates/Bug.md
index 6496339845..d86285d53d 100644
--- a/.gitlab/issue_templates/Bug.md
+++ b/.gitlab/issue_templates/Bug.md
@@ -4,43 +4,41 @@
 - Make sure to remove any content from the description that you did not add. For example, if there are no related log entries, remove the whole "Related log entries" part.
 -->
 
-## short description
-What is happening and what is wrong with that?
+## Summary
+<!-- What is happening and what is wrong with that? -->
 
-## steps to reproduce
+## Steps to reproduce
 1. [First step]
 2. [Second step]
 3. [and so on...]
 
-## correct behaviour
-What should happen instead?
+## Correct behaviour
+<!-- What should happen instead? -->
 
-## environment
-Server OS + version: (Debian 10/Ubuntu 20.04 /CentOS 8/...)  
+## Environment
+Server OS + version: (Debian 10/Ubuntu 20.04/CentOS 8/...) \
 ISPConfig version: (3.1.15p3/3.2.3/3.2dev/...)
-_you can use `grep 'ISPC_APP_VERSION' /usr/local/ispconfig/server/lib/config.inc.php` to get it from the command line_
+<!-- _you can use `grep 'ISPC_APP_VERSION' /usr/local/ispconfig/server/lib/config.inc.php` to get it from the command line_ -->
 Software version of the related software:
+<!-- You can use 'nginx -v' or 'apachectl -v' to find the webserver version. Use 'php -v' to find the PHP version.> Put this in code blocks, like so: -->
 ```
-insert the output of `nginx -v` or `apachectl -v` here
-```
-```
-insert the output of `php -v` here
+Output of the command
 ```
 
-## proposed fix
+## Proposed fix
 optional, of course.  
-if you want to post code snippets, please use  
+if you want to post code snippets, please use
 ```  
 your code  
 ```
 or attach a code file. Best is to create a merge request of course.
 
-## references
+## References
 if you know of related bugs or feature requests, please reference them by using `#<issuenumber>`, e. g. #6105
 if you have done a merge request already, please reference it by using `!<mergenumber>`, e. g. !1444 
 if you know of a forum post on howtoforge.com that deals with this topic, just add the link to the forum topic here
 
-## screenshots
+## Screenshots
 optional, of course.  
 Add screenshots of the problem by clicking "Attach a file" on the bottom right.
 
-- 
GitLab


From b04c0927bb46f1b23b699aa94dd197adec4dce41 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 15 Mar 2021 12:36:43 -0600
Subject: [PATCH 347/441] fix rspamd whitelist template names

---
 install/lib/installer_base.lib.php                        | 8 ++++----
 ...t.inc.master => rspamd_dkim_whitelist.inc.ispc.master} | 0
 ....inc.master => rspamd_dmarc_whitelist.inc.ispc.master} | 0
 ...c.master => rspamd_spf_dkim_whitelist.inc.ispc.master} | 0
 ...st.inc.master => rspamd_spf_whitelist.inc.ispc.master} | 0
 5 files changed, 4 insertions(+), 4 deletions(-)
 rename install/tpl/{rspamd_dkim_whitelist.inc.master => rspamd_dkim_whitelist.inc.ispc.master} (100%)
 rename install/tpl/{rspamd_dmarc_whitelist.inc.master => rspamd_dmarc_whitelist.inc.ispc.master} (100%)
 rename install/tpl/{rspamd_spf_dkim_whitelist.inc.master => rspamd_spf_dkim_whitelist.inc.ispc.master} (100%)
 rename install/tpl/{rspamd_spf_whitelist.inc.master => rspamd_spf_whitelist.inc.ispc.master} (100%)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 6de768f7e5..768ff43363 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1881,10 +1881,10 @@ class installer_base {
 
 		# local.d/maps.d templates without template tags
 		$maps_d = array(
-			'dkim_whitelist.inc',
-			'dmarc_whitelist.inc',
-			'spf_dkim_whitelist.inc',
-			'spf_whitelist.inc',
+			'dkim_whitelist.inc.ispc',
+			'dmarc_whitelist.inc.ispc',
+			'spf_dkim_whitelist.inc.ispc',
+			'spf_whitelist.inc.ispc',
 		);
 		foreach ($maps_d as $f) {
 			if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
diff --git a/install/tpl/rspamd_dkim_whitelist.inc.master b/install/tpl/rspamd_dkim_whitelist.inc.ispc.master
similarity index 100%
rename from install/tpl/rspamd_dkim_whitelist.inc.master
rename to install/tpl/rspamd_dkim_whitelist.inc.ispc.master
diff --git a/install/tpl/rspamd_dmarc_whitelist.inc.master b/install/tpl/rspamd_dmarc_whitelist.inc.ispc.master
similarity index 100%
rename from install/tpl/rspamd_dmarc_whitelist.inc.master
rename to install/tpl/rspamd_dmarc_whitelist.inc.ispc.master
diff --git a/install/tpl/rspamd_spf_dkim_whitelist.inc.master b/install/tpl/rspamd_spf_dkim_whitelist.inc.ispc.master
similarity index 100%
rename from install/tpl/rspamd_spf_dkim_whitelist.inc.master
rename to install/tpl/rspamd_spf_dkim_whitelist.inc.ispc.master
diff --git a/install/tpl/rspamd_spf_whitelist.inc.master b/install/tpl/rspamd_spf_whitelist.inc.ispc.master
similarity index 100%
rename from install/tpl/rspamd_spf_whitelist.inc.master
rename to install/tpl/rspamd_spf_whitelist.inc.ispc.master
-- 
GitLab


From 076722f40c0e4e876af0149c498aa0ce983506fb Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 15 Mar 2021 12:54:27 -0600
Subject: [PATCH 348/441] missing slash: #6106

---
 install/lib/installer_base.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 6de768f7e5..a82418e504 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2772,7 +2772,7 @@ class installer_base {
 		if(@is_link($vhost_conf_enabled_dir.'/' . $use_symlink)) {
 			unlink($vhost_conf_enabled_dir.'/' . $use_symlink);
 		}
-		if(!@is_link($vhost_conf_enabled_dir.'' . $use_symlink)) {
+		if(!@is_link($vhost_conf_enabled_dir.'/' . $use_symlink)) {
 			symlink($vhost_conf_dir.'/' . $use_name, $vhost_conf_enabled_dir.'/' . $use_symlink);
 		}
 	}
-- 
GitLab


From f9325281311aadc184d6014d789673c6d24e620d Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 15 Mar 2021 13:25:12 -0600
Subject: [PATCH 349/441] installer: fix powerdns GRANT query

---
 install/lib/installer_base.lib.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 6de768f7e5..31697cfe17 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2036,8 +2036,8 @@ class installer_base {
 		}
 
 		//* Create the ISPConfig database user in the local database
-		$query = "GRANT ALL ON ?? TO ?@'localhost'";
-		if(!$this->db->query($query, $conf['powerdns']['database'] . '.*', $conf['mysql']['ispconfig_user'])) {
+		$query = "GRANT ALL ON ??.* TO ?@?";
+		if(!$this->db->query($query, $conf['powerdns']['database'], $conf['mysql']['ispconfig_user'], 'localhost')) {
 			$this->error('Unable to create user for powerdns database Error: '.$this->db->errorMessage);
 		}
 
-- 
GitLab


From 234ea4d1605a12bf3787d1c0d7f4d12cd45cf0e0 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 16 Mar 2021 19:03:47 +0000
Subject: [PATCH 350/441] Clean up default jailkit sections/programs (remove
 duplication, utilize correct sections)

---
 install/tpl/server.ini.master | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master
index 028fb68a6b..7cca8c6720 100644
--- a/install/tpl/server.ini.master
+++ b/install/tpl/server.ini.master
@@ -144,9 +144,9 @@ fastcgi_config_syntax=2
 
 [jailkit]
 jailkit_chroot_home=/home/[username]
-jailkit_chroot_app_sections=basicshell editors extendedshell netutils ssh sftp scp groups jk_lsh
-jailkit_chroot_app_programs=/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico /usr/bin/mysql /usr/bin/mysqldump /usr/bin/git /usr/bin/git-receive-pack /usr/bin/git-upload-pack /usr/bin/unzip /usr/bin/zip /bin/tar /bin/rm /usr/bin/patch /usr/bin/which /usr/lib/x86_64-linux-gnu/libmemcached.so.11 /usr/lib/x86_64-linux-gnu/libmemcachedutil.so.2 /usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.2 /opt/php-5.6.8/bin/php /opt/php-5.6.8/include /opt/php-5.6.8/lib
-jailkit_chroot_cron_programs=/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php
+jailkit_chroot_app_sections=coreutils basicshell editors extendedshell netutils ssh sftp scp jk_lsh mysql-client git
+jailkit_chroot_app_programs=lesspipe pico unzip zip patch which
+jailkit_chroot_cron_programs=/usr/bin/php /usr/lib/php/ /usr/share/php/ /usr/share/zoneinfo/ /usr/bin/perl /usr/share/perl/
 jailkit_chroot_authorized_keys_template=/root/.ssh/authorized_keys
 jailkit_hardlinks=allow
 
-- 
GitLab


From caebfaca84caeb9b9c50ebf29c076f9d72235b76 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 16 Mar 2021 19:08:41 +0000
Subject: [PATCH 351/441] Default to strong dkim.

---
 install/tpl/server.ini.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master
index 028fb68a6b..4732a85254 100644
--- a/install/tpl/server.ini.master
+++ b/install/tpl/server.ini.master
@@ -37,7 +37,7 @@ maildir_path=/var/vmail/[domain]/[localpart]
 homedir_path=/var/vmail
 maildir_format=maildir
 dkim_path=/var/lib/amavis/dkim
-dkim_strength=1024
+dkim_strength=4096
 content_filter=amavis
 rspamd_password=
 pop3_imap_daemon=courier
-- 
GitLab


From a12b68c92d0d1977d214f9bcc1f4290233ea7d21 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 16 Mar 2021 19:25:39 +0000
Subject: [PATCH 352/441] update default firewall port list

---
 interface/web/admin/form/firewall.tform.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/admin/form/firewall.tform.php b/interface/web/admin/form/firewall.tform.php
index eb7dcb3acf..90614bac55 100644
--- a/interface/web/admin/form/firewall.tform.php
+++ b/interface/web/admin/form/firewall.tform.php
@@ -79,7 +79,7 @@ $form["tabs"]['firewall'] = array (
 					'regex' => '/^$|\d{1,5}(?::\d{1,5})?(?:,\d{1,5}(?::\d{1,5})?)*$/',
 					'errmsg'=> 'tcp_ports_error_regex'),
 			),
-			'default' => '20,21,22,25,53,80,110,143,443,465,587,993,995,3306,8080,8081,10000',
+			'default' => '21,22,25,53,80,110,143,443,465,587,993,995,3306,4190,8080,8081,40110:40210',
 			'value'  => '',
 			'width'  => '30',
 			'maxlength' => '255'
@@ -91,7 +91,7 @@ $form["tabs"]['firewall'] = array (
 					'regex' => '/^$|\d{1,5}(?::\d{1,5})?(?:,\d{1,5}(?::\d{1,5})?)*$/',
 					'errmsg'=> 'udp_ports_error_regex'),
 			),
-			'default' => '53,3306',
+			'default' => '53',
 			'value'  => '',
 			'width'  => '30',
 			'maxlength' => '255'
-- 
GitLab


From 1cb3ba38c1df679f87661eb474edc6339d8b7c6f Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 17 Mar 2021 08:59:26 -0600
Subject: [PATCH 353/441] default dkim_strength=2048

---
 install/tpl/server.ini.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master
index 4732a85254..1fbadd8287 100644
--- a/install/tpl/server.ini.master
+++ b/install/tpl/server.ini.master
@@ -37,7 +37,7 @@ maildir_path=/var/vmail/[domain]/[localpart]
 homedir_path=/var/vmail
 maildir_format=maildir
 dkim_path=/var/lib/amavis/dkim
-dkim_strength=4096
+dkim_strength=2048
 content_filter=amavis
 rspamd_password=
 pop3_imap_daemon=courier
-- 
GitLab


From 4991d0e548e6ea481c1012579fda497627ae6d9f Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 17 Mar 2021 12:27:58 -0600
Subject: [PATCH 354/441] rspamd: fix user_settings_update loop

---
 server/plugins-available/rspamd_plugin.inc.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index 41f6b08f40..f3f6d97c8f 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -200,6 +200,8 @@ class rspamd_plugin {
 			$is_domain = true;
 		}
 
+		$app->log("rspamd: user_settings_update() for $type $email_address", LOGLEVEL_DEBUG);
+
 		if($settings_name == '') {
 			// missing settings file name
 			$app->log('Empty rspamd identifier in rspamd_plugin from identifier: ' . $use_data . '/' . $identifier, LOGLEVEL_WARN);
@@ -217,7 +219,7 @@ class rspamd_plugin {
 				$entries_to_update['mail_user'] = $mailusers;
 			}
 
-			$forwardings = $app->db->queryAllRecords("SELECT mf.* FROM mail_forwarding as mf LEFT JOIN spamfilter_users as su ON (su.email = mf.source) WHERE mf.source LIKE ? AND su.id IS NULL", '%' . $email_address);
+			$forwardings = $app->db->queryAllRecords("SELECT mf.* FROM mail_forwarding as mf LEFT JOIN spamfilter_users as su ON (su.email = mf.source) WHERE mf.source LIKE ? AND su.id IS NULL", '%_' . $email_address);
 			if(is_array($forwardings) && !empty($forwardings)) {
 				$entries_to_update['mail_forwarding'] = $forwardings;
 			}
-- 
GitLab


From d08b278d97a1a7761cf905b82a8190ccef63a18c Mon Sep 17 00:00:00 2001
From: Tommaso Basilici <t.basilici@19.coop>
Date: Thu, 18 Mar 2021 14:20:10 +0100
Subject: [PATCH 355/441] #4961 modified remote API client edit to include lock
 and cancel, functions moved from client_edit to functions

---
 interface/lib/classes/functions.inc.php       | 115 ++++++++++++++++
 interface/lib/classes/remote.d/client.inc.php |   9 ++
 interface/web/client/client_edit.php          | 127 ++----------------
 3 files changed, 134 insertions(+), 117 deletions(-)

diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index 4d4c011fb5..8b52cd35c0 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -528,6 +528,121 @@ class functions {
 		}
 	}
 
+        // Function to lock a client
+        public function func_client_lock($client_id,$locked) {
+
+                global $app;
+                $client_data = $app->db->queryOneRecord('SELECT `tmp_data` FROM `client` WHERE `client_id` = ?', $client_id);
+                if($client_data['tmp_data'] == '') $tmp_data = array();
+                else $tmp_data = unserialize($client_data['tmp_data']);
+                if(!is_array($tmp_data)) $tmp_data = array();
+                $to_disable = array('cron' => 'id',
+                        'ftp_user' => 'ftp_user_id',
+                        'mail_domain' => 'domain_id',
+                        'mail_user' => 'mailuser_id',
+                        'mail_user_smtp' => 'mailuser_id',
+                        'mail_forwarding' => 'forwarding_id',
+                        'mail_get' => 'mailget_id',
+                        'openvz_vm' => 'vm_id',
+                        'shell_user' => 'shell_user_id',
+                        'webdav_user' => 'webdav_user_id',
+                        'web_database' => 'database_id',
+                        'web_domain' => 'domain_id',
+                        'web_folder' => 'web_folder_id',
+                        'web_folder_user' => 'web_folder_user_id'
+                );
+
+                $udata = $app->db->queryOneRecord('SELECT `userid` FROM `sys_user` WHERE `client_id` = ?', $client_id);
+                $gdata = $app->db->queryOneRecord('SELECT `groupid` FROM `sys_group` WHERE `client_id` = ?', $client_id);
+                $sys_groupid = $gdata['groupid'];
+                $sys_userid = $udata['userid'];
+                if($locked == 'y') {
+                        $prev_active = array();
+                        $prev_sysuser = array();
+                        foreach($to_disable as $current => $keycolumn) {
+                                $active_col = 'active';
+                                $reverse = false;
+                                if($current == 'mail_user') {
+                                        $active_col = 'postfix';
+                                } elseif($current == 'mail_user_smtp') {
+                                        $current = 'mail_user';
+                                        $active_col = 'disablesmtp';
+                                        $reverse = true;
+                                }
+
+                                if(!isset($prev_active[$current])) $prev_active[$current] = array();
+                                if(!isset($prev_sysuser[$current])) $prev_sysuser[$current] = array();
+
+                                $entries = $app->db->queryAllRecords('SELECT ?? as `id`, `sys_userid`, ?? FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $active_col, $current, $sys_groupid);
+                                foreach($entries as $item) {
+
+                                        if($item[$active_col] != 'y' && $reverse == false) $prev_active[$current][$item['id']][$active_col] = 'n';
+                                        elseif($item[$active_col] == 'y' && $reverse == true) $prev_active[$current][$item['id']][$active_col] = 'y';
+                                        if($item['sys_userid'] != $sys_userid) $prev_sysuser[$current][$item['id']] = $item['sys_userid'];
+                                        // we don't have to store these if y, as everything without previous state gets enabled later
+
+                                        //$app->db->datalogUpdate($current, array($active_col => ($reverse == true ? 'y' : 'n'), 'sys_userid' => $_SESSION["s"]["user"]["userid"]), $keycolumn, $item['id']);
+                                        $app->db->datalogUpdate($current, array($active_col => ($reverse == true ? 'y' : 'n'), 'sys_userid' => $sys_userid), $keycolumn, $item['id']);
+                                }
+}
+
+                        $tmp_data['prev_active'] = $prev_active;
+                        $tmp_data['prev_sys_userid'] = $prev_sysuser;
+                        $app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $client_id);
+                        unset($prev_active);
+                        unset($prev_sysuser);
+                } elseif ($locked == 'n') {
+                        foreach($to_disable as $current => $keycolumn) {
+                                $active_col = 'active';
+                                $reverse = false;
+                                if($current == 'mail_user') {
+                                        $active_col = 'postfix';
+                                } elseif($current == 'mail_user_smtp') {
+                                        $current = 'mail_user';
+                                        $active_col = 'disablesmtp';
+                                        $reverse = true;
+                                }
+
+                                $entries = $app->db->queryAllRecords('SELECT ?? as `id` FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $current, $sys_groupid);
+                                foreach($entries as $item) {
+                                        $set_active = ($reverse == true ? 'n' : 'y');
+                                        $set_inactive = ($reverse == true ? 'y' : 'n');
+                                        $set_sysuser = $sys_userid;
+                                        if(array_key_exists('prev_active', $tmp_data) == true
+                                                && array_key_exists($current, $tmp_data['prev_active']) == true
+                                                && array_key_exists($item['id'], $tmp_data['prev_active'][$current]) == true
+                                                && $tmp_data['prev_active'][$current][$item['id']][$active_col] == $set_inactive) $set_active = $set_inactive;
+                                        if(array_key_exists('prev_sysuser', $tmp_data) == true
+                                                && array_key_exists($current, $tmp_data['prev_sysuser']) == true
+                                                && array_key_exists($item['id'], $tmp_data['prev_sysuser'][$current]) == true
+                                                && $tmp_data['prev_sysuser'][$current][$item['id']] != $sys_userid) $set_sysuser = $tmp_data['prev_sysuser'][$current][$item['id']];
+
+                                        $app->db->datalogUpdate($current, array($active_col => $set_active, 'sys_userid' => $set_sysuser), $keycolumn, $item['id']);
+                                }
+                        }
+                        if(array_key_exists('prev_active', $tmp_data)) unset($tmp_data['prev_active']);
+                        $app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $client_id);
+                }
+                unset($tmp_data);
+                unset($entries);
+                unset($to_disable);
+
+        }
+        // Function to cancel disable/enable a client
+        public function func_client_cancel($client_id,$cancel) {
+                global $app;
+                if ($cancel == 'y') {
+                        $sql = "UPDATE sys_user SET active = '0' WHERE client_id = ?";
+                        $result = $app->db->query($sql, $client_id);
+                } elseif($cancel == 'n') {
+                        $sql = "UPDATE sys_user SET active = '1' WHERE client_id = ?";
+                        $result = $app->db->query($sql, $client_id);
+                } else {
+                        $result = FALSE;
+                }
+                return $result;
+        }	
+
 }
 
 ?>
diff --git a/interface/lib/classes/remote.d/client.inc.php b/interface/lib/classes/remote.d/client.inc.php
index 57412e5e19..fa20802b7d 100644
--- a/interface/lib/classes/remote.d/client.inc.php
+++ b/interface/lib/classes/remote.d/client.inc.php
@@ -243,6 +243,15 @@ class remoting_client extends remoting {
 		$affected_rows = $this->updateQuery('../client/form/' . (isset($params['limit_client']) && $params['limit_client'] != 0 ? 'reseller' : 'client') . '.tform.php', $reseller_id, $client_id, $params, 'client:' . ($reseller_id ? 'reseller' : 'client') . ':on_after_update');
 
 		$app->remoting_lib->ispconfig_sysuser_update($params, $client_id);
+		
+		// if canceled
+                if ($params['canceled']) {
+                        $result = functions::func_client_cancel($client_id, $params['canceled']);
+                }
+                // if locked
+                if ($params['locked']) {
+                        $result = functions::func_client_lock($client_id, $params['locked']);
+		}
 
 		return $affected_rows;
 	}
diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index 3d2e4e805d..9bd114daad 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -425,123 +425,16 @@ class page_action extends tform_actions {
 			$app->db->query($sql, $password, $client_id);
 		}
 
-		if(!isset($this->dataRecord['locked'])) $this->dataRecord['locked'] = 'n';
-		if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["locked"] != $this->oldDataRecord['locked']) {
-			/** lock all the things like web, mail etc. - easy to extend */
-
-
-			// get tmp_data of client
-			$client_data = $app->db->queryOneRecord('SELECT `tmp_data` FROM `client` WHERE `client_id` = ?', $this->id);
-
-			if($client_data['tmp_data'] == '') $tmp_data = array();
-			else $tmp_data = unserialize($client_data['tmp_data']);
-
-			if(!is_array($tmp_data)) $tmp_data = array();
-
-			// database tables with their primary key columns
-			$to_disable = array('cron' => 'id',
-				'ftp_user' => 'ftp_user_id',
-				'mail_domain' => 'domain_id',
-				'mail_user' => 'mailuser_id',
-				'mail_user_smtp' => 'mailuser_id',
-				'mail_forwarding' => 'forwarding_id',
-				'mail_get' => 'mailget_id',
-				'openvz_vm' => 'vm_id',
-				'shell_user' => 'shell_user_id',
-				'webdav_user' => 'webdav_user_id',
-				'web_database' => 'database_id',
-				'web_domain' => 'domain_id',
-				'web_folder' => 'web_folder_id',
-				'web_folder_user' => 'web_folder_user_id'
-			);
-
-			$udata = $app->db->queryOneRecord('SELECT `userid` FROM `sys_user` WHERE `client_id` = ?', $this->id);
-			$gdata = $app->db->queryOneRecord('SELECT `groupid` FROM `sys_group` WHERE `client_id` = ?', $this->id);
-			$sys_groupid = $gdata['groupid'];
-			$sys_userid = $udata['userid'];
-
-			$entries = array();
-			if($this->dataRecord['locked'] == 'y') {
-				$prev_active = array();
-				$prev_sysuser = array();
-				foreach($to_disable as $current => $keycolumn) {
-					$active_col = 'active';
-					$reverse = false;
-					if($current == 'mail_user') {
-						$active_col = 'postfix';
-					} elseif($current == 'mail_user_smtp') {
-						$current = 'mail_user';
-						$active_col = 'disablesmtp';
-						$reverse = true;
-					}
-
-					if(!isset($prev_active[$current])) $prev_active[$current] = array();
-					if(!isset($prev_sysuser[$current])) $prev_sysuser[$current] = array();
-
-					$entries = $app->db->queryAllRecords('SELECT ?? as `id`, `sys_userid`, ?? FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $active_col, $current, $sys_groupid);
-					foreach($entries as $item) {
-
-						if($item[$active_col] != 'y' && $reverse == false) $prev_active[$current][$item['id']][$active_col] = 'n';
-						elseif($item[$active_col] == 'y' && $reverse == true) $prev_active[$current][$item['id']][$active_col] = 'y';
-						if($item['sys_userid'] != $sys_userid) $prev_sysuser[$current][$item['id']] = $item['sys_userid'];
-						// we don't have to store these if y, as everything without previous state gets enabled later
-
-						$app->db->datalogUpdate($current, array($active_col => ($reverse == true ? 'y' : 'n'), 'sys_userid' => $_SESSION["s"]["user"]["userid"]), $keycolumn, $item['id']);
-					}
-				}
-
-				$tmp_data['prev_active'] = $prev_active;
-				$tmp_data['prev_sys_userid'] = $prev_sysuser;
-				$app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $this->id);
-				unset($prev_active);
-				unset($prev_sysuser);
-			} elseif($this->dataRecord['locked'] == 'n') {
-				foreach($to_disable as $current => $keycolumn) {
-					$active_col = 'active';
-					$reverse = false;
-					if($current == 'mail_user') {
-						$active_col = 'postfix';
-					} elseif($current == 'mail_user_smtp') {
-						$current = 'mail_user';
-						$active_col = 'disablesmtp';
-						$reverse = true;
-					}
-
-					$entries = $app->db->queryAllRecords('SELECT ?? as `id` FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $current, $sys_groupid);
-					foreach($entries as $item) {
-						$set_active = ($reverse == true ? 'n' : 'y');
-						$set_inactive = ($reverse == true ? 'y' : 'n');
-						$set_sysuser = $sys_userid;
-						if(array_key_exists('prev_active', $tmp_data) == true
-							&& array_key_exists($current, $tmp_data['prev_active']) == true
-							&& array_key_exists($item['id'], $tmp_data['prev_active'][$current]) == true
-							&& $tmp_data['prev_active'][$current][$item['id']][$active_col] == $set_inactive) $set_active = $set_inactive;
-						if(array_key_exists('prev_sysuser', $tmp_data) == true
-							&& array_key_exists($current, $tmp_data['prev_sysuser']) == true
-							&& array_key_exists($item['id'], $tmp_data['prev_sysuser'][$current]) == true
-							&& $tmp_data['prev_sysuser'][$current][$item['id']] != $sys_userid) $set_sysuser = $tmp_data['prev_sysuser'][$current][$item['id']];
-
-						$app->db->datalogUpdate($current, array($active_col => $set_active, 'sys_userid' => $set_sysuser), $keycolumn, $item['id']);
-					}
-				}
-				if(array_key_exists('prev_active', $tmp_data)) unset($tmp_data['prev_active']);
-				$app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $this->id);
-			}
-			unset($tmp_data);
-			unset($entries);
-			unset($to_disable);
-		}
-
-		if(!isset($this->dataRecord['canceled'])) $this->dataRecord['canceled'] = 'n';
-		if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["canceled"] != $this->oldDataRecord['canceled']) {
-			if($this->dataRecord['canceled'] == 'y') {
-				$sql = "UPDATE sys_user SET active = '0' WHERE client_id = ?";
-				$app->db->query($sql, $this->id);
-			} elseif($this->dataRecord['canceled'] == 'n') {
-				$sql = "UPDATE sys_user SET active = '1' WHERE client_id = ?";
-				$app->db->query($sql, $this->id);
-			}
-		}
+		// lock and cancel
+                if(!isset($this->dataRecord['locked'])) $this->dataRecord['locked'] = 'n';
+                if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["locked"] != $this->oldDataRecord['locked']) {
+                        $lock = functions::func_client_lock($this->id,$this->dataRecord["locked"]);
+                }
+
+                if(!isset($this->dataRecord['canceled'])) $this->dataRecord['canceled'] = 'n';
+                if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["canceled"] != $this->oldDataRecord['canceled']) {
+                        $cancel = functions::func_client_cancel($this->id,$this->dataRecord["canceled"]);
+                }
 
 		// language changed
 		if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) {
-- 
GitLab


From 8be8f7a82fea7d9b44e6d0d1aca554116c4922cc Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Mon, 22 Mar 2021 09:18:48 +0100
Subject: [PATCH 356/441] Highlight offline services in table, #6117

---
 interface/web/themes/default/assets/stylesheets/ispconfig.css | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css
index 9d44048e82..963476f501 100644
--- a/interface/web/themes/default/assets/stylesheets/ispconfig.css
+++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css
@@ -802,6 +802,9 @@ input[type="password"].form-control[readonly] {
 .systemmonitor-state.state-info .statusMsg {
     display: none;
 }
+.systemmonitor-state .offline {
+	color: red;
+}
 
 span.notification_text {
     display: block;
-- 
GitLab


From 61e25a09229372648ee160f14e2448fc58727248 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Mon, 22 Mar 2021 20:12:02 +0100
Subject: [PATCH 357/441] Online services as green

---
 interface/web/themes/default/assets/stylesheets/ispconfig.css | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css
index 963476f501..c53b988632 100644
--- a/interface/web/themes/default/assets/stylesheets/ispconfig.css
+++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css
@@ -802,6 +802,9 @@ input[type="password"].form-control[readonly] {
 .systemmonitor-state.state-info .statusMsg {
     display: none;
 }
+.systemmonitor-state .online {
+	color: green;
+}
 .systemmonitor-state .offline {
 	color: red;
 }
-- 
GitLab


From 935e8870218418ebb86ac98eb858cb2e2fc2df5a Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 23 Mar 2021 15:21:55 -0600
Subject: [PATCH 358/441] postfix: fix 'enable receiving' checkbox

---
 install/tpl/mysql-virtual_email2email.cf.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/tpl/mysql-virtual_email2email.cf.master b/install/tpl/mysql-virtual_email2email.cf.master
index f420a104d9..21d5146f2c 100644
--- a/install/tpl/mysql-virtual_email2email.cf.master
+++ b/install/tpl/mysql-virtual_email2email.cf.master
@@ -2,7 +2,7 @@ user = {mysql_server_ispconfig_user}
 password = {mysql_server_ispconfig_password}
 dbname = {mysql_server_database}
 hosts = {mysql_server_ip}
-query = SELECT email FROM mail_user WHERE email = '%s' AND forward_in_lda = 'n' AND disabledeliver = 'n' AND disablesmtp = 'n' AND server_id = {server_id}
+query = SELECT email FROM mail_user WHERE email = '%s' AND forward_in_lda = 'n' AND disabledeliver = 'n' AND postfix = 'y' AND server_id = {server_id}
            AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
         UNION
         SELECT cc AS email FROM mail_user WHERE email = '%s' AND cc != '' AND (forward_in_lda = 'n' OR disabledeliver = 'y') AND disablesmtp = 'n' AND server_id = {server_id}
-- 
GitLab


From 32048facf803dcdd08ea6bcca295158633b57762 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 23 Mar 2021 15:36:35 -0600
Subject: [PATCH 359/441] updater: reset umask after creating tmpdir

---
 server/scripts/update_runner.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server/scripts/update_runner.sh b/server/scripts/update_runner.sh
index 5647272f3a..8c885f7299 100644
--- a/server/scripts/update_runner.sh
+++ b/server/scripts/update_runner.sh
@@ -40,10 +40,12 @@ cd /tmp
 if [ -n "${_UPD}" ]
 then
     {
+        save_umask=`umask`
         umask 0077 \
         && tmpdir=`mktemp -dt "$(basename $0).XXXXXXXXXX"` \
         && test -d "${tmpdir}" \
         && cd "${tmpdir}"
+        umask $save_umask
     } || {
         echo 'mktemp failed'
         exit 1
-- 
GitLab


From b801952990365ed0c74d30d089ecec981d157375 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 23 Mar 2021 15:41:08 -0600
Subject: [PATCH 360/441] ensure created rspamd directories have correct
 permission

---
 install/lib/installer_base.lib.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 6de768f7e5..9c7e139c37 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1800,14 +1800,17 @@ class installer_base {
 
 		if(!is_dir('/etc/rspamd/local.d/')){
 			mkdir('/etc/rspamd/local.d/', 0755, true);
+			chmod('/etc/rspamd/local.d/', 0755);
 		}
 
 		if(!is_dir('/etc/rspamd/local.d/maps.d/')){
 			mkdir('/etc/rspamd/local.d/maps.d/', 0755, true);
+			chmod('/etc/rspamd/local.d/maps.d/', 0755);
 		}
 
 		if(!is_dir('/etc/rspamd/override.d/')){
 			mkdir('/etc/rspamd/override.d/', 0755, true);
+			chmod('/etc/rspamd/override.d/', 0755);
 		}
 
 		if ( substr($mail_config['dkim_path'], strlen($mail_config['dkim_path'])-1) == '/' ) {
-- 
GitLab


From a849544259034788204ef2f22131bb8f94c84a28 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 24 Mar 2021 11:18:59 -0600
Subject: [PATCH 361/441] dovecot: include custom config earlier

---
 install/tpl/debian6_dovecot2.conf.master | 10 +++++-----
 install/tpl/debian_dovecot2.conf.master  | 10 +++++-----
 install/tpl/fedora_dovecot2.conf.master  | 10 +++++-----
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/install/tpl/debian6_dovecot2.conf.master b/install/tpl/debian6_dovecot2.conf.master
index 91d745bc39..7c83812dd6 100644
--- a/install/tpl/debian6_dovecot2.conf.master
+++ b/install/tpl/debian6_dovecot2.conf.master
@@ -16,6 +16,7 @@ ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDH
 ssl_prefer_server_ciphers = no
 mail_max_userip_connections = 100
 mail_plugins = quota
+!include_try conf.d/99-ispconfig-custom-config.conf
 passdb {
   args = /etc/dovecot/dovecot-sql.conf
   driver = sql
@@ -68,21 +69,21 @@ service imap-login {
   process_limit = 512
 }
 protocol imap {
-  mail_plugins = quota imap_quota
+  mail_plugins = $mail_plugins quota imap_quota
   auth_verbose = yes
 }
 protocol pop3 {
   pop3_uidl_format = %08Xu%08Xv
-  mail_plugins = quota
+  mail_plugins = $mail_plugins quota
   auth_verbose = yes
 }
 protocol lda {
   postmaster_address = webmaster@localhost
-  mail_plugins = sieve quota
+  mail_plugins = $mail_plugins sieve quota
 }
 protocol lmtp {
   postmaster_address = webmaster@localhost
-  mail_plugins = quota sieve
+  mail_plugins = $mail_plugins quota sieve
 }
 
 #2.3+ service stats {
@@ -134,4 +135,3 @@ namespace inbox {
     special_use = \Trash
   }
 }
-!include_try conf.d/99-ispconfig-custom-config.conf
diff --git a/install/tpl/debian_dovecot2.conf.master b/install/tpl/debian_dovecot2.conf.master
index acbb5ccdff..067f5676e2 100644
--- a/install/tpl/debian_dovecot2.conf.master
+++ b/install/tpl/debian_dovecot2.conf.master
@@ -16,6 +16,7 @@ ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDH
 ssl_prefer_server_ciphers = no
 mail_max_userip_connections = 100
 mail_plugins = quota
+!include_try conf.d/99-ispconfig-custom-config.conf
 passdb {
   args = /etc/dovecot/dovecot-sql.conf
   driver = sql
@@ -65,21 +66,21 @@ service imap-login {
   process_limit = 512
 }
 protocol imap {
-  mail_plugins = quota imap_quota
+  mail_plugins = $mail_plugins quota imap_quota
   auth_verbose = yes
 }
 protocol pop3 {
   pop3_uidl_format = %08Xu%08Xv
-  mail_plugins = quota
+  mail_plugins = $mail_plugins quota
   auth_verbose = yes
 }
 protocol lda {
   postmaster_address = webmaster@localhost
-  mail_plugins = sieve quota
+  mail_plugins = $mail_plugins sieve quota
 }
 protocol lmtp {
   postmaster_address = webmaster@localhost
-  mail_plugins = quota sieve
+  mail_plugins = $mail_plugins quota sieve
 }
 
 
@@ -111,4 +112,3 @@ plugin {
   quota_status_nouser = DUNNO
   quota_status_overquota = "552 5.2.2 Mailbox is full"
 }
-!include_try conf.d/99-ispconfig-custom-config.conf
diff --git a/install/tpl/fedora_dovecot2.conf.master b/install/tpl/fedora_dovecot2.conf.master
index 0b31c23b4e..c518fbad74 100644
--- a/install/tpl/fedora_dovecot2.conf.master
+++ b/install/tpl/fedora_dovecot2.conf.master
@@ -13,6 +13,7 @@ ssl_min_protocol = TLSv1.2
 ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
 ssl_prefer_server_ciphers = no
 mail_plugins = quota
+!include_try conf.d/99-ispconfig-custom-config.conf
 passdb {
   args = /etc/dovecot-sql.conf
   driver = sql
@@ -62,21 +63,21 @@ service imap-login {
   process_limit = 500
 }
 protocol imap {
-  mail_plugins = quota imap_quota
+  mail_plugins = $mail_plugins quota imap_quota
   auth_verbose = yes
 }
 protocol pop3 {
   pop3_uidl_format = %08Xu%08Xv
-  mail_plugins = quota
+  mail_plugins = $mail_plugins quota
   auth_verbose = yes
 }
 protocol lda {
-  mail_plugins = sieve quota
+  mail_plugins = $mail_plugins sieve quota
   postmaster_address = root@localhost
 }
 protocol lmtp {
   postmaster_address = webmaster@localhost
-  mail_plugins = quota sieve
+  mail_plugins = $mail_plugins quota sieve
 }
 
 #2.3+ service stats {
@@ -128,4 +129,3 @@ namespace inbox {
     special_use = \Trash
   }
 }
-!include_try conf.d/99-ispconfig-custom-config.conf
-- 
GitLab


From f424031f8e2a4ba9427041dbd742e64edbc49130 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 25 Mar 2021 09:57:59 -0600
Subject: [PATCH 362/441] jailkit cron:  always chown/chmod home dir

---
 server/plugins-available/cron_jailkit_plugin.inc.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/cron_jailkit_plugin.inc.php b/server/plugins-available/cron_jailkit_plugin.inc.php
index a186a12886..8bd33b3de0 100644
--- a/server/plugins-available/cron_jailkit_plugin.inc.php
+++ b/server/plugins-available/cron_jailkit_plugin.inc.php
@@ -339,10 +339,11 @@ class cron_jailkit_plugin {
 
 		if(!is_dir($this->parent_domain['document_root'].$jailkit_chroot_userhome)) {
 			$app->system->mkdir($this->parent_domain['document_root'].$jailkit_chroot_userhome, 0750, true);
-			$app->system->chown($this->parent_domain['document_root'].$jailkit_chroot_userhome, $this->parent_domain['system_user']);
-			$app->system->chgrp($this->parent_domain['document_root'].$jailkit_chroot_userhome, $this->parent_domain['system_group']);
 		}
 
+		$app->system->chown($this->parent_domain['document_root'].$jailkit_chroot_userhome, $this->parent_domain['system_user']);
+		$app->system->chgrp($this->parent_domain['document_root'].$jailkit_chroot_userhome, $this->parent_domain['system_group']);
+
 	}
 
 	function _get_home_dir($username)
-- 
GitLab


From d15f5a7d058162fff137501fd139d504e06fdab2 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Mon, 29 Mar 2021 15:45:33 +0000
Subject: [PATCH 363/441] Only add http2 to nginx vhost if SSL is enabled
 (#6127)

---
 install/lib/installer_base.lib.php                 | 4 ++--
 install/tpl/nginx_apps.vhost.master                | 4 ++--
 install/tpl/nginx_ispconfig.vhost.master           | 4 ++--
 server/conf/nginx_apps.vhost.master                | 4 ++--
 server/plugins-available/apps_vhost_plugin.inc.php | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index eb3a65bd96..42a3b1792a 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2627,7 +2627,7 @@ class installer_base {
 
 			// Enable SSL if a cert is in place.
 			if(is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.crt') && is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.key')) {
-				$content = str_replace('{ssl_on}', 'ssl', $content);
+				$content = str_replace('{ssl_on}', 'ssl http2', $content);
 				$content = str_replace('{ssl_comment}', '', $content);
 			} else {
 				$content = str_replace('{ssl_on}', '', $content);
@@ -3524,7 +3524,7 @@ class installer_base {
 			$content = str_replace('{vhost_port}', $conf['nginx']['vhost_port'], $content);
 
 			if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
-				$content = str_replace('{ssl_on}', 'ssl', $content);
+				$content = str_replace('{ssl_on}', 'ssl http2', $content);
 				$content = str_replace('{ssl_comment}', '', $content);
 				$content = str_replace('{fastcgi_ssl}', 'on', $content);
 			} else {
diff --git a/install/tpl/nginx_apps.vhost.master b/install/tpl/nginx_apps.vhost.master
index de48420054..181f4c807e 100644
--- a/install/tpl/nginx_apps.vhost.master
+++ b/install/tpl/nginx_apps.vhost.master
@@ -1,6 +1,6 @@
 server {
-        listen {apps_vhost_ip}{apps_vhost_port} {ssl_on} http2;
-        listen [::]:{apps_vhost_port} {ssl_on} ipv6only=on http2;
+        listen {apps_vhost_ip}{apps_vhost_port} {ssl_on};
+        listen [::]:{apps_vhost_port} {ssl_on} ipv6only=on;
 
         {ssl_comment}ssl_protocols TLSv1.2;
         {ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
diff --git a/install/tpl/nginx_ispconfig.vhost.master b/install/tpl/nginx_ispconfig.vhost.master
index e1c39ee98b..dbe44d7064 100644
--- a/install/tpl/nginx_ispconfig.vhost.master
+++ b/install/tpl/nginx_ispconfig.vhost.master
@@ -1,6 +1,6 @@
 server {
-        listen {vhost_port} {ssl_on} http2;
-        listen [::]:{vhost_port} {ssl_on} ipv6only=on http2;
+        listen {vhost_port} {ssl_on};
+        listen [::]:{vhost_port} {ssl_on} ipv6only=on;
 
 		{ssl_comment}ssl_protocols TLSv1.2;
         {ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
diff --git a/server/conf/nginx_apps.vhost.master b/server/conf/nginx_apps.vhost.master
index de48420054..181f4c807e 100644
--- a/server/conf/nginx_apps.vhost.master
+++ b/server/conf/nginx_apps.vhost.master
@@ -1,6 +1,6 @@
 server {
-        listen {apps_vhost_ip}{apps_vhost_port} {ssl_on} http2;
-        listen [::]:{apps_vhost_port} {ssl_on} ipv6only=on http2;
+        listen {apps_vhost_ip}{apps_vhost_port} {ssl_on};
+        listen [::]:{apps_vhost_port} {ssl_on} ipv6only=on;
 
         {ssl_comment}ssl_protocols TLSv1.2;
         {ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
diff --git a/server/plugins-available/apps_vhost_plugin.inc.php b/server/plugins-available/apps_vhost_plugin.inc.php
index d391633b62..91a994b109 100644
--- a/server/plugins-available/apps_vhost_plugin.inc.php
+++ b/server/plugins-available/apps_vhost_plugin.inc.php
@@ -209,7 +209,7 @@ class apps_vhost_plugin {
             /* Check if SSL should be enabled: */
             if(is_file('/usr/local/ispconfig/interface/ssl/ispserver.crt') && is_file('/usr/local/ispconfig/interface/ssl/ispserver.key')) {
 				$content = str_replace('{ssl_comment}', '', $content);
-				$content = str_replace('{ssl_on}', 'ssl', $content);
+				$content = str_replace('{ssl_on}', 'ssl http2', $content);
             } else {
 				$content = str_replace('{ssl_comment}', '#', $content);
 				$content = preg_replace('/(\s)\{ssl_on\}/', '', $content);
-- 
GitLab


From e08928d2b7d9ca1fd93bad8975189bba2abf55c3 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 31 Mar 2021 10:48:50 +0200
Subject: [PATCH 364/441] - enable acme.sh upgrade / set default server to
 letsencrypt

---
 install/lib/installer_base.lib.php | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 42a3b1792a..8d9ee9bf7e 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -51,6 +51,21 @@ class installer_base {
 		return ($val == 0 ? true : false);
 	}
 
+	private function update_acme() {
+		$acme = explode("\n", shell_exec('which /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh'));
+		$acme = reset($acme);
+		$val = 0;
+
+		if($acme) {
+			$cmd = $acme . ' --upgrade --auto-upgrade ; ' . $acme . ' --set-default-ca --server letsencrypt';
+			$ret = null;
+			$val = 0;
+			exec($cmd. ' 2>&1', $ret, $val);
+		}
+
+		return ($val == 0 ? true : false);
+	}
+
 	//: TODO  Implement the translation function and language files for the installer.
 	public function lng($text) {
 		return $text;
@@ -2923,6 +2938,11 @@ class installer_base {
 				}
 			}
 
+			if($acme && is_executable($acme)) {
+				// we do this even on install to enable automatic updates
+				$this->update_acme();
+			}
+
 			$restore_conf_symlink = false;
 
 			// we only need this for apache, so use fixed conf index
-- 
GitLab


From 30c922c3d5c286260d5dd5c94ea29a3e8d15f922 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 31 Mar 2021 10:53:20 +0200
Subject: [PATCH 365/441] - update for acme.sh if installed (also if not
 re-creating cert for ispc)

---
 install/install.php                |  3 +++
 install/lib/installer_base.lib.php | 10 ++++------
 install/update.php                 |  3 +++
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/install/install.php b/install/install.php
index 7bc3836223..a5233744c8 100644
--- a/install/install.php
+++ b/install/install.php
@@ -597,6 +597,9 @@ if(!$issue_asked) {
     }
 }
 
+// update acme.sh if installed
+$inst->update_acme();
+
 if($conf['services']['web'] == true) {
 	//** Configure apps vhost
 	swriteln('Configuring Apps vhost');
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 8d9ee9bf7e..1664ddc210 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -56,7 +56,7 @@ class installer_base {
 		$acme = reset($acme);
 		$val = 0;
 
-		if($acme) {
+		if($acme && is_executable($acme)) {
 			$cmd = $acme . ' --upgrade --auto-upgrade ; ' . $acme . ' --set-default-ca --server letsencrypt';
 			$ret = null;
 			$val = 0;
@@ -2932,17 +2932,15 @@ class installer_base {
 					$acme = reset($acme);
 					if($acme && is_executable($acme)) {
 						swriteln('Installed acme.sh and using it for certificate creation during install.');
+
+						// we do this even on install to enable automatic updates
+						$this->update_acme();
 					} else {
 						swriteln('Failed installing acme.sh. Will not be able to issue certificate during install.');
 					}
 				}
 			}
 
-			if($acme && is_executable($acme)) {
-				// we do this even on install to enable automatic updates
-				$this->update_acme();
-			}
-
 			$restore_conf_symlink = false;
 
 			// we only need this for apache, so use fixed conf index
diff --git a/install/update.php b/install/update.php
index e821eac203..0122f27678 100644
--- a/install/update.php
+++ b/install/update.php
@@ -566,6 +566,9 @@ if(!$issue_asked) {
     }
 }
 
+// update acme.sh if installed
+$inst->update_acme();
+
 $inst->install_ispconfig();
 
 // Cleanup
-- 
GitLab


From daa41dbb2a43a3a766b1b540fa2bb0eaf5076456 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 31 Mar 2021 11:07:03 +0200
Subject: [PATCH 366/441] - add missing columns to powerdns

---
 install/dist/lib/gentoo.lib.php    |  4 ++--
 install/lib/installer_base.lib.php |  4 ++--
 install/sql/powerdns.sql           | 25 +++++++++++++++++++++++++
 3 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index 78dffabf85..83a4b5ffaf 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -531,10 +531,10 @@ class installer extends installer_base
 
 		//* load the powerdns databse dump
 		if($conf['mysql']['admin_password'] == '') {
-			caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null",
+			caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' --force '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null",
 				__FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in powerdns.sql');
 		} else {
-			caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null",
+			caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' --force '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null",
 				__FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in powerdns.sql');
 		}
 
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 42a3b1792a..95c1eecbd8 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2049,10 +2049,10 @@ class installer_base {
 
 		//* load the powerdns databse dump
 		if($conf['mysql']['admin_password'] == '') {
-			caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null",
+			caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' --force '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null",
 				__FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in powerdns.sql');
 		} else {
-			caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null",
+			caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' --force '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null",
 				__FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in powerdns.sql');
 		}
 
diff --git a/install/sql/powerdns.sql b/install/sql/powerdns.sql
index c9bf8280f2..d803f70fb0 100644
--- a/install/sql/powerdns.sql
+++ b/install/sql/powerdns.sql
@@ -20,6 +20,8 @@ CREATE TABLE IF NOT EXISTS `records` (
   `ttl` int(11) default NULL,
   `prio` int(11) default NULL,
   `change_date` int(11) default NULL,
+  `disabled` tinyint(1) default 0,
+  `auth` tinyint(1) default 1,
   `ispconfig_id` int(11) NOT NULL,
   PRIMARY KEY  (`id`),
   KEY `rec_name_index` (`name`),
@@ -32,3 +34,26 @@ CREATE TABLE IF NOT EXISTS `supermasters` (
   `nameserver` varchar(255) NOT NULL,
   `account` varchar(40) default NULL
 ) ENGINE=InnoDB;
+
+CREATE TABLE IF NOT EXISTS `domainmetadata` (
+  `id` int auto_increment,
+  `domain_id` int NOT NULL,
+  `kind` varchar(32),
+  `content` TEXT,
+  PRIMARY KEY (`id`)
+) Engine=InnoDB;
+
+
+-- add new columns if not existing
+SET @dbname = DATABASE();
+
+SELECT count(*) INTO @exist FROM `information_schema`.`columns` WHERE `table_schema` = @dbname AND `column_name` = 'auth' AND `table_name` = 'records' LIMIT 1;
+SET @query = IF(@exist <= 0, 'ALTER TABLE `records` ADD COLUMN `auth` tinyint(1) default 0 AFTER `change_date`', 'SELECT \'Column Exists\' STATUS');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+
+SELECT count(*) INTO @exist FROM `information_schema`.`columns` WHERE `table_schema` = @dbname AND `column_name` = 'disabled' AND `table_name` = 'records' LIMIT 1;
+SET @query = IF(@exist <= 0, 'ALTER TABLE `records` ADD COLUMN `disabled` tinyint(1) default 0 AFTER `change_date`', 'SELECT \'Column Exists\' STATUS');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+
-- 
GitLab


From 4637b536337742d87a00c269c3927b5adb5ee0e9 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 31 Mar 2021 11:21:04 +0200
Subject: [PATCH 367/441] - fixed wrong default value for auth

---
 install/sql/powerdns.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/sql/powerdns.sql b/install/sql/powerdns.sql
index d803f70fb0..640e06eb06 100644
--- a/install/sql/powerdns.sql
+++ b/install/sql/powerdns.sql
@@ -48,7 +48,7 @@ CREATE TABLE IF NOT EXISTS `domainmetadata` (
 SET @dbname = DATABASE();
 
 SELECT count(*) INTO @exist FROM `information_schema`.`columns` WHERE `table_schema` = @dbname AND `column_name` = 'auth' AND `table_name` = 'records' LIMIT 1;
-SET @query = IF(@exist <= 0, 'ALTER TABLE `records` ADD COLUMN `auth` tinyint(1) default 0 AFTER `change_date`', 'SELECT \'Column Exists\' STATUS');
+SET @query = IF(@exist <= 0, 'ALTER TABLE `records` ADD COLUMN `auth` tinyint(1) default 1 AFTER `change_date`', 'SELECT \'Column Exists\' STATUS');
 PREPARE stmt FROM @query;
 EXECUTE stmt;
 
-- 
GitLab


From 6d9d4c592882a4f05576c66eee6095f207f961ec Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 31 Mar 2021 14:19:11 +0000
Subject: [PATCH 368/441] Apply 1 suggestion(s) to 1 file(s)

---
 server/conf/rspamd_classifier-bayes.conf.master | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/conf/rspamd_classifier-bayes.conf.master b/server/conf/rspamd_classifier-bayes.conf.master
index 48dc9f6b53..c9e83495aa 100644
--- a/server/conf/rspamd_classifier-bayes.conf.master
+++ b/server/conf/rspamd_classifier-bayes.conf.master
@@ -6,8 +6,8 @@ servers = "<tmpl_var name='rspamd_redis_bayes_servers'>";
 password = "<tmpl_var name='rspamd_redis_bayes_password'>";
 </tmpl_if>
 autolearn {
-  spam_threshold = 9.0; # When to learn spam (score >= threshold)
-  ham_threshold = -1.5; # When to learn ham (score <= threshold)
+  spam_threshold = 6.0;
+  ham_threshold = -0.5; # When to learn ham (score <= threshold)
   check_balance = true; # Check spam and ham balance
   min_balance = 0.9; # Keep diff for spam/ham learns for at least this value
 }
-- 
GitLab


From fcff3cd195ad9ac917bf5b050413647ecca4b3da Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 31 Mar 2021 17:50:24 +0000
Subject: [PATCH 369/441] Apply 1 suggestion(s) to 1 file(s)

---
 install/lib/installer_base.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 1664ddc210..ae2b288cdb 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -51,7 +51,7 @@ class installer_base {
 		return ($val == 0 ? true : false);
 	}
 
-	private function update_acme() {
+	public function update_acme() {
 		$acme = explode("\n", shell_exec('which /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh'));
 		$acme = reset($acme);
 		$val = 0;
-- 
GitLab


From c3cb53482e8dcf9f3c55a68ec6446655705b8715 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Wed, 31 Mar 2021 18:53:28 +0000
Subject: [PATCH 370/441] Run wget and tar silently on update

---
 server/scripts/update_runner.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/scripts/update_runner.sh b/server/scripts/update_runner.sh
index 8c885f7299..89f883bc52 100644
--- a/server/scripts/update_runner.sh
+++ b/server/scripts/update_runner.sh
@@ -51,10 +51,10 @@ then
         exit 1
     }
 
-    wget -O ISPConfig-3.tar.gz "${URL}"
+    wget -O -Q ISPConfig-3.tar.gz "${URL}"
     if [ -f ISPConfig-3.tar.gz ]
     then
-        tar xvzf ISPConfig-3.tar.gz --strip-components=1
+        tar xzf ISPConfig-3.tar.gz --strip-components=1
         cd install/
         php -q \
             -d disable_classes= \
-- 
GitLab


From c799186909a7e4ba6ef4fa858cc801f9cc0e32d9 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Wed, 31 Mar 2021 19:00:27 +0000
Subject: [PATCH 371/441] Fix typo

---
 server/scripts/update_runner.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/scripts/update_runner.sh b/server/scripts/update_runner.sh
index 89f883bc52..f83dc28d9e 100644
--- a/server/scripts/update_runner.sh
+++ b/server/scripts/update_runner.sh
@@ -51,7 +51,7 @@ then
         exit 1
     }
 
-    wget -O -Q ISPConfig-3.tar.gz "${URL}"
+    wget -q -O ISPConfig-3.tar.gz "${URL}"
     if [ -f ISPConfig-3.tar.gz ]
     then
         tar xzf ISPConfig-3.tar.gz --strip-components=1
-- 
GitLab


From 5e2b43c84f2d821f010b64b29da5cd8094bba54d Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Wed, 31 Mar 2021 19:24:05 +0000
Subject: [PATCH 372/441] Add echo's for download/unpack process

---
 server/scripts/update_runner.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server/scripts/update_runner.sh b/server/scripts/update_runner.sh
index f83dc28d9e..e432fc006a 100644
--- a/server/scripts/update_runner.sh
+++ b/server/scripts/update_runner.sh
@@ -51,9 +51,11 @@ then
         exit 1
     }
 
+    echo "Downloading ISPConfig update."
     wget -q -O ISPConfig-3.tar.gz "${URL}"
     if [ -f ISPConfig-3.tar.gz ]
     then
+        echo "Unpacking ISPConfig update."
         tar xzf ISPConfig-3.tar.gz --strip-components=1
         cd install/
         php -q \
-- 
GitLab


From bb68be204db7a5708325f7e1a25e5216067e8899 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Wed, 31 Mar 2021 21:22:09 +0000
Subject: [PATCH 373/441] include_try for general dovecot at the end of the
 config

---
 install/tpl/debian6_dovecot2.conf.master | 3 ++-
 install/tpl/debian_dovecot2.conf.master  | 3 ++-
 install/tpl/fedora_dovecot2.conf.master  | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/install/tpl/debian6_dovecot2.conf.master b/install/tpl/debian6_dovecot2.conf.master
index 7c3e31879d..36ae86fa6d 100644
--- a/install/tpl/debian6_dovecot2.conf.master
+++ b/install/tpl/debian6_dovecot2.conf.master
@@ -16,7 +16,6 @@ ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDH
 ssl_prefer_server_ciphers = no
 mail_max_userip_connections = 100
 mail_plugins = quota
-!include_try conf.d/99-ispconfig-custom-config.conf
 passdb {
   args = /etc/dovecot/dovecot-sql.conf
   driver = sql
@@ -135,3 +134,5 @@ namespace inbox {
     special_use = \Trash
   }
 }
+
+!include_try conf.d/99-ispconfig-custom-config.conf
\ No newline at end of file
diff --git a/install/tpl/debian_dovecot2.conf.master b/install/tpl/debian_dovecot2.conf.master
index 067f5676e2..12288e2cde 100644
--- a/install/tpl/debian_dovecot2.conf.master
+++ b/install/tpl/debian_dovecot2.conf.master
@@ -16,7 +16,6 @@ ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDH
 ssl_prefer_server_ciphers = no
 mail_max_userip_connections = 100
 mail_plugins = quota
-!include_try conf.d/99-ispconfig-custom-config.conf
 passdb {
   args = /etc/dovecot/dovecot-sql.conf
   driver = sql
@@ -112,3 +111,5 @@ plugin {
   quota_status_nouser = DUNNO
   quota_status_overquota = "552 5.2.2 Mailbox is full"
 }
+
+!include_try conf.d/99-ispconfig-custom-config.conf
\ No newline at end of file
diff --git a/install/tpl/fedora_dovecot2.conf.master b/install/tpl/fedora_dovecot2.conf.master
index c518fbad74..d4cd148ef0 100644
--- a/install/tpl/fedora_dovecot2.conf.master
+++ b/install/tpl/fedora_dovecot2.conf.master
@@ -13,7 +13,6 @@ ssl_min_protocol = TLSv1.2
 ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
 ssl_prefer_server_ciphers = no
 mail_plugins = quota
-!include_try conf.d/99-ispconfig-custom-config.conf
 passdb {
   args = /etc/dovecot-sql.conf
   driver = sql
@@ -129,3 +128,5 @@ namespace inbox {
     special_use = \Trash
   }
 }
+
+!include_try conf.d/99-ispconfig-custom-config.conf
-- 
GitLab


From 768a531afb97646d6a9a7ffc3070220a8c058500 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Fri, 2 Apr 2021 08:03:48 +0000
Subject: [PATCH 374/441] Remove duplicate data placeholder (#6138)

---
 server/conf/bind_pri.domain.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/conf/bind_pri.domain.master b/server/conf/bind_pri.domain.master
index e5af0ca311..efaa06a28d 100644
--- a/server/conf/bind_pri.domain.master
+++ b/server/conf/bind_pri.domain.master
@@ -54,7 +54,7 @@ $TTL        {tmpl_var name='ttl'}
 {tmpl_var name='name'} {tmpl_var name='ttl'}      SRV    {tmpl_var name='aux'} {tmpl_var name='data'}
 </tmpl_if>
 <tmpl_if name="type" op='==' value='SSHFP'>
-{tmpl_var name='name'} {tmpl_var name='ttl'}      SSHFP   {tmpl_var name='data'} {tmpl_var name='data'}
+{tmpl_var name='name'} {tmpl_var name='ttl'}      SSHFP   {tmpl_var name='data'}
 </tmpl_if>
 <tmpl_if name="type" op='==' value='TLSA'>
 {tmpl_var name='name'} {tmpl_var name='ttl'}      TLSA       {tmpl_var name='data'}
-- 
GitLab


From afc1c2ecaf4ea263c26645d4338a2ed77b262311 Mon Sep 17 00:00:00 2001
From: Daniel Jagszent <daniel@jagszent.de>
Date: Wed, 7 Apr 2021 14:23:40 +0200
Subject: [PATCH 375/441] Ensure that we always have two capture groups in
 nginx redirect regex expressions

We sometimes had one and mostly had two capture groups. Now we always have two capture groups and thus can always use $2 for the redirect target.

Fixes #6144
---
 server/conf/nginx_vhost.conf.master           | 4 ++--
 server/plugins-available/nginx_plugin.inc.php | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index d5e457b9e3..50c0cf5183 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -60,13 +60,13 @@ server {
 </tmpl_loop>
 <tmpl_loop name="local_redirects">
         if ($http_host <tmpl_var name='local_redirect_operator'> "<tmpl_var name='local_redirect_origin_domain'>") {
-            rewrite ^<tmpl_var name='local_redirect_exclude'>(.*)$ <tmpl_var name='local_redirect_target'>$1 <tmpl_var name='local_redirect_type'>;
+            rewrite ^<tmpl_var name='local_redirect_exclude'>(.*)$ <tmpl_var name='local_redirect_target'>$2 <tmpl_var name='local_redirect_type'>;
         }
 </tmpl_loop>
 
 <tmpl_loop name="own_redirects">
 <tmpl_if name='use_rewrite'>
-        <tmpl_if name='exclude_own_hostname'>if ($http_host != "<tmpl_var name='exclude_own_hostname'>") { </tmpl_if>rewrite ^<tmpl_var name='rewrite_exclude'>(.*)$ <tmpl_var name='rewrite_target'>$1 <tmpl_var name='rewrite_type'>;<tmpl_if name='exclude_own_hostname'> }</tmpl_if>
+        <tmpl_if name='exclude_own_hostname'>if ($http_host != "<tmpl_var name='exclude_own_hostname'>") { </tmpl_if>rewrite ^<tmpl_var name='rewrite_exclude'>(.*)$ <tmpl_var name='rewrite_target'>$2 <tmpl_var name='rewrite_type'>;<tmpl_if name='exclude_own_hostname'> }</tmpl_if>
 </tmpl_if>
 <tmpl_if name='use_proxy'>
         location / {
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 92d8bac7f9..2a1ba6c13a 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1499,7 +1499,7 @@ class nginx_plugin {
 						}
 					} else {
 						// external URL
-						$rewrite_exclude = '(?!\.well-known/acme-challenge)/';
+						$rewrite_exclude = '(?!/(\.well-known/acme-challenge))/';
 						if($data['new']['redirect_type'] == 'proxy'){
 							$vhost_data['use_proxy'] = 'y';
 							$rewrite_subdir = $tmp_redirect_path_parts['path'];
@@ -1551,7 +1551,7 @@ class nginx_plugin {
 						}
 					} else {
 						// external URL
-						$rewrite_exclude = '(?!\.well-known/acme-challenge)/';
+						$rewrite_exclude = '(?!/(\.well-known/acme-challenge))/';
 						if($data['new']['redirect_type'] == 'proxy'){
 							$vhost_data['use_proxy'] = 'y';
 							$rewrite_subdir = $tmp_redirect_path_parts['path'];
@@ -1601,7 +1601,7 @@ class nginx_plugin {
 						}
 					} else {
 						// external URL
-						$rewrite_exclude = '(?!\.well-known/acme-challenge)/';
+						$rewrite_exclude = '(?!/(\.well-known/acme-challenge))/';
 						if($data['new']['redirect_type'] == 'proxy'){
 							$vhost_data['use_proxy'] = 'y';
 							$rewrite_subdir = $tmp_redirect_path_parts['path'];
-- 
GitLab


From 38c7515bb1ad44ca7af451e0326813fe493598c2 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 7 Apr 2021 17:32:19 -0600
Subject: [PATCH 376/441] sieve: case insensitive move to junk test matched
 'BAYES' for 'Yes'

---
 server/conf/sieve_filter.master | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/conf/sieve_filter.master b/server/conf/sieve_filter.master
index 16a39ec180..fd216d3d64 100644
--- a/server/conf/sieve_filter.master
+++ b/server/conf/sieve_filter.master
@@ -7,7 +7,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
 
 <tmpl_if name="move_junk" op="==" value="y">
 # Move spam to spam folder
-if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
+if anyof (header :is ["X-Spam", "X-Spam-Flag"] "Yes", header :matches "X-Spam-Status" "Yes, *") {
   fileinto :create "Junk";
   # Stop here so that we do not reply on spams
   stop;
@@ -33,7 +33,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
 
 <tmpl_if name="move_junk" op="==" value="a">
 # Move spam to spam folder
-if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
+if anyof (header :is ["X-Spam", "X-Spam-Flag"] "Yes", header :matches "X-Spam-Status" "Yes, *") {
   fileinto :create "Junk";
   # Stop here so that we do not reply on spams
   stop;
@@ -46,7 +46,7 @@ if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-S
 #################################################################
 
 # Move spam to spam folder
-if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
+if anyof (header :is ["X-Spam", "X-Spam-Flag"] "Yes", header :matches "X-Spam-Status" "Yes, *") {
   # Stop here so that we do not reply on spams
   stop;
 }
-- 
GitLab


From c5e82d49695b4af4d5eff67db8eca8b9af6f9515 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Thu, 8 Apr 2021 16:00:28 +0000
Subject: [PATCH 377/441] Fix broken check for correct index file (#6147)

---
 server/conf/awstats_index.php.master | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/server/conf/awstats_index.php.master b/server/conf/awstats_index.php.master
index b3e694ebbf..a82de8a0ca 100644
--- a/server/conf/awstats_index.php.master
+++ b/server/conf/awstats_index.php.master
@@ -43,23 +43,17 @@ if ($handle = opendir('.'))
 arsort($awprev);
 
 $options = "";
-foreach ($awprev as $key => $value)
-{
-
-	if(file_exists($value.'/awsindex.html') && file_exists($value.'/goaindex.html')) {
-		$awstatsindex = 'awsindex.html';
-	} elseif(file_exists($value.'/awsindex.html') && !file_exists($value.'/goaindex.html')) {
-                $awstatsindex = 'awsindex.html';
-	} else {
-		$awstatsindex = 'goaindex.html';
-	}
-
+foreach ($awprev as $key => $value) {
+        // Define name for the index file
+        $awstatsindex = 'awsindex.html';
+        if(!file_exists($value.'/awsindex.html') && file_exists($value.'/goaindex.html')) {
+                $awstatsindex = 'goaindex.html';
+        }
+        // Set name for first entry in month list
 	if($key == $current) $options .= "<option selected=\"selected\" value=\"{$awstatsindex}\">{$value}</option>\n";
 	else $options .= "<option value=\"{$value}/{$awstatsindex}\">{$value}</option>\n";
 }
 
-$awstatsindex = 'awsindex.html';
-
 $html = "<!DOCTYPE html>\n<html>\n<head>\n<title>Stats</title>\n";
 $html .= "<style>\nhtml,body {margin:0px;padding:0px;width:100%;height:100%;background-color: #ccc;}\n";
 $html .= "#header\n{\nwidth:100%;margin:0px auto;\nheight:20px;\nposition:fixed;\npadding:4px;\ntext-align:center;\n}\n";
-- 
GitLab


From d40c2a66411f160e100be6294a2258dc9e239ac7 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 8 Apr 2021 16:16:27 -0600
Subject: [PATCH 378/441] installer: add rspamd config vars to all OS conf
 files

---
 install/dist/conf/centos52.conf.php    | 5 +++++
 install/dist/conf/centos53.conf.php    | 5 +++++
 install/dist/conf/debian100.conf.php   | 5 +++++
 install/dist/conf/opensuse110.conf.php | 5 +++++
 4 files changed, 20 insertions(+)

diff --git a/install/dist/conf/centos52.conf.php b/install/dist/conf/centos52.conf.php
index 12044d3ce0..6dff93f65f 100644
--- a/install/dist/conf/centos52.conf.php
+++ b/install/dist/conf/centos52.conf.php
@@ -147,6 +147,11 @@ $conf['amavis']['installed'] = false; // will be detected automatically during i
 $conf['amavis']['config_dir'] = '/etc';
 $conf['amavis']['init_script'] = 'amavisd';
 
+//* Rspamd
+$conf['rspamd']['installed'] = false; // will be detected automatically during installation
+$conf['rspamd']['config_dir'] = '/etc/rspamd';
+$conf['rspamd']['init_script'] = 'rspamd';
+
 //* ClamAV
 $conf['clamav']['installed'] = false; // will be detected automatically during installation
 $conf['clamav']['init_script'] = 'clamd';
diff --git a/install/dist/conf/centos53.conf.php b/install/dist/conf/centos53.conf.php
index 12044d3ce0..6dff93f65f 100644
--- a/install/dist/conf/centos53.conf.php
+++ b/install/dist/conf/centos53.conf.php
@@ -147,6 +147,11 @@ $conf['amavis']['installed'] = false; // will be detected automatically during i
 $conf['amavis']['config_dir'] = '/etc';
 $conf['amavis']['init_script'] = 'amavisd';
 
+//* Rspamd
+$conf['rspamd']['installed'] = false; // will be detected automatically during installation
+$conf['rspamd']['config_dir'] = '/etc/rspamd';
+$conf['rspamd']['init_script'] = 'rspamd';
+
 //* ClamAV
 $conf['clamav']['installed'] = false; // will be detected automatically during installation
 $conf['clamav']['init_script'] = 'clamd';
diff --git a/install/dist/conf/debian100.conf.php b/install/dist/conf/debian100.conf.php
index 28d82b8079..0861af83de 100644
--- a/install/dist/conf/debian100.conf.php
+++ b/install/dist/conf/debian100.conf.php
@@ -153,6 +153,11 @@ $conf['amavis']['installed'] = false; // will be detected automatically during i
 $conf['amavis']['config_dir'] = '/etc/amavis';
 $conf['amavis']['init_script'] = 'amavis';
 
+//* Rspamd
+$conf['rspamd']['installed'] = false; // will be detected automatically during installation
+$conf['rspamd']['config_dir'] = '/etc/rspamd';
+$conf['rspamd']['init_script'] = 'rspamd';
+
 //* ClamAV
 $conf['clamav']['installed'] = false; // will be detected automatically during installation
 $conf['clamav']['init_script'] = 'clamav-daemon';
diff --git a/install/dist/conf/opensuse110.conf.php b/install/dist/conf/opensuse110.conf.php
index e389c3b2a0..37f5a14d3b 100644
--- a/install/dist/conf/opensuse110.conf.php
+++ b/install/dist/conf/opensuse110.conf.php
@@ -147,6 +147,11 @@ $conf['amavis']['installed'] = false; // will be detected automatically during i
 $conf['amavis']['config_dir'] = '/etc/amavis';
 $conf['amavis']['init_script'] = 'amavis';
 
+//* Rspamd
+$conf['rspamd']['installed'] = false; // will be detected automatically during installation
+$conf['rspamd']['config_dir'] = '/etc/rspamd';
+$conf['rspamd']['init_script'] = 'rspamd';
+
 //* ClamAV
 $conf['clamav']['installed'] = false; // will be detected automatically during installation
 $conf['clamav']['init_script'] = 'clamd';
-- 
GitLab


From bdb8d46ba4230ed041ba060ea9c73ae77c5d7f7e Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 8 Apr 2021 16:41:13 -0600
Subject: [PATCH 379/441] rspamd: restart rspamd if configured, not if init.d
 file is present

---
 server/plugins-available/rspamd_plugin.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index f30538f09a..63640d02e6 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -460,7 +460,7 @@ class rspamd_plugin {
 				unlink($wblist_file);
 			}
 
-			if($mail_config['content_filter'] == 'rspamd' && is_file('/etc/init.d/rspamd')) {
+			if($mail_config['content_filter'] == 'rspamd') {
 				$app->services->restartServiceDelayed('rspamd', 'reload');
 			}
 		}
@@ -484,7 +484,7 @@ class rspamd_plugin {
 			}
 
 			if($mail_config['content_filter'] == 'rspamd'){
-				if(is_file('/etc/init.d/rspamd')) $app->services->restartServiceDelayed('rspamd', 'reload');
+				$app->services->restartServiceDelayed('rspamd', 'reload');
 			}
 		}
 	}
-- 
GitLab


From 596e30c05bbc9ea01dd3558fa8f49e6277924e10 Mon Sep 17 00:00:00 2001
From: Tommaso Basilici <t.basilici@19.coop>
Date: Fri, 9 Apr 2021 10:40:58 +0000
Subject: [PATCH 380/441] Update client.inc.php

---
 interface/lib/classes/remote.d/client.inc.php | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/interface/lib/classes/remote.d/client.inc.php b/interface/lib/classes/remote.d/client.inc.php
index fa20802b7d..a571b571a9 100644
--- a/interface/lib/classes/remote.d/client.inc.php
+++ b/interface/lib/classes/remote.d/client.inc.php
@@ -245,12 +245,12 @@ class remoting_client extends remoting {
 		$app->remoting_lib->ispconfig_sysuser_update($params, $client_id);
 		
 		// if canceled
-                if ($params['canceled']) {
-                        $result = functions::func_client_cancel($client_id, $params['canceled']);
-                }
-                // if locked
-                if ($params['locked']) {
-                        $result = functions::func_client_lock($client_id, $params['locked']);
+        if ($params['canceled']) {
+            $result = $app->functions->func_client_cancel($client_id, $params['canceled']);
+        }
+        // if locked
+        if ($params['locked']) {
+            $result = $app->functions->func_client_lock($client_id, $params['locked']);
 		}
 
 		return $affected_rows;
-- 
GitLab


From 632ee10f0416bd7c9715f4daf0f774236ec0125a Mon Sep 17 00:00:00 2001
From: Tommaso Basilici <t.basilici@19.coop>
Date: Fri, 9 Apr 2021 10:48:14 +0000
Subject: [PATCH 381/441] Update interface/web/client/client_edit.php

---
 interface/web/client/client_edit.php | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index 9bd114daad..d35b3bb849 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -426,15 +426,16 @@ class page_action extends tform_actions {
 		}
 
 		// lock and cancel
-                if(!isset($this->dataRecord['locked'])) $this->dataRecord['locked'] = 'n';
-                if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["locked"] != $this->oldDataRecord['locked']) {
-                        $lock = functions::func_client_lock($this->id,$this->dataRecord["locked"]);
-                }
-
-                if(!isset($this->dataRecord['canceled'])) $this->dataRecord['canceled'] = 'n';
-                if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["canceled"] != $this->oldDataRecord['canceled']) {
-                        $cancel = functions::func_client_cancel($this->id,$this->dataRecord["canceled"]);
-                }
+        if(!isset($this->dataRecord['locked'])) $this->dataRecord['locked'] = 'n';
+        if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["locked"] != $this->oldDataRecord['locked']) 
+		{
+        	$lock = $app->functions->func_client_lock($this->id,$this->dataRecord["locked"]);
+        }
+
+        if(!isset($this->dataRecord['canceled'])) $this->dataRecord['canceled'] = 'n';
+        if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["canceled"] != $this->oldDataRecord['canceled']) {
+                $cancel = $app->functions->func_client_cancel($this->id,$this->dataRecord["canceled"]);
+        }
 
 		// language changed
 		if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) {
-- 
GitLab


From 3574cb454acca92643a51fd0ecbabd88c4a64ab5 Mon Sep 17 00:00:00 2001
From: Tommaso Basilici <t.basilici@19.coop>
Date: Fri, 9 Apr 2021 13:08:02 +0000
Subject: [PATCH 382/441] Apply 1 suggestion(s) to 1 file(s)

---
 interface/lib/classes/functions.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index 8b52cd35c0..f1f4fd1789 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -638,7 +638,7 @@ class functions {
                         $sql = "UPDATE sys_user SET active = '1' WHERE client_id = ?";
                         $result = $app->db->query($sql, $client_id);
                 } else {
-                        $result = FALSE;
+                        $result = false;
                 }
                 return $result;
         }	
-- 
GitLab


From 7bd07c088844f5ddbee05e0a9b339005e777cf08 Mon Sep 17 00:00:00 2001
From: Tommaso Basilici <t.basilici@19.coop>
Date: Fri, 9 Apr 2021 13:36:49 +0000
Subject: [PATCH 383/441] Update interface/lib/classes/remote.d/client.inc.php,
 interface/lib/classes/functions.inc.php, interface/web/client/client_edit.php
 files

---
 interface/lib/classes/functions.inc.php       | 220 +++++++++---------
 interface/lib/classes/remote.d/client.inc.php |   4 +-
 interface/web/client/client_edit.php          |  10 +-
 3 files changed, 115 insertions(+), 119 deletions(-)

diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index f1f4fd1789..02d573a778 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -529,119 +529,115 @@ class functions {
 	}
 
         // Function to lock a client
-        public function func_client_lock($client_id,$locked) {
-
-                global $app;
-                $client_data = $app->db->queryOneRecord('SELECT `tmp_data` FROM `client` WHERE `client_id` = ?', $client_id);
-                if($client_data['tmp_data'] == '') $tmp_data = array();
-                else $tmp_data = unserialize($client_data['tmp_data']);
-                if(!is_array($tmp_data)) $tmp_data = array();
-                $to_disable = array('cron' => 'id',
-                        'ftp_user' => 'ftp_user_id',
-                        'mail_domain' => 'domain_id',
-                        'mail_user' => 'mailuser_id',
-                        'mail_user_smtp' => 'mailuser_id',
-                        'mail_forwarding' => 'forwarding_id',
-                        'mail_get' => 'mailget_id',
-                        'openvz_vm' => 'vm_id',
-                        'shell_user' => 'shell_user_id',
-                        'webdav_user' => 'webdav_user_id',
-                        'web_database' => 'database_id',
-                        'web_domain' => 'domain_id',
-                        'web_folder' => 'web_folder_id',
-                        'web_folder_user' => 'web_folder_user_id'
-                );
-
-                $udata = $app->db->queryOneRecord('SELECT `userid` FROM `sys_user` WHERE `client_id` = ?', $client_id);
-                $gdata = $app->db->queryOneRecord('SELECT `groupid` FROM `sys_group` WHERE `client_id` = ?', $client_id);
-                $sys_groupid = $gdata['groupid'];
-                $sys_userid = $udata['userid'];
-                if($locked == 'y') {
-                        $prev_active = array();
-                        $prev_sysuser = array();
-                        foreach($to_disable as $current => $keycolumn) {
-                                $active_col = 'active';
-                                $reverse = false;
-                                if($current == 'mail_user') {
-                                        $active_col = 'postfix';
-                                } elseif($current == 'mail_user_smtp') {
-                                        $current = 'mail_user';
-                                        $active_col = 'disablesmtp';
-                                        $reverse = true;
-                                }
-
-                                if(!isset($prev_active[$current])) $prev_active[$current] = array();
-                                if(!isset($prev_sysuser[$current])) $prev_sysuser[$current] = array();
-
-                                $entries = $app->db->queryAllRecords('SELECT ?? as `id`, `sys_userid`, ?? FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $active_col, $current, $sys_groupid);
-                                foreach($entries as $item) {
-
-                                        if($item[$active_col] != 'y' && $reverse == false) $prev_active[$current][$item['id']][$active_col] = 'n';
-                                        elseif($item[$active_col] == 'y' && $reverse == true) $prev_active[$current][$item['id']][$active_col] = 'y';
-                                        if($item['sys_userid'] != $sys_userid) $prev_sysuser[$current][$item['id']] = $item['sys_userid'];
-                                        // we don't have to store these if y, as everything without previous state gets enabled later
-
-                                        //$app->db->datalogUpdate($current, array($active_col => ($reverse == true ? 'y' : 'n'), 'sys_userid' => $_SESSION["s"]["user"]["userid"]), $keycolumn, $item['id']);
-                                        $app->db->datalogUpdate($current, array($active_col => ($reverse == true ? 'y' : 'n'), 'sys_userid' => $sys_userid), $keycolumn, $item['id']);
-                                }
-}
+	public function func_client_lock($client_id,$locked) {
+		global $app;
+		$client_data = $app->db->queryOneRecord('SELECT `tmp_data` FROM `client` WHERE `client_id` = ?', $client_id);
+		if($client_data['tmp_data'] == '') $tmp_data = array();
+		else $tmp_data = unserialize($client_data['tmp_data']);
+		if(!is_array($tmp_data)) $tmp_data = array();
+		$to_disable = array('cron' => 'id',
+							'ftp_user' => 'ftp_user_id',
+							'mail_domain' => 'domain_id',
+							'mail_user' => 'mailuser_id',
+							'mail_user_smtp' => 'mailuser_id',
+							'mail_forwarding' => 'forwarding_id',
+							'mail_get' => 'mailget_id',
+							'openvz_vm' => 'vm_id',
+							'shell_user' => 'shell_user_id',
+							'webdav_user' => 'webdav_user_id',
+							'web_database' => 'database_id',
+							'web_domain' => 'domain_id',
+							'web_folder' => 'web_folder_id',
+							'web_folder_user' => 'web_folder_user_id'
+							);
+		$udata = $app->db->queryOneRecord('SELECT `userid` FROM `sys_user` WHERE `client_id` = ?', $client_id);
+		$gdata = $app->db->queryOneRecord('SELECT `groupid` FROM `sys_group` WHERE `client_id` = ?', $client_id);
+		$sys_groupid = $gdata['groupid'];
+		$sys_userid = $udata['userid'];
+		if($locked == 'y') {
+			$prev_active = array();
+			$prev_sysuser = array();
+			foreach($to_disable as $current => $keycolumn) {
+				$active_col = 'active';
+				$reverse = false;
+				if($current == 'mail_user') {
+						$active_col = 'postfix';
+				} elseif($current == 'mail_user_smtp') {
+						$current = 'mail_user';
+						$active_col = 'disablesmtp';
+						$reverse = true;
+				}
+
+				if(!isset($prev_active[$current])) $prev_active[$current] = array();
+				if(!isset($prev_sysuser[$current])) $prev_sysuser[$current] = array();
+
+				$entries = $app->db->queryAllRecords('SELECT ?? as `id`, `sys_userid`, ?? FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $active_col, $current, $sys_groupid);
+				foreach($entries as $item) {
+
+						if($item[$active_col] != 'y' && $reverse == false) $prev_active[$current][$item['id']][$active_col] = 'n';
+						elseif($item[$active_col] == 'y' && $reverse == true) $prev_active[$current][$item['id']][$active_col] = 'y';
+						if($item['sys_userid'] != $sys_userid) $prev_sysuser[$current][$item['id']] = $item['sys_userid'];
+						// we don't have to store these if y, as everything without previous state gets enabled later
+
+						//$app->db->datalogUpdate($current, array($active_col => ($reverse == true ? 'y' : 'n'), 'sys_userid' => $_SESSION["s"]["user"]["userid"]), $keycolumn, $item['id']);
+						$app->db->datalogUpdate($current, array($active_col => ($reverse == true ? 'y' : 'n'), 'sys_userid' => $sys_userid), $keycolumn, $item['id']);
+				}
+			}
 
-                        $tmp_data['prev_active'] = $prev_active;
-                        $tmp_data['prev_sys_userid'] = $prev_sysuser;
-                        $app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $client_id);
-                        unset($prev_active);
-                        unset($prev_sysuser);
-                } elseif ($locked == 'n') {
-                        foreach($to_disable as $current => $keycolumn) {
-                                $active_col = 'active';
-                                $reverse = false;
-                                if($current == 'mail_user') {
-                                        $active_col = 'postfix';
-                                } elseif($current == 'mail_user_smtp') {
-                                        $current = 'mail_user';
-                                        $active_col = 'disablesmtp';
-                                        $reverse = true;
-                                }
-
-                                $entries = $app->db->queryAllRecords('SELECT ?? as `id` FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $current, $sys_groupid);
-                                foreach($entries as $item) {
-                                        $set_active = ($reverse == true ? 'n' : 'y');
-                                        $set_inactive = ($reverse == true ? 'y' : 'n');
-                                        $set_sysuser = $sys_userid;
-                                        if(array_key_exists('prev_active', $tmp_data) == true
-                                                && array_key_exists($current, $tmp_data['prev_active']) == true
-                                                && array_key_exists($item['id'], $tmp_data['prev_active'][$current]) == true
-                                                && $tmp_data['prev_active'][$current][$item['id']][$active_col] == $set_inactive) $set_active = $set_inactive;
-                                        if(array_key_exists('prev_sysuser', $tmp_data) == true
-                                                && array_key_exists($current, $tmp_data['prev_sysuser']) == true
-                                                && array_key_exists($item['id'], $tmp_data['prev_sysuser'][$current]) == true
-                                                && $tmp_data['prev_sysuser'][$current][$item['id']] != $sys_userid) $set_sysuser = $tmp_data['prev_sysuser'][$current][$item['id']];
-
-                                        $app->db->datalogUpdate($current, array($active_col => $set_active, 'sys_userid' => $set_sysuser), $keycolumn, $item['id']);
-                                }
-                        }
-                        if(array_key_exists('prev_active', $tmp_data)) unset($tmp_data['prev_active']);
-                        $app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $client_id);
-                }
-                unset($tmp_data);
-                unset($entries);
-                unset($to_disable);
-
-        }
-        // Function to cancel disable/enable a client
-        public function func_client_cancel($client_id,$cancel) {
-                global $app;
-                if ($cancel == 'y') {
-                        $sql = "UPDATE sys_user SET active = '0' WHERE client_id = ?";
-                        $result = $app->db->query($sql, $client_id);
-                } elseif($cancel == 'n') {
-                        $sql = "UPDATE sys_user SET active = '1' WHERE client_id = ?";
-                        $result = $app->db->query($sql, $client_id);
-                } else {
-                        $result = false;
-                }
-                return $result;
-        }	
+			$tmp_data['prev_active'] = $prev_active;
+			$tmp_data['prev_sys_userid'] = $prev_sysuser;
+			$app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $client_id);
+			unset($prev_active);
+			unset($prev_sysuser);
+		} elseif ($locked == 'n') {
+			foreach($to_disable as $current => $keycolumn) {
+				$active_col = 'active';
+				$reverse = false;
+				if($current == 'mail_user') {
+						$active_col = 'postfix';
+				} elseif($current == 'mail_user_smtp') {
+						$current = 'mail_user';
+						$active_col = 'disablesmtp';
+						$reverse = true;
+				}
+
+				$entries = $app->db->queryAllRecords('SELECT ?? as `id` FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $current, $sys_groupid);
+				foreach($entries as $item) {
+						$set_active = ($reverse == true ? 'n' : 'y');
+						$set_inactive = ($reverse == true ? 'y' : 'n');
+						$set_sysuser = $sys_userid;
+						if(array_key_exists('prev_active', $tmp_data) == true
+								&& array_key_exists($current, $tmp_data['prev_active']) == true
+								&& array_key_exists($item['id'], $tmp_data['prev_active'][$current]) == true
+								&& $tmp_data['prev_active'][$current][$item['id']][$active_col] == $set_inactive) $set_active = $set_inactive;
+						if(array_key_exists('prev_sysuser', $tmp_data) == true
+								&& array_key_exists($current, $tmp_data['prev_sysuser']) == true
+								&& array_key_exists($item['id'], $tmp_data['prev_sysuser'][$current]) == true
+								&& $tmp_data['prev_sysuser'][$current][$item['id']] != $sys_userid) $set_sysuser = $tmp_data['prev_sysuser'][$current][$item['id']];
+						$app->db->datalogUpdate($current, array($active_col => $set_active, 'sys_userid' => $set_sysuser), $keycolumn, $item['id']);
+				}
+			}
+			if(array_key_exists('prev_active', $tmp_data)) unset($tmp_data['prev_active']);
+			$app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $client_id);
+		}
+		unset($tmp_data);
+		unset($entries);
+		unset($to_disable);
+    }
+    // Function to cancel disable/enable a client
+	public function func_client_cancel($client_id,$cancel) {
+		global $app;
+		if ($cancel == 'y') {
+			$sql = "UPDATE sys_user SET active = '0' WHERE client_id = ?";
+			$result = $app->db->query($sql, $client_id);
+		} elseif($cancel == 'n') {
+			$sql = "UPDATE sys_user SET active = '1' WHERE client_id = ?";
+			$result = $app->db->query($sql, $client_id);
+		} else {
+			$result = false;
+		}
+		return $result;
+	}	
 
 }
 
diff --git a/interface/lib/classes/remote.d/client.inc.php b/interface/lib/classes/remote.d/client.inc.php
index a571b571a9..58dcc3119f 100644
--- a/interface/lib/classes/remote.d/client.inc.php
+++ b/interface/lib/classes/remote.d/client.inc.php
@@ -246,11 +246,11 @@ class remoting_client extends remoting {
 		
 		// if canceled
         if ($params['canceled']) {
-            $result = $app->functions->func_client_cancel($client_id, $params['canceled']);
+        	$result = $app->functions->func_client_cancel($client_id, $params['canceled']);
         }
         // if locked
         if ($params['locked']) {
-            $result = $app->functions->func_client_lock($client_id, $params['locked']);
+        	$result = $app->functions->func_client_lock($client_id, $params['locked']);
 		}
 
 		return $affected_rows;
diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index d35b3bb849..cc8dc0aef9 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -429,13 +429,13 @@ class page_action extends tform_actions {
         if(!isset($this->dataRecord['locked'])) $this->dataRecord['locked'] = 'n';
         if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["locked"] != $this->oldDataRecord['locked']) 
 		{
-        	$lock = $app->functions->func_client_lock($this->id,$this->dataRecord["locked"]);
+			$lock = $app->functions->func_client_lock($this->id,$this->dataRecord["locked"]);
         }
 
-        if(!isset($this->dataRecord['canceled'])) $this->dataRecord['canceled'] = 'n';
-        if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["canceled"] != $this->oldDataRecord['canceled']) {
-                $cancel = $app->functions->func_client_cancel($this->id,$this->dataRecord["canceled"]);
-        }
+		if(!isset($this->dataRecord['canceled'])) $this->dataRecord['canceled'] = 'n';
+		if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["canceled"] != $this->oldDataRecord['canceled']) {
+			$cancel = $app->functions->func_client_cancel($this->id,$this->dataRecord["canceled"]);
+		}
 
 		// language changed
 		if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) {
-- 
GitLab


From cda8cce4e77ab95971f9144c6e090c8bb392eff4 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sun, 11 Apr 2021 11:09:51 +0000
Subject: [PATCH 384/441] Hide APS limits when APS is disabled (#6130)

---
 interface/web/client/client_edit.php                     | 9 +++++++++
 interface/web/client/client_template_edit.php            | 7 +++++++
 interface/web/client/reseller_edit.php                   | 8 ++++++++
 interface/web/client/templates/client_edit_limits.htm    | 2 ++
 .../web/client/templates/client_template_edit_limits.htm | 2 ++
 interface/web/client/templates/reseller_edit_limits.htm  | 2 ++
 6 files changed, 30 insertions(+)

diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index 3d2e4e805d..20daebad8a 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -190,6 +190,15 @@ class page_action extends tform_actions {
 			$app->tpl->setVar("show_per_domain_relay_options", 0);
 		}
 
+		// APS is enabled or not
+		$global_config = $app->getconf->get_global_config('sites');
+		if($global_config['show_aps_menu'] == 'y') {
+			$app->tpl->setVar("show_aps_menu", 1);
+		} else {
+			$app->tpl->setVar("show_aps_menu", 0);
+		}
+
+
 
 		//* Set the 'customer no' default value
 		if($this->id == 0) {
diff --git a/interface/web/client/client_template_edit.php b/interface/web/client/client_template_edit.php
index dc43d90de3..7cc3ab5ff9 100644
--- a/interface/web/client/client_template_edit.php
+++ b/interface/web/client/client_template_edit.php
@@ -73,6 +73,13 @@ class page_action extends tform_actions {
 		} else {
 			$app->tpl->setVar("show_per_domain_relay_options", 0);
 		}
+		// APS is enabled or not
+		$global_config = $app->getconf->get_global_config('sites');
+		if($global_config['show_aps_menu'] == 'y') {
+			$app->tpl->setVar("show_aps_menu", 1);
+		} else {
+			$app->tpl->setVar("show_aps_menu", 0);
+		}
 		parent::onShowEnd();
 	}
 
diff --git a/interface/web/client/reseller_edit.php b/interface/web/client/reseller_edit.php
index 78ee149e77..7cbd6687bc 100644
--- a/interface/web/client/reseller_edit.php
+++ b/interface/web/client/reseller_edit.php
@@ -184,6 +184,14 @@ class page_action extends tform_actions {
 			$app->tpl->setVar("show_per_domain_relay_options", 0);
 		}
 
+		// APS is enabled or not
+		$global_config = $app->getconf->get_global_config('sites');
+		if($global_config['show_aps_menu'] == 'y') {
+			$app->tpl->setVar("show_aps_menu", 1);
+		} else {
+			$app->tpl->setVar("show_aps_menu", 0);
+		}
+
 		//* Set the 'customer no' default value
 		if($this->id == 0) {
 			//* get the system config
diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm
index b7a0ccf69c..a4a4a9dfe7 100644
--- a/interface/web/client/templates/client_edit_limits.htm
+++ b/interface/web/client/templates/client_edit_limits.htm
@@ -433,6 +433,7 @@
       </div>
     </div>
   </div>
+  <tmpl_if name="show_aps_menu">
   <div class="panel panel-default">
     <div class="panel-heading" role="tab" id="headingAPS">
       <h4 class="panel-title">
@@ -450,6 +451,7 @@
       </div>
     </div>
   </div>
+  </tmpl_if>
 </div>
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
 
diff --git a/interface/web/client/templates/client_template_edit_limits.htm b/interface/web/client/templates/client_template_edit_limits.htm
index 8aa6d87ac7..88162d9214 100644
--- a/interface/web/client/templates/client_template_edit_limits.htm
+++ b/interface/web/client/templates/client_template_edit_limits.htm
@@ -391,6 +391,7 @@
     </div>
   </div>
   <!-- APS -->
+  <tmpl_if name="show_aps_menu">
   <div class="panel panel-default">
     <div class="panel-heading" role="tab" id="headingAPS">
       <h4 class="panel-title">
@@ -408,6 +409,7 @@
       </div>
     </div>
   </div>
+  </tmpl_if>
   <tmpl_if name="is_admin">
   <!-- Client -->
   <div class="panel panel-default">
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm
index cbc8c38c57..e69642bc57 100644
--- a/interface/web/client/templates/reseller_edit_limits.htm
+++ b/interface/web/client/templates/reseller_edit_limits.htm
@@ -435,6 +435,7 @@
     </div>
   </div>
   <!-- APS -->
+  <tmpl_if name="show_aps_menu">
   <div class="panel panel-default">
     <div class="panel-heading" role="tab" id="headingAPS">
       <h4 class="panel-title">
@@ -452,6 +453,7 @@
       </div>
     </div>
   </div>
+  </tmpl_if>
   <!-- Client -->
   <div class="panel panel-default">
     <div class="panel-heading" role="tab" id="headingClient">
-- 
GitLab


From c6d1c5d9dabc2aeba1b24c89fc266b1aaa62963e Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 13 Apr 2021 17:11:37 -0600
Subject: [PATCH 385/441] set acme.log path in installer

---
 install/lib/installer_base.lib.php | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index aa85837ffc..d39754750d 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2886,8 +2886,13 @@ class installer_base {
 				$check_acme_file = $acme_cert_dir . '/cert.pem';
 			}
 		}
-
 		swriteln('Using certificate path ' . $acme_cert_dir);
+
+		if(!is_dir($conf['ispconfig_log_dir'])) {
+			mkdir($conf['ispconfig_log_dir'], 0755, true);
+		}
+		$acme_log = $conf['ispconfig_log_dir'] . '/acme.log';
+
 		$ip_address_match = false;
 		if(!(($svr_ip4 && in_array($svr_ip4, $dns_ips)) || ($svr_ip6 && in_array($svr_ip6, $dns_ips)))) {
 			swriteln('Server\'s public ip(s) (' . $svr_ip4 . ($svr_ip6 ? ', ' . $svr_ip6 : '') . ') not found in A/AAAA records for ' . $hostname . ': ' . implode(', ', $dns_ips));
@@ -3015,11 +3020,11 @@ class installer_base {
 				$out = null;
 				$ret = null;
 				if($conf['nginx']['installed'] == true || $conf['apache']['installed'] == true) {
-					exec("$acme --issue -w /usr/local/ispconfig/interface/acme -d " . escapeshellarg($hostname) . " $renew_hook", $out, $ret);
+					exec("$acme --issue --log $acme_log -w /usr/local/ispconfig/interface/acme -d " . escapeshellarg($hostname) . " $renew_hook", $out, $ret);
 				}
 				// Else, it is not webserver, so we use standalone
 				else {
-					exec("$acme --issue --standalone -d " . escapeshellarg($hostname) . " $hook", $out, $ret);
+					exec("$acme --issue --log $acme_log --standalone -d " . escapeshellarg($hostname) . " $hook", $out, $ret);
 				}
 
 				if($ret == 0 || ($ret == 2 && file_exists($check_acme_file))) {
@@ -3031,7 +3036,7 @@ class installer_base {
 					//$acme_cert = "--cert-file $acme_cert_dir/cert.pem";
 					$acme_key = "--key-file " . escapeshellarg($ssl_key_file);
 					$acme_chain = "--fullchain-file " . escapeshellarg($ssl_crt_file);
-					exec("$acme --install-cert -d " . escapeshellarg($hostname) . " $acme_key $acme_chain");
+					exec("$acme --install-cert --log $acme_log -d " . escapeshellarg($hostname) . " $acme_key $acme_chain");
 					$issued_successfully = true;
 					umask($old_umask);
 
-- 
GitLab


From 9b9df0507213936504265e1a2abe027c2e60bed8 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Tue, 20 Apr 2021 15:47:28 +0000
Subject: [PATCH 386/441] Remove obsolete dnssec-lookaside setting (#6156)

---
 install/tpl/named.conf.options.master | 1 -
 1 file changed, 1 deletion(-)

diff --git a/install/tpl/named.conf.options.master b/install/tpl/named.conf.options.master
index cd5b0ebc2f..4f001960bf 100644
--- a/install/tpl/named.conf.options.master
+++ b/install/tpl/named.conf.options.master
@@ -20,7 +20,6 @@ options {
 	//========================================================================
 	dnssec-enable yes;
 	dnssec-validation yes;
-	dnssec-lookaside auto;
 
 	version "unknown";
 	
-- 
GitLab


From 7a0869403fa385999cd38c2905662988089fffec Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Tue, 20 Apr 2021 15:57:21 +0000
Subject: [PATCH 387/441] Remove outdated configure_postfix option (#6141)

---
 install/dist/lib/fedora.lib.php | 231 --------------------------------
 1 file changed, 231 deletions(-)

diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index 25dc461433..2e46ed16d3 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -47,237 +47,6 @@ class installer_dist extends installer_base {
 		}
 	}
 
-	function configure_postfix($options = '')
-	{
-		global $conf,$autoinstall;
-		$cf = $conf['postfix'];
-		$config_dir = $cf['config_dir'];
-
-		if(!is_dir($config_dir)){
-			$this->error("The postfix configuration directory '$config_dir' does not exist.");
-		}
-
-		//* Install virtual mappings
-		foreach (glob('tpl/mysql-virtual_*.master') as $filename) {
-			$this->process_postfix_config( basename($filename, '.master') );
-		}
-
-		//* mysql-verify_recipients.cf
-		$this->process_postfix_config('mysql-verify_recipients.cf');
-
-		//* postfix-dkim
-		$filename='tag_as_originating.re';
-		$full_file_name=$config_dir.'/'.$filename;
-		if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
-		$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
-		wf($full_file_name, $content);
-
-		$filename='tag_as_foreign.re';
-		$full_file_name=$config_dir.'/'.$filename;
-		if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
-		$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
-		wf($full_file_name, $content);
-
-		//* Creating virtual mail user and group
-		$command = 'groupadd -g '.$cf['vmail_groupid'].' '.$cf['vmail_groupname'];
-		if(!is_group($cf['vmail_groupname'])) caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
-
-		$command = 'useradd -g '.$cf['vmail_groupname'].' -u '.$cf['vmail_userid'].' '.$cf['vmail_username'].' -d '.$cf['vmail_mailbox_base'].' -m';
-		if(!is_user($cf['vmail_username'])) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
-
-		//* These postconf commands will be executed on installation and update
-		$server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ?", $conf['server_id']);
-		$server_ini_array = ini_to_array(stripslashes($server_ini_rec['config']));
-		unset($server_ini_rec);
-
-		//* If there are RBL's defined, format the list and add them to smtp_recipient_restrictions to prevent removeal after an update
-		$rbl_list = '';
-		if (@isset($server_ini_array['mail']['realtime_blackhole_list']) && $server_ini_array['mail']['realtime_blackhole_list'] != '') {
-			$rbl_hosts = explode(",", str_replace(" ", "", $server_ini_array['mail']['realtime_blackhole_list']));
-			foreach ($rbl_hosts as $key => $value) {
-				$rbl_list .= ", reject_rbl_client ". $value;
-			}
-		}
-		unset($rbl_hosts);
-
-		//* If Postgrey is installed, configure it
-		$greylisting = '';
-		if($conf['postgrey']['installed'] == true) {
-			$greylisting = ', check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf';
-		}
-
-		$reject_sender_login_mismatch = '';
-		$reject_authenticated_sender_login_mismatch = '';
-		if(isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) {
-			$reject_sender_login_mismatch = ', reject_sender_login_mismatch';
-			$reject_authenticated_sender_login_mismatch = 'reject_authenticated_sender_login_mismatch, ';
-		}
-
-		# placeholder includes comment char
-		$stress_adaptive_placeholder = '#{stress_adaptive} ';
-		$stress_adaptive = (isset($server_ini_array['mail']['stress_adaptive']) && ($server_ini_array['mail']['stress_adaptive'] == 'y')) ? '' : $stress_adaptive_placeholder;
-
-		$reject_unknown_client_hostname='';
-		if (isset($server_ini_array['mail']['reject_unknown']) && ($server_ini_array['mail']['reject_unknown'] == 'client' || $server_ini_array['mail']['reject_unknown'] == 'client_helo')) {
-			$reject_unknown_client_hostname=',reject_unknown_client_hostname';
-		}
-		$reject_unknown_helo_hostname='';
-		if ((!isset($server_ini_array['mail']['reject_unknown'])) || $server_ini_array['mail']['reject_unknown'] == 'helo' || $server_ini_array['mail']['reject_unknown'] == 'client_helo') {
-			$reject_unknown_helo_hostname=',reject_unknown_helo_hostname';
-		}
-
-		unset($server_ini_array);
-
-		$myhostname = str_replace('.','\.',$conf['hostname']);
-
-		$postconf_placeholders = array('{config_dir}' => $config_dir,
-			'{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
-			'{vmail_userid}' => $cf['vmail_userid'],
-			'{vmail_groupid}' => $cf['vmail_groupid'],
-			'{rbl_list}' => $rbl_list,
-			'{greylisting}' => $greylisting,
-			'{reject_slm}' => $reject_sender_login_mismatch,
-			'{reject_aslm}' => $reject_authenticated_sender_login_mismatch,
-			'{myhostname}' => $myhostname,
-			$stress_adaptive_placeholder => $stress_adaptive,
-			'{reject_unknown_client_hostname}' => $reject_unknown_client_hostname,
-			'{reject_unknown_helo_hostname}' => $reject_unknown_helo_hostname,
-		);
-
-		$postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_postfix.conf.master', 'tpl/fedora_postfix.conf.master');
-		$postconf_tpl = strtr($postconf_tpl, $postconf_placeholders);
-		$postconf_commands = array_filter(explode("\n", $postconf_tpl)); // read and remove empty lines
-
-		//* These postconf commands will be executed on installation only
-		if($this->is_update == false) {
-			$postconf_commands = array_merge($postconf_commands, array(
-					'myhostname = '.$conf['hostname'],
-					'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain',
-					'mynetworks = 127.0.0.0/8 [::1]/128'
-				));
-		}
-
-		//* Create the header and body check files
-		touch($config_dir.'/header_checks');
-		touch($config_dir.'/mime_header_checks');
-		touch($config_dir.'/nested_header_checks');
-		touch($config_dir.'/body_checks');
-		touch($config_dir.'/sasl_passwd');
-
-		//* Create the mailman files
-		if(!is_dir('/var/lib/mailman/data')) exec('mkdir -p /var/lib/mailman/data');
-		//if(!is_file('/var/lib/mailman/data/aliases')) touch('/var/lib/mailman/data/aliases');
-		if(is_file('/var/lib/mailman/data/aliases')) unlink('/var/lib/mailman/data/aliases');
-		if(!is_link('/var/lib/mailman/data/aliases')) symlink('/etc/mailman/aliases', '/var/lib/mailman/data/aliases');
-		if(!is_dir('/etc/mailman')) mkdir('/etc/mailman');
-		if(!is_file('/etc/mailman/aliases')) touch('/etc/mailman/aliases');
-		exec('postalias /var/lib/mailman/data/aliases');
-		if(!is_file('/etc/mailman/virtual-mailman')) touch('/etc/mailman/virtual-mailman');
-		exec('postmap /etc/mailman/virtual-mailman');
-		if(!is_file('/var/lib/mailman/data/transport-mailman')) touch('/var/lib/mailman/data/transport-mailman');
-		exec('/usr/sbin/postmap /var/lib/mailman/data/transport-mailman');
-
-		//* Create auxillary postfix conf files
-		$configfile = 'helo_access';
-		if(is_file($config_dir.'/'.$configfile)) {
-			copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
-			chmod($config_dir.'/'.$configfile.'~', 0400);
-		}
-		$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
-		$content = strtr($content, $postconf_placeholders);
-		# todo: look up this server's ip addrs and loop through each
-		# todo: look up domains hosted on this server and loop through each
-		wf($config_dir.'/'.$configfile, $content);
-
-		$configfile = 'blacklist_helo';
-		if(is_file($config_dir.'/'.$configfile)) {
-			copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
-			chmod($config_dir.'/'.$configfile.'~', 0400);
-		}
-		$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
-		$content = strtr($content, $postconf_placeholders);
-		wf($config_dir.'/'.$configfile, $content);
-
-		//* Make a backup copy of the main.cf file
-		copy($config_dir.'/main.cf', $config_dir.'/main.cf~');
-
-		//* Executing the postconf commands
-		foreach($postconf_commands as $cmd) {
-			$command = "postconf -e '$cmd'";
-			caselog($command." &> /dev/null", __FILE__, __LINE__, 'EXECUTED: '.$command, 'Failed to execute the command '.$command);
-		}
-
-		if(!stristr($options, 'dont-create-certs')) {
-			//* Create the SSL certificate
-			if(AUTOINSTALL){
-				$command = 'cd '.$config_dir.'; '
-					."openssl req -new -subj '/C=".escapeshellcmd($autoinstall['ssl_cert_country'])."/ST=".escapeshellcmd($autoinstall['ssl_cert_state'])."/L=".escapeshellcmd($autoinstall['ssl_cert_locality'])."/O=".escapeshellcmd($autoinstall['ssl_cert_organisation'])."/OU=".escapeshellcmd($autoinstall['ssl_cert_organisation_unit'])."/CN=".escapeshellcmd($autoinstall['ssl_cert_common_name'])."' -outform PEM -out smtpd.cert -newkey rsa:4096 -nodes -keyout smtpd.key -keyform PEM -days 3650 -x509";
-			} else {
-				$command = 'cd '.$config_dir.'; '
-					.'openssl req -new -outform PEM -out smtpd.cert -newkey rsa:4096 -nodes -keyout smtpd.key -keyform PEM -days 3650 -x509';
-			}
-			exec($command);
-
-			$command = 'chmod o= '.$config_dir.'/smtpd.key';
-			caselog($command.' &> /dev/null', __FILE__, __LINE__, 'EXECUTED: '.$command, 'Failed to execute the command '.$command);
-		}
-
-		//** We have to change the permissions of the courier authdaemon directory to make it accessible for maildrop.
-		$command = 'chmod 755 /var/spool/authdaemon';
-		caselog($command.' &> /dev/null', __FILE__, __LINE__, 'EXECUTED: '.$command, 'Failed to execute the command '.$command);
-
-		//* Changing maildrop lines in posfix master.cf
-		if(is_file($config_dir.'/master.cf')){
-			copy($config_dir.'/master.cf', $config_dir.'/master.cf~');
-		}
-		if(is_file($config_dir.'/master.cf~')){
-			exec('chmod 400 '.$config_dir.'/master.cf~');
-		}
-		$configfile = $config_dir.'/master.cf';
-		$content = rf($configfile);
-		// if postfix package is from fedora or centios main repo
-		$content = str_replace('#  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}',
-			'  flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
-			$content);
-
-		// If postfix package is from centos plus repo
-		$content = str_replace('#  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}',
-			'  flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
-			$content);
-
-		$content = str_replace('  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}',
-			'  flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
-			$content);
-
-
-		$content = str_replace('#maildrop  unix  -       n       n       -       -       pipe',
-			'maildrop  unix  -       n       n       -       -       pipe',
-			$content);
-
-		wf($configfile, $content);
-
-		//* Writing the Maildrop mailfilter file
-		$configfile = 'mailfilter';
-		if(is_file($cf['vmail_mailbox_base'].'/.'.$configfile)){
-			copy($cf['vmail_mailbox_base'].'/.'.$configfile, $cf['vmail_mailbox_base'].'/.'.$configfile.'~');
-		}
-		$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/$configfile.master");
-		$content = str_replace('{dist_postfix_vmail_mailbox_base}', $cf['vmail_mailbox_base'], $content);
-		wf($cf['vmail_mailbox_base'].'/.'.$configfile, $content);
-
-		//* Create the directory for the custom mailfilters
-		$command = 'mkdir '.$cf['vmail_mailbox_base'].'/mailfilters';
-		caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
-
-		//* Chmod and chown the .mailfilter file
-		$command = 'chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base'].'/.mailfilter';
-		caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
-
-		$command = 'chmod -R 600 '.$cf['vmail_mailbox_base'].'/.mailfilter';
-		caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
-
-	}
-
 	public function configure_saslauthd() {
 		global $conf;
 
-- 
GitLab


From 4406a09a2e0f9f64612eedf07fa3cd141cafc9f7 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 20 Apr 2021 13:25:17 -0600
Subject: [PATCH 388/441] missing check for a few rspamd custom templates

---
 install/lib/installer_base.lib.php            | 12 ++++++++++--
 .../plugins-available/rspamd_plugin.inc.php   | 19 ++++++++++++++++---
 2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index aa85837ffc..622674267c 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1868,7 +1868,11 @@ class installer_base {
 		);
 		foreach ($local_d as $f) {
 			$tpl = new tpl();
-			$tpl->newTemplate("rspamd_${f}.master");
+			if (file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
+				$tpl->newTemplate($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master");
+			} else {
+				$tpl->newTemplate("rspamd_${f}.master");
+			}
 
 			$tpl->setVar('dkim_path', $mail_config['dkim_path']);
 			$tpl->setVar('rspamd_redis_servers', $mail_config['rspamd_redis_servers']);
@@ -1964,7 +1968,11 @@ class installer_base {
 		unset($server_ini_string);
 
 		$tpl = new tpl();
-		$tpl->newTemplate('rspamd_worker-controller.inc.master');
+		if (file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_worker-controller.inc.master")) {
+			$tpl->newTemplate($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_worker-controller.inc.master");
+		} else {
+			$tpl->newTemplate("rspamd_worker-controller.inc.master");
+		}
 		$rspamd_password = $mail_config['rspamd_password'];
 		$crypted_password = trim(exec('rspamadm pw -p ' . escapeshellarg($rspamd_password)));
 		if($crypted_password) {
diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index 63640d02e6..9d34ac8a36 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -295,7 +295,11 @@ class rspamd_plugin {
 				$app->load('tpl');
 
 				$tpl = new tpl();
-				$tpl->newTemplate('rspamd_users.inc.conf.master');
+				if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master")) {
+					$tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master");
+				} else {
+					$tpl->newTemplate("rspamd_users.inc.conf.master");
+				}
 
 				$tpl->setVar('record_identifier', 'ispc_' . $type . '_' . $entry_id);
 				$tpl->setVar('priority', $settings_priority);
@@ -443,7 +447,12 @@ class rspamd_plugin {
 					}
 				} else {
 					$tpl = new tpl();
-					$tpl->newTemplate('rspamd_wblist.inc.conf.master');
+					if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_wblist.inc.conf.master")) {
+			                        $tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_wblist.inc.conf.master");
+					} else {
+						$tpl->newTemplate("rspamd_wblist.inc.conf.master");
+					}
+
 					$tpl->setVar('list_scope', ($global_filter ? 'global' : 'spamfilter'));
 					$tpl->setVar('record_id', $record_id);
 					// add 30/40 to priority to avoid collisions and prefer white/blacklists above mailbox/domain spamfilter settings
@@ -521,7 +530,11 @@ class rspamd_plugin {
 		);
 		foreach ($local_d as $f) {
 			$tpl = new tpl();
-			$tpl->newTemplate("rspamd_${f}.master");
+			if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_${f}.master")) {
+				$tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_${f}.master");
+			} else {
+				$tpl->newTemplate("rspamd_${f}.master");
+			}
 
 			$tpl->setVar('dkim_path', $mail_config['dkim_path']);
 			$tpl->setVar('rspamd_redis_servers', $mail_config['rspamd_redis_servers']);
-- 
GitLab


From 02a1d26102ba901768dc269ac9813348b45235bf Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@amsterdamtech.nl>
Date: Wed, 21 Apr 2021 14:05:26 +0200
Subject: [PATCH 389/441] CLarify update desc - apt instead of aptitude (#6155)

---
 interface/web/admin/lib/lang/ar_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/bg_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/br_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/ca_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/cz_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/de_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/dk_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/el_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/en_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/es_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/fi_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/fr_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/hr_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/hu_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/id_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/it_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/ja_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/nl_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/pl_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/pt_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/ro_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/ru_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/se_remote_action.lng | 2 +-
 interface/web/admin/lib/lang/sk_remote_action.lng | 2 +-
 24 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/interface/web/admin/lib/lang/ar_remote_action.lng b/interface/web/admin/lib/lang/ar_remote_action.lng
index 3f8948e19f..dfe56b616d 100644
--- a/interface/web/admin/lib/lang/ar_remote_action.lng
+++ b/interface/web/admin/lib/lang/ar_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Select Server';
 $wb['btn_do_txt'] = 'Execute action';
 $wb['do_osupdate_caption'] = 'Do OS-Update at remote server';
-$wb['do_osupdate_desc'] = 'This Action does a aptitude -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
+$wb['do_osupdate_desc'] = 'This Action does a apt -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['do_ispcupdate_caption'] = 'Do ISPConfig 3 - Update at remote server';
 $wb['do_ispcupdate_desc'] = 'This action does a ISPConfig3 update at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['action_scheduled'] = 'The action is scheduled for execution';
diff --git a/interface/web/admin/lib/lang/bg_remote_action.lng b/interface/web/admin/lib/lang/bg_remote_action.lng
index 6925ec260d..8d6e441d85 100644
--- a/interface/web/admin/lib/lang/bg_remote_action.lng
+++ b/interface/web/admin/lib/lang/bg_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Избери сървър';
 $wb['btn_do_txt'] = 'Изпълни действие';
 $wb['do_osupdate_caption'] = 'Направете OS - Актуализация на отдалечен сървър';
-$wb['do_osupdate_desc'] = 'Това действие прави за aptitude-y  ъпгрейд на избрания от Вас сървър.<br><br><strong>ИЗПОЛЗВАШ ТОВА НА ТВОЙ РИСК!</strong>';
+$wb['do_osupdate_desc'] = 'Това действие прави за apt-y  ъпгрейд на избрания от Вас сървър.<br><br><strong>ИЗПОЛЗВАШ ТОВА НА ТВОЙ РИСК!</strong>';
 $wb['do_ispcupdate_caption'] = 'Do ISPConfig 3 - Update at remote server';
 $wb['do_ispcupdate_desc'] = 'Това действие прави ISPConfig 3 обновяване на избрания от Вас сървър.<br><br><strong>ИЗПОЛЗВАШ ТОВА НА ТВОЙ РИСК!</strong>';
 $wb['action_scheduled'] = 'Това действие е насрочено за изпълнение';
diff --git a/interface/web/admin/lib/lang/br_remote_action.lng b/interface/web/admin/lib/lang/br_remote_action.lng
index 5c88861814..84e928dbd9 100644
--- a/interface/web/admin/lib/lang/br_remote_action.lng
+++ b/interface/web/admin/lib/lang/br_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Selecionar servidor';
 $wb['btn_do_txt'] = 'Executar ação';
 $wb['do_osupdate_caption'] = 'Atualizar sistema operacional no servidor remoto';
-$wb['do_osupdate_desc'] = 'Esta ação fará o comando \'aptitude -y upgrade\' no servidor selecionado.<br><br><strong>UTILIZE POR SUA CONTA E RISCO!</strong>';
+$wb['do_osupdate_desc'] = 'Esta ação fará o comando \'apt -y upgrade\' no servidor selecionado.<br><br><strong>UTILIZE POR SUA CONTA E RISCO!</strong>';
 $wb['do_ispcupdate_caption'] = 'Atualizar ISPConfig 3 - Atualizar o servidor remoto';
 $wb['do_ispcupdate_desc'] = 'Esta ação atualizará o ISPConfig3 no servidor selecionado.<br><br><strong>UTILIZE POR SUA CONTA E RISCO!</strong>';
 $wb['action_scheduled'] = 'A ação foi agendada.';
diff --git a/interface/web/admin/lib/lang/ca_remote_action.lng b/interface/web/admin/lib/lang/ca_remote_action.lng
index cb7800aca6..667f382fbb 100644
--- a/interface/web/admin/lib/lang/ca_remote_action.lng
+++ b/interface/web/admin/lib/lang/ca_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Select Server';
 $wb['btn_do_txt'] = 'Execute action';
 $wb['do_osupdate_caption'] = 'Do OS-Update at remote server';
-$wb['do_osupdate_desc'] = 'This Action does a \'aptitude -y upgrade\' at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
+$wb['do_osupdate_desc'] = 'This Action does a \'apt -y upgrade\' at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['do_ispcupdate_caption'] = 'Do ISPConfig 3 - Update at remote server';
 $wb['do_ispcupdate_desc'] = 'This action does a ISPConfig3 update at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['action_scheduled'] = 'The action is scheduled for execution';
diff --git a/interface/web/admin/lib/lang/cz_remote_action.lng b/interface/web/admin/lib/lang/cz_remote_action.lng
index c361f6d664..5f7fb604fc 100644
--- a/interface/web/admin/lib/lang/cz_remote_action.lng
+++ b/interface/web/admin/lib/lang/cz_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Zvolit server';
 $wb['btn_do_txt'] = 'Provést akci';
 $wb['do_osupdate_caption'] = 'Aktualizace operačního systému na vzdáleném serveru.';
-$wb['do_osupdate_desc'] = 'Tato akce provede \"aptitude -y\" aktualizaci na vybraném serveru.<br><br><strong>POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !</strong>';
+$wb['do_osupdate_desc'] = 'Tato akce provede \"apt -y\" aktualizaci na vybraném serveru.<br><br><strong>POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !</strong>';
 $wb['do_ispcupdate_caption'] = 'Provedení ISPConfig 3 - aktualizace na vzdáleném serveru';
 $wb['do_ispcupdate_desc'] = 'Tato akce provede \"ISPConfig 3\" aktualizaci na vašem vybraném serveru.<br><br><strong>POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !</strong>';
 $wb['action_scheduled'] = 'Akce je naplánována na provedení';
diff --git a/interface/web/admin/lib/lang/de_remote_action.lng b/interface/web/admin/lib/lang/de_remote_action.lng
index 3bb968d013..324c183311 100644
--- a/interface/web/admin/lib/lang/de_remote_action.lng
+++ b/interface/web/admin/lib/lang/de_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Server auswählen';
 $wb['btn_do_txt'] = 'Aktion ausführen';
 $wb['do_osupdate_caption'] = 'Betriebssystem Update auf entferntem Server ausführen';
-$wb['do_osupdate_desc'] = 'Diese Aktion wird ein aptitude -y upgrade auf dem ausgewählten Server ausführen.<br><br><strong>DIES GESCHIEHT AUF IHRE EIGENE VERANTWORTUNG!</strong>';
+$wb['do_osupdate_desc'] = 'Diese Aktion wird ein apt -y upgrade auf dem ausgewählten Server ausführen.<br><br><strong>DIES GESCHIEHT AUF IHRE EIGENE VERANTWORTUNG!</strong>';
 $wb['do_ispcupdate_caption'] = 'ISPConfig 3 Update auf entferntem Server ausführen';
 $wb['do_ispcupdate_desc'] = 'Diese Aktion wird ein Update des ISPConfig 3 Systems auf Ihrem ausgewählten Server ausführen.<br><br><strong>DIES GESCHIEHT AUF IHRE EIGENE VERANTWORTUNG!</strong>';
 $wb['action_scheduled'] = 'Die Aktion wurde zur Ausführung vorgemerkt';
diff --git a/interface/web/admin/lib/lang/dk_remote_action.lng b/interface/web/admin/lib/lang/dk_remote_action.lng
index a5366d9175..53c12f6adf 100644
--- a/interface/web/admin/lib/lang/dk_remote_action.lng
+++ b/interface/web/admin/lib/lang/dk_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Vælg Server(e)';
 $wb['btn_do_txt'] = 'Udfør handling';
 $wb['do_osupdate_caption'] = 'Udfør OS-Opdatering på fjern server';
-$wb['do_osupdate_desc'] = 'Denne Handling udfør en \'aptitude -y upgrade\' på den valgte server.<br><br><strong>BRUG DETTE PÅ EGEN RISIKO!</strong>';
+$wb['do_osupdate_desc'] = 'Denne Handling udfør en \'apt -y upgrade\' på den valgte server.<br><br><strong>BRUG DETTE PÅ EGEN RISIKO!</strong>';
 $wb['do_ispcupdate_caption'] = 'Udfør ISPConfig 3 - Opdatering på fjern-server';
 $wb['do_ispcupdate_desc'] = 'Denne Handling udfør en ISPConfig 3 opdatering på den valgte server.<br><br><strong>BRUG DETTE PÅ EGEN RISIKO!</strong>';
 $wb['action_scheduled'] = 'Handlingen er planlagt til udførelse';
diff --git a/interface/web/admin/lib/lang/el_remote_action.lng b/interface/web/admin/lib/lang/el_remote_action.lng
index ff63fd5935..1836332325 100644
--- a/interface/web/admin/lib/lang/el_remote_action.lng
+++ b/interface/web/admin/lib/lang/el_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Επιλογή Server';
 $wb['btn_do_txt'] = 'Εκτέλεση ενέργειας';
 $wb['do_osupdate_caption'] = 'Εκκίνηση αναβάθμισης λειτουργικού συστήματος στον απομακρυσμένο server';
-$wb['do_osupdate_desc'] = 'Αυτή η ενέργεια εκτελεί την εντολή aptitude -y upgrade στον επιλεγμένο σας server.<br><br><strong>ΧΡΗΣΙΜΟΠΟΙΗΣΤΕ ΤΟ ΜΕ ΔΙΚΗ ΣΑΣ ΕΥΘΥΝΗ!</strong>';
+$wb['do_osupdate_desc'] = 'Αυτή η ενέργεια εκτελεί την εντολή apt -y upgrade στον επιλεγμένο σας server.<br><br><strong>ΧΡΗΣΙΜΟΠΟΙΗΣΤΕ ΤΟ ΜΕ ΔΙΚΗ ΣΑΣ ΕΥΘΥΝΗ!</strong>';
 $wb['do_ispcupdate_caption'] = 'Εκκίνηση αναβάθμισης ISPConfig 3 στον απομακρυσμένο server';
 $wb['do_ispcupdate_desc'] = 'Αυτή η ενέργεια κάνει αναβάθμιση στο ISPConfig3 στον επιλεγμένο σας server.<br><br><strong>ΧΡΗΣΙΜΟΠΟΙΗΣΤΕ ΤΟ ΜΕ ΔΙΚΗ ΣΑΣ ΕΥΘΥΝΗ!</strong>';
 $wb['action_scheduled'] = 'Η ενέργεια προγραμματίστηκε για εκτέλεση';
diff --git a/interface/web/admin/lib/lang/en_remote_action.lng b/interface/web/admin/lib/lang/en_remote_action.lng
index 963eb473fa..16b45fada9 100644
--- a/interface/web/admin/lib/lang/en_remote_action.lng
+++ b/interface/web/admin/lib/lang/en_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Select Server';
 $wb['btn_do_txt'] = 'Execute action';
 $wb['do_osupdate_caption'] = 'Do OS-Update at remote server';
-$wb['do_osupdate_desc'] = 'This Action does a "aptitude -y upgrade" at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
+$wb['do_osupdate_desc'] = 'This Action does a "apt -y upgrade" at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['do_ispcupdate_caption'] = 'Do ISPConfig 3 - Update at remote server';
 $wb['do_ispcupdate_desc'] = 'This action does a ISPConfig3 update at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['action_scheduled'] = 'The action is scheduled for execution';
diff --git a/interface/web/admin/lib/lang/es_remote_action.lng b/interface/web/admin/lib/lang/es_remote_action.lng
index d259d33a15..0e7997d049 100644
--- a/interface/web/admin/lib/lang/es_remote_action.lng
+++ b/interface/web/admin/lib/lang/es_remote_action.lng
@@ -4,7 +4,7 @@ $wb['btn_do_txt'] = 'Ejecutar acción';
 $wb['do_ispcupdate_caption'] = 'Realizar actualización de ISPConfig 3 en el servidor remoto';
 $wb['do_ispcupdate_desc'] = 'Esta acción realizará una actualización de ISPConfig 3 en el servidor seleccionado.<br><br><strong>¡USE ESTO BAJO SU PROPIA RESPONSABILIDAD!</strong>';
 $wb['do_osupdate_caption'] = 'Ejecutar actualización de S.O. al servidor remoto';
-$wb['do_osupdate_desc'] = 'Esta acción realizará un \'aptitude -y upgrade\' en el servidor seleccionado.<br><br><strong>¡USE ESTO BAJO SU PROPIA RESPONSABILIDAD!</strong>';
+$wb['do_osupdate_desc'] = 'Esta acción realizará un \'apt -y upgrade\' en el servidor seleccionado.<br><br><strong>¡USE ESTO BAJO SU PROPIA RESPONSABILIDAD!</strong>';
 $wb['ispconfig_update_text'] = 'Inicie sesión como root en el shell de su servidor y ejecute el comando<br /><br /> <strong>ispconfig_update.sh</strong><br /><br />para iniciar la actualización de ISPConfig.<br /><br /><a href= target=>Pulse aquí para ver una descripción detallada de cómo actualizar</a>';
 $wb['ispconfig_update_title'] = 'Instrucciones de actualización de ISPConfig';
 $wb['select_all_server'] = 'Todos los servidores';
diff --git a/interface/web/admin/lib/lang/fi_remote_action.lng b/interface/web/admin/lib/lang/fi_remote_action.lng
index 3f8948e19f..dfe56b616d 100644
--- a/interface/web/admin/lib/lang/fi_remote_action.lng
+++ b/interface/web/admin/lib/lang/fi_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Select Server';
 $wb['btn_do_txt'] = 'Execute action';
 $wb['do_osupdate_caption'] = 'Do OS-Update at remote server';
-$wb['do_osupdate_desc'] = 'This Action does a aptitude -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
+$wb['do_osupdate_desc'] = 'This Action does a apt -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['do_ispcupdate_caption'] = 'Do ISPConfig 3 - Update at remote server';
 $wb['do_ispcupdate_desc'] = 'This action does a ISPConfig3 update at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['action_scheduled'] = 'The action is scheduled for execution';
diff --git a/interface/web/admin/lib/lang/fr_remote_action.lng b/interface/web/admin/lib/lang/fr_remote_action.lng
index 640c17af90..ca4dc85ddd 100644
--- a/interface/web/admin/lib/lang/fr_remote_action.lng
+++ b/interface/web/admin/lib/lang/fr_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Sélectionner un serveur';
 $wb['btn_do_txt'] = 'Exécuter l’action';
 $wb['do_osupdate_caption'] = 'Mettre à jour l\'OS du serveur distant';
-$wb['do_osupdate_desc'] = 'Cette action effectue aptitude -y upgrade sur le serveur sélectionné.<br/><br/><strong>UTILISEZ A VOS RISQUES ET PERILS !</strong>';
+$wb['do_osupdate_desc'] = 'Cette action effectue apt -y upgrade sur le serveur sélectionné.<br/><br/><strong>UTILISEZ A VOS RISQUES ET PERILS !</strong>';
 $wb['do_ispcupdate_caption'] = 'Mettre à jour ISPConfig 3 sur le serveur distant';
 $wb['do_ispcupdate_desc'] = 'Cette action met à jour ISPConfig3 sur le serveur sélectionné.<br/><br/><strong>UTILISEZ A VOS RISQUES ET PERILS !</strong>';
 $wb['action_scheduled'] = 'L’action est marquée pour exécution';
diff --git a/interface/web/admin/lib/lang/hr_remote_action.lng b/interface/web/admin/lib/lang/hr_remote_action.lng
index 6b10a83f53..d36e61de86 100644
--- a/interface/web/admin/lib/lang/hr_remote_action.lng
+++ b/interface/web/admin/lib/lang/hr_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Izaberi server';
 $wb['btn_do_txt'] = 'Pokreni';
 $wb['do_osupdate_caption'] = 'Nadogradi operativni sistem na udaljenom serveru';
-$wb['do_osupdate_desc'] = 'Ovime pokrećete \'aptitude -y upgrade\' na izabranom serveru.<br><br><strong>KORISTITE NA VLASTITU ODGOVORNOST!</strong>';
+$wb['do_osupdate_desc'] = 'Ovime pokrećete \'apt -y upgrade\' na izabranom serveru.<br><br><strong>KORISTITE NA VLASTITU ODGOVORNOST!</strong>';
 $wb['do_ispcupdate_caption'] = 'Nadogradi ISPConfig 3 na udaljenom serveru';
 $wb['do_ispcupdate_desc'] = 'Ovime pokrećete nadogradnju ISPConfig3-a na izabranom serveru.<br><br><strong>KORISTITE NA VLASTITU ODGOVORNOST!</strong>';
 $wb['action_scheduled'] = 'Nadogradnja je dodana u planer poslova';
diff --git a/interface/web/admin/lib/lang/hu_remote_action.lng b/interface/web/admin/lib/lang/hu_remote_action.lng
index 6c31b4fd0d..03d94116b9 100644
--- a/interface/web/admin/lib/lang/hu_remote_action.lng
+++ b/interface/web/admin/lib/lang/hu_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Válasszon szervert';
 $wb['btn_do_txt'] = 'Execute action';
 $wb['do_osupdate_caption'] = 'Do OS-Update at remote server';
-$wb['do_osupdate_desc'] = 'This Action does a aptitude -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
+$wb['do_osupdate_desc'] = 'This Action does a apt -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['do_ispcupdate_caption'] = 'Do ISPConfig 3 - Update at remote server';
 $wb['do_ispcupdate_desc'] = 'This action does a ISPConfig3 update at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['action_scheduled'] = 'The action is scheduled for execution';
diff --git a/interface/web/admin/lib/lang/id_remote_action.lng b/interface/web/admin/lib/lang/id_remote_action.lng
index 9e3eccb308..2ddc957f63 100644
--- a/interface/web/admin/lib/lang/id_remote_action.lng
+++ b/interface/web/admin/lib/lang/id_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Pilih Server';
 $wb['btn_do_txt'] = 'Jalankan Tindakan';
 $wb['do_osupdate_caption'] = 'Lakukan pemutakhiran OS di server remote';
-$wb['do_osupdate_desc'] = 'Tindakan ini menjalankan aptitude -y upgrade di server yang dipilih.<br><br><strong>PENGGUNAANNYA MENJADI TANGGUNG JAWAB ANDA SENDIRI!</strong>';
+$wb['do_osupdate_desc'] = 'Tindakan ini menjalankan apt -y upgrade di server yang dipilih.<br><br><strong>PENGGUNAANNYA MENJADI TANGGUNG JAWAB ANDA SENDIRI!</strong>';
 $wb['do_ispcupdate_caption'] = 'Lakukan pemutakhiran ISPConfig 3 - di server remote';
 $wb['do_ispcupdate_desc'] = 'Tindakan ini melakukan pemutakhiran ISPConfig3 di server yang Anda pilih.<br><br><strong>PENGGUNAANNYA MENJADI TANGGUNG JAWAB ANDA SENDIRI!</strong>';
 $wb['action_scheduled'] = 'Tindakan dijadwalkan untuk dijalankan';
diff --git a/interface/web/admin/lib/lang/it_remote_action.lng b/interface/web/admin/lib/lang/it_remote_action.lng
index 08d02db6a3..bb14a01f75 100644
--- a/interface/web/admin/lib/lang/it_remote_action.lng
+++ b/interface/web/admin/lib/lang/it_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Seleziona Server';
 $wb['btn_do_txt'] = 'Esegui Azione';
 $wb['do_osupdate_caption'] = 'Do OS-Update at remote server';
-$wb['do_osupdate_desc'] = 'This Action does a aptitude -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
+$wb['do_osupdate_desc'] = 'This Action does a apt -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['do_ispcupdate_caption'] = 'Do ISPConfig 3 - Update at remote server';
 $wb['do_ispcupdate_desc'] = 'This action does a ISPConfig3 update at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['action_scheduled'] = 'The action is scheduled for execution';
diff --git a/interface/web/admin/lib/lang/ja_remote_action.lng b/interface/web/admin/lib/lang/ja_remote_action.lng
index 3f8948e19f..dfe56b616d 100644
--- a/interface/web/admin/lib/lang/ja_remote_action.lng
+++ b/interface/web/admin/lib/lang/ja_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Select Server';
 $wb['btn_do_txt'] = 'Execute action';
 $wb['do_osupdate_caption'] = 'Do OS-Update at remote server';
-$wb['do_osupdate_desc'] = 'This Action does a aptitude -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
+$wb['do_osupdate_desc'] = 'This Action does a apt -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['do_ispcupdate_caption'] = 'Do ISPConfig 3 - Update at remote server';
 $wb['do_ispcupdate_desc'] = 'This action does a ISPConfig3 update at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['action_scheduled'] = 'The action is scheduled for execution';
diff --git a/interface/web/admin/lib/lang/nl_remote_action.lng b/interface/web/admin/lib/lang/nl_remote_action.lng
index 6f1521152f..146bbc6bfb 100644
--- a/interface/web/admin/lib/lang/nl_remote_action.lng
+++ b/interface/web/admin/lib/lang/nl_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Seleceert server';
 $wb['btn_do_txt'] = 'Actie uitvoeren';
 $wb['do_osupdate_caption'] = 'Voer een OS-update uit op de remote server';
-$wb['do_osupdate_desc'] = 'Deze actie voert een aptitude -y upgrade uit op de door u geselecteerde server.<br><br><strong>GEBRUIK OP EIGEN RISICO!</strong>';
+$wb['do_osupdate_desc'] = 'Deze actie voert een apt -y upgrade uit op de door u geselecteerde server.<br><br><strong>GEBRUIK OP EIGEN RISICO!</strong>';
 $wb['do_ispcupdate_caption'] = 'Voer een ISPConfig 3 - update uit op de remote server';
 $wb['do_ispcupdate_desc'] = 'Deze actie voert een ISPConfig3 update uit op de soor u geselecteerde server.<br><br><strong>GEBRUIK OP EIGEN RISICO!</strong>';
 $wb['action_scheduled'] = 'Deze actie is ingepland om uitgevoerd te worden';
diff --git a/interface/web/admin/lib/lang/pl_remote_action.lng b/interface/web/admin/lib/lang/pl_remote_action.lng
index 67a819febb..884b2047d5 100644
--- a/interface/web/admin/lib/lang/pl_remote_action.lng
+++ b/interface/web/admin/lib/lang/pl_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Wybierz serwer';
 $wb['btn_do_txt'] = 'Uruchom akcjÄ™';
 $wb['do_osupdate_caption'] = 'Wykonaj zdalnÄ… aktualizacjÄ™ systemu na serwerze';
-$wb['do_osupdate_desc'] = 'Ta akcja wykona polecenie <b>aptitude -y upgrade</b> na wybranym serwerze.<br><br><strong>UŻYWASZ JEJ NA WŁASNĄ ODPOWIEDZIALNOŚĆ!</strong>';
+$wb['do_osupdate_desc'] = 'Ta akcja wykona polecenie <b>apt -y upgrade</b> na wybranym serwerze.<br><br><strong>UŻYWASZ JEJ NA WŁASNĄ ODPOWIEDZIALNOŚĆ!</strong>';
 $wb['do_ispcupdate_caption'] = 'Wykonaj zdalnÄ… aktualizacjÄ™ ISPConfig 3 na serwerze';
 $wb['do_ispcupdate_desc'] = 'Ta akcja przeprowadzi aktualizację ISPConfig3 na wybranym serwerze.<br><br><strong>UŻYWASZ JEJ NA WŁASNĄ ODPOWIEDZIALNOŚĆ!</strong>';
 $wb['action_scheduled'] = 'Akcja zaplanowana do wykonania';
diff --git a/interface/web/admin/lib/lang/pt_remote_action.lng b/interface/web/admin/lib/lang/pt_remote_action.lng
index 3f8948e19f..dfe56b616d 100644
--- a/interface/web/admin/lib/lang/pt_remote_action.lng
+++ b/interface/web/admin/lib/lang/pt_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Select Server';
 $wb['btn_do_txt'] = 'Execute action';
 $wb['do_osupdate_caption'] = 'Do OS-Update at remote server';
-$wb['do_osupdate_desc'] = 'This Action does a aptitude -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
+$wb['do_osupdate_desc'] = 'This Action does a apt -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['do_ispcupdate_caption'] = 'Do ISPConfig 3 - Update at remote server';
 $wb['do_ispcupdate_desc'] = 'This action does a ISPConfig3 update at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['action_scheduled'] = 'The action is scheduled for execution';
diff --git a/interface/web/admin/lib/lang/ro_remote_action.lng b/interface/web/admin/lib/lang/ro_remote_action.lng
index 3f8948e19f..dfe56b616d 100644
--- a/interface/web/admin/lib/lang/ro_remote_action.lng
+++ b/interface/web/admin/lib/lang/ro_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Select Server';
 $wb['btn_do_txt'] = 'Execute action';
 $wb['do_osupdate_caption'] = 'Do OS-Update at remote server';
-$wb['do_osupdate_desc'] = 'This Action does a aptitude -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
+$wb['do_osupdate_desc'] = 'This Action does a apt -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['do_ispcupdate_caption'] = 'Do ISPConfig 3 - Update at remote server';
 $wb['do_ispcupdate_desc'] = 'This action does a ISPConfig3 update at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['action_scheduled'] = 'The action is scheduled for execution';
diff --git a/interface/web/admin/lib/lang/ru_remote_action.lng b/interface/web/admin/lib/lang/ru_remote_action.lng
index 858d96b02e..f9d10afc53 100644
--- a/interface/web/admin/lib/lang/ru_remote_action.lng
+++ b/interface/web/admin/lib/lang/ru_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Выбор сервера';
 $wb['btn_do_txt'] = 'Выполнить действие';
 $wb['do_osupdate_caption'] = 'Обновление ОС на удалённом сервере';
-$wb['do_osupdate_desc'] = 'Это действие выполнит <strong>aptitude -y upgrade</strong> на выбранном сервере.<br><br><strong>ИСПОЛЬЗУЙТЕ ЭТО НА СВОЙ СТРАХ И РИСК!</strong>';
+$wb['do_osupdate_desc'] = 'Это действие выполнит <strong>apt -y upgrade</strong> на выбранном сервере.<br><br><strong>ИСПОЛЬЗУЙТЕ ЭТО НА СВОЙ СТРАХ И РИСК!</strong>';
 $wb['do_ispcupdate_caption'] = 'Запуск обновления ISPConfig 3 на удалённом сервере';
 $wb['do_ispcupdate_desc'] = 'Это действие выполнит обновление ISPConfig 3 на выбранном сервере.<br><br><strong>ИСПОЛЬЗУЙТЕ ЭТО НА СВОЙ СТРАХ И РИСК!</strong>';
 $wb['action_scheduled'] = 'Действие запланировано на выполнение';
diff --git a/interface/web/admin/lib/lang/se_remote_action.lng b/interface/web/admin/lib/lang/se_remote_action.lng
index fe6a849905..9aeb7d9ba3 100644
--- a/interface/web/admin/lib/lang/se_remote_action.lng
+++ b/interface/web/admin/lib/lang/se_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Välj server';
 $wb['btn_do_txt'] = 'Utför handling';
 $wb['do_osupdate_caption'] = 'Utför OS-uppdatering på fjärrserver';
-$wb['do_osupdate_desc'] = 'This Action does a aptitude -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
+$wb['do_osupdate_desc'] = 'This Action does a apt -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['do_ispcupdate_caption'] = 'Utför ISPConfig 3 -uppdatering på fjärrserver';
 $wb['do_ispcupdate_desc'] = 'This action does a ISPConfig3 update at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['action_scheduled'] = 'Handlingen är schemalagd att utföras';
diff --git a/interface/web/admin/lib/lang/sk_remote_action.lng b/interface/web/admin/lib/lang/sk_remote_action.lng
index 3f8948e19f..dfe56b616d 100644
--- a/interface/web/admin/lib/lang/sk_remote_action.lng
+++ b/interface/web/admin/lib/lang/sk_remote_action.lng
@@ -2,7 +2,7 @@
 $wb['select_server_txt'] = 'Select Server';
 $wb['btn_do_txt'] = 'Execute action';
 $wb['do_osupdate_caption'] = 'Do OS-Update at remote server';
-$wb['do_osupdate_desc'] = 'This Action does a aptitude -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
+$wb['do_osupdate_desc'] = 'This Action does a apt -y upgrade at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['do_ispcupdate_caption'] = 'Do ISPConfig 3 - Update at remote server';
 $wb['do_ispcupdate_desc'] = 'This action does a ISPConfig3 update at your selected server.<br><br><strong>USE THIS AT YOUR OWN RISK!</strong>';
 $wb['action_scheduled'] = 'The action is scheduled for execution';
-- 
GitLab


From 23c1c31a6894228ee8c0ad2d61a4911c75df6ac1 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sun, 25 Apr 2021 17:08:12 +0000
Subject: [PATCH 390/441] Update README.md, CONTRIBUTING.md files

---
 CONTRIBUTING.md |  1 +
 README.md       | 23 +++++++++++++----------
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 27377de6e6..092b8969f7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -9,6 +9,7 @@ This document is under development and will be continuously improved.
 * If you want to report several bugs or request several features, open a separate issue for each one of them.
 
 # Branches
+* If this you are a new user, please send an email to: dev [at] ispconfig [dot] org to receive rights to fork the project.
 * Please create an issue for each contribution you want to make.
 * Do not put multiple contributions into a single branch and merge request. Each contribution should have it's own branch.
 * Do not use the develop branch in your forked project for your contribution. Create a separate branch for each issue.
diff --git a/README.md b/README.md
index 544c36e7d6..6929b573d1 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,13 @@
 # ISPConfig - Hosting Control Panel
-![alt text](https://www.ispconfig.org/wp-content/themes/ispconfig/images/ispconfig_logo.png "") \
+![ISPConfig logo](https://www.ispconfig.org/wp-content/themes/ispconfig/images/ispconfig_logo.png "") \
 Development branch: [![pipeline status](https://git.ispconfig.org/ispconfig/ispconfig3/badges/develop/pipeline.svg)](https://git.ispconfig.org/ispconfig/ispconfig3/commits/develop)
 
 ## Functions
 - Manage multiple servers from one control panel
 - Single server, multiserver and mirrored clusters.
-- Webserver management (Apache2 and nginx)
+- Webserver management
 - Mailserver management
-- DNS server management (BIND and PowerDNS)
+- DNS server management
 - Virtualization (OpenVZ)
 - Administrator, reseller, client and mailuser login
 - Open Source software (BSD license)
@@ -18,10 +18,12 @@ Development branch: [![pipeline status](https://git.ispconfig.org/ispconfig/ispc
 - Let's Encrypt: Acme.sh and certbot
 - SMTP: Postfix
 - POP3/IMAP: Dovecot
-- Spamfilter: Rspamd and Amavis
+- Spamfilter: Rspamd and Amavis[^1]
 - FTP: PureFTPD
-- DNS: BIND9 and PowerDNS
-- Database: MariaDB and MySQL
+- DNS: BIND9 and PowerDNS[^1]
+- Database: MariaDB and MySQL[^1]
+
+[^1]: not actively tested
 
 ## Supported operating systems
 - Debian 9, 10, and testing
@@ -29,15 +31,16 @@ Development branch: [![pipeline status](https://git.ispconfig.org/ispconfig/ispc
 - CentOS 7 and 8
 
 ## Auto-install script
-You can install ISPConfig with our official autoinstaller: https://git.ispconfig.org/ispconfig/ispconfig-autoinstaller/-/blob/master/README.md
+You can install the "Perfect Server" with ISPConfig using [our official autoinstaller](https://www.howtoforge.com/ispconfig-autoinstall-debian-ubuntu/)
 
 ## Migration tool
-The Migration Tool helps you to import data from other control panels (currently ISPConfig 2 and 3 – 3.2, Plesk 10 – 12.5, Plesk Onyx, CPanel** and Confixx 3). For more information, see https://www.ispconfig.org/add-ons/ispconfig-migration-tool/
+The Migration Tool helps you to import data from other control panels (currently ISPConfig 2 and 3 – 3.2, Plesk 10 – 12.5, Plesk Onyx, CPanel[^2] and Confixx 3). For more information, see https://www.ispconfig.org/add-ons/ispconfig-migration-tool/
 
-** The Migration Toolkit contains now beta support for migrating CPanel to ISPConfig.
+[^2]: The Migration Toolkit now contains beta support for migrating CPanel to ISPConfig.
 
 ## Documentation
 You can support ISPConfig development by buying the manual: https://www.ispconfig.org/documentation/
 
 ## Contributing
-If you like to contribute to the ISPConfig development, please send an email to: dev [at] ispconfig [dot] org.
+If you like to contribute to the ISPConfig development, please read the contributing guidelines: [CONTRIBUTING.MD](CONTRIBUTING.md)
+
-- 
GitLab


From 289322aa5a1dbc14543d4b8c682b3609cd46ea9a Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sun, 25 Apr 2021 17:18:45 +0000
Subject: [PATCH 391/441] Fix typo

---
 CONTRIBUTING.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 092b8969f7..3a4a7de71f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -9,7 +9,7 @@ This document is under development and will be continuously improved.
 * If you want to report several bugs or request several features, open a separate issue for each one of them.
 
 # Branches
-* If this you are a new user, please send an email to: dev [at] ispconfig [dot] org to receive rights to fork the project.
+* If you are a new user, please send an email to: dev [at] ispconfig [dot] org to receive rights to fork the project.
 * Please create an issue for each contribution you want to make.
 * Do not put multiple contributions into a single branch and merge request. Each contribution should have it's own branch.
 * Do not use the develop branch in your forked project for your contribution. Create a separate branch for each issue.
-- 
GitLab


From 5b38de2cbb67bc32b17b80f878d92f94505626fd Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sun, 25 Apr 2021 17:59:31 +0000
Subject: [PATCH 392/441] Update README.md

---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 6929b573d1..0c71d1891b 100644
--- a/README.md
+++ b/README.md
@@ -18,10 +18,10 @@ Development branch: [![pipeline status](https://git.ispconfig.org/ispconfig/ispc
 - Let's Encrypt: Acme.sh and certbot
 - SMTP: Postfix
 - POP3/IMAP: Dovecot
-- Spamfilter: Rspamd and Amavis[^1]
+- Spamfilter: Rspamd and Amavis
 - FTP: PureFTPD
 - DNS: BIND9 and PowerDNS[^1]
-- Database: MariaDB and MySQL[^1]
+- Database: MariaDB and MySQL
 
 [^1]: not actively tested
 
-- 
GitLab


From 5954be8e1768b55918b2568955f85bf8abfcabc2 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sun, 25 Apr 2021 19:45:08 +0000
Subject: [PATCH 393/441] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 0c71d1891b..eeb096c3c1 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Development branch: [![pipeline status](https://git.ispconfig.org/ispconfig/ispc
 - Open Source software (BSD license)
 
 ## Supported daemons
-- HTTP: Apache2 and nginx
+- HTTP: Apache2 and NGINX
 - HTTP stats: Webalizer, GoAccess and AWStats
 - Let's Encrypt: Acme.sh and certbot
 - SMTP: Postfix
-- 
GitLab


From 9c446e6a59022c77c4490fab867b6ea86bc246a7 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sun, 25 Apr 2021 19:46:29 +0000
Subject: [PATCH 394/441] Add link to license

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index eeb096c3c1..9e0eea359d 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ Development branch: [![pipeline status](https://git.ispconfig.org/ispconfig/ispc
 - DNS server management
 - Virtualization (OpenVZ)
 - Administrator, reseller, client and mailuser login
-- Open Source software (BSD license)
+- Open Source software ([BSD license](LICENSE))
 
 ## Supported daemons
 - HTTP: Apache2 and NGINX
-- 
GitLab


From 75c5ed1b3318c3cf7a9c76767b4af83dad9366a1 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 12 May 2021 16:38:45 -0600
Subject: [PATCH 395/441] rspamd: enable arc signing incoming mail

---
 install/lib/installer_base.lib.php | 3 ++-
 install/tpl/rspamd_arc.conf.master | 8 ++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 install/tpl/rspamd_arc.conf.master

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 622674267c..4165551108 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1861,7 +1861,7 @@ class installer_base {
 		# local.d templates with template tags
 		# note: ensure these template files are in server/conf/ and symlinked in install/tpl/
 		$local_d = array(
-			'dkim_signing.conf',
+			'dkim_signing.conf',	# dkim_signing.conf no longer uses template tags, could move below
 			'options.inc',
 			'redis.conf',
 			'classifier-bayes.conf',
@@ -1897,6 +1897,7 @@ class installer_base {
 			'neural_group.conf',
 			'users.conf',
 			'groups.conf',
+			'arc.conf',
 		);
 		foreach ($local_d as $f) {
 			if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
diff --git a/install/tpl/rspamd_arc.conf.master b/install/tpl/rspamd_arc.conf.master
new file mode 100644
index 0000000000..781f83ccb2
--- /dev/null
+++ b/install/tpl/rspamd_arc.conf.master
@@ -0,0 +1,8 @@
+sign_authenticated = false;
+sign_inbound = true;
+sign_local = false;
+use_domain = "recipient";
+try_fallback = false;
+use_esld = false;
+path_map = "/etc/rspamd/local.d/dkim_domains.map";
+selector_map = "/etc/rspamd/local.d/dkim_selectors.map";
-- 
GitLab


From 62a3381bd0b56055ee67e4dfb1277812bebb0f09 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 14 May 2021 18:33:41 +0000
Subject: [PATCH 396/441] rspamd: fix remove-headers

---
 install/tpl/rspamd_milter_headers.conf.master | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/install/tpl/rspamd_milter_headers.conf.master b/install/tpl/rspamd_milter_headers.conf.master
index 0205160c25..c9ef9fa2d0 100644
--- a/install/tpl/rspamd_milter_headers.conf.master
+++ b/install/tpl/rspamd_milter_headers.conf.master
@@ -1,11 +1,13 @@
-use = ["x-spamd-bar", "x-spam-level", "x-spam-status", "authentication-results"];
+use = ["x-spamd-bar", "x-spam-level", "x-spam-status", "authentication-results", "remove-headers"];
 authenticated_headers = ["authentication-results"];
 routines {
   remove-headers {
-    "X-Spam" = 0;
-    "X-Spamd-Bar" = 0;
-    "X-Spam-Level" = 0;
-    "X-Spam-Status" = 0;
-    "X-Spam-Flag" = 0;
+    headers {
+      "X-Spam" = 0;
+      "X-Spamd-Bar" = 0;
+      "X-Spam-Level" = 0;
+      "X-Spam-Status" = 0;
+      "X-Spam-Flag" = 0;
+    }
   }
 }
-- 
GitLab


From 90b88d3fc015fee960ee66a7401a45e5b033a376 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 21 May 2021 12:40:51 +0000
Subject: [PATCH 397/441] Apply 1 suggestion(s) to 1 file(s)

---
 interface/lib/app.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php
index d609835f54..0c15825ef5 100755
--- a/interface/lib/app.inc.php
+++ b/interface/lib/app.inc.php
@@ -132,8 +132,8 @@ class app {
 
 			//* Initialize session variables
 			if(!isset($_SESSION['s']['id']) ) $_SESSION['s']['id'] = session_id();
-			if(empty($_SESSION['s']['theme'])) $_SESSION['s']['theme'] = $conf['theme'];
-			if(empty($_SESSION['s']['language'])) $_SESSION['s']['language'] = $conf['language'];
+			if(empty($_SESSION['s']['theme'])) $_SESSION['s']['theme'] = $this->_conf['theme'];
+			if(empty($_SESSION['s']['language'])) $_SESSION['s']['language'] = $this->_conf['language'];
 		}
 
 	}
-- 
GitLab


From e9a9ad0f6eda04cacb4d2a8cb767a7eb36afb311 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 21 May 2021 12:41:04 +0000
Subject: [PATCH 398/441] Apply 1 suggestion(s) to 1 file(s)

---
 interface/lib/app.inc.php | 2 --
 1 file changed, 2 deletions(-)

diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php
index 0c15825ef5..8617c34b21 100755
--- a/interface/lib/app.inc.php
+++ b/interface/lib/app.inc.php
@@ -86,8 +86,6 @@ class app {
 	}
 
 	public function initialize_session() {
-		global $conf;
-
 		//* Start the session
 		if($this->_conf['start_session'] == true) {
 			session_name('ISPCSESS');
-- 
GitLab


From f85318e7128c2620084c736db3fe3cc87c032739 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sun, 23 May 2021 16:09:56 +0000
Subject: [PATCH 399/441] Fix missing index error

---
 server/conf/awstats_index.php.master | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/conf/awstats_index.php.master b/server/conf/awstats_index.php.master
index a82de8a0ca..65fc9afff4 100644
--- a/server/conf/awstats_index.php.master
+++ b/server/conf/awstats_index.php.master
@@ -54,6 +54,7 @@ foreach ($awprev as $key => $value) {
 	else $options .= "<option value=\"{$value}/{$awstatsindex}\">{$value}</option>\n";
 }
 
+$awstatsindex = 'awsindex.html'
 $html = "<!DOCTYPE html>\n<html>\n<head>\n<title>Stats</title>\n";
 $html .= "<style>\nhtml,body {margin:0px;padding:0px;width:100%;height:100%;background-color: #ccc;}\n";
 $html .= "#header\n{\nwidth:100%;margin:0px auto;\nheight:20px;\nposition:fixed;\npadding:4px;\ntext-align:center;\n}\n";
-- 
GitLab


From 5d143fe884334f2a085c4af5bce3a13aa97fd246 Mon Sep 17 00:00:00 2001
From: Thom <thom@amsterdamtech.nl>
Date: Sun, 23 May 2021 16:11:55 +0000
Subject: [PATCH 400/441] Improve awsindex setting

---
 server/conf/awstats_index.php.master | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/server/conf/awstats_index.php.master b/server/conf/awstats_index.php.master
index 65fc9afff4..86eec8a73d 100644
--- a/server/conf/awstats_index.php.master
+++ b/server/conf/awstats_index.php.master
@@ -54,7 +54,6 @@ foreach ($awprev as $key => $value) {
 	else $options .= "<option value=\"{$value}/{$awstatsindex}\">{$value}</option>\n";
 }
 
-$awstatsindex = 'awsindex.html'
 $html = "<!DOCTYPE html>\n<html>\n<head>\n<title>Stats</title>\n";
 $html .= "<style>\nhtml,body {margin:0px;padding:0px;width:100%;height:100%;background-color: #ccc;}\n";
 $html .= "#header\n{\nwidth:100%;margin:0px auto;\nheight:20px;\nposition:fixed;\npadding:4px;\ntext-align:center;\n}\n";
@@ -63,7 +62,7 @@ $html .= $script;
 $html .= "<div id=\"header\">{$yearmonth_text}\n";
 $html .= "<select name=\"awdate\" onchange=\"load_content(this.value)\">\n";
 $html .= $options;
-$html .= "</select>\n</div>\n<iframe src=\"{$awstatsindex}\" id=\"content\"></iframe>\n";
+$html .= "</select>\n</div>\n<iframe src=\"awsindex.html\" id=\"content\"></iframe>\n";
 $html .= "</body></html>";
 echo $html;
 ?>
-- 
GitLab


From b9dc3b878c028153f4989ade169da202eea62251 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Wed, 2 Jun 2021 07:46:05 +0000
Subject: [PATCH 401/441] Update server/lib/classes/letsencrypt.inc.php

---
 server/lib/classes/letsencrypt.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php
index 5f918f016d..ac805a6b67 100644
--- a/server/lib/classes/letsencrypt.inc.php
+++ b/server/lib/classes/letsencrypt.inc.php
@@ -80,7 +80,7 @@ class letsencrypt {
 	}
 
 	public function get_certbot_script() {
-		$letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt /opt/eff.org/certbot/venv/bin/certbot'));
+		$letsencrypt = explode("\n", shell_exec('which certbot /root/.local/share/letsencrypt/bin/letsencrypt /opt/eff.org/certbot/venv/bin/certbot letsencrypt'));
 		$letsencrypt = reset($letsencrypt);
 		if(is_executable($letsencrypt)) {
 			return $letsencrypt;
-- 
GitLab


From 7d4db1dab0aa00ab58a635b38e0f814ad7636027 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 3 Jun 2021 06:58:51 +0000
Subject: [PATCH 402/441] Update installer_base.lib.php

---
 install/lib/installer_base.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 622674267c..7856cc2f26 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2946,7 +2946,7 @@ class installer_base {
 			}
 
 			// Get the default LE client name and version
-			$le_client = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt /opt/eff.org/certbot/venv/bin/certbot'));
+			$le_client = explode("\n", shell_exec('which certbot /root/.local/share/letsencrypt/bin/letsencrypt /opt/eff.org/certbot/venv/bin/certbot letsencrypt'));
 			$le_client = reset($le_client);
 
 			// Check for Neilpang acme.sh as well
-- 
GitLab


From 86b801081bc42d1a485028a53de8f9b343d22728 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 3 Jun 2021 12:37:52 +0200
Subject: [PATCH 403/441] - do not use password protected ssl keys for
 self-signed

---
 .gitlab-ci.yml                                |  19 +++
 install/lib/installer_base.lib.php            |  12 +-
 interface/lib/classes/quota_lib.inc.php       | 118 +++++++++---------
 .../plugins-available/apache2_plugin.inc.php  |  37 +-----
 4 files changed, 87 insertions(+), 99 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f3bb140d1b..e1a4913454 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,6 +3,7 @@ stages:
   - syntax
   - syntax_diff
   - test
+  - build
 
 #
 ### Stage syntax
@@ -63,3 +64,21 @@ test:install:
     - apt-get --yes install curl
     - curl --insecure https://127.0.0.1:8080/login/
     - ps xaf
+
+
+build:package:
+    stage: build
+    image: edbizarro/gitlab-ci-pipeline-php:7.2
+    only:
+        refs:
+            - /^\d+\.\d+\.\d+$/
+    except:
+        - branches
+        - merge_requests
+        - schedules
+        - pushes
+    script:
+        - echo "Building release."
+        
+    when: manual
+    allow_failure: false
\ No newline at end of file
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 7856cc2f26..43d226aab5 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -3147,17 +3147,11 @@ class installer_base {
 			}
 
 			// We can still use the old self-signed method
-			$ssl_pw = substr(md5(mt_rand()), 0, 6);
-			exec("openssl genrsa -des3 -passout pass:$ssl_pw -out $ssl_key_file 4096");
+			$openssl_cmd = 'openssl req -nodes -newkey rsa:4096 -x509 -days 3650 -keyout ' . escapeshellarg($ssl_key_file) . ' -out ' . escapeshellarg($ssl_crt_file);
 			if(AUTOINSTALL){
-				exec("openssl req -new -passin pass:$ssl_pw -passout pass:$ssl_pw -subj '/C=".escapeshellcmd($autoinstall['ssl_cert_country'])."/ST=".escapeshellcmd($autoinstall['ssl_cert_state'])."/L=".escapeshellcmd($autoinstall['ssl_cert_locality'])."/O=".escapeshellcmd($autoinstall['ssl_cert_organisation'])."/OU=".escapeshellcmd($autoinstall['ssl_cert_organisation_unit'])."/CN=".escapeshellcmd($autoinstall['ssl_cert_common_name'])."' -key $ssl_key_file -out $ssl_csr_file");
-			} else {
-				exec("openssl req -new -passin pass:$ssl_pw -passout pass:$ssl_pw -key $ssl_key_file -out $ssl_csr_file");
+				$openssl_cmd .= ' -subj ' . escapeshellarg('/C=' . $autoinstall['ssl_cert_country'] . '/ST=' . $autoinstall['ssl_cert_state'] . '/L=' . $autoinstall['ssl_cert_locality'] . '/O=' . $autoinstall['ssl_cert_organisation'] . '/OU=' . $autoinstall['ssl_cert_organisation_unit'] . '/CN=' . $autoinstall['ssl_cert_common_name']);
 			}
-			exec("openssl req -x509 -passin pass:$ssl_pw -passout pass:$ssl_pw -key $ssl_key_file -in $ssl_csr_file -out $ssl_crt_file -days 3650");
-			exec("openssl rsa -passin pass:$ssl_pw -in $ssl_key_file -out $ssl_key_file.insecure");
-			rename($ssl_key_file, $ssl_key_file.'.secure');
-			rename($ssl_key_file.'.insecure', $ssl_key_file);
+			exec($openssl_cmd);
 		}
 
 		// Build ispserver.pem file and chmod it
diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php
index 3bae97f046..b02cdea994 100644
--- a/interface/lib/classes/quota_lib.inc.php
+++ b/interface/lib/classes/quota_lib.inc.php
@@ -2,8 +2,8 @@
 
 class quota_lib {
 	public function get_quota_data($clientid = null, $readable = true) {
-		global $app; 
-		
+		global $app;
+
 		$tmp_rec =  $app->db->queryAllRecords("SELECT data from monitor_data WHERE type = 'harddisk_quota' ORDER BY created DESC");
 		$monitor_data = array();
 		if(is_array($tmp_rec)) {
@@ -12,10 +12,10 @@ class quota_lib {
 			}
 		}
 		//print_r($monitor_data);
-		
+
 		// select all websites or websites belonging to client
 		$sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'".(($clientid != null)?" AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)":'') . " ORDER BY domain", $clientid);
-		
+
 		//print_r($sites);
 		if(is_array($sites) && !empty($sites)){
 			for($i=0;$i<sizeof($sites);$i++){
@@ -24,7 +24,7 @@ class quota_lib {
 				$sites[$i]['soft'] = $monitor_data['user'][$username]['soft'];
 				$sites[$i]['hard'] = $monitor_data['user'][$username]['hard'];
 				$sites[$i]['files'] = $monitor_data['user'][$username]['files'];
-		
+
 				if (!is_numeric($sites[$i]['used'])){
 					if ($sites[$i]['used'][0] > $sites[$i]['used'][1]){
 						$sites[$i]['used'] = $sites[$i]['used'][0];
@@ -35,13 +35,13 @@ class quota_lib {
 				if (!is_numeric($sites[$i]['soft'])) $sites[$i]['soft']=$sites[$i]['soft'][1];
 				if (!is_numeric($sites[$i]['hard'])) $sites[$i]['hard']=$sites[$i]['hard'][1];
 				if (!is_numeric($sites[$i]['files'])) $sites[$i]['files']=$sites[$i]['files'][1];
-				
+
 				$sites[$i]['used_raw'] = $sites[$i]['used'];
 				$sites[$i]['soft_raw'] = $sites[$i]['soft'];
 				$sites[$i]['hard_raw'] = $sites[$i]['hard'];
 				$sites[$i]['files_raw'] = $sites[$i]['files'];
 				$sites[$i]['used_percentage'] = ($sites[$i]['soft'] > 0 && $sites[$i]['used'] > 0 ? round($sites[$i]['used'] * 100 / $sites[$i]['soft']) : 0);
-				
+
 				if ($readable) {
 					// colours
 					$sites[$i]['display_colour'] = '#000000';
@@ -52,31 +52,31 @@ class quota_lib {
 					}
 					if($used_ratio >= 0.8) $sites[$i]['display_colour'] = '#fd934f';
 					if($used_ratio >= 1) $sites[$i]['display_colour'] = '#cc0000';
-			
+
 					if($sites[$i]['used'] > 1024) {
 						$sites[$i]['used'] = round($sites[$i]['used'] / 1024, 1).' MB';
 					} else {
 						if ($sites[$i]['used'] != '') $sites[$i]['used'] .= ' KB';
 					}
-			
+
 					if($sites[$i]['soft'] > 1024) {
 						$sites[$i]['soft'] = round($sites[$i]['soft'] / 1024, 1).' MB';
 					} else {
 						$sites[$i]['soft'] .= ' KB';
 					}
-			
+
 					if($sites[$i]['hard'] > 1024) {
 						$sites[$i]['hard'] = round($sites[$i]['hard'] / 1024, 1).' MB';
 					} else {
 						$sites[$i]['hard'] .= ' KB';
 					}
-			
+
 					if($sites[$i]['soft'] == " KB") $sites[$i]['soft'] = $app->lng('unlimited_txt');
 					if($sites[$i]['hard'] == " KB") $sites[$i]['hard'] = $app->lng('unlimited_txt');
-					
+
 					if($sites[$i]['soft'] == '0 B' || $sites[$i]['soft'] == '0 KB' || $sites[$i]['soft'] == '0') $sites[$i]['soft'] = $app->lng('unlimited_txt');
 					if($sites[$i]['hard'] == '0 B' || $sites[$i]['hard'] == '0 KB' || $sites[$i]['hard'] == '0') $sites[$i]['hard'] = $app->lng('unlimited_txt');
-					
+
 					/*
 					 if(!strstr($sites[$i]['used'],'M') && !strstr($sites[$i]['used'],'K')) $sites[$i]['used'].= ' B';
 					if(!strstr($sites[$i]['soft'],'M') && !strstr($sites[$i]['soft'],'K')) $sites[$i]['soft'].= ' B';
@@ -86,35 +86,35 @@ class quota_lib {
 				else {
 					if (empty($sites[$i]['soft'])) $sites[$i]['soft'] = -1;
 					if (empty($sites[$i]['hard'])) $sites[$i]['hard'] = -1;
-					
+
 					if($sites[$i]['soft'] == '0 B' || $sites[$i]['soft'] == '0 KB' || $sites[$i]['soft'] == '0') $sites[$i]['soft'] = -1;
 					if($sites[$i]['hard'] == '0 B' || $sites[$i]['hard'] == '0 KB' || $sites[$i]['hard'] == '0') $sites[$i]['hard'] = -1;
 				}
 			}
 		}
-		
+
 		return $sites;
 	}
-	
+
 	public function get_trafficquota_data($clientid = null, $lastdays = 0) {
 		global $app;
-	
+
 		$traffic_data = array();
-	
+
 		// select vhosts (belonging to client)
 		if($clientid != null){
 			$sql_where = " AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)";
 		}
 		$sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')".$sql_where, $clientid);
-	
+
 		$hostnames = array();
 		$traffic_data = array();
-	
+
 		foreach ($sites as $site) {
 			$hostnames[] = $site['domain'];
 			$traffic_data[$site['domain']]['domain_id'] = $site['domain_id'];
 		}
-	
+
 		// fetch all traffic-data of selected vhosts
 		if (!empty($hostnames)) {
 			$tmp_year = date('Y');
@@ -129,7 +129,7 @@ class quota_lib {
 			foreach ($tmp_recs as $tmp_rec) {
 				$traffic_data[$tmp_rec['hostname']]['this_year'] = $tmp_rec['t'];
 			}
-				
+
 			$tmp_year = date('Y', mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
 			$tmp_month = date('m', mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
 			// Last Month
@@ -137,14 +137,14 @@ class quota_lib {
 			foreach ($tmp_recs as $tmp_rec) {
 				$traffic_data[$tmp_rec['hostname']]['last_month'] = $tmp_rec['t'];
 			}
-				
+
 			$tmp_year = date('Y', mktime(0, 0, 0, date("m"), date("d"), date("Y")-1));
 			// Last Year
 			$tmp_recs = $app->db->queryAllRecords("SELECT hostname, SUM(traffic_bytes) as t FROM web_traffic WHERE YEAR(traffic_date) = ? AND hostname IN ? GROUP BY hostname", $tmp_year, $hostnames);
 			foreach ($tmp_recs as $tmp_rec) {
 				$traffic_data[$tmp_rec['hostname']]['last_year'] = $tmp_rec['t'];
 			}
-				
+
 			if (is_int($lastdays)  && ($lastdays > 0)) {
 				// Last xx Days
 				$tmp_recs = $app->db->queryAllRecords("SELECT hostname, SUM(traffic_bytes) as t FROM web_traffic WHERE (traffic_date >= DATE_SUB(NOW(), INTERVAL ? DAY)) AND hostname IN ? GROUP BY hostname", $lastdays, $hostnames);
@@ -153,29 +153,29 @@ class quota_lib {
 				}
 			}
 		}
-	
+
 		return $traffic_data;
 	}
 
 	public function get_ftptrafficquota_data($clientid = null, $lastdays = 0) {
 		global $app;
-	
+
 		$traffic_data = array();
-	
+
 		// select vhosts (belonging to client)
 		if($clientid != null){
 			$sql_where = " AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)";
 		}
 		$sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')".$sql_where, $clientid);
-	
+
 		$hostnames = array();
 		$traffic_data = array();
-	
+
 		foreach ($sites as $site) {
 			$hostnames[] = $site['domain'];
 			$traffic_data[$site['domain']]['domain_id'] = $site['domain_id'];
 		}
-	
+
 		// fetch all traffic-data of selected vhosts
 		if (!empty($hostnames)) {
 			$tmp_year = date('Y');
@@ -190,7 +190,7 @@ class quota_lib {
 			foreach ($tmp_recs as $tmp_rec) {
 				$traffic_data[$tmp_rec['hostname']]['this_year'] = $tmp_rec['t'];
 			}
-				
+
 			$tmp_year = date('Y', mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
 			$tmp_month = date('m', mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
 			// Last Month
@@ -198,14 +198,14 @@ class quota_lib {
 			foreach ($tmp_recs as $tmp_rec) {
 				$traffic_data[$tmp_rec['hostname']]['last_month'] = $tmp_rec['t'];
 			}
-				
+
 			$tmp_year = date('Y', mktime(0, 0, 0, date("m"), date("d"), date("Y")-1));
 			// Last Year
 			$tmp_recs = $app->db->queryAllRecords("SELECT hostname, SUM(in_bytes) AS ftp_in, SUM(out_bytes) AS ftp_out FROM ftp_traffic WHERE YEAR(traffic_date) = ? AND hostname IN ? GROUP BY hostname", $tmp_year, $hostnames);
 			foreach ($tmp_recs as $tmp_rec) {
 				$traffic_data[$tmp_rec['hostname']]['last_year'] = $tmp_rec['t'];
 			}
-				
+
 			if (is_int($lastdays)  && ($lastdays > 0)) {
 				// Last xx Days
 				$tmp_recs = $app->db->queryAllRecords("SELECT hostname, SUM(in_bytes) AS ftp_in, SUM(out_bytes) AS ftp_out FROM ftp_traffic WHERE (traffic_date >= DATE_SUB(NOW(), INTERVAL ? DAY)) AND hostname IN ? GROUP BY hostname", $lastdays, $hostnames);
@@ -214,13 +214,13 @@ class quota_lib {
 				}
 			}
 		}
-	
+
 		return $traffic_data;
 	}
-	
+
 	public function get_mailquota_data($clientid = null, $readable = true) {
 		global $app;
-		
+
 		$tmp_rec =  $app->db->queryAllRecords("SELECT data from monitor_data WHERE type = 'email_quota' ORDER BY created DESC");
 		$monitor_data = array();
 		if(is_array($tmp_rec)) {
@@ -235,25 +235,25 @@ class quota_lib {
 			}
 		}
 		//print_r($monitor_data);
-		
+
 		// select all email accounts or email accounts belonging to client
 		$emails = $app->db->queryAllRecords("SELECT * FROM mail_user".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : '') . " ORDER BY email", $clientid);
-		
+
 		//print_r($emails);
-		if(is_array($emails) && !empty($emails)){
+		if(is_array($emails) && !empty($emails)) {
 			for($i=0;$i<sizeof($emails);$i++){
 				$email = $emails[$i]['email'];
-				
+
 				$emails[$i]['name'] = $app->functions->htmlentities($emails[$i]['name']);
 				$emails[$i]['used'] = isset($monitor_data[$email]['used']) ? $monitor_data[$email]['used'] : array(1 => 0);
-		
+
 				if (!is_numeric($emails[$i]['used'])) $emails[$i]['used']=$emails[$i]['used'][1];
-				
+
 				$emails[$i]['quota_raw'] = $emails[$i]['quota'];
 				$emails[$i]['used_raw'] = $emails[$i]['used'];
 				$emails[$i]['used_percentage'] = ($emails[$i]['quota'] > 0 && $emails[$i]['used'] > 0 ? round($emails[$i]['used'] * 100 / $emails[$i]['quota']) : 0);
 
-				
+
 				if ($readable) {
 					// colours
 					$emails[$i]['display_colour'] = '#000000';
@@ -264,14 +264,14 @@ class quota_lib {
 					}
 					if($used_ratio >= 0.8) $emails[$i]['display_colour'] = '#fd934f';
 					if($used_ratio >= 1) $emails[$i]['display_colour'] = '#cc0000';
-			
+
 					if($emails[$i]['quota'] == 0){
 						$emails[$i]['quota'] = $app->lng('unlimited_txt');
 					} else {
                                                $emails[$i]['quota'] = round($emails[$i]['quota'] / 1048576, 1).' MB';
 					}
-			
-			
+
+
 					if($emails[$i]['used'] < 1544000) {
                                                $emails[$i]['used'] = round($emails[$i]['used'] / 1024, 1).' KB';
 					} else {
@@ -280,13 +280,13 @@ class quota_lib {
 				}
 			}
 		}
-		
+
 		return $emails;
 	}
-	
+
 	public function get_databasequota_data($clientid = null, $readable = true) {
 		global $app;
-	
+
 		$tmp_rec =  $app->db->queryAllRecords("SELECT data from monitor_data WHERE type = 'database_size' ORDER BY created DESC");
 		$monitor_data = array();
 		if(is_array($tmp_rec)) {
@@ -300,21 +300,21 @@ class quota_lib {
 			}
 		}
 		//print_r($monitor_data);
-	
+
 		// select all databases belonging to client
 		$databases = $app->db->queryAllRecords("SELECT * FROM web_database".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : '') . " ORDER BY database_name", $clientid);
-	
+
 		//print_r($databases);
 		if(is_array($databases) && !empty($databases)){
 			for($i=0;$i<sizeof($databases);$i++){
 				$databasename = $databases[$i]['database_name'];
-	
+
 				$databases[$i]['used'] = isset($monitor_data[$databasename]['size']) ? $monitor_data[$databasename]['size'] : 0;
-	
+
 				$databases[$i]['quota_raw'] = $databases[$i]['database_quota'];
 				$databases[$i]['used_raw'] = $databases[$i]['used'] / 1024 / 1024; //* quota is stored as MB - calculated bytes
 				$databases[$i]['used_percentage'] = (($databases[$i]['database_quota'] > 0) && ($databases[$i]['used'] > 0)) ? round($databases[$i]['used_raw'] * 100 / $databases[$i]['database_quota']) : 0;
-	
+
 				if ($readable) {
 					// colours
 					$databases[$i]['display_colour'] = '#000000';
@@ -325,14 +325,14 @@ class quota_lib {
 					}
 					if($used_ratio >= 0.8) $databases[$i]['display_colour'] = '#fd934f';
 					if($used_ratio >= 1) $databases[$i]['display_colour'] = '#cc0000';
-						
+
 					if($databases[$i]['database_quota'] == 0){
 						$databases[$i]['database_quota'] = $app->lng('unlimited_txt');
 					} else {
 						$databases[$i]['database_quota'] = $databases[$i]['database_quota'] . ' MB';
 					}
-						
-						
+
+
 					if($databases[$i]['used'] < 1544000) {
 						$databases[$i]['used'] = round($databases[$i]['used'] / 1024, 1).' KB';
 					} else {
@@ -341,8 +341,8 @@ class quota_lib {
 				}
 			}
 		}
-	
+
 		return $databases;
 	}
-	
+
 }
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 170f8b1b72..19f650d4b3 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -278,7 +278,6 @@ class apache2_plugin {
 		$ssl_dir = $data['new']['document_root'].'/ssl';
 		$domain = ($data['new']['ssl_domain'] != '') ? $data['new']['ssl_domain'] : $data['new']['domain'];
 		$key_file = $ssl_dir.'/'.$domain.'.key';
-		$key_file2 = $ssl_dir.'/'.$domain.'.key.org';
 		$csr_file = $ssl_dir.'/'.$domain.'.csr';
 		$crt_file = $ssl_dir.'/'.$domain.'.crt';
 		$bundle_file = $ssl_dir.'/'.$domain.'.bundle';
@@ -293,10 +292,6 @@ class apache2_plugin {
 				$app->system->rename($key_file, $key_file.'.bak');
 				$app->system->chmod($key_file.'.bak', 0400);
 			}
-			if(file_exists($key_file2)){
-				$app->system->rename($key_file2, $key_file2.'.bak');
-				$app->system->chmod($key_file2.'.bak', 0400);
-			}
 			if(file_exists($csr_file)) $app->system->rename($csr_file, $csr_file.'.bak');
 			if(file_exists($crt_file)) $app->system->rename($crt_file, $crt_file.'.bak');
 
@@ -346,44 +341,35 @@ class apache2_plugin {
 			$ssl_ext_file = $ssl_dir.'/v3.ext';
 			$app->system->file_put_contents($ssl_ext_file, $ext_cnf);
 
-			$rand_file = $rand_file;
-			$key_file2 = $key_file2;
-			$openssl_cmd_key_file2 = $key_file2;
-			if(substr($domain, 0, 2) == '*.' && strpos($key_file2, '/ssl/\*.') !== false) $key_file2 = str_replace('/ssl/\*.', '/ssl/*.', $key_file2); // wildcard certificate
-			$key_file = $key_file;
 			$openssl_cmd_key_file = $key_file;
 			if(substr($domain, 0, 2) == '*.' && strpos($key_file, '/ssl/\*.') !== false) $key_file = str_replace('/ssl/\*.', '/ssl/*.', $key_file); // wildcard certificate
 			$ssl_days = 3650;
-			$csr_file = $csr_file;
 			$openssl_cmd_csr_file = $csr_file;
 			if(substr($domain, 0, 2) == '*.' && strpos($csr_file, '/ssl/\*.') !== false) $csr_file = str_replace('/ssl/\*.', '/ssl/*.', $csr_file); // wildcard certificate
 			$config_file = $ssl_cnf_file;
-			$crt_file = $crt_file;
 			$openssl_cmd_crt_file = $crt_file;
 			if(substr($domain, 0, 2) == '*.' && strpos($crt_file, '/ssl/\*.') !== false) $crt_file = str_replace('/ssl/\*.', '/ssl/*.', $crt_file); // wildcard certificate
 
 			if(is_file($ssl_cnf_file) && !is_link($ssl_cnf_file)) {
-
-				$app->system->exec_safe("openssl genrsa -des3 -rand ? -passout pass:? -out ? 2048", $rand_file, $ssl_password, $openssl_cmd_key_file2);
-				$app->system->exec_safe("openssl req -new -sha256 -passin pass:? -passout pass:? -key ? -out ? -days ? -config ?", $ssl_password, $ssl_password, $openssl_cmd_key_file2, $openssl_cmd_csr_file, $ssl_days, $config_file);
-				$app->system->exec_safe("openssl rsa -passin pass:? -in ? -out ?", $ssl_password, $openssl_cmd_key_file2, $openssl_cmd_key_file);
+				$openssl_cmd = 'openssl req -nodes -newkey rsa:4096 -x509 -days ? -keyout ? -out ? -config ?';
+				$app->system->exec_safe($openssl_cmd, $ssl_days, $openssl_cmd_key_file, $openssl_cmd_crt_file, $config_file);
 
 				if(file_exists($web_config['CA_path'].'/openssl.cnf'))
 				{
+					$app->system->exec_safe("openssl req -new -sha256 -key ? -out ? -days ? -config ?", $openssl_cmd_key_file, $openssl_cmd_csr_file, $ssl_days, $config_file);
 					$app->system->exec_safe("openssl ca -batch -out ? -config ? -passin pass:? -in ? -extfile ?", $openssl_cmd_crt_file, $web_config['CA_path']."/openssl.cnf", $web_config['CA_pass'], $openssl_cmd_csr_file, $ssl_ext_file);
 					$app->log("Creating CA-signed SSL Cert for: $domain", LOGLEVEL_DEBUG);
 					if(filesize($crt_file) == 0 || !file_exists($crt_file)) {
 						$app->log("CA-Certificate signing failed.  openssl ca -out $openssl_cmd_crt_file -config " . $web_config['CA_path'] . "/openssl.cnf -passin pass:" . $web_config['CA_pass'] . " -in $openssl_cmd_csr_file -extfile $ssl_ext_file", LOGLEVEL_ERROR);
 					}
-				};
+				}
 				if (@filesize($crt_file)==0 || !file_exists($crt_file)){
-					$app->system->exec_safe("openssl req -x509 -passin pass:? -passout pass:? -key ? -in ? -out ? -days ? -config ? ", $ssl_password, $ssl_password, $openssl_cmd_key_file2, $openssl_cmd_csr_file, $openssl_cmd_crt_file, $ssl_days, $config_file);
+					$app->system->exec_safe($openssl_cmd, $ssl_days, $openssl_cmd_key_file, $openssl_cmd_crt_file, $config_file);
 					$app->log("Creating self-signed SSL Cert for: $domain", LOGLEVEL_DEBUG);
-				};
+				}
 
 			}
 
-			$app->system->chmod($key_file2, 0400);
 			$app->system->chmod($key_file, 0400);
 			@$app->system->unlink($config_file);
 			@$app->system->unlink($rand_file);
@@ -445,10 +431,6 @@ class apache2_plugin {
 				$app->system->copy($key_file, $key_file.'~');
 				$app->system->chmod($key_file.'~', 0400);
 			}
-			if(file_exists($key_file2)){
-				$app->system->copy($key_file2, $key_file2.'~');
-				$app->system->chmod($key_file2.'~', 0400);
-			}
 			if(file_exists($csr_file)) $app->system->copy($csr_file, $csr_file.'~');
 			if(file_exists($crt_file)) $app->system->copy($crt_file, $crt_file.'~');
 			if(file_exists($bundle_file)) $app->system->copy($bundle_file, $bundle_file.'~');
@@ -1316,7 +1298,6 @@ class apache2_plugin {
 		$tmp = $app->letsencrypt->get_website_certificate_paths($data);
 		$domain = $tmp['domain'];
 		$key_file = $tmp['key'];
-		$key_file2 = $tmp['key2'];
 		$csr_file = $tmp['csr'];
 		$crt_file = $tmp['crt'];
 		$bundle_file = $tmp['bundle'];
@@ -2094,17 +2075,12 @@ class apache2_plugin {
 						$app->system->copy($key_file, $key_file.'.err');
 						$app->system->chmod($key_file.'.err', 0400);
 					}
-					if(is_file($key_file2)){
-						$app->system->copy($key_file2, $key_file2.'.err');
-						$app->system->chmod($key_file2.'.err', 0400);
-					}
 					if(is_file($csr_file)) $app->system->copy($csr_file, $csr_file.'.err');
 					if(is_file($crt_file)) $app->system->copy($crt_file, $crt_file.'.err');
 					if(is_file($bundle_file)) $app->system->copy($bundle_file, $bundle_file.'.err');
 
 					//* Restore the ~ backup files
 					if(is_file($key_file.'~')) $app->system->copy($key_file.'~', $key_file);
-					if(is_file($key_file2.'~')) $app->system->copy($key_file2.'~', $key_file2);
 					if(is_file($crt_file.'~')) $app->system->copy($crt_file.'~', $crt_file);
 					if(is_file($csr_file.'~')) $app->system->copy($csr_file.'~', $csr_file);
 					if(is_file($bundle_file.'~')) $app->system->copy($bundle_file.'~', $bundle_file);
@@ -2129,7 +2105,6 @@ class apache2_plugin {
 		$this->ssl_certificate_changed = false;
 
 		if(@is_file($key_file.'~')) $app->system->unlink($key_file.'~');
-		if(@is_file($key_file2.'~')) $app->system->unlink($key_file2.'~');
 		if(@is_file($crt_file.'~')) $app->system->unlink($crt_file.'~');
 		if(@is_file($csr_file.'~')) $app->system->unlink($csr_file.'~');
 		if(@is_file($bundle_file.'~')) $app->system->unlink($bundle_file.'~');
-- 
GitLab


From 66358f7d288988a9dc4e771e978a4906d459af96 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 4 Jun 2021 11:03:09 +0000
Subject: [PATCH 404/441] Change URI for git-develop download

---
 server/scripts/update_runner.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/scripts/update_runner.sh b/server/scripts/update_runner.sh
index e432fc006a..f3eb684328 100644
--- a/server/scripts/update_runner.sh
+++ b/server/scripts/update_runner.sh
@@ -26,7 +26,7 @@ if [[ "$SOURCE" == "stable" ]] ; then
 elif [[ "$SOURCE" == "nightly" ]] ; then
 	URL="https://www.ispconfig.org/downloads/ISPConfig-3-nightly.tar.gz"
 elif [[ "$SOURCE" == "git-develop" ]] ; then
-	URL="https://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=develop"
+	URL="https://git.ispconfig.org/ispconfig/ispconfig3/-/archive/develop/ispconfig3-develop.tar.gz"
 else 
 	echo "Please choose an installation source (stable, nightly, git-develop)"
 	exit 1
-- 
GitLab


From cabf6039d34cec43d166617ede7126a0bf053af9 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Tue, 8 Jun 2021 09:03:58 +0000
Subject: [PATCH 405/441] Update app.inc.php

---
 interface/lib/app.inc.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php
index 8617c34b21..ee4713cd98 100755
--- a/interface/lib/app.inc.php
+++ b/interface/lib/app.inc.php
@@ -126,6 +126,9 @@ class app {
 				array($this->session, 'destroy'),
 				array($this->session, 'gc'));
 
+			ini_set('session.cookie_httponly', true);
+			@ini_set('session.cookie_samesite', 'Lax');
+
 			session_start();
 
 			//* Initialize session variables
-- 
GitLab


From 4946eca16ca6140cdb1d2ca668f902c254eb5d6f Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Tue, 8 Jun 2021 11:02:35 +0000
Subject: [PATCH 406/441] Update nginx_vhost.conf.master

---
 server/conf/nginx_vhost.conf.master | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index 50c0cf5183..1c219f0cd4 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -355,11 +355,18 @@ server {
 <tmpl_if name='ipv6_enabled'>
         listen [<tmpl_var name='ipv6_address'>]:<tmpl_var name='http_port'>;
 </tmpl_if>
+<tmpl_if name='ipv6_wildcard'>
+        listen [::]:<tmpl_var name='http_port'>;
+</tmpl_if>
+
 
 <tmpl_if name='ssl_enabled'>
-        listen <tmpl_var name='ip_address'>:<tmpl_var name='https_port'> ssl;
+        listen <tmpl_var name='ip_address'>:<tmpl_var name='https_port'> ssl http2;
 <tmpl_if name='ipv6_enabled'>
-        listen [<tmpl_var name='ipv6_address'>]:<tmpl_var name='https_port'> ssl;
+        listen [<tmpl_var name='ipv6_address'>]:<tmpl_var name='https_port'> ssl http2;
+</tmpl_if>
+<tmpl_if name='ipv6_wildcard'>
+        listen [::]:<tmpl_var name='https_port'> ssl http2;
 </tmpl_if>
         ssl_certificate <tmpl_var name='ssl_crt_file'>;
         ssl_certificate_key <tmpl_var name='ssl_key_file'>;
-- 
GitLab


From c3c9c984166f0ebb0b6b46dab52c7cbc0ce5ec6f Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 25 Jun 2021 10:12:43 +0000
Subject: [PATCH 407/441] Update 500-backup_mail.inc.php Disable quota and ACLS
 when doing a backup of mdbox mailboxes with dsnyc

---
 server/lib/classes/cron.d/500-backup_mail.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/classes/cron.d/500-backup_mail.inc.php b/server/lib/classes/cron.d/500-backup_mail.inc.php
index f631f0043c..6a133fa839 100644
--- a/server/lib/classes/cron.d/500-backup_mail.inc.php
+++ b/server/lib/classes/cron.d/500-backup_mail.inc.php
@@ -126,7 +126,7 @@ class cronjob_backup_mail extends cronjob {
 						if ($rec['maildir_format'] == 'mdbox') {
 							if (empty($this->tmp_backup_dir)) $this->tmp_backup_dir = $rec['maildir'];
 							// Create temporary backup-mailbox
-							$app->system->exec_safe("su -c ?", 'dsync backup -u "'.$rec["email"].'" mdbox:' . $this->tmp_backup_dir . '/backup');
+							$app->system->exec_safe("su -c ?", 'dsync backup -o plugin/acl= -o plugin/quota= -u "'.$rec["email"].'" mdbox:' . $this->tmp_backup_dir . '/backup');
 		
 							if($backup_mode == 'userzip') {
 								$mail_backup_file.='.zip';
-- 
GitLab


From 22e34a16a3317ef115d81ec03cc9565a1397c7e3 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 25 Jun 2021 10:46:36 -0600
Subject: [PATCH 408/441] custom letsencrypt renew hook

---
 server/scripts/letsencrypt_renew_hook.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/server/scripts/letsencrypt_renew_hook.sh b/server/scripts/letsencrypt_renew_hook.sh
index 53fc31befd..63100ed650 100644
--- a/server/scripts/letsencrypt_renew_hook.sh
+++ b/server/scripts/letsencrypt_renew_hook.sh
@@ -12,8 +12,12 @@
 
 ## If you need a custom hook file, create a file with the same name in
 ## /usr/local/ispconfig/server/conf-custom/scripts/
+##
+## End the file with 'return 124' to signal that this script should not terminate.
 if [ -e "/usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_renew_hook.sh" ] ; then
-	. /usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_renew_hook.sh && exit 0 || exit 1;
+        . /usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_renew_hook.sh
+        ret=$?
+        if [ $ret != 124 ]; then exit $ret; fi
 fi
 
 hostname=$(hostname -f)
@@ -52,4 +56,4 @@ if [ -d "$lelive" ]; then
         if [ $(dpkg-query -W -f='${Status}' nginx 2>/dev/null | grep -c "ok installed") -eq 1 ]; then service nginx restart; fi
         if [ $(dpkg-query -W -f='${Status}' apache2 2>/dev/null | grep -c "ok installed") -eq 1 ]; then service apache2 restart; fi
     fi
-else echo `/bin/date` "Your Lets Encrypt SSL certs path for your ISPConfig server FQDN is missing.$line" >> /var/log/ispconfig/ispconfig.log; fi
\ No newline at end of file
+else echo `/bin/date` "Your Lets Encrypt SSL certs path for your ISPConfig server FQDN is missing.$line" >> /var/log/ispconfig/ispconfig.log; fi
-- 
GitLab


From 679bae56dc798abfae2e5337e0c636da581c76c2 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Mon, 12 Jul 2021 07:40:40 +0000
Subject: [PATCH 409/441] Update installer_base.lib.php

---
 install/lib/installer_base.lib.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 43d226aab5..9681d32e5e 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -3002,13 +3002,13 @@ class installer_base {
 
 			// Backup existing ispserver ssl files
 			if(file_exists($ssl_crt_file) || is_link($ssl_crt_file)) {
-				rename($ssl_crt_file, $ssl_crt_file . '-temporary.bak');
+				copy($ssl_crt_file, $ssl_crt_file . '-temporary.bak');
 			}
 			if(file_exists($ssl_key_file) || is_link($ssl_key_file)) {
-				rename($ssl_key_file, $ssl_key_file . '-temporary.bak');
+				copy($ssl_key_file, $ssl_key_file . '-temporary.bak');
 			}
 			if(file_exists($ssl_pem_file) || is_link($ssl_pem_file)) {
-				rename($ssl_pem_file, $ssl_pem_file . '-temporary.bak');
+				copy($ssl_pem_file, $ssl_pem_file . '-temporary.bak');
 			}
 
 			// Attempt to use Neilpang acme.sh first, as it is now the preferred LE client
-- 
GitLab


From 679b2ec8952dbf302b9cec7acd102e8367d8db3c Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 13 Jul 2021 18:32:23 +0000
Subject: [PATCH 410/441] Update rspamd_antivirus.conf.master:  don't skip
 virus scanning for text and image attachments.

---
 install/tpl/rspamd_antivirus.conf.master | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/install/tpl/rspamd_antivirus.conf.master b/install/tpl/rspamd_antivirus.conf.master
index f88d81ac7c..aa3d2cc9f2 100644
--- a/install/tpl/rspamd_antivirus.conf.master
+++ b/install/tpl/rspamd_antivirus.conf.master
@@ -1,8 +1,11 @@
 clamav {
     # If set force this action if any virus is found (default unset: no action is forced)
     #action = "reject";
-    # if `true` only messages with non-image attachments will be checked (default true)
+    # Scan mime_parts separately - otherwise the complete mail will be transferred to AV Scanner 
     scan_mime_parts = true;
+    # Scanning Text is suitable for some av scanner databases (e.g. Sanesecurity)
+    scan_text_mime = true;
+    scan_image_mime = true;
     # If `max_size` is set, messages > n bytes in size are not scanned
     #max_size = 20000000;
     # symbol to add (add it to metric if you want non-zero weight)
@@ -25,6 +28,10 @@ clamav {
       # symbol_name = "pattern";
       JUST_EICAR = "^Eicar-Test-Signature$";
     }
+    patterns_fail {
+      # symbol_name = "pattern";
+      CLAM_PROTOCOL_ERROR = '^unhandled response';
+    }
     # `whitelist` points to a map of IP addresses. Mail from these addresses is not scanned.
     whitelist = "/etc/rspamd/antivirus.wl";
-}
\ No newline at end of file
+}
-- 
GitLab


From b8926ade07bc1d859c9a671bf96eb7061adbca99 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 15 Jul 2021 15:59:11 +0000
Subject: [PATCH 411/441] Update jk_init.ini.master - incorporate upstream
 (v2.22) changes and glob match some pathnames

---
 install/tpl/jk_init.ini.master | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/install/tpl/jk_init.ini.master b/install/tpl/jk_init.ini.master
index 1060085e39..418488194f 100644
--- a/install/tpl/jk_init.ini.master
+++ b/install/tpl/jk_init.ini.master
@@ -6,11 +6,11 @@
 
 [uidbasics]
 comment = common files for all jails that need user/group information
-paths = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, /lib64/libnss*.so.2, /lib/i386-linux-gnu/libnsl.so.1, /lib/i386-linux-gnu/libnss*.so.2, /lib/x86_64-linux-gnu/libnsl.so.1, /lib/x86_64-linux-gnu/libnss*.so.2, /lib/arm-linux-gnueabihf/libnsl*.so.1, /lib/arm-linux-gnueabihf/libnss*.so.2, /lib/aarch64-linux-gnu/libnsl.so.1, /lib/aarch64-linux-gnu/libnss*.so.2, /etc/nsswitch.conf, /etc/ld.so.conf
+paths = /lib*/libnsl.so.*, /lib*/libnss*.so.*, /lib/*/libnsl.so.*, /lib/*/libnss.so.*, /etc/nsswitch.conf, /etc/ld.so.conf
 
 [netbasics]
 comment = common files for all jails that need any internet connectivity
-paths = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2, /lib/libnss_mdns*.so.2, /lib/i386-linux-gnu/libnss_dns.so.2, /lib/x86_64-linux-gnu/libnss_dns.so.2, /lib/arm-linux-gnueabihf/libnss_dns.so.2, /lib/aarch64-linux-gnu/libnss_dns.so.2, /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols, /etc/services, /etc/ssl/certs/, /usr/lib/ssl/certs
+paths = /lib*/libnss_dns.so.*, /lib*/libnss_mdns*.so.*, /lib/*/libnss_dns.so.*, /lib/*/libnss_mdns*.so.*, /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols, /etc/services, /etc/ssl/certs/, /usr/lib/ssl/certs
 
 [logbasics]
 comment = timezone information and log sockets
@@ -35,22 +35,20 @@ devices = /dev/null
 
 [git]
 comment = Fast Version Control System
-paths = /usr/bin/git*, /usr/lib/git-core, /usr/share/git-core, /usr/bin/pager
+paths = /usr/bin/git*, /usr/lib/git-core, /usr/share/git-core, pager
 includesections = editors, perl, netbasics, basicshell, coreutils
 
 [scp]
 comment = ssh secure copy
 paths = scp
 includesections = netbasics, uidbasics
-devices = /dev/urandom
+devices = /dev/urandom, /dev/null
 
 [sftp]
 comment = ssh secure ftp
 paths = /usr/lib/sftp-server, /usr/libexec/openssh/sftp-server, /usr/lib/misc/sftp-server, /usr/libexec/sftp-server, /usr/lib/openssh/sftp-server
 includesections = netbasics, uidbasics
 devices = /dev/urandom, /dev/null
-# on solaris 
-#paths = /usr/lib/ssh/sftp-server
 
 [ssh]
 comment = ssh secure shell
@@ -74,6 +72,10 @@ users = root
 groups = root
 includesections = uidbasics
 
+[interactiveshell]
+comment = for ssh access to a full shell
+includesections = uidbasics, basicshell, terminfo, editors, extendedshell
+
 [midnightcommander]
 comment = Midnight Commander
 paths = mc, mcedit, mcview, /usr/share/mc
@@ -226,11 +228,11 @@ comment = php version 7.4
 paths = /usr/bin/php7.4, /usr/lib/php/7.4/, /usr/lib/php/20190902/, /usr/share/php/7.4/, /etc/php/7.4/cli/, /etc/php/7.4/mods-available/
 includesections = php_common
 
-[imagemagick]
-comment = ImageMagick needed for php-imagemagick extension
-paths = /usr/share/ImageMagick-*, /etc/ImageMagick-*, /usr/lib/i386-linux-gnu/ImageMagick-*, /usr/lib/x86_64-linux-gnu/ImageMagick-*, /usr/lib/arm-linux-gnueabihf/ImageMagick-*, /usr/lib/aarch64-linux-gnu/ImageMagick-*
-
 [php8_0]
 comment = php version 8.0
 paths = /usr/bin/php8.0, /usr/lib/php/8.0/, /usr/lib/php/20200930/, /usr/share/php/8.0/, /etc/php/8.0/cli/, /etc/php/8.0/mods-available/
 includesections = php_common
+
+[imagemagick]
+comment = ImageMagick needed for php-imagemagick extension
+paths = /usr/share/ImageMagick-*, /etc/ImageMagick-*, /usr/lib/*/ImageMagick-*
-- 
GitLab


From 8a4596b20558f6006be8dbe28eb5d02dc0cb9b8b Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 15 Jul 2021 11:39:40 -0600
Subject: [PATCH 412/441] "ISPConfig v2 detected" message indicates possible
 fix

---
 install/install.php               |  7 +++++-
 install/update.php                |  6 ++++-
 server/lib/classes/system.inc.php | 38 -------------------------------
 3 files changed, 11 insertions(+), 40 deletions(-)

diff --git a/install/install.php b/install/install.php
index a5233744c8..6194e556a1 100644
--- a/install/install.php
+++ b/install/install.php
@@ -160,8 +160,13 @@ if(!is_writable(dirname(ISPC_LOG_FILE))){
 	die("ERROR: Cannot write to the ".dirname(ISPC_LOG_FILE)." directory. Are you root or sudo ?\n\n");
 }
 
+//** Check for ISPConfig 2.x versions
 if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) {
-	die('This software cannot be installed on a server wich runs ISPConfig 2.x.');
+	if(is_dir('/home/admispconfig') {
+		die('This software cannot be installed on a server which runs ISPConfig 2.x.');
+	} else {
+		die('This software cannot be installed on a server which runs ISPConfig 2.x; the presence of the /root/ispconfig/ directory may indicate an ISPConfig 2.x installation, otherwise you can remove or rename it to continue.');
+	}
 }
 
 if(is_dir('/usr/local/ispconfig')) {
diff --git a/install/update.php b/install/update.php
index 0122f27678..d584c112cf 100644
--- a/install/update.php
+++ b/install/update.php
@@ -96,7 +96,11 @@ require_once 'lib/classes/tpl.inc.php';
 
 //** Check for ISPConfig 2.x versions
 if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) {
-	die('This software cannot be installed on a server wich runs ISPConfig 2.x.');
+	if(is_dir('/home/admispconfig') {
+		die('This software cannot be installed on a server which runs ISPConfig 2.x.');
+	} else {
+		die('This software cannot be installed on a server which runs ISPConfig 2.x; the presence of the /root/ispconfig/ directory may indicate an ISPConfig 2.x installation, otherwise you can remove or rename it to continue.');
+	}
 }
 
 // Patch is required to reapir latest amavis versions
diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 5a99bbda20..9c202542e8 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -1591,44 +1591,6 @@ class system{
 
 
 
-	/**
-	 * Scan the trash for virusses infection
-	 *
-	 */
-	function make_trashscan(){
-		global $app;
-		//trashscan erstellen
-		// Template Öffnen
-		$app->tpl->clear_all();
-		$app->tpl->define( array(table    => 'trashscan.master'));
-
-		if(!isset($this->server_conf['virusadmin']) || trim($this->server_conf['virusadmin']) == '') $this->server_conf['virusadmin'] = 'admispconfig@localhost';
-		if(substr($this->server_conf['virusadmin'], 0, 1) == '#'){
-			$notify = 'no';
-		} else {
-			$notify = 'yes';
-		}
-
-		// Variablen zuweisen
-		$app->tpl->assign( array(VIRUSADMIN => $this->server_conf['virusadmin'],
-				NOTIFICATION => $notify));
-
-		$app->tpl->parse(TABLE, table);
-
-		$trashscan_text = $app->tpl->fetch();
-
-		$datei = '/home/admispconfig/ispconfig/tools/clamav/bin/trashscan';
-		$app->file->wf($datei, $trashscan_text);
-
-		chmod($datei, 0755);
-		chown($datei, 'admispconfig');
-		chgrp($datei, 'admispconfig');
-	}
-
-
-
-
-
 	/**
 	 * Get the current time
 	 *
-- 
GitLab


From 4096880fbdddd6404be57414393eef3358031113 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 15 Jul 2021 14:42:24 -0600
Subject: [PATCH 413/441] missing parenthesis

---
 install/install.php | 2 +-
 install/update.php  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/install.php b/install/install.php
index 6194e556a1..b94c1c7f6f 100644
--- a/install/install.php
+++ b/install/install.php
@@ -162,7 +162,7 @@ if(!is_writable(dirname(ISPC_LOG_FILE))){
 
 //** Check for ISPConfig 2.x versions
 if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) {
-	if(is_dir('/home/admispconfig') {
+	if(is_dir('/home/admispconfig')) {
 		die('This software cannot be installed on a server which runs ISPConfig 2.x.');
 	} else {
 		die('This software cannot be installed on a server which runs ISPConfig 2.x; the presence of the /root/ispconfig/ directory may indicate an ISPConfig 2.x installation, otherwise you can remove or rename it to continue.');
diff --git a/install/update.php b/install/update.php
index d584c112cf..4639615801 100644
--- a/install/update.php
+++ b/install/update.php
@@ -96,7 +96,7 @@ require_once 'lib/classes/tpl.inc.php';
 
 //** Check for ISPConfig 2.x versions
 if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) {
-	if(is_dir('/home/admispconfig') {
+	if(is_dir('/home/admispconfig')) {
 		die('This software cannot be installed on a server which runs ISPConfig 2.x.');
 	} else {
 		die('This software cannot be installed on a server which runs ISPConfig 2.x; the presence of the /root/ispconfig/ directory may indicate an ISPConfig 2.x installation, otherwise you can remove or rename it to continue.');
-- 
GitLab


From 63368e9ead6a8405c58c5ad843aa9907ccb52985 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 15 Jul 2021 15:42:39 -0600
Subject: [PATCH 414/441] remove spamfilter_wblist entries when removing
 spamfilter_users

---
 interface/web/mail/mail_user_del.php        |  9 +++++++-
 interface/web/mail/spamfilter_users_del.php | 23 ++++++++++++++++++---
 2 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/interface/web/mail/mail_user_del.php b/interface/web/mail/mail_user_del.php
index dc92047331..1f19166ef7 100644
--- a/interface/web/mail/mail_user_del.php
+++ b/interface/web/mail/mail_user_del.php
@@ -55,6 +55,14 @@ class page_action extends tform_actions {
 		global $app; $conf;
 
 		$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]);
+		if (is_array($tmp_user) && isset($tmp_user['id'])) {
+			$tmp_wblists = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_user['id']);
+			if(is_array($tmp_wblists)) {
+				foreach($tmp_wblists as $tmp) {
+					$app->db->datalogDelete('spamfilter_wblist', 'wblist_id', $tmp['wblist_id']);
+				}
+			}
+		}
 		$app->db->datalogDelete('spamfilter_users', 'id', $tmp_user["id"]);
 
 		$tmp_filters = $app->db->queryAllRecords("SELECT filter_id FROM mail_user_filter WHERE mailuser_id = ?", $this->id);
@@ -71,4 +79,3 @@ class page_action extends tform_actions {
 $page = new page_action;
 $page->onDelete();
 
-?>
diff --git a/interface/web/mail/spamfilter_users_del.php b/interface/web/mail/spamfilter_users_del.php
index 0dc92935c1..a243803f9f 100644
--- a/interface/web/mail/spamfilter_users_del.php
+++ b/interface/web/mail/spamfilter_users_del.php
@@ -45,7 +45,24 @@ require_once '../../lib/app.inc.php';
 //* Check permissions for module
 $app->auth->check_module_permissions('mail');
 
-$app->uses("tform_actions");
-$app->tform_actions->onDelete();
+$app->uses('tform_actions');
+$app->load('tform_actions');
+
+class page_action extends tform_actions {
+
+        function onBeforeDelete() {
+                global $app; $conf;
+
+		$tmp_wblists = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $this->id);
+		if(is_array($tmp_wblists)) {
+			foreach($tmp_wblists as $tmp) {
+				$app->db->datalogDelete('spamfilter_wblist', 'wblist_id', $tmp['wblist_id']);
+			}
+		}
+        }
+
+}
+
+$page = new page_action;
+$page->onDelete();
 
-?>
-- 
GitLab


From 17a4b7d10083a194dd9f12f0f01d7fa59c38e9ea Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 3 Aug 2021 17:22:16 -0600
Subject: [PATCH 415/441] fix php warning in cron_plugin.php

---
 server/plugins-available/cron_plugin.inc.php | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php
index 1d44a849aa..331e85f919 100644
--- a/server/plugins-available/cron_plugin.inc.php
+++ b/server/plugins-available/cron_plugin.inc.php
@@ -184,12 +184,14 @@ class cron_plugin {
 
 		if(!$parent_domain) {
 			$tmp = $app->db->queryOneRecord('SELECT * FROM sys_datalog WHERE dbtable = ? AND dbidx = ? AND `action` = ? ORDER BY `datalog_id` DESC', 'web_domain', 'domain_id:' . $data['old']['parent_domain_id'], 'd');
-			$tmp = unserialize($tmp);
-			if($tmp && isset($tmp['old'])) {
-				$this->parent_domain = $tmp['old'];
-			} else {
-				$app->log("Parent domain not found", LOGLEVEL_WARN);
-				return 0;
+			if(is_array($tmp) && isset($tmp['data']) && strlen($tmp['data']) > 0) {
+				$tmp = unserialize($tmp['data']);
+				if($tmp && isset($tmp['old'])) {
+					$this->parent_domain = $tmp['old'];
+				} else {
+					$app->log("Parent domain not found", LOGLEVEL_WARN);
+					return 0;
+				}
 			}
 		} else {
 			$this->parent_domain = $parent_domain;
-- 
GitLab


From 8e60423faab16c4e96659e8f24a374bbff633569 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 9 Aug 2021 15:44:10 -0600
Subject: [PATCH 416/441] create missing jailkit when enabling php

---
 .../plugins-available/apache2_plugin.inc.php  | 29 ++++++----------
 server/plugins-available/nginx_plugin.inc.php | 34 ++++++++-----------
 2 files changed, 24 insertions(+), 39 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 19f650d4b3..76967c9935 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -533,7 +533,7 @@ class apache2_plugin {
 		$app->uses('getconf');
 		$web_config = $app->getconf->get_server_config($conf['server_id'], 'web');
 
-		//* Check if this is a chrooted setup
+		//* Check if apache is using a chrooted setup
 		if($web_config['website_basedir'] != '' && @is_file($web_config['website_basedir'].'/etc/passwd')) {
 			$apache_chrooted = true;
 			$app->log('Info: Apache is chrooted.', LOGLEVEL_DEBUG);
@@ -547,7 +547,7 @@ class apache2_plugin {
 		}
 		if($app->system->is_allowed_user($data['new']['system_user'], $app->system->is_user($data['new']['system_user']), true) == false
 			|| $app->system->is_allowed_group($data['new']['system_group'], $app->system->is_group($data['new']['system_group']), true) == false) {
-			$app->log('Websites cannot be owned by the root user or group. User: '.$data['new']['system_user'].' Group: '.$data['new']['system_group'], LOGLEVEL_WARN);
+			$app->log('Problem with website user or group.  Websites cannot be owned by root or an existing user/group. User: '.$data['new']['system_user'].' Group: '.$data['new']['system_group'], LOGLEVEL_WARN);
 			return 0;
 		}
 		if(trim($data['new']['domain']) == '') {
@@ -641,7 +641,7 @@ class apache2_plugin {
 					$tmp_symlink = str_replace('[website_domain]', $data['old']['domain'], $tmp_symlink);
 					// Remove trailing slash
 					if(substr($tmp_symlink, -1, 1) == '/') $tmp_symlink = substr($tmp_symlink, 0, -1);
-					// create the symlinks, if not exist
+					// remove the old symlinks if they exist
 					if(is_link($tmp_symlink)) {
 						$app->system->exec_safe('rm -f ?', $tmp_symlink);
 						$app->log('Removed symlink: rm -f '.$tmp_symlink, LOGLEVEL_DEBUG);
@@ -674,9 +674,7 @@ class apache2_plugin {
 
 				//* Create new base directory, if it does not exist yet
 				if(!is_dir($new_dir)) $app->system->mkdirpath($new_dir);
-				$app->system->web_folder_protection($data['old']['document_root'], false);
 				$app->system->exec_safe('mv ? ?', $data['old']['document_root'], $new_dir);
-				//$app->system->rename($data['old']['document_root'],$new_dir);
 				$app->log('Moving site to new document root: mv '.$data['old']['document_root'].' '.$new_dir, LOGLEVEL_DEBUG);
 
 				// Handle the change in php_open_basedir
@@ -696,15 +694,6 @@ class apache2_plugin {
 			if($apache_chrooted) $app->system->exec_safe('chroot ? ?', $web_config['website_basedir'], $command);
 
 			//* Change the log mount
-			/*
-			$fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.'    none    bind';
-			$app->system->removeLine('/etc/fstab', $fstab_line);
-			$fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.'    none    bind,nobootwait';
-			$app->system->removeLine('/etc/fstab', $fstab_line);
-			$fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.'    none    bind,nobootwait';
-			$app->system->removeLine('/etc/fstab', $fstab_line);
-			*/
-
 			$fstab_line_old = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.'    none    bind';
 
 			if($web_config['network_filesystem'] == 'y') {
@@ -719,8 +708,6 @@ class apache2_plugin {
 
 		}
 
-		//print_r($data);
-
 		// Check if the directories are there and create them if necessary.
 		$app->system->web_folder_protection($data['new']['document_root'], false);
 
@@ -772,8 +759,12 @@ class apache2_plugin {
 		$update_hash = hash('md5', implode(' ', $last_updated));
 		$check_for_jailkit_updates=false;
 
-		// Create jailkit chroot when enabling php_fpm_chroot
-		if($data['new']['php_fpm_chroot'] == 'y' && $data['old']['php_fpm_chroot'] != 'y' && $data['new']['php'] != 'no') {
+		$create_jail_conditions= ($data['old']['php_fpm_chroot'] != 'y' ||
+			! is_dir($data['new']['document_root'].'/etc/jailkit') ||
+			($data['old']['php'] != $data['new']['php'] && $data['new']['php'] != 'no'));
+
+		// Create jailkit chroot if needed and when enabling php_fpm_chroot
+		if($data['new']['php_fpm_chroot'] == 'y' && $create_jail_conditions && $data['new']['php'] != 'no') {
 			$website = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ?', $data['new']['domain_id']);
 			$this->website = array_merge($website, $data['new'], array('new_jailkit_hash' => $update_hash));
 			$this->jailkit_config = $jailkit_config;
@@ -875,7 +866,7 @@ class apache2_plugin {
 					$tmp_symlink = str_replace('[website_domain]', $data['old']['domain'], $tmp_symlink);
 					// Remove trailing slash
 					if(substr($tmp_symlink, -1, 1) == '/') $tmp_symlink = substr($tmp_symlink, 0, -1);
-					// remove the symlinks, if not exist
+					// remove the old symlinks if they exist
 					if(is_link($tmp_symlink)) {
 						$app->system->exec_safe('rm -f ?', $tmp_symlink);
 						$app->log('Removed symlink: rm -f '.$tmp_symlink, LOGLEVEL_DEBUG);
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 2a1ba6c13a..adf0ed0781 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -379,7 +379,7 @@ class nginx_plugin {
 		$app->uses('getconf');
 		$web_config = $app->getconf->get_server_config($conf['server_id'], 'web');
 
-		//* Check if this is a chrooted setup
+		//* Check if nginx is using a chrooted setup
 		if($web_config['website_basedir'] != '' && @is_file($web_config['website_basedir'].'/etc/passwd')) {
 			$nginx_chrooted = true;
 			$app->log('Info: nginx is chrooted.', LOGLEVEL_DEBUG);
@@ -393,7 +393,7 @@ class nginx_plugin {
 		}
 		if($app->system->is_allowed_user($data['new']['system_user'], $app->system->is_user($data['new']['system_user']), true) == false
 			|| $app->system->is_allowed_group($data['new']['system_group'], $app->system->is_group($data['new']['system_group']), true) == false) {
-			$app->log('Websites cannot be owned by the root user or group. User: '.$data['new']['system_user'].' Group: '.$data['new']['system_group'], LOGLEVEL_WARN);
+			$app->log('Problem with website user or group.  Websites cannot be owned by root or an existing user/group. User: '.$data['new']['system_user'].' Group: '.$data['new']['system_group'], LOGLEVEL_WARN);
 			return 0;
 		}
 		if(trim($data['new']['domain']) == '') {
@@ -500,7 +500,7 @@ class nginx_plugin {
 					$tmp_symlink = str_replace('[website_domain]', $data['old']['domain'], $tmp_symlink);
 					// Remove trailing slash
 					if(substr($tmp_symlink, -1, 1) == '/') $tmp_symlink = substr($tmp_symlink, 0, -1);
-					// create the symlinks, if not exist
+					// remove the old symlinks if they exist
 					if(is_link($tmp_symlink)) {
 						$app->system->exec_safe('rm -f ?', $tmp_symlink);
 						$app->log('Removed symlink: rm -f '.$tmp_symlink, LOGLEVEL_DEBUG);
@@ -508,6 +508,9 @@ class nginx_plugin {
 				}
 			}
 
+			//* Remove protection of old folders
+			$app->system->web_folder_protection($data['old']['document_root'], false);
+
 			if($data["new"]["type"] != "vhostsubdomain" && $data["new"]["type"] != "vhostalias") {
 				//* Move the site data
 				$tmp_docroot = explode('/', $data['new']['document_root']);
@@ -530,9 +533,7 @@ class nginx_plugin {
 
 				//* Create new base directory, if it does not exist yet
 				if(!is_dir($new_dir)) $app->system->mkdirpath($new_dir);
-				$app->system->web_folder_protection($data['old']['document_root'], false);
 				$app->system->exec_safe('mv ? ?', $data['old']['document_root'], $new_dir);
-				//$app->system->rename($data['old']['document_root'],$new_dir);
 				$app->log('Moving site to new document root: mv '.$data['old']['document_root'].' '.$new_dir, LOGLEVEL_DEBUG);
 
 				// Handle the change in php_open_basedir
@@ -552,15 +553,6 @@ class nginx_plugin {
 			if($nginx_chrooted) $app->system->exec_safe('chroot ? ?', $web_config['website_basedir'], $command);
 
 			//* Change the log mount
-			/*
-			$fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.'    none    bind';
-			$app->system->removeLine('/etc/fstab', $fstab_line);
-			$fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.'    none    bind,nobootwait';
-			$app->system->removeLine('/etc/fstab', $fstab_line);
-			$fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.'    none    bind,nobootwait';
-			$app->system->removeLine('/etc/fstab', $fstab_line);
-			*/
-
 			$fstab_line_old = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.'    none    bind';
 
 			if($web_config['network_filesystem'] == 'y') {
@@ -575,8 +567,6 @@ class nginx_plugin {
 
 		}
 
-		//print_r($data);
-
 		// Check if the directories are there and create them if necessary.
 		$app->system->web_folder_protection($data['new']['document_root'], false);
 
@@ -628,8 +618,12 @@ class nginx_plugin {
 		$update_hash = hash('md5', implode(' ', $last_updated));
 		$check_for_jailkit_updates=false;
 
-		// Create jailkit chroot when enabling php_fpm_chroot
-		if($data['new']['php_fpm_chroot'] == 'y' && $data['old']['php_fpm_chroot'] != 'y' && $data['new']['php'] != 'no') {
+		$create_jail_conditions= ($data['old']['php_fpm_chroot'] != 'y' ||
+			! is_dir($data['new']['document_root'].'/etc/jailkit') ||
+			($data['old']['php'] != $data['new']['php'] && $data['new']['php'] != 'no'));
+
+		// Create jailkit chroot if needed and when enabling php_fpm_chroot
+		if($data['new']['php_fpm_chroot'] == 'y' && $create_jail_conditions && $data['new']['php'] != 'no') {
 			$website = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ?', $data['new']['domain_id']);
 			$this->website = array_merge($website, $data['new'], array('new_jailkit_hash' => $update_hash));
 			$this->jailkit_config = $jailkit_config;
@@ -731,7 +725,7 @@ class nginx_plugin {
 					$tmp_symlink = str_replace('[website_domain]', $data['old']['domain'], $tmp_symlink);
 					// Remove trailing slash
 					if(substr($tmp_symlink, -1, 1) == '/') $tmp_symlink = substr($tmp_symlink, 0, -1);
-					// remove the symlinks, if not exist
+					// remove the old symlinks if they exist
 					if(is_link($tmp_symlink)) {
 						$app->system->exec_safe('rm -f ?', $tmp_symlink);
 						$app->log('Removed symlink: rm -f '.$tmp_symlink, LOGLEVEL_DEBUG);
@@ -2143,7 +2137,7 @@ class nginx_plugin {
 
 		if($data['old']['type'] == 'vhost' || $data['old']['type'] == 'vhostsubdomain' || $data['old']['type'] == 'vhostalias') $app->system->web_folder_protection($data['old']['document_root'], false);
 
-		//* Check if this is a chrooted setup
+		//* Check if nginx is using a chrooted setup
 		if($web_config['website_basedir'] != '' && @is_file($web_config['website_basedir'].'/etc/passwd')) {
 			$nginx_chrooted = true;
 		} else {
-- 
GitLab


From 8418cc3aedf8b49bc99bac084e018cca7fbc72fb Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 9 Aug 2021 17:37:59 -0600
Subject: [PATCH 417/441] force jails to update every 2 weeks

---
 .../cron.d/600-jailkit_maintenance.inc.php    | 39 +++++++------------
 1 file changed, 15 insertions(+), 24 deletions(-)

diff --git a/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php b/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
index 4ef5835e67..e38ee58210 100644
--- a/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
+++ b/server/lib/classes/cron.d/600-jailkit_maintenance.inc.php
@@ -34,22 +34,6 @@ class cronjob_jailkit_maintenance extends cronjob {
 	protected $_schedule = '*/5 * * * *';
 	protected $_run_at_new = true;
 
-	//private $_tools = null;
-
-	/* this function is optional if it contains no custom code */
-	public function onPrepare() {
-		global $app;
-
-		parent::onPrepare();
-	}
-
-	/* this function is optional if it contains no custom code */
-	public function onBeforeRun() {
-		global $app;
-
-		return parent::onBeforeRun();
-	}
-
 	public function onRunJob() {
 		global $app, $conf;
 
@@ -66,6 +50,18 @@ class cronjob_jailkit_maintenance extends cronjob {
 			$options = array('allow_hardlink');
 		}
 
+		// force all jails to update every 2 weeks
+		if (! is_file('/usr/local/ispconfig/server/temp/jailkit_force_update.ts')) {
+			if(!@is_dir('/usr/local/ispconfig/server/temp')) {
+				$app->system->mkdirpath('/usr/local/ispconfig/server/temp');
+			}
+			$app->system->touch('/usr/local/ispconfig/server/temp/jailkit_force_update.ts');
+		} elseif ( time() - filemtime('/usr/local/ispconfig/server/temp/jailkit_force_update.ts') > 60 * 60 * 24 * 14 ) {
+			$update_hash = 'force_update'.time();
+			$app->db->query("UPDATE web_domain SET last_jailkit_hash = ? WHERE type = 'vhost' AND server_id = ?", $update_hash, $conf['server_id']);
+			$app->system->touch('/usr/local/ispconfig/server/temp/jailkit_force_update.ts');
+		}
+
 		// limit the number of jails we update at one time according to time of day
 		$num_jails_to_update = (date('H') < 6) ? 25 : 3;
 
@@ -111,12 +107,12 @@ class cronjob_jailkit_maintenance extends cronjob {
 				sort($last_updated, SORT_STRING);
 				$update_hash = hash('md5', implode(' ', $last_updated));
 
-				if (is_file( $rec['document_root']."/bin/bash" )) {
+				if (substr($rec['last_jailkit_hash'], 0, strlen('force_update')) === 'force_update') {
+					$options[] = 'force';
+				} elseif (is_file( $rec['document_root']."/bin/bash" )) {
 					# test that /bin/bash functions in the jail
-print "chroot --userspec ".$rec['system_user'].":".$rec['system_group']." ".$rec['document_root']." /bin/bash -c true 2>/dev/null\n";
 					$app->system->exec_safe("chroot --userspec ?:? ? /bin/bash -c true 2>/dev/null", $rec['system_user'], $rec['system_group'], $rec['document_root']);
 					if ($app->system->last_exec_retcode()) {  # return 0 means success
-print "/bin/bash test failed, forcing update\n";
 						$options[] = 'force';
 						# bogus hash will not match, triggering an update
 						$update_hash = 'force_update'.time();
@@ -147,10 +143,5 @@ print "/bin/bash test failed, forcing update\n";
 		parent::onRunJob();
 	}
 
-	/* this function is optional if it contains no custom code */
-	public function onAfterRun() {
-		parent::onAfterRun();
-	}
-
 }
 
-- 
GitLab


From c4417ba5399a06402e4bff3c7237176919186772 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Mon, 12 Jul 2021 07:40:40 +0000
Subject: [PATCH 418/441] Update installer_base.lib.php

---
 install/lib/installer_base.lib.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 7fa747eecd..da50c79808 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -3003,13 +3003,13 @@ class installer_base {
 
 			// Backup existing ispserver ssl files
 			if(file_exists($ssl_crt_file) || is_link($ssl_crt_file)) {
-				rename($ssl_crt_file, $ssl_crt_file . '-temporary.bak');
+				copy($ssl_crt_file, $ssl_crt_file . '-temporary.bak');
 			}
 			if(file_exists($ssl_key_file) || is_link($ssl_key_file)) {
-				rename($ssl_key_file, $ssl_key_file . '-temporary.bak');
+				copy($ssl_key_file, $ssl_key_file . '-temporary.bak');
 			}
 			if(file_exists($ssl_pem_file) || is_link($ssl_pem_file)) {
-				rename($ssl_pem_file, $ssl_pem_file . '-temporary.bak');
+				copy($ssl_pem_file, $ssl_pem_file . '-temporary.bak');
 			}
 
 			// Attempt to use Neilpang acme.sh first, as it is now the preferred LE client
-- 
GitLab


From 6ed08cf68cc09368f805629f8367e69fda3d6d6f Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 15 Mar 2021 11:14:01 -0600
Subject: [PATCH 419/441] allow 1-char domain names

---
 interface/lib/classes/remote.d/dns.inc.php             |  2 +-
 interface/web/admin/form/server_config.tform.php       |  2 +-
 interface/web/client/form/domain.tform.php             |  2 +-
 interface/web/dns/dns_wizard.php                       | 10 ++++++----
 interface/web/dns/form/dns_slave.tform.php             |  2 +-
 interface/web/dns/form/dns_soa.tform.php               |  2 +-
 interface/web/mail/ajax_get_json.php                   |  2 +-
 interface/web/mail/form/mail_aliasdomain.tform.php     |  2 +-
 interface/web/mail/form/mail_domain_catchall.tform.php |  2 +-
 interface/web/mail/form/mail_mailinglist.tform.php     |  2 +-
 interface/web/mail/form/xmpp_domain.tform.php          |  2 +-
 11 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php
index 463b474cd1..15f47db874 100644
--- a/interface/lib/classes/remote.d/dns.inc.php
+++ b/interface/lib/classes/remote.d/dns.inc.php
@@ -248,7 +248,7 @@ class remoting_dns extends remoting {
 			return false;
 		}
 
-		if(!preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9\-]{2,63}$/', $origin)){
+		if(!preg_match('/^[\w\.\-]{1,64}\.[a-zA-Z0-9\-]{2,63}$/', $origin)){
 			throw new SoapFault('no_domain_found', 'Invalid domain name.');
 			return false;
 		}
diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index d5133f2a01..47a48a3c27 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -131,7 +131,7 @@ $form["tabs"]['server'] = array(
 			'validators' => array(	0 => array('type' => 'NOTEMPTY',
 												'errmsg' => 'hostname_error_empty'),
 									1 => array ('type' => 'REGEX',
-												'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,63}$/',
+												'regex' => '/^[\w\.\-]{1,255}\.[a-zA-Z0-9\-]{2,63}$/',
 												'errmsg'=> 'hostname_error_regex'),
 			),
 			'value' => '',
diff --git a/interface/web/client/form/domain.tform.php b/interface/web/client/form/domain.tform.php
index a3dc1aaac0..f521a55b2d 100644
--- a/interface/web/client/form/domain.tform.php
+++ b/interface/web/client/form/domain.tform.php
@@ -100,7 +100,7 @@ $form["tabs"]['domain'] = array (
 				1 => array ( 'type' => 'UNIQUE',
 					'errmsg'=> 'domain_error_unique'),
 				2 => array ( 'type' => 'REGEX',
-					'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,63}$/',
+					'regex' => '/^[\w\.\-]{1,255}\.[a-zA-Z0-9\-]{2,63}$/',
 					'errmsg'=> 'domain_error_regex'),
 			),
 			'default' => '',
diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php
index bef4422ef3..90e2fef1c4 100644
--- a/interface/web/dns/dns_wizard.php
+++ b/interface/web/dns/dns_wizard.php
@@ -276,18 +276,20 @@ if($_POST['create'] == 1) {
 	}
 
 
+	# fixme: this regex is pretty poor for domain validation
 	if(isset($_POST['domain']) && $_POST['domain'] == '') $error .= $app->lng('error_domain_empty').'<br />';
-	elseif(isset($_POST['domain']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9\-]{2,63}$/', $_POST['domain'])) $error .= $app->lng('error_domain_regex').'<br />';
+	elseif(isset($_POST['domain']) && !preg_match('/^[\w\.\-]{1,64}\.[a-zA-Z0-9\-]{2,63}$/', $_POST['domain'])) $error .= $app->lng('error_domain_regex').'<br />';
 
 	if(isset($_POST['ip']) && $_POST['ip'] == '') $error .= $app->lng('error_ip_empty').'<br />';
 
 	if(isset($_POST['ipv6']) && $_POST['ipv6'] == '') $error .= $app->lng('error_ipv6_empty').'<br />';
 
+	# fixme: this regex is pretty poor for hostname validation
 	if(isset($_POST['ns1']) && $_POST['ns1'] == '') $error .= $app->lng('error_ns1_empty').'<br />';
-	elseif(isset($_POST['ns1']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9]{2,63}$/', $_POST['ns1'])) $error .= $app->lng('error_ns1_regex').'<br />';
+	elseif(isset($_POST['ns1']) && !preg_match('/^[\w\.\-]{1,64}\.[a-zA-Z0-9]{2,63}$/', $_POST['ns1'])) $error .= $app->lng('error_ns1_regex').'<br />';
 
 	if(isset($_POST['ns2']) && $_POST['ns2'] == '') $error .= $app->lng('error_ns2_empty').'<br />';
-	elseif(isset($_POST['ns2']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9]{2,63}$/', $_POST['ns2'])) $error .= $app->lng('error_ns2_regex').'<br />';
+	elseif(isset($_POST['ns2']) && !preg_match('/^[\w\.\-]{1,64}\.[a-zA-Z0-9]{2,63}$/', $_POST['ns2'])) $error .= $app->lng('error_ns2_regex').'<br />';
 
 	if(isset($_POST['email']) && $_POST['email'] == '') $error .= $app->lng('error_email_empty').'<br />';
 	elseif(isset($_POST['email']) && filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) $error .= $app->lng('error_email_regex').'<br />';
@@ -326,7 +328,7 @@ if($_POST['create'] == 1) {
 	// $enable_dnssec = (($_POST['dnssec'] == 'Y') ? 'Y' : 'N');
 	// if(isset($_POST['dnssec'])) $vars['dnssec_wanted'] = 'Y';
 	if(isset($_POST['dnssec'])) $tpl_content = str_replace('[ZONE]', '[ZONE]'."\n".'dnssec_wanted=Y', $tpl_content);
-	if(isset($_POST['dkim']) && preg_match('/^[\w\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,63}[\.]{0,1}$/', $_POST['domain'])) {
+	if(isset($_POST['dkim']) && preg_match('/^[\w\.\-\/]{1,255}\.[a-zA-Z0-9\-]{2,63}[\.]{0,1}$/', $_POST['domain'])) {
 		$sql = $app->db->queryOneRecord("SELECT dkim_public, dkim_selector FROM mail_domain WHERE domain = ? AND dkim = 'y' AND ".$app->tform->getAuthSQL('r'), $_POST['domain']);
 		$public_key = $sql['dkim_public'];
 		if ($public_key!='') {
diff --git a/interface/web/dns/form/dns_slave.tform.php b/interface/web/dns/form/dns_slave.tform.php
index 55e085861a..bf684f9868 100644
--- a/interface/web/dns/form/dns_slave.tform.php
+++ b/interface/web/dns/form/dns_slave.tform.php
@@ -96,7 +96,7 @@ $form["tabs"]['dns_slave'] = array (
 														'errmsg'=> 'origin_error_unique'),
 										*/
 				1 => array ( 'type' => 'REGEX',
-					'regex' => '/^[a-zA-Z0-9\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,63}[\.]{0,1}$/',
+					'regex' => '/^[a-zA-Z0-9\.\-\/]{1,255}\.[a-zA-Z0-9\-]{2,63}[\.]{0,1}$/',
 					'errmsg'=> 'origin_error_regex'),
 			),
 			'default' => '',
diff --git a/interface/web/dns/form/dns_soa.tform.php b/interface/web/dns/form/dns_soa.tform.php
index fe71757788..b9e402f441 100644
--- a/interface/web/dns/form/dns_soa.tform.php
+++ b/interface/web/dns/form/dns_soa.tform.php
@@ -120,7 +120,7 @@ $form["tabs"]['dns_soa'] = array (
 				1 => array ( 'type' => 'UNIQUE',
 					'errmsg'=> 'origin_error_unique'),
 				2 => array ( 'type' => 'REGEX',
-					'regex' => '/^[a-zA-Z0-9\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,63}[\.]{0,1}$/',
+					'regex' => '/^[a-zA-Z0-9\.\-\/]{1,255}\.[a-zA-Z0-9\-]{2,63}[\.]{0,1}$/',
 					'errmsg'=> 'origin_error_regex'),
 			),
 			'default' => '',
diff --git a/interface/web/mail/ajax_get_json.php b/interface/web/mail/ajax_get_json.php
index dfc9dc220c..c40c3bf401 100644
--- a/interface/web/mail/ajax_get_json.php
+++ b/interface/web/mail/ajax_get_json.php
@@ -113,7 +113,7 @@ header('Content-type: application/json');
 echo $json;
 
 function validate_domain($domain) {
-	$regex = '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,63}$/';
+	$regex = '/^[\w\.\-]{1,255}\.[a-zA-Z0-9\-]{2,63}$/';
 	if ( preg_match($regex, $domain) === 1 ) return true; else return false;
 }
 
diff --git a/interface/web/mail/form/mail_aliasdomain.tform.php b/interface/web/mail/form/mail_aliasdomain.tform.php
index a0d1024989..c94e1a9311 100644
--- a/interface/web/mail/form/mail_aliasdomain.tform.php
+++ b/interface/web/mail/form/mail_aliasdomain.tform.php
@@ -86,7 +86,7 @@ $form["tabs"]['alias'] = array (
 				1 => array ( 'type' => 'UNIQUE',
 					'errmsg'=> 'source_error_unique'),
 				2 => array ( 'type' => 'REGEX',
-					'regex' => '/^\@[\w\.\-]{2,64}\.[a-zA-Z0-9\-]{2,20}$/',
+					'regex' => '/^\@[\w\.\-]{1,255}\.[a-zA-Z0-9\-]{2,63}$/',
 					'errmsg'=> 'source_error_regex'),
 			),
 			'default' => '',
diff --git a/interface/web/mail/form/mail_domain_catchall.tform.php b/interface/web/mail/form/mail_domain_catchall.tform.php
index 95e10354cc..ac4631bedb 100644
--- a/interface/web/mail/form/mail_domain_catchall.tform.php
+++ b/interface/web/mail/form/mail_domain_catchall.tform.php
@@ -86,7 +86,7 @@ $form["tabs"]['catchall'] = array (
 				1 => array ( 'type' => 'UNIQUE',
 					'errmsg'=> 'domain_error_unique'),
 				2 => array ( 'type' => 'REGEX',
-					'regex' => '/^\@[\w\.\-]{2,255}\.[a-zA-Z\-]{2,63}$/',
+					'regex' => '/^\@[\w\.\-]{1,255}\.[a-zA-Z\-]{2,63}$/',
 					'errmsg'=> 'domain_error_regex'),
 			),
 			'default' => '',
diff --git a/interface/web/mail/form/mail_mailinglist.tform.php b/interface/web/mail/form/mail_mailinglist.tform.php
index ba877f410c..295bd8d571 100644
--- a/interface/web/mail/form/mail_mailinglist.tform.php
+++ b/interface/web/mail/form/mail_mailinglist.tform.php
@@ -87,7 +87,7 @@ $form["tabs"]['mailinglist'] = array (
 			'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
 					'errmsg'=> 'domain_error_empty'),
 				1 => array ( 'type' => 'REGEX',
-					'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
+					'regex' => '/^[\w\.\-]{1,255}\.[a-zA-Z\-]{2,10}$/',
 					'errmsg'=> 'domain_error_regex'),
 			),
 			'default' => '',
diff --git a/interface/web/mail/form/xmpp_domain.tform.php b/interface/web/mail/form/xmpp_domain.tform.php
index c703b0bea3..28262923b9 100644
--- a/interface/web/mail/form/xmpp_domain.tform.php
+++ b/interface/web/mail/form/xmpp_domain.tform.php
@@ -103,7 +103,7 @@ $form["tabs"]['domain'] = array (
 				1 => array ( 'type' => 'UNIQUE',
 					'errmsg'=> 'domain_error_unique'),
 				2 => array ( 'type' => 'REGEX',
-					'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,63}$/',
+					'regex' => '/^[\w\.\-]{1,255}\.[a-zA-Z0-9\-]{2,63}$/',
 					'errmsg'=> 'domain_error_regex'),
 			),
 			'default' => '',
-- 
GitLab


From 7a58805fbcf9892e2c0888aa3853a02b641ee5ec Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 16 Jul 2021 15:39:48 -0600
Subject: [PATCH 420/441] send spamfilter_wblist_update events for change of
 spamfilter_users.email

---
 interface/web/mail/spamfilter_users_edit.php | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/interface/web/mail/spamfilter_users_edit.php b/interface/web/mail/spamfilter_users_edit.php
index b8bc9316c5..98493173cc 100644
--- a/interface/web/mail/spamfilter_users_edit.php
+++ b/interface/web/mail/spamfilter_users_edit.php
@@ -90,7 +90,7 @@ class page_action extends tform_actions {
 			$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
 			$client = $app->db->queryOneRecord("SELECT limit_spamfilter_user FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
 
-			// Check if the user may add another mailbox.
+			// Check if the user may add another spamfilter user.
 			if($this->id == 0 && $client["limit_spamfilter_user"] >= 0) {
 				$tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM spamfilter_users WHERE sys_groupid = ?", $client_group_id);
 				if($tmp["number"] >= $client["limit_spamfilter_user"]) {
@@ -103,10 +103,21 @@ class page_action extends tform_actions {
 		parent::onSubmit();
 	}
 
+
+	function onAfterUpdate() {
+		global $app, $conf;
+
+		// If email changes fire spamfilter_wblist_update events so rspamd files are rewritten
+		if(isset($this->dataRecord['email']) && $this->oldDataRecord['email'] != $this->dataRecord['email']) {
+			$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $this->dataRecord['id']);
+			foreach ($tmp_wblist as $tmp) {
+				$app->db->datalogUpdate('spamfilter_wblist', array('rid' => $this->dataRecord['id']), 'wblist_id', $tmp['wblist_id']);
+			}
+		}
+	}
+
 }
 
 $app->tform_actions = new page_action;
 $app->tform_actions->onLoad();
 
-
-?>
-- 
GitLab


From d7f9f242e3b53c48a69a6c868bbba4ef6ebeeb24 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 16 Jul 2021 15:40:37 -0600
Subject: [PATCH 421/441] send spamfilter_{users,wblist}_update events when
 mail_user email changes

---
 interface/web/mail/mail_domain_edit.php | 74 +++++++++++++++++++------
 interface/web/mail/mail_user_edit.php   | 40 +++++++++++--
 2 files changed, 93 insertions(+), 21 deletions(-)

diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index 67a724dbaf..a980aeef50 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -405,14 +405,48 @@ class page_action extends tform_actions {
 		global $app, $conf;
 
 		$domain = $app->functions->idn_encode($this->dataRecord["domain"]);
+		$old_domain = $app->functions->idn_encode($this->oldDataRecord["domain"]);
 
 		// Spamfilter policy
 		$policy_id = $app->functions->intval($this->dataRecord["policy"]);
+
+		// If domain changes, update spamfilter_users
+		// and fire spamfilter_wblist_update events so rspamd files are rewritten
+		$skip_spamfilter_users_update = false;
+		if(isset($old_domain != $domain) {
+			$tmp_old = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", '@' . $old_domain);
+			if($tmp_old['id'] > 0) {
+				$tmp_new = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", '@' . $domain);
+				if($tmp_new['id'] > 0) {
+					// There is a spamfilter_users for both old and new domain, we'll update old wblist entries
+					$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_old['id']);
+					foreach ($tmp_wblist as $tmp) {
+						$app->db->datalogUpdate('spamfilter_wblist', array('rid' => $tmp_new['id']), 'wblist_id', $tmp['wblist_id']);
+					}
+
+					// now delete old spamfilter_users entry
+					$app->db->datalogDelete('spamfilter_users', 'id', $tmp_old['id']);
+				} else {
+					$update_data = array(
+						'email' => '@' . $domain,
+						'policy_id' => $policy_id,
+					);
+					if($tmp_old['fullname'] == '@' . $old_domain) {
+						$update_data['fullname'] = '@' . $domain;
+					}
+					$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_old['id']);
+					$skip_spamfilter_users_update = true;
+				}
+			}
+		}
+
 		$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $domain);
 		if($policy_id > 0) {
 			if($tmp_user["id"] > 0) {
 				// There is already a record that we will update
-				$app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]);
+				if(!$skip_spamfilter_users_update) {
+					$app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]);
+				}
 			} else {
 				$tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id);
 				// We create a new record
@@ -435,20 +469,23 @@ class page_action extends tform_actions {
 		} else {
 			if($tmp_user["id"] > 0) {
 				// There is already a record but the user shall have no policy, so we delete it
+// fixme: this abandons any spamfilter_wblist entries tied to this spamfilter_users id
+// https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6201
 				$app->db->datalogDelete('spamfilter_users', 'id', $tmp_user["id"]);
 			}
 		} // endif spamfilter policy
 		//** If the domain name or owner has been changed, change the domain and owner in all mailbox records
-		if($this->oldDataRecord['domain'] != $domain || (isset($this->dataRecord['client_group_id']) && $this->oldDataRecord['sys_groupid'] != $this->dataRecord['client_group_id'])) {
+		if($old_domain != $domain || (isset($this->dataRecord['client_group_id']) && $this->oldDataRecord['sys_groupid'] != $this->dataRecord['client_group_id'])) {
 			$app->uses('getconf');
 			$mail_config = $app->getconf->get_server_config($this->dataRecord["server_id"], 'mail');
 
 			//* Update the mailboxes
-			$mailusers = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE email like ?", '%@' . $this->oldDataRecord['domain']);
+			$mailusers = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE email like ?", '%@' . $old_domain;
 			$sys_groupid = $app->functions->intval((isset($this->dataRecord['client_group_id']))?$this->dataRecord['client_group_id']:$this->oldDataRecord['sys_groupid']);
 			$tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $sys_groupid);
 			$client_user_id = $app->functions->intval(($tmp['userid'] > 0)?$tmp['userid']:1);
 			if(is_array($mailusers)) {
+// fixme: change spamfilter_users and fire wblist events
 				foreach($mailusers as $rec) {
 					// setting Maildir, Homedir, UID and GID
 					$mail_parts = explode("@", $rec['email']);
@@ -460,32 +497,38 @@ class page_action extends tform_actions {
 			}
 
 			//* Update the aliases
-			$forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source like ? OR destination like ?", '%@' . $this->oldDataRecord['domain'], '%@' . $this->oldDataRecord['domain']);
+			$forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source like ? OR destination like ?", '%@' . $old_domain, '%@' . $old_domain);
 			if(is_array($forwardings)) {
+// fixme: change spamfilter_users and fire wblist events  for aliases/forwards
 				foreach($forwardings as $rec) {
-					$destination = str_replace($this->oldDataRecord['domain'], $domain, $rec['destination']);
-					$source = str_replace($this->oldDataRecord['domain'], $domain, $rec['source']);
+					$destination = str_replace($old_domain, $domain, $rec['destination']);
+					$source = str_replace($old_domain, $domain, $rec['source']);
 					$app->db->datalogUpdate('mail_forwarding', array("source" => $source, "destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'forwarding_id', $rec['forwarding_id']);
 				}
 			}
 
 			//* Update the mailinglist
-			$app->db->query("UPDATE mail_mailinglist SET sys_userid = ?, sys_groupid = ? WHERE domain = ?", $client_user_id, $sys_groupid, $this->oldDataRecord['domain']);
+			$mailinglists = $app->db->queryAllRecords("SELECT * FROM mail_mailinglist WHERE domain = ?", $old_domain);
+			if(is_array($mailinglists)) {
+				foreach($mailinglists as $rec) {
+					$update_data = array(
+						'sys_userid' => $client_user_id,
+						'sys_groupid' => $sys_groupid,
+						'domain' => $domain,
+						'email' => str_replace($old_domain, $domain, $rec['email']),
+					);
+					$app->db->datalogUpdate('mail_mailinglist', $update_data, 'mailinglist_id', $rec['mailinglist_id']);
+				}
+			}
 
 			//* Update fetchmail accounts
-			$fetchmail = $app->db->queryAllRecords("SELECT * FROM mail_get WHERE destination like ?", '%@' . $this->oldDataRecord['domain']);
+			$fetchmail = $app->db->queryAllRecords("SELECT * FROM mail_get WHERE destination like ?", '%@' . $old_domain);
 			if(is_array($fetchmail)) {
 				foreach($fetchmail as $rec) {
-					$destination = str_replace($this->oldDataRecord['domain'], $domain, $rec['destination']);
+					$destination = str_replace($old_domain, $domain, $rec['destination']);
 					$app->db->datalogUpdate('mail_get', array("destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailget_id', $rec['mailget_id']);
 				}
 			}
-
-			//* Delete the old spamfilter record
-			$tmp = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $this->oldDataRecord["domain"]);
-			$app->db->datalogDelete('spamfilter_users', 'id', $tmp["id"]);
-			unset($tmp);
-
 		} // end if domain name changed
 
 		//* update dns-record when the dkim record was changed
@@ -559,4 +602,3 @@ class page_action extends tform_actions {
 $page = new page_action;
 $page->onLoad();
 
-?>
diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php
index 1dca1db848..e24ca17c8f 100644
--- a/interface/web/mail/mail_user_edit.php
+++ b/interface/web/mail/mail_user_edit.php
@@ -329,11 +329,42 @@ class page_action extends tform_actions {
 
 			// Spamfilter policy
 			$policy_id = $app->functions->intval($this->dataRecord["policy"]);
+			// Handle email change
+			$skip_spamfilter_users_update = false;
+			if(isset($this->dataRecord['email']) && $this->oldDataRecord['email'] != $this->dataRecord['email']) {
+				$tmp_olduser = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", $this->oldDataRecord['email']);
+				if($tmp_olduser["id"] > 0) {
+					$tmp_newuser = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord['email']);
+					if($tmp_newuser['id'] > 0) {
+						// There is a spamfilter_users for both old and new email, we'll update old wblist entries
+						$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
+						foreach ($tmp_wblist as $tmp) {
+							$app->db->datalogUpdate('spamfilter_wblist', array('rid' => $tmp_newuser['id']), 'wblist_id', $tmp['wblist_id']);
+						}
+
+						// now delete old spamfilter_users entry
+						$app->db->datalogDelete('spamfilter_users', 'id', $tmp_olduser['id']);
+					} else {
+						$update_data = array(
+							'email' => $this->dataRecord['email'],
+							'policy_id' => $policy_id,
+						);
+						if($tmp_olduser['fullname'] == $app->functions->idn_decode($this->oldDataRecord["email"])) {
+							$update_data['fullname'] = $app->functions->idn_decode($this->dataRecord["email"]);
+						}
+						$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_olduser['id']);
+						$skip_spamfilter_users_update = true;
+					}
+				}
+			}
+
 			$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]);
 			if($policy_id > 0) {
 				if($tmp_user["id"] > 0) {
 					// There is already a record that we will update
-					$app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]);
+					if(!$skip_spamfilter_users_update) {
+						$app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]);
+					}
 				} else {
 					// We create a new record
 					$insert_data = array(
@@ -351,9 +382,11 @@ class page_action extends tform_actions {
 					);
 					$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
 				}
-			}else {
+			} else {
 				if($tmp_user["id"] > 0) {
 					// There is already a record but the user shall have no policy, so we delete it
+// fixme: don't delete or we abandon users' wblist entries
+// https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6201
 					$app->db->datalogDelete('spamfilter_users', 'id', $tmp_user["id"]);
 				}
 			} // endif spamfilter policy
@@ -372,8 +405,6 @@ class page_action extends tform_actions {
 
 		//** If the email address has been changed, change it in all aliases too
 		if(isset($this->dataRecord['email']) && $this->oldDataRecord['email'] != $this->dataRecord['email']) {
-			//if($this->oldDataRecord['email'] != $this->dataRecord['email']) {
-
 			//* Update the aliases
 			$forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE destination = ?", $this->oldDataRecord['email']);
 			if(is_array($forwardings)) {
@@ -401,4 +432,3 @@ class page_action extends tform_actions {
 $app->tform_actions = new page_action;
 $app->tform_actions->onLoad();
 
-?>
-- 
GitLab


From 7d3ec68f499d309d243b3a715f7e248adb543a0e Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 16 Jul 2021 16:36:52 -0600
Subject: [PATCH 422/441] update spamfilter_users and spamfilter_wblist when
 domain changes

---
 interface/web/mail/mail_domain_edit.php | 133 +++++++++++++++++++++++-
 1 file changed, 128 insertions(+), 5 deletions(-)

diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index a980aeef50..36185ead69 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -413,7 +413,7 @@ class page_action extends tform_actions {
 		// If domain changes, update spamfilter_users
 		// and fire spamfilter_wblist_update events so rspamd files are rewritten
 		$skip_spamfilter_users_update = false;
-		if(isset($old_domain != $domain) {
+		if($old_domain != $domain) {
 			$tmp_old = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", '@' . $old_domain);
 			if($tmp_old['id'] > 0) {
 				$tmp_new = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", '@' . $domain);
@@ -480,29 +480,152 @@ class page_action extends tform_actions {
 			$mail_config = $app->getconf->get_server_config($this->dataRecord["server_id"], 'mail');
 
 			//* Update the mailboxes
-			$mailusers = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE email like ?", '%@' . $old_domain;
+			$mailusers = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE email like ?", '%@' . $old_domain);
 			$sys_groupid = $app->functions->intval((isset($this->dataRecord['client_group_id']))?$this->dataRecord['client_group_id']:$this->oldDataRecord['sys_groupid']);
 			$tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $sys_groupid);
 			$client_user_id = $app->functions->intval(($tmp['userid'] > 0)?$tmp['userid']:1);
 			if(is_array($mailusers)) {
-// fixme: change spamfilter_users and fire wblist events
 				foreach($mailusers as $rec) {
 					// setting Maildir, Homedir, UID and GID
 					$mail_parts = explode("@", $rec['email']);
 					$maildir = str_replace("[domain]", $domain, $mail_config["maildir_path"]);
 					$maildir = str_replace("[localpart]", $mail_parts[0], $maildir);
 					$email = $mail_parts[0].'@'.$this->dataRecord['domain'];
-					$app->db->datalogUpdate('mail_user', array("maildir" => $maildir, "email" => $email, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailuser_id', $rec['mailuser_id']);
+					// update spamfilter_users and spamfilter_wblist if email change
+					$skip_spamfilter_users_update = false;
+					if($email != $mail_parts[0].'@'.$this->oldDataRecord['domain']) {
+						$tmp_olduser = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", $mail_parts[0].'@'.$this->oldDataRecord['domain']);
+						if($tmp_olduser['id'] > 0) {
+
+							$tmp_newuser = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $mail_parts[0].'@'.$this->dataRecord['domain']);
+							if($tmp_newuser['id'] > 0) {
+								// There is a spamfilter_users for both old and new email, we'll update old wblist entries
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
+								foreach ($tmp_wblist as $tmp) {
+									$update_data = array(
+										'rid' => $tmp_newuser['id'],
+										'sys_userid' => $client_user_id,
+										'sys_groupid' => $sys_groupid,
+									);
+									$app->db->datalogUpdate('spamfilter_wblist', $update_data, 'wblist_id', $tmp['wblist_id']);
+								}
+
+								// now delete old spamfilter_users entry
+								$app->db->datalogDelete('spamfilter_users', 'id', $tmp_olduser['id']);
+							} else {
+								$update_data = array(
+									'email' => $mail_parts[0].'@'.$this->dataRecord['domain'],
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								if($tmp_olduser['fullname'] == $app->functions->idn_decode($mail_parts[0].'@'.$this->oldDataRecord['domain'])) {
+									$update_data['fullname'] = $app->functions->idn_decode($mail_parts[0].'@'.$this->dataRecord['domain']);
+								}
+								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_olduser['id']);
+								$skip_spamfilter_users_update = true;
+
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
+								$update_data = array(
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								foreach ($tmp_wblist as $tmp) {
+									$app->db->datalogUpdate('spamfilter_wblist', $update_data, 'wblist_id', $tmp['wblist_id']);
+								}
+							}
+						}
+
+						$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $mail_parts[0].'@'.$this->dataRecord['domain']);
+						if($tmp_user["id"] > 0) {
+							// There is already a record that we will update
+							if(!$skip_spamfilter_users_update) {
+								$update_data = array(
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_user['id']);
+							}
+						/*
+						} else {
+							 # fixme: insert spamfilter_users with correct policy_id,
+							 # pending https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6201
+						 */
+						}
+
+						$app->db->datalogUpdate('mail_user', array("maildir" => $maildir, "email" => $email, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailuser_id', $rec['mailuser_id']);
+					}
 				}
 			}
 
 			//* Update the aliases
 			$forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source like ? OR destination like ?", '%@' . $old_domain, '%@' . $old_domain);
 			if(is_array($forwardings)) {
-// fixme: change spamfilter_users and fire wblist events  for aliases/forwards
 				foreach($forwardings as $rec) {
 					$destination = str_replace($old_domain, $domain, $rec['destination']);
 					$source = str_replace($old_domain, $domain, $rec['source']);
+
+					// update spamfilter_users and spamfilter_wblist if email change
+					$skip_spamfilter_users_update = false;
+					if($source != $rec['source']) {
+						$tmp_olduser = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", $rec['source']);
+						if($tmp_olduser['id'] > 0) {
+							$tmp_newuser = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $source);
+							if($tmp_newuser['id'] > 0) {
+								// There is a spamfilter_users for both old and new email, we'll update old wblist entries
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
+								foreach ($tmp_wblist as $tmp) {
+									$update_data = array(
+										'rid' => $tmp_newuser['id'],
+										'sys_userid' => $client_user_id,
+										'sys_groupid' => $sys_groupid,
+									);
+									$app->db->datalogUpdate('spamfilter_wblist', $update_data, 'wblist_id', $tmp['wblist_id']);
+								}
+
+								// now delete old spamfilter_users entry
+								$app->db->datalogDelete('spamfilter_users', 'id', $tmp_olduser['id']);
+							} else {
+								$update_data = array(
+									'email' => $source,
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								if($tmp_olduser['fullname'] == $app->functions->idn_decode($rec['source'])) {
+									$update_data['fullname'] = $app->functions->idn_decode($source);
+								}
+								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_olduser['id']);
+								$skip_spamfilter_users_update = true;
+
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
+								$update_data = array(
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								foreach ($tmp_wblist as $tmp) {
+									$app->db->datalogUpdate('spamfilter_wblist', $update_data, 'wblist_id', $tmp['wblist_id']);
+								}
+							}
+						}
+
+						$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $source);
+						if($tmp_user["id"] > 0) {
+							// There is already a record that we will update
+							if(!$skip_spamfilter_users_update) {
+								$update_data = array(
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_user['id']);
+							}
+						/*
+						} else {
+							 # fixme: insert spamfilter_users with correct policy_id,
+							 # pending https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6201
+						 */
+						}
+
+					}
+
 					$app->db->datalogUpdate('mail_forwarding', array("source" => $source, "destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'forwarding_id', $rec['forwarding_id']);
 				}
 			}
-- 
GitLab


From 20c5d50dbfa094575347544bd39eb0db6d36e313 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 21 Jul 2021 12:34:36 -0600
Subject: [PATCH 423/441] update spamfilter_users and spamfilter_wblist when
 mail_user.email changes

---
 interface/web/mail/mail_user_edit.php | 99 ++++++++++++++++-----------
 1 file changed, 59 insertions(+), 40 deletions(-)

diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php
index e24ca17c8f..30c6d15000 100644
--- a/interface/web/mail/mail_user_edit.php
+++ b/interface/web/mail/mail_user_edit.php
@@ -327,43 +327,70 @@ class page_action extends tform_actions {
 			$domain = $app->db->queryOneRecord("SELECT sys_groupid, server_id FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"]));
 			$app->db->query("UPDATE mail_user SET sys_groupid = ? WHERE mailuser_id = ?", $domain["sys_groupid"], $this->id);
 
+		}
+
+		// Set the fields for dovecot
+		if(isset($this->dataRecord["email"])) {
+			$disableimap = (isset($this->dataRecord["disableimap"]) && $this->dataRecord["disableimap"])?'y':'n';
+			$disablepop3 = (isset($this->dataRecord["disablepop3"]) && $this->dataRecord["disablepop3"])?'y':'n';
+			$disablesmtp = (isset($this->dataRecord["disablesmtp"]) && $this->dataRecord["disablesmtp"])?'y':'n';
+			$disabledeliver = (isset($this->dataRecord["disabledeliver"]) && $this->dataRecord["disabledeliver"])?'y':'n';
+
+			$sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, `disablesieve-filter` = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ?, disablelmtp = ? WHERE mailuser_id = ?";
+			$app->db->query($sql, $disableimap, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $disabledeliver, $this->id);
+		}
+
+		//** Handle email address change
+		if(isset($this->dataRecord['email']) && $this->oldDataRecord['email'] != $this->dataRecord['email']) {
 			// Spamfilter policy
 			$policy_id = $app->functions->intval($this->dataRecord["policy"]);
-			// Handle email change
+
+			//** Update spamfilter_users and spamfilter_wblist
 			$skip_spamfilter_users_update = false;
-			if(isset($this->dataRecord['email']) && $this->oldDataRecord['email'] != $this->dataRecord['email']) {
-				$tmp_olduser = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", $this->oldDataRecord['email']);
-				if($tmp_olduser["id"] > 0) {
-					$tmp_newuser = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord['email']);
-					if($tmp_newuser['id'] > 0) {
-						// There is a spamfilter_users for both old and new email, we'll update old wblist entries
-						$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
-						foreach ($tmp_wblist as $tmp) {
-							$app->db->datalogUpdate('spamfilter_wblist', array('rid' => $tmp_newuser['id']), 'wblist_id', $tmp['wblist_id']);
-						}
+			$tmp_olduser = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", $this->oldDataRecord['email']);
+			if($tmp_olduser["id"] > 0) {
+				$tmp_newuser = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord['email']);
+				if($tmp_newuser['id'] > 0) {
+					// There is a spamfilter_users for both old and new email, we'll update old wblist entries
+					$update_date = array('rid' => $tmp_newuser['id']);
+					if (isset($domain['sys_groupid'])) {
+						$update_data['sys_groupid'] = $domain['sys_groupid'];
+					}
+					$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
+					foreach ($tmp_wblist as $tmp) {
+						$app->db->datalogUpdate('spamfilter_wblist', $update_data, 'wblist_id', $tmp['wblist_id']);
+					}
 
-						// now delete old spamfilter_users entry
-						$app->db->datalogDelete('spamfilter_users', 'id', $tmp_olduser['id']);
-					} else {
-						$update_data = array(
-							'email' => $this->dataRecord['email'],
-							'policy_id' => $policy_id,
-						);
-						if($tmp_olduser['fullname'] == $app->functions->idn_decode($this->oldDataRecord["email"])) {
-							$update_data['fullname'] = $app->functions->idn_decode($this->dataRecord["email"]);
-						}
-						$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_olduser['id']);
-						$skip_spamfilter_users_update = true;
+					// now delete old spamfilter_users entry
+					$app->db->datalogDelete('spamfilter_users', 'id', $tmp_olduser['id']);
+				} else {
+					$update_data = array(
+						'email' => $this->dataRecord['email'],
+						'policy_id' => $policy_id,
+					);
+					if (isset($domain['sys_groupid'])) {
+						$update_data['sys_groupid'] = $domain['sys_groupid'];
+					}
+					if($tmp_olduser['fullname'] == $app->functions->idn_decode($this->oldDataRecord['email'])) {
+						$update_data['fullname'] = $app->functions->idn_decode($this->dataRecord['email']);
 					}
+					$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_olduser['id']);
+					$skip_spamfilter_users_update = true;
 				}
 			}
 
-			$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]);
+			$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord['email']);
 			if($policy_id > 0) {
 				if($tmp_user["id"] > 0) {
 					// There is already a record that we will update
 					if(!$skip_spamfilter_users_update) {
-						$app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]);
+						$update_data = array(
+							'policy_id' => $policy_id,
+						);
+						if (isset($domain['sys_groupid'])) {
+							$update_data['sys_groupid'] = $domain['sys_groupid'];
+						}
+						$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_user['id']);
 					}
 				} else {
 					// We create a new record
@@ -390,27 +417,19 @@ class page_action extends tform_actions {
 					$app->db->datalogDelete('spamfilter_users', 'id', $tmp_user["id"]);
 				}
 			} // endif spamfilter policy
-		}
-
-		// Set the fields for dovecot
-		if(isset($this->dataRecord["email"])) {
-			$disableimap = (isset($this->dataRecord["disableimap"]) && $this->dataRecord["disableimap"])?'y':'n';
-			$disablepop3 = (isset($this->dataRecord["disablepop3"]) && $this->dataRecord["disablepop3"])?'y':'n';
-			$disablesmtp = (isset($this->dataRecord["disablesmtp"]) && $this->dataRecord["disablesmtp"])?'y':'n';
-			$disabledeliver = (isset($this->dataRecord["disabledeliver"]) && $this->dataRecord["disabledeliver"])?'y':'n';
 
-			$sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, `disablesieve-filter` = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ?, disablelmtp = ? WHERE mailuser_id = ?";
-			$app->db->query($sql, $disableimap, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $disabledeliver, $this->id);
-		}
-
-		//** If the email address has been changed, change it in all aliases too
-		if(isset($this->dataRecord['email']) && $this->oldDataRecord['email'] != $this->dataRecord['email']) {
 			//* Update the aliases
 			$forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE destination = ?", $this->oldDataRecord['email']);
 			if(is_array($forwardings)) {
 				foreach($forwardings as $rec) {
 					$destination = $this->dataRecord['email'];
-					$app->db->datalogUpdate('mail_forwarding', array("destination" => $destination), 'forwarding_id', $rec['forwarding_id']);
+					$update_data = array(
+						'destination' => $destination,
+					);
+					if (isset($domain['sys_groupid'])) {
+						$update_data['sys_groupid'] = $domain['sys_groupid'];
+					}
+					$app->db->datalogUpdate('mail_forwarding', $update_data, 'forwarding_id', $rec['forwarding_id']);
 				}
 			}
 
-- 
GitLab


From 9a335174422f6baf6e051608fc979e35ded30405 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 28 Jul 2021 17:40:25 -0600
Subject: [PATCH 424/441] always keep spamfilter_users entries:  #6201

---
 .../tpl/gentoo/amavisd-ispconfig.conf.master  |   3 +-
 .../sql/incremental/upd_dev_collection.sql    |   2 +
 install/sql/ispconfig3.sql                    |   2 +-
 install/tpl/amavisd_user_config.master        |   3 +-
 install/tpl/fedora_amavisd_conf.master        |   3 +-
 install/tpl/opensuse_amavisd_conf.master      |   3 +-
 interface/lib/classes/remote.d/client.inc.php |   2 +-
 interface/lib/classes/remote.d/mail.inc.php   |   4 +-
 .../plugins/mail_mail_domain_plugin.inc.php   | 250 ++++++++++++++++--
 interface/web/client/client_del.php           |   6 +-
 .../web/mail/form/spamfilter_users.tform.php  |   2 +-
 .../web/mail/lib/lang/ar_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/bg_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/br_spamfilter_users.lng |   1 +
 .../web/mail/lib/lang/ca_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/cz_spamfilter_users.lng |   1 +
 .../web/mail/lib/lang/de_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/dk_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/el_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/en_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/es_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/fi_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/fr_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/hr_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/hu_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/id_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/it_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/ja_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/nl_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/pl_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/pt_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/ro_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/ru_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/se_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/sk_spamfilter_users.lng |   2 +-
 .../web/mail/lib/lang/tr_spamfilter_users.lng |   2 +-
 interface/web/mail/mail_domain_del.php        |   4 +
 interface/web/mail/mail_domain_edit.php       | 177 +++++++------
 interface/web/mail/mail_user_del.php          |   2 +
 interface/web/mail/mail_user_edit.php         | 177 ++++++-------
 .../web/mail/spamfilter_blacklist_edit.php    |   2 +-
 interface/web/mail/spamfilter_policy_edit.php |  11 +-
 interface/web/mail/spamfilter_users_edit.php  |  25 +-
 .../web/mail/spamfilter_whitelist_edit.php    |   2 +-
 .../mailuser/mail_user_spamfilter_edit.php    |  58 ++--
 interface/web/tools/resync.php                |  86 +++---
 server/plugins-available/mail_plugin.inc.php  |   2 +-
 .../plugins-available/rspamd_plugin.inc.php   |  24 +-
 48 files changed, 561 insertions(+), 337 deletions(-)

diff --git a/install/dist/tpl/gentoo/amavisd-ispconfig.conf.master b/install/dist/tpl/gentoo/amavisd-ispconfig.conf.master
index 7e42c8a362..c60b50e2fa 100644
--- a/install/dist/tpl/gentoo/amavisd-ispconfig.conf.master
+++ b/install/dist/tpl/gentoo/amavisd-ispconfig.conf.master
@@ -51,7 +51,8 @@ use strict;
 $sql_select_policy =
    'SELECT *,spamfilter_users.id'.
    ' FROM spamfilter_users LEFT JOIN spamfilter_policy ON spamfilter_users.policy_id=spamfilter_policy.id'.
-   ' WHERE spamfilter_users.email IN (%k) ORDER BY spamfilter_users.priority DESC';
+   ' WHERE spamfilter_users.email IN (%k) AND spamfilter_users.policy_id != 0'.
+   ' ORDER BY spamfilter_users.priority DESC';
 
 
 $sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'.
diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index e69de29bb2..2a9a9ffd09 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -0,0 +1,2 @@
+-- default spamfilter_users.policy_id to 0
+ALTER TABLE `spamfilter_users` ALTER `policy_id` SET DEFAULT 0;
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 006beb6b53..9ebb69090f 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -1545,7 +1545,7 @@ CREATE TABLE `spamfilter_users` (
   `sys_perm_other` varchar(5) NOT NULL DEFAULT '',
   `server_id` int(11) unsigned NOT NULL DEFAULT '0',
   `priority` tinyint(3) unsigned NOT NULL default '7',
-  `policy_id` int(11) unsigned NOT NULL default '1',
+  `policy_id` int(11) unsigned NOT NULL default '0',
   `email` varchar(255) NOT NULL DEFAULT '',
   `fullname` varchar(64) default NULL,
   `local` varchar(1) default NULL,
diff --git a/install/tpl/amavisd_user_config.master b/install/tpl/amavisd_user_config.master
index 344ea9a152..f764bb3acb 100644
--- a/install/tpl/amavisd_user_config.master
+++ b/install/tpl/amavisd_user_config.master
@@ -33,7 +33,8 @@ use strict;
 $sql_select_policy =
    'SELECT *,spamfilter_users.id'.
    ' FROM spamfilter_users LEFT JOIN spamfilter_policy ON spamfilter_users.policy_id=spamfilter_policy.id'.
-   ' WHERE spamfilter_users.email IN (%k) ORDER BY spamfilter_users.priority DESC';
+   ' WHERE spamfilter_users.email IN (%k) AND spamfilter_users.policy_id != 0'.
+   ' ORDER BY spamfilter_users.priority DESC';
 
 
 $sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'.
diff --git a/install/tpl/fedora_amavisd_conf.master b/install/tpl/fedora_amavisd_conf.master
index 9cf4b801bc..2435e6939e 100644
--- a/install/tpl/fedora_amavisd_conf.master
+++ b/install/tpl/fedora_amavisd_conf.master
@@ -751,7 +751,8 @@ $banned_filename_re = new_RE(
 $sql_select_policy =
    'SELECT *,spamfilter_users.id'.
    ' FROM spamfilter_users LEFT JOIN spamfilter_policy ON spamfilter_users.policy_id=spamfilter_policy.id'.
-   ' WHERE spamfilter_users.email IN (%k) ORDER BY spamfilter_users.priority DESC';
+   ' WHERE spamfilter_users.email IN (%k) AND spamfilter_users.policy_id != 0'.
+   ' ORDER BY spamfilter_users.priority DESC';
 
 
 $sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'.
diff --git a/install/tpl/opensuse_amavisd_conf.master b/install/tpl/opensuse_amavisd_conf.master
index 419eea237c..7310db9cbf 100644
--- a/install/tpl/opensuse_amavisd_conf.master
+++ b/install/tpl/opensuse_amavisd_conf.master
@@ -746,7 +746,8 @@ $banned_filename_re = new_RE(
 $sql_select_policy =
    'SELECT *,spamfilter_users.id'.
    ' FROM spamfilter_users LEFT JOIN spamfilter_policy ON spamfilter_users.policy_id=spamfilter_policy.id'.
-   ' WHERE spamfilter_users.email IN (%k) ORDER BY spamfilter_users.priority DESC';
+   ' WHERE spamfilter_users.email IN (%k) AND spamfilter_users.policy_id != 0'.
+   ' ORDER BY spamfilter_users.priority DESC';
 
 
 $sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'.
diff --git a/interface/lib/classes/remote.d/client.inc.php b/interface/lib/classes/remote.d/client.inc.php
index 58dcc3119f..5af1592db9 100644
--- a/interface/lib/classes/remote.d/client.inc.php
+++ b/interface/lib/classes/remote.d/client.inc.php
@@ -413,7 +413,7 @@ class remoting_client extends remoting {
 			$app->db->query("DELETE FROM sys_user WHERE client_id = ?", $client_id);
 
 			//* Delete all records (sub-clients, mail, web, etc....)  of this client.
-			$tables = 'cron,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic,domain,mail_mailinglist,client';
+			$tables = 'cron,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic,domain,mail_mailinglist,client,spamfilter_wblist';
 			$tables_array = explode(',', $tables);
 			$client_group_id = $app->functions->intval($client_group['groupid']);
 			if($client_group_id > 1) {
diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php
index c4582c634e..286d6f6c57 100644
--- a/interface/lib/classes/remote.d/mail.inc.php
+++ b/interface/lib/classes/remote.d/mail.inc.php
@@ -663,7 +663,7 @@ class remoting_mail extends remoting {
 		return $app->remoting_lib->getDataRecord($primary_id);
 	}
 
-	//* biała lista e-mail
+	//* add spamfilter whitelist entry
 	public function mail_spamfilter_whitelist_add($session_id, $client_id, $params)
 	{
 		if (!$this->checkPerm($session_id, 'mail_spamfilter_whitelist_add'))
@@ -763,7 +763,7 @@ class remoting_mail extends remoting {
 		return $app->remoting_lib->getDataRecord($primary_id);
 	}
 
-	//* filtr spamu użytkowników e-mail
+	//* Add new spamfilter_users
 	public function mail_spamfilter_user_add($session_id, $client_id, $params)
 	{
 		if (!$this->checkPerm($session_id, 'mail_spamfilter_user_add'))
diff --git a/interface/lib/plugins/mail_mail_domain_plugin.inc.php b/interface/lib/plugins/mail_mail_domain_plugin.inc.php
index 598fe74f09..4ff756f44f 100644
--- a/interface/lib/plugins/mail_mail_domain_plugin.inc.php
+++ b/interface/lib/plugins/mail_mail_domain_plugin.inc.php
@@ -13,9 +13,10 @@ class mail_mail_domain_plugin {
 
 	/*
             This function is called when the plugin is loaded
-    */
+	 */
 	function onLoad() {
 		global $app;
+
 		//Register for the events
 		$app->plugin->registerEvent('mail:mail_domain:on_after_insert', 'mail_mail_domain_plugin', 'mail_mail_domain_edit');
 		$app->plugin->registerEvent('mail:mail_domain:on_after_update', 'mail_mail_domain_plugin', 'mail_mail_domain_edit');
@@ -23,13 +24,13 @@ class mail_mail_domain_plugin {
 
 	/*
 		Function to create the sites_web_domain rule and insert it into the custom rules
-    */
+	 */
 	function mail_mail_domain_edit($event_name, $page_form) {
 		global $app, $conf;
 		
 		$domain = $app->functions->idn_encode($page_form->dataRecord['domain']);
 
-		// make sure that the record belongs to the client group and not the admin group when a dmin inserts it
+		// make sure that the record belongs to the client group and not the admin group when admin inserts it
 		// also make sure that the user can not delete entry created by an admin
 		if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($page_form->dataRecord["client_group_id"])) {
 			$client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]);
@@ -64,6 +65,8 @@ class mail_mail_domain_plugin {
 			$app->uses('getconf');
 			$mail_config = $app->getconf->get_server_config($page_form->dataRecord["server_id"], 'mail');
 
+			$old_domain = $app->functions->idn_encode($page_form->oldDataRecord['domain']);
+
 			//* Update the mailboxes
 			$mailusers = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE email like ?", "%@" . $page_form->oldDataRecord['domain']);
 			$sys_groupid = $app->functions->intval((isset($page_form->dataRecord['client_group_id']))?$page_form->dataRecord['client_group_id']:$page_form->oldDataRecord['sys_groupid']);
@@ -76,25 +79,164 @@ class mail_mail_domain_plugin {
 					$maildir = str_replace("[domain]", $domain, $mail_config["maildir_path"]);
 					$maildir = str_replace("[localpart]", $mail_parts[0], $maildir);
 					$email = $mail_parts[0].'@'.$domain;
+
+					// update spamfilter_users and spamfilter_wblist if email change
+					$skip_spamfilter_users_update = false;
+					if($email != $rec['email']) {
+						$tmp_olduser = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", $rec['email']);
+						if($tmp_olduser['id'] > 0) {
+							$tmp_newuser = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $email);
+							if($tmp_newuser['id'] > 0) {
+								// There is a spamfilter_users for both old and new email, we'll update old wblist entries
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_olduser['id']);
+								foreach ($tmp_wblist as $tmp) {
+									$update_data = array(
+										'rid' => $tmp_newuser['id'],
+										'sys_userid' => $client_user_id,
+										'sys_groupid' => $sys_groupid,
+									);
+									$app->db->datalogUpdate('spamfilter_wblist', $update_data, 'wblist_id', $tmp['wblist_id']);
+								}
+
+								// now delete old spamfilter_users entry
+								$app->db->datalogDelete('spamfilter_users', 'id', $tmp_olduser['id']);
+							} else {
+								$update_data = array(
+									'email' => $email,
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								if($tmp_olduser['fullname'] == $app->functions->idn_decode($rec['email'])) {
+									$update_data['fullname'] = $app->functions->idn_decode($email);
+								}
+								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_olduser['id']);
+								$skip_spamfilter_users_update = true;
+
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_olduser['id']);
+								$update_data = array(
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								foreach ($tmp_wblist as $tmp) {
+									$app->db->datalogUpdate('spamfilter_wblist', $update_data, 'wblist_id', $tmp['wblist_id']);
+								}
+							}
+						}
+
+						$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $email);
+						if($tmp_user["id"] > 0) {
+							// There is already a record that we will update
+							if(!$skip_spamfilter_users_update) {
+								$update_data = array(
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_user['id']);
+							}
+						} else {
+							// We create a new record
+							$insert_data = array(
+								"sys_userid" => $client_user_id,
+								"sys_groupid" => $sys_groupid,
+								"sys_perm_user" => 'riud',
+								"sys_perm_group" => 'riud',
+								"sys_perm_other" => '',
+								"server_id" => $page_form->dataRecord["server_id"],
+								"priority" => 5,
+								"policy_id" => 0,
+								"email" => $email,
+								"fullname" => $app->functions->idn_decode($email),
+								"local" => 'Y'
+							);
+							$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
+						}
+					}
+
 					$app->db->datalogUpdate('mail_user', array("maildir" => $maildir, "email" => $email, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailuser_id', $rec['mailuser_id']);
+
 				}
 			}
 
 			//* Update the aliases
-			$forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source LIKE ? OR destination LIKE ?", "%@" . $page_form->oldDataRecord['domain'], "%@" . $page_form->oldDataRecord['domain']);
+			$forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source like ? OR destination like ?", '%@' . $old_domain, '%@' . $old_domain);
 			if(is_array($forwardings)) {
 				foreach($forwardings as $rec) {
-					$destination = str_replace($page_form->oldDataRecord['domain'], $domain, $rec['destination']);
-					$source = str_replace($page_form->oldDataRecord['domain'], $domain, $rec['source']);
+					$destination = str_replace($old_domain, $domain, $rec['destination']);
+					$source = str_replace($old_domain, $domain, $rec['source']);
+
+					// update spamfilter_users and spamfilter_wblist if source email changes
+					$skip_spamfilter_users_update = false;
+					if(strpos($rec['source'],'@'.$old_domain) && $source != $rec['source']) {
+						$tmp_olduser = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", $rec['source']);
+						if($tmp_olduser['id'] > 0) {
+							$tmp_newuser = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $source);
+							if($tmp_newuser['id'] > 0) {
+								// There is a spamfilter_users for both old and new email, we'll update old wblist entries
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_olduser['id']);
+								foreach ($tmp_wblist as $tmp) {
+									$update_data = array(
+										'rid' => $tmp_newuser['id'],
+										'sys_userid' => $client_user_id,
+										'sys_groupid' => $sys_groupid,
+									);
+									$app->db->datalogUpdate('spamfilter_wblist', $update_data, 'wblist_id', $tmp['wblist_id']);
+								}
+
+								// now delete old spamfilter_users entry
+								$app->db->datalogDelete('spamfilter_users', 'id', $tmp_olduser['id']);
+							} else {
+								$update_data = array(
+									'email' => $source,
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								if($tmp_olduser['fullname'] == $app->functions->idn_decode($rec['source'])) {
+									$update_data['fullname'] = $app->functions->idn_decode($source);
+								}
+								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_olduser['id']);
+								$skip_spamfilter_users_update = true;
+
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_olduser['id']);
+								$update_data = array(
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								foreach ($tmp_wblist as $tmp) {
+									$app->db->datalogUpdate('spamfilter_wblist', $update_data, 'wblist_id', $tmp['wblist_id']);
+								}
+							}
+						}
+
+
+						$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $source);
+						if($tmp_user["id"] > 0) {
+							// There is already a record that we will update
+							if(!$skip_spamfilter_users_update) {
+								$update_data = array(
+									'sys_userid' => $client_user_id,
+									'sys_groupid' => $sys_groupid,
+								);
+								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_user['id']);
+							}
+						}
+
+					}
+
 					$app->db->datalogUpdate('mail_forwarding', array("source" => $source, "destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'forwarding_id', $rec['forwarding_id']);
 				}
 			}
 
 			//* Update the mailinglist
-			$mailing_lists = $app->db->queryAllRecords("SELECT mailinglist_id FROM mail_mailinglist WHERE domain = ?", $page_form->oldDataRecord['domain']);
-			if(is_array($mailing_lists)) {
-				foreach($mailing_lists as $rec) {
-					$app->db->datalogUpdate('mail_mailinglist', array("sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailinglist_id', $rec['mailinglist_id']);
+			$mailinglists = $app->db->queryAllRecords("SELECT * FROM mail_mailinglist WHERE domain = ?", $old_domain);
+			if(is_array($mailinglists)) {
+				foreach($mailinglists as $rec) {
+					$update_data = array(
+						'sys_userid' => $client_user_id,
+						'sys_groupid' => $sys_groupid,
+						'domain' => $domain,
+						'email' => str_replace($old_domain, $domain, $rec['email']),
+					);
+					$app->db->datalogUpdate('mail_mailinglist', $update_data, 'mailinglist_id', $rec['mailinglist_id']);
 				}
 			}
 
@@ -107,25 +249,81 @@ class mail_mail_domain_plugin {
 				}
 			}
 
-			if ($page_form->oldDataRecord["domain"] != $domain) {
-				//* Delete the old spamfilter record
-				$tmp = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", "@" . $page_form->oldDataRecord["domain"]);
-				$app->db->datalogDelete('spamfilter_users', 'id', $tmp["id"]);
-				unset($tmp);
+			// Spamfilter policy
+			$policy_id = $app->functions->intval($page_form->dataRecord["policy"]);
+
+			// If domain changes, update spamfilter_users
+			// and fire spamfilter_wblist_update events so rspamd files are rewritten
+			if ($old_domain != $domain) {
+				$tmp_users = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email LIKE ?", '%@' . $old_domain);
+				if(is_array($tmp_users)) {
+					foreach ($tmp_users as $tmp_old) {
+						$tmp_new = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", '@' . $domain);
+						if($tmp_new['id'] > 0) {
+							// There is a spamfilter_users for both old and new domain, we'll update old wblist entries
+							$update_data = array(
+								'sys_userid' => $client_user_id,
+								'sys_groupid' => $sys_groupid,
+								'rid' => $tmp_new['id'],
+							);
+							$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_old['id']);
+							foreach ($tmp_wblist as $tmp) {
+								$app->db->datalogUpdate('spamfilter_wblist', $update_data, 'wblist_id', $tmp['wblist_id']);
+							}
+
+							// now delete old spamfilter_users entry
+							$app->db->datalogDelete('spamfilter_users', 'id', $tmp_old['id']);
+
+							/// and update the new
+							$update_data = array(
+								'sys_userid' => $client_user_id,
+								'sys_groupid' => $sys_groupid,
+							);
+							$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_old['id']);
+						} else {
+							$update_data = array(
+								'sys_userid' => $client_user_id,
+								'sys_groupid' => $sys_groupid,
+								'email' => '@' . $domain,
+							);
+							if($tmp_old['fullname'] == '@' . $old_domain) {
+								$update_data['fullname'] = '@' . $domain;
+							}
+							$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_old['id']);
+						}
+					}
+				}
 			}
-			$app->db->query("UPDATE spamfilter_users SET email=REPLACE(email, ?, ?), sys_userid = ?, sys_groupid = ? WHERE email LIKE ?", $page_form->oldDataRecord['domain'], $domain, $client_user_id, $sys_groupid, "%@" . $page_form->oldDataRecord['domain']);
 
-		} // end if domain name changed
-		
-		//* Force-update the aliases (required for spamfilter changes)
-		$forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source LIKE ? OR destination LIKE ?", "%@" . $domain, "%@" . $domain);
-		
-		if(is_array($forwardings)) {
-			foreach($forwardings as $rec) {
-				$app->db->datalogUpdate('mail_forwarding', array("source" => $rec['source']), 'forwarding_id', $rec['forwarding_id'],true);
+			$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $domain);
+			if(isset($tmp_user['id']) && $tmp_user['id'] > 0) {
+				// There is already a record that we will update
+				if($policy_id != $tmp_user['policy_id']) {
+					$update_data = array(
+						'policy_id' => $policy_id,
+					);
+					$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_user["id"]);
+				}
+			} else {
+				// We create a new record
+				$insert_data = array(
+					"sys_userid" => $client_user_id,
+					"sys_groupid" => $sys_groupid,
+					"sys_perm_user" => 'riud',
+					"sys_perm_group" => 'riud',
+					"sys_perm_other" => '',
+					"server_id" => $page_form->dataRecord["server_id"],
+					"priority" => 5,
+					"policy_id" => $policy_id,
+					"email" => '@' . $domain,
+					"fullname" => '@' . $domain,
+					"local" => 'Y'
+				);
+				$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
 			}
-		}
-		
+
+		} // end if domain name changed
+
 	}
 
 }
diff --git a/interface/web/client/client_del.php b/interface/web/client/client_del.php
index c018b7a27d..dadcae0bdf 100644
--- a/interface/web/client/client_del.php
+++ b/interface/web/client/client_del.php
@@ -69,7 +69,8 @@ class page_action extends tform_actions {
 		'mail_user' => 'email', 
 		'mail_user_filter' => '', 
 		'shell_user' => 'username', 
-		'spamfilter_users' => '', 'spamfilter_wblist' => '',
+		'spamfilter_users' => '',
+		'spamfilter_wblist' => '',
 		'support_message' => '',
 		'web_domain' => 'domain', 
 		'web_folder' => 'path', 
@@ -208,6 +209,5 @@ class page_action extends tform_actions {
 }
 
 $page = new page_action;
-$page->onDelete()
+$page->onDelete();
 
-?>
diff --git a/interface/web/mail/form/spamfilter_users.tform.php b/interface/web/mail/form/spamfilter_users.tform.php
index 65f196b987..1388217b64 100644
--- a/interface/web/mail/form/spamfilter_users.tform.php
+++ b/interface/web/mail/form/spamfilter_users.tform.php
@@ -78,7 +78,7 @@ $form["tabs"]['users'] = array (
 		'policy_id' => array (
 			'datatype' => 'INTEGER',
 			'formtype' => 'SELECT',
-			'default' => '5',
+			'default' => '',
 			'datasource' => array (  'type' => 'SQL',
 				'querystring' => 'SELECT id,policy_name FROM spamfilter_policy WHERE {AUTHSQL} ORDER BY policy_name',
 				'keyfield'=> 'id',
diff --git a/interface/web/mail/lib/lang/ar_spamfilter_users.lng b/interface/web/mail/lib/lang/ar_spamfilter_users.lng
index efe95b5c7f..05d0ca9bd6 100644
--- a/interface/web/mail/lib/lang/ar_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/ar_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/bg_spamfilter_users.lng b/interface/web/mail/lib/lang/bg_spamfilter_users.lng
index efe95b5c7f..05d0ca9bd6 100644
--- a/interface/web/mail/lib/lang/bg_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/bg_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/br_spamfilter_users.lng b/interface/web/mail/lib/lang/br_spamfilter_users.lng
index d18fbc13a9..bdc989833e 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_users.lng
@@ -10,3 +10,4 @@ $wb['fullname_error_notempty'] = 'Nome está vazio.';
 $wb['10 - highest'] = '10 - alta';
 $wb['5 - medium'] = '5 - média';
 $wb['1 - lowest'] = '1 - baixa';
+$wb['inherit_policy'] = '- Herdar configuração de domínio -';
diff --git a/interface/web/mail/lib/lang/ca_spamfilter_users.lng b/interface/web/mail/lib/lang/ca_spamfilter_users.lng
index 9c7d5bbe7a..a54e84e608 100644
--- a/interface/web/mail/lib/lang/ca_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/ca_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_users.lng b/interface/web/mail/lib/lang/cz_spamfilter_users.lng
index f2fff323f4..8c66a07144 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_users.lng
@@ -10,3 +10,4 @@ $wb['fullname_error_notempty'] = 'Jméno nesmí být prázdné.';
 $wb['10 - highest'] = '10 - nejvyšší';
 $wb['5 - medium'] = '5 - střední';
 $wb['1 - lowest'] = '1 - nejnižší';
+$wb['inherit_policy'] = '- Zdědit nastavení od domény -';
diff --git a/interface/web/mail/lib/lang/de_spamfilter_users.lng b/interface/web/mail/lib/lang/de_spamfilter_users.lng
index 9322c80466..d6b148cbe3 100644
--- a/interface/web/mail/lib/lang/de_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/de_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'Der Name darf nicht leer sein.';
 $wb['10 - highest'] = '10 - höchste';
 $wb['5 - medium'] = '5 - normal';
 $wb['1 - lowest'] = '1 - niedrigste';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/dk_spamfilter_users.lng b/interface/web/mail/lib/lang/dk_spamfilter_users.lng
index 5b132bc774..b6d9a226d0 100644
--- a/interface/web/mail/lib/lang/dk_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/dk_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'Navn må ikke være tomt.';
 $wb['10 - highest'] = '10 - højeste';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - laveste';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/el_spamfilter_users.lng b/interface/web/mail/lib/lang/el_spamfilter_users.lng
index b6da2d1e15..fc61aa818d 100644
--- a/interface/web/mail/lib/lang/el_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/el_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/en_spamfilter_users.lng b/interface/web/mail/lib/lang/en_spamfilter_users.lng
index e43b315df6..05d0ca9bd6 100644
--- a/interface/web/mail/lib/lang/en_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/en_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
\ No newline at end of file
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/es_spamfilter_users.lng b/interface/web/mail/lib/lang/es_spamfilter_users.lng
index c5a5a0f948..575c14a9f4 100644
--- a/interface/web/mail/lib/lang/es_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/es_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['local_txt'] = 'Local';
 $wb['policy_id_txt'] = 'Directiva';
 $wb['priority_txt'] = 'Prioridad';
 $wb['server_id_txt'] = 'Servidor';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/fi_spamfilter_users.lng b/interface/web/mail/lib/lang/fi_spamfilter_users.lng
index c4290efbf2..5c9570d6fb 100644
--- a/interface/web/mail/lib/lang/fi_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/fi_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/fr_spamfilter_users.lng b/interface/web/mail/lib/lang/fr_spamfilter_users.lng
index e8936b0183..b87fe87ccb 100644
--- a/interface/web/mail/lib/lang/fr_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/fr_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/hr_spamfilter_users.lng b/interface/web/mail/lib/lang/hr_spamfilter_users.lng
index 9969ef421d..9e78310d71 100644
--- a/interface/web/mail/lib/lang/hr_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/hr_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/hu_spamfilter_users.lng b/interface/web/mail/lib/lang/hu_spamfilter_users.lng
index 573d696182..a5097ddbfd 100644
--- a/interface/web/mail/lib/lang/hu_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/hu_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/id_spamfilter_users.lng b/interface/web/mail/lib/lang/id_spamfilter_users.lng
index f4549c5c46..4777d33581 100644
--- a/interface/web/mail/lib/lang/id_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/id_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/it_spamfilter_users.lng b/interface/web/mail/lib/lang/it_spamfilter_users.lng
index cebb20324e..2f49b05a41 100644
--- a/interface/web/mail/lib/lang/it_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/it_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be vuoto.';
 $wb['10 - highest'] = '10 - elevata';
 $wb['5 - medium'] = '5 - media';
 $wb['1 - lowest'] = '1 - minima';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/ja_spamfilter_users.lng b/interface/web/mail/lib/lang/ja_spamfilter_users.lng
index cd212e9418..5272d3f3e1 100644
--- a/interface/web/mail/lib/lang/ja_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/ja_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/nl_spamfilter_users.lng b/interface/web/mail/lib/lang/nl_spamfilter_users.lng
index 697e130b35..b9da8e7e4a 100644
--- a/interface/web/mail/lib/lang/nl_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/nl_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/pl_spamfilter_users.lng b/interface/web/mail/lib/lang/pl_spamfilter_users.lng
index c46589b18d..5173099c27 100644
--- a/interface/web/mail/lib/lang/pl_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/pl_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/pt_spamfilter_users.lng b/interface/web/mail/lib/lang/pt_spamfilter_users.lng
index 0ee8d37d50..adec31f8a1 100644
--- a/interface/web/mail/lib/lang/pt_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/pt_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/ro_spamfilter_users.lng b/interface/web/mail/lib/lang/ro_spamfilter_users.lng
index c51b0b8182..bdc418c92c 100644
--- a/interface/web/mail/lib/lang/ro_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/ro_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/ru_spamfilter_users.lng b/interface/web/mail/lib/lang/ru_spamfilter_users.lng
index 8fcfff421b..238f3b7048 100644
--- a/interface/web/mail/lib/lang/ru_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/ru_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'Имя не может быть пустым.'
 $wb['10 - highest'] = '10 - сильный';
 $wb['5 - medium'] = '5 - средний';
 $wb['1 - lowest'] = '1 - слабый';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/se_spamfilter_users.lng b/interface/web/mail/lib/lang/se_spamfilter_users.lng
index ba3b60e273..ca3fac06c2 100644
--- a/interface/web/mail/lib/lang/se_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/se_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'Fältet för namn kan inte vara tomt.';
 $wb['10 - highest'] = '10 - högsta';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lägsta';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/sk_spamfilter_users.lng b/interface/web/mail/lib/lang/sk_spamfilter_users.lng
index 89bc415672..dfd74a3291 100644
--- a/interface/web/mail/lib/lang/sk_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/sk_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'The name must not be empty.';
 $wb['10 - highest'] = '10 - highest';
 $wb['5 - medium'] = '5 - medium';
 $wb['1 - lowest'] = '1 - lowest';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/lib/lang/tr_spamfilter_users.lng b/interface/web/mail/lib/lang/tr_spamfilter_users.lng
index 33ef04c610..10144b8232 100644
--- a/interface/web/mail/lib/lang/tr_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/tr_spamfilter_users.lng
@@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'Ad boÅŸ olamaz.';
 $wb['10 - highest'] = '10 - en yüksek';
 $wb['5 - medium'] = '5 - orta';
 $wb['1 - lowest'] = '1 - en düşük';
-?>
+$wb['inherit_policy'] = '- Inherit domain setting -';
diff --git a/interface/web/mail/mail_domain_del.php b/interface/web/mail/mail_domain_del.php
index bce89695dc..e4c26399ef 100644
--- a/interface/web/mail/mail_domain_del.php
+++ b/interface/web/mail/mail_domain_del.php
@@ -80,6 +80,10 @@ class page_action extends tform_actions {
 		// Delete all spamfilters that belong to this domain
 		$records = $app->db->queryAllRecords("SELECT id FROM spamfilter_users WHERE email like ?", '%@' . $domain);
 		foreach($records as $rec) {
+			$wblists = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $rec['id']);
+			foreach($wblists as $wblist) {
+				$app->db->datalogDelete('spamfilter_wblist', 'wblist_id', $wblist['wblist_id']);
+			}
 			$app->db->datalogDelete('spamfilter_users', 'id', $rec['id']);
 		}
 
diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index 36185ead69..48f6eb2e4d 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -190,19 +190,19 @@ class page_action extends tform_actions {
 			$app->tpl->setVar("domain_module", 0);
 		}
 
-		// Get the spamfilter policys for the user
+		// Get the spamfilter policies for the user
 		$tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = ?", '@' . $this->dataRecord["domain"]);
 		$sql = "SELECT id, policy_name FROM spamfilter_policy WHERE ".$app->tform->getAuthSQL('r')." ORDER BY policy_name";
-		$policys = $app->db->queryAllRecords($sql);
-		$policy_select = "<option value='0'>".$app->tform->wordbook["no_policy"]."</option>";
-		if(is_array($policys)) {
-			foreach( $policys as $p) {
+		$policies = $app->db->queryAllRecords($sql);
+		$policy_select = "<option value='0'".(($tmp_user['policy_id'] == 0) ? " SELECTED>":">").$app->tform->wordbook["no_policy"]."</option>";
+		if(is_array($policies)) {
+			foreach( $policies as $p) {
 				$selected = ($p["id"] == $tmp_user["policy_id"])?'SELECTED':'';
 				$policy_select .= "<option value='$p[id]' $selected>" . $app->functions->htmlentities($p['policy_name']) . "</option>\r\n";
 			}
 		}
 		$app->tpl->setVar("policy", $policy_select);
-		unset($policys);
+		unset($policies);
 		unset($policy_select);
 		unset($tmp_user);
 
@@ -257,7 +257,7 @@ class page_action extends tform_actions {
 		if (!empty($rec['dkim_public'])) $app->tpl->setVar('dns_record', $dns_record, true);
 
 		parent::onShowEnd();
-	}
+	 }
 
 	function onSubmit() {
 		global $app, $conf;
@@ -334,30 +334,30 @@ class page_action extends tform_actions {
 
 		// Spamfilter policy
 		$policy_id = $app->functions->intval($this->dataRecord["policy"]);
-		if($policy_id > 0) {
-			$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $domain);
-			if($tmp_user["id"] > 0) {
-				// There is already a record that we will update
+		$tmp_user = $app->db->queryOneRecord("SELECT id, policy_id FROM spamfilter_users WHERE email = ?", '@' . $domain);
+		if($tmp_user["id"] > 0) {
+			// There is already a record that we will update
+			if($policy_id != $tmp_user['policy_id']) {
 				$app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]);
-			} else {
-				$tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id);
-				// We create a new record
-				$insert_data = array(
-					"sys_userid" => $_SESSION["s"]["user"]["userid"],
-					"sys_groupid" => $tmp_domain["sys_groupid"],
-					"sys_perm_user" => 'riud',
-					"sys_perm_group" => 'riud',
-					"sys_perm_other" => '',
-					"server_id" => $this->dataRecord["server_id"],
-					"priority" => 5,
-					"policy_id" => $policy_id,
-					"email" => '@' . $domain,
-					"fullname" => '@' . $domain,
-					"local" => 'Y'
-				);
-				$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
-				unset($tmp_domain);
 			}
+		} else {
+			$tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id);
+			// We create a new record
+			$insert_data = array(
+				"sys_userid" => $_SESSION["s"]["user"]["userid"],
+				"sys_groupid" => $tmp_domain["sys_groupid"],
+				"sys_perm_user" => 'riud',
+				"sys_perm_group" => 'riud',
+				"sys_perm_other" => '',
+				"server_id" => $this->dataRecord["server_id"],
+				"priority" => 5,
+				"policy_id" => $policy_id,
+				"email" => '@' . $domain,
+				"fullname" => '@' . $domain,
+				"local" => 'Y'
+			);
+			$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
+			unset($tmp_domain);
 		} // endif spamfilter policy
 
 		//* create dns-record with dkim-values if the zone exists
@@ -419,7 +419,7 @@ class page_action extends tform_actions {
 				$tmp_new = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", '@' . $domain);
 				if($tmp_new['id'] > 0) {
 					// There is a spamfilter_users for both old and new domain, we'll update old wblist entries
-					$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_old['id']);
+					$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_old['id']);
 					foreach ($tmp_wblist as $tmp) {
 						$app->db->datalogUpdate('spamfilter_wblist', array('rid' => $tmp_new['id']), 'wblist_id', $tmp['wblist_id']);
 					}
@@ -441,39 +441,31 @@ class page_action extends tform_actions {
 		}
 
 		$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $domain);
-		if($policy_id > 0) {
-			if($tmp_user["id"] > 0) {
-				// There is already a record that we will update
-				if(!$skip_spamfilter_users_update) {
-					$app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]);
-				}
-			} else {
-				$tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id);
-				// We create a new record
-				$insert_data = array(
-					"sys_userid" => $_SESSION["s"]["user"]["userid"],
-					"sys_groupid" => $tmp_domain["sys_groupid"],
-					"sys_perm_user" => 'riud',
-					"sys_perm_group" => 'riud',
-					"sys_perm_other" => '',
-					"server_id" => $this->dataRecord["server_id"],
-					"priority" => 5,
-					"policy_id" => $policy_id,
-					"email" => '@' . $domain,
-					"fullname" => '@' . $domain,
-					"local" => 'Y'
-				);
-				$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
-				unset($tmp_domain);
+		if($tmp_user["id"] > 0) {
+			// There is already a record that we will update
+			if((! $skip_spamfilter_users_update) && ($policy_id != $tmp_user['policy_id'])) {
+				$app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]);
 			}
 		} else {
-			if($tmp_user["id"] > 0) {
-				// There is already a record but the user shall have no policy, so we delete it
-// fixme: this abandons any spamfilter_wblist entries tied to this spamfilter_users id
-// https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6201
-				$app->db->datalogDelete('spamfilter_users', 'id', $tmp_user["id"]);
-			}
+			$tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id);
+			// We create a new record
+			$insert_data = array(
+				"sys_userid" => $_SESSION["s"]["user"]["userid"],
+				"sys_groupid" => $tmp_domain["sys_groupid"],
+				"sys_perm_user" => 'riud',
+				"sys_perm_group" => 'riud',
+				"sys_perm_other" => '',
+				"server_id" => $this->dataRecord["server_id"],
+				"priority" => 5,
+				"policy_id" => $policy_id,
+				"email" => '@' . $domain,
+				"fullname" => '@' . $domain,
+				"local" => 'Y'
+			);
+			$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
+			unset($tmp_domain);
 		} // endif spamfilter policy
+
 		//** If the domain name or owner has been changed, change the domain and owner in all mailbox records
 		if($old_domain != $domain || (isset($this->dataRecord['client_group_id']) && $this->oldDataRecord['sys_groupid'] != $this->dataRecord['client_group_id'])) {
 			$app->uses('getconf');
@@ -493,14 +485,13 @@ class page_action extends tform_actions {
 					$email = $mail_parts[0].'@'.$this->dataRecord['domain'];
 					// update spamfilter_users and spamfilter_wblist if email change
 					$skip_spamfilter_users_update = false;
-					if($email != $mail_parts[0].'@'.$this->oldDataRecord['domain']) {
-						$tmp_olduser = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", $mail_parts[0].'@'.$this->oldDataRecord['domain']);
+					if($email != $rec['email']) {
+						$tmp_olduser = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", $rec['email']);
 						if($tmp_olduser['id'] > 0) {
-
-							$tmp_newuser = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $mail_parts[0].'@'.$this->dataRecord['domain']);
+							$tmp_newuser = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $email);
 							if($tmp_newuser['id'] > 0) {
 								// There is a spamfilter_users for both old and new email, we'll update old wblist entries
-								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_olduser['id']);
 								foreach ($tmp_wblist as $tmp) {
 									$update_data = array(
 										'rid' => $tmp_newuser['id'],
@@ -518,13 +509,13 @@ class page_action extends tform_actions {
 									'sys_userid' => $client_user_id,
 									'sys_groupid' => $sys_groupid,
 								);
-								if($tmp_olduser['fullname'] == $app->functions->idn_decode($mail_parts[0].'@'.$this->oldDataRecord['domain'])) {
-									$update_data['fullname'] = $app->functions->idn_decode($mail_parts[0].'@'.$this->dataRecord['domain']);
+								if($tmp_olduser['fullname'] == $app->functions->idn_decode($rec['email'])) {
+									$update_data['fullname'] = $app->functions->idn_decode($email);
 								}
 								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_olduser['id']);
 								$skip_spamfilter_users_update = true;
 
-								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_olduser['id']);
 								$update_data = array(
 									'sys_userid' => $client_user_id,
 									'sys_groupid' => $sys_groupid,
@@ -535,7 +526,7 @@ class page_action extends tform_actions {
 							}
 						}
 
-						$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $mail_parts[0].'@'.$this->dataRecord['domain']);
+						$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $email);
 						if($tmp_user["id"] > 0) {
 							// There is already a record that we will update
 							if(!$skip_spamfilter_users_update) {
@@ -545,11 +536,22 @@ class page_action extends tform_actions {
 								);
 								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_user['id']);
 							}
-						/*
 						} else {
-							 # fixme: insert spamfilter_users with correct policy_id,
-							 # pending https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6201
-						 */
+							// We create a new record
+							$insert_data = array(
+								"sys_userid" => $client_user_id,
+								"sys_groupid" => $sys_groupid,
+								"sys_perm_user" => 'riud',
+								"sys_perm_group" => 'riud',
+								"sys_perm_other" => '',
+								"server_id" => $this->dataRecord["server_id"],
+								"priority" => 5,
+								"policy_id" => 0,
+								"email" => $email,
+								"fullname" => $app->functions->idn_decode($email),
+								"local" => 'Y'
+							);
+							$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
 						}
 
 						$app->db->datalogUpdate('mail_user', array("maildir" => $maildir, "email" => $email, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailuser_id', $rec['mailuser_id']);
@@ -564,15 +566,15 @@ class page_action extends tform_actions {
 					$destination = str_replace($old_domain, $domain, $rec['destination']);
 					$source = str_replace($old_domain, $domain, $rec['source']);
 
-					// update spamfilter_users and spamfilter_wblist if email change
+					// update spamfilter_users and spamfilter_wblist if source email changes
 					$skip_spamfilter_users_update = false;
-					if($source != $rec['source']) {
+					if(strpos($rec['source'],'@'.$old_domain) && $source != $rec['source']) {
 						$tmp_olduser = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", $rec['source']);
 						if($tmp_olduser['id'] > 0) {
 							$tmp_newuser = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $source);
 							if($tmp_newuser['id'] > 0) {
 								// There is a spamfilter_users for both old and new email, we'll update old wblist entries
-								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_olduser['id']);
 								foreach ($tmp_wblist as $tmp) {
 									$update_data = array(
 										'rid' => $tmp_newuser['id'],
@@ -596,7 +598,7 @@ class page_action extends tform_actions {
 								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_olduser['id']);
 								$skip_spamfilter_users_update = true;
 
-								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
+								$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_olduser['id']);
 								$update_data = array(
 									'sys_userid' => $client_user_id,
 									'sys_groupid' => $sys_groupid,
@@ -607,6 +609,7 @@ class page_action extends tform_actions {
 							}
 						}
 
+
 						$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $source);
 						if($tmp_user["id"] > 0) {
 							// There is already a record that we will update
@@ -618,9 +621,25 @@ class page_action extends tform_actions {
 								$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_user['id']);
 							}
 						/*
+						 * should we insert spamfilter_users with policy_id = 0 for mail_forwardings?
+						 * I think no (see https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6201)
+						 *
 						} else {
-							 # fixme: insert spamfilter_users with correct policy_id,
-							 # pending https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6201
+							// We create a new record
+							$insert_data = array(
+								"sys_userid" => $client_user_id,
+								"sys_groupid" => $sys_groupid,
+								"sys_perm_user" => 'riud',
+								"sys_perm_group" => 'riud',
+								"sys_perm_other" => '',
+								"server_id" => $this->dataRecord["server_id"],
+								"priority" => 5,
+								"policy_id" => 0,
+								"email" => $source,
+								"fullname" => $app->functions->idn_decode($source),
+								"local" => 'Y'
+							);
+							$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
 						 */
 						}
 
diff --git a/interface/web/mail/mail_user_del.php b/interface/web/mail/mail_user_del.php
index 1f19166ef7..d301f50085 100644
--- a/interface/web/mail/mail_user_del.php
+++ b/interface/web/mail/mail_user_del.php
@@ -65,6 +65,8 @@ class page_action extends tform_actions {
 		}
 		$app->db->datalogDelete('spamfilter_users', 'id', $tmp_user["id"]);
 
+		// delete mail_forwardings with destination == email ?
+
 		$tmp_filters = $app->db->queryAllRecords("SELECT filter_id FROM mail_user_filter WHERE mailuser_id = ?", $this->id);
 		if(is_array($tmp_filters)) {
 			foreach($tmp_filters as $tmp) {
diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php
index 30c6d15000..f13c5845a5 100644
--- a/interface/web/mail/mail_user_edit.php
+++ b/interface/web/mail/mail_user_edit.php
@@ -94,20 +94,20 @@ class page_action extends tform_actions {
 		unset($domains);
 		unset($domain_select);
 
-		// Get the spamfilter policys for the user
+		// Get the spamfilter policies for the user
 		$tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]);
 		if (isset($_POST['policy'])) $tmp_user['policy_id'] = intval($_POST['policy']);
 		$sql = "SELECT id, policy_name FROM spamfilter_policy WHERE ".$app->tform->getAuthSQL('r') . " ORDER BY policy_name";
-		$policys = $app->db->queryAllRecords($sql);
-		$policy_select = "<option value='0'>".$app->tform->lng("inherit_policy")."</option>";
-		if(is_array($policys)) {
-			foreach( $policys as $p) {
+		$policies = $app->db->queryAllRecords($sql);
+		$policy_select = "<option value='0'".(($tmp_user['policy_id'] == 0) ? " SELECTED>":">").$app->tform->lng("inherit_policy")."</option>";
+		if(is_array($policies)) {
+			foreach( $policies as $p) {
 				$selected = ($p["id"] == $tmp_user["policy_id"])?'SELECTED':'';
 				$policy_select .= "<option value='$p[id]' $selected>" . $app->functions->htmlentities($p['policy_name']) . "</option>\r\n";
 			}
 		}
 		$app->tpl->setVar("policy", $policy_select);
-		unset($policys);
+		unset($policies);
 		unset($policy_select);
 		unset($tmp_user);
 
@@ -281,42 +281,40 @@ class page_action extends tform_actions {
 
 		// Spamfilter policy
 		$policy_id = $app->functions->intval($this->dataRecord["policy"]);
-		if($policy_id > 0) {
-			$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]);
-			if($tmp_user["id"] > 0) {
-				// There is already a record that we will update
+		$tmp_user = $app->db->queryOneRecord("SELECT id, policy_id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]);
+		if($tmp_user["id"] > 0) {
+			// There is already a record that we will update
+			if($policy_id != $tmp_user['policy_id']) {
 				$app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]);
-			} else {
-				// We create a new record
-				$insert_data = array(
-					"sys_userid" => $_SESSION["s"]["user"]["userid"],
-					"sys_groupid" => $domain["sys_groupid"],
-					"sys_perm_user" => 'riud',
-					"sys_perm_group" => 'riud',
-					"sys_perm_other" => '',
-					"server_id" => $domain["server_id"],
-					"priority" => 10,
-					"policy_id" => $policy_id,
-					"email" => $this->dataRecord["email"],
-					"fullname" => $app->functions->idn_decode($this->dataRecord["email"]),
-					"local" => 'Y'
-				);
-				$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
 			}
-		}  // endif spamfilter policy
+		} else {
+			// We create a new record
+			$insert_data = array(
+				"sys_userid" => $_SESSION["s"]["user"]["userid"],
+				"sys_groupid" => $domain["sys_groupid"],
+				"sys_perm_user" => 'riud',
+				"sys_perm_group" => 'riud',
+				"sys_perm_other" => '',
+				"server_id" => $domain["server_id"],
+				"priority" => 5,
+				"policy_id" => $policy_id,
+				"email" => $this->dataRecord["email"],
+				"fullname" => $app->functions->idn_decode($this->dataRecord["email"]),
+				"local" => 'Y'
+			);
+			$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
+		}
 
 
 		// Set the fields for dovecot
-		if(isset($this->dataRecord["email"])) {
-			$disableimap = ($this->dataRecord["disableimap"])?'y':'n';
-			$disablepop3 = ($this->dataRecord["disablepop3"])?'y':'n';
-			$disablesmtp = ($this->dataRecord["disablesmtp"])?'y':'n';
-			$disabledeliver = ($this->dataRecord["disabledeliver"])?'y':'n';
-
-			$app->db->query($sql, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $this->id);
-			$sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ?, disablelmtp = ? WHERE mailuser_id = ?";
-			$app->db->query($sql, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $disabledeliver, $this->id);
-		}
+		$disableimap = ($this->dataRecord["disableimap"])?'y':'n';
+		$disablepop3 = ($this->dataRecord["disablepop3"])?'y':'n';
+		$disablesmtp = ($this->dataRecord["disablesmtp"])?'y':'n';
+		$disabledeliver = ($this->dataRecord["disabledeliver"])?'y':'n';
+
+		$app->db->query($sql, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $this->id);
+		$sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ?, disablelmtp = ? WHERE mailuser_id = ?";
+		$app->db->query($sql, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $disabledeliver, $this->id);
 	}
 
 	function onAfterUpdate() {
@@ -326,43 +324,44 @@ class page_action extends tform_actions {
 		if(isset($_POST["email_domain"])) {
 			$domain = $app->db->queryOneRecord("SELECT sys_groupid, server_id FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"]));
 			$app->db->query("UPDATE mail_user SET sys_groupid = ? WHERE mailuser_id = ?", $domain["sys_groupid"], $this->id);
-
 		}
 
 		// Set the fields for dovecot
-		if(isset($this->dataRecord["email"])) {
-			$disableimap = (isset($this->dataRecord["disableimap"]) && $this->dataRecord["disableimap"])?'y':'n';
-			$disablepop3 = (isset($this->dataRecord["disablepop3"]) && $this->dataRecord["disablepop3"])?'y':'n';
-			$disablesmtp = (isset($this->dataRecord["disablesmtp"]) && $this->dataRecord["disablesmtp"])?'y':'n';
-			$disabledeliver = (isset($this->dataRecord["disabledeliver"]) && $this->dataRecord["disabledeliver"])?'y':'n';
-
-			$sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, `disablesieve-filter` = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ?, disablelmtp = ? WHERE mailuser_id = ?";
-			$app->db->query($sql, $disableimap, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $disabledeliver, $this->id);
-		}
+		$disableimap = (isset($this->dataRecord["disableimap"]) && $this->dataRecord["disableimap"])?'y':'n';
+		$disablepop3 = (isset($this->dataRecord["disablepop3"]) && $this->dataRecord["disablepop3"])?'y':'n';
+		$disablesmtp = (isset($this->dataRecord["disablesmtp"]) && $this->dataRecord["disablesmtp"])?'y':'n';
+		$disabledeliver = (isset($this->dataRecord["disabledeliver"]) && $this->dataRecord["disabledeliver"])?'y':'n';
+
+		$sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, `disablesieve-filter` = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ?, disablelmtp = ? WHERE mailuser_id = ?";
+		$app->db->query($sql, $disableimap, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $disabledeliver, $this->id);
+
+		// Spamfilter policy
+		$policy_id = $app->functions->intval($this->dataRecord["policy"]);
+		$skip_spamfilter_users_update = false;
 
 		//** Handle email address change
 		if(isset($this->dataRecord['email']) && $this->oldDataRecord['email'] != $this->dataRecord['email']) {
-			// Spamfilter policy
-			$policy_id = $app->functions->intval($this->dataRecord["policy"]);
-
 			//** Update spamfilter_users and spamfilter_wblist
-			$skip_spamfilter_users_update = false;
 			$tmp_olduser = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", $this->oldDataRecord['email']);
 			if($tmp_olduser["id"] > 0) {
 				$tmp_newuser = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord['email']);
 				if($tmp_newuser['id'] > 0) {
 					// There is a spamfilter_users for both old and new email, we'll update old wblist entries
-					$update_date = array('rid' => $tmp_newuser['id']);
+					$update_data = array(
+						'rid' => $tmp_newuser['id'],
+					);
 					if (isset($domain['sys_groupid'])) {
 						$update_data['sys_groupid'] = $domain['sys_groupid'];
 					}
-					$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $tmp_olduser['id']);
+					$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $tmp_olduser['id']);
 					foreach ($tmp_wblist as $tmp) {
 						$app->db->datalogUpdate('spamfilter_wblist', $update_data, 'wblist_id', $tmp['wblist_id']);
 					}
 
 					// now delete old spamfilter_users entry
 					$app->db->datalogDelete('spamfilter_users', 'id', $tmp_olduser['id']);
+
+					// we update spamfilter_users for new id below
 				} else {
 					$update_data = array(
 						'email' => $this->dataRecord['email'],
@@ -379,45 +378,6 @@ class page_action extends tform_actions {
 				}
 			}
 
-			$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord['email']);
-			if($policy_id > 0) {
-				if($tmp_user["id"] > 0) {
-					// There is already a record that we will update
-					if(!$skip_spamfilter_users_update) {
-						$update_data = array(
-							'policy_id' => $policy_id,
-						);
-						if (isset($domain['sys_groupid'])) {
-							$update_data['sys_groupid'] = $domain['sys_groupid'];
-						}
-						$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_user['id']);
-					}
-				} else {
-					// We create a new record
-					$insert_data = array(
-						"sys_userid" => $_SESSION["s"]["user"]["userid"],
-						"sys_groupid" => $domain["sys_groupid"],
-						"sys_perm_user" => 'riud',
-						"sys_perm_group" => 'riud',
-						"sys_perm_other" => '',
-						"server_id" => $domain["server_id"],
-						"priority" => 10,
-						"policy_id" => $policy_id,
-						"email" => $this->dataRecord["email"],
-						"fullname" => $app->functions->idn_decode($this->dataRecord["email"]),
-						"local" => 'Y'
-					);
-					$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
-				}
-			} else {
-				if($tmp_user["id"] > 0) {
-					// There is already a record but the user shall have no policy, so we delete it
-// fixme: don't delete or we abandon users' wblist entries
-// https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6201
-					$app->db->datalogDelete('spamfilter_users', 'id', $tmp_user["id"]);
-				}
-			} // endif spamfilter policy
-
 			//* Update the aliases
 			$forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE destination = ?", $this->oldDataRecord['email']);
 			if(is_array($forwardings)) {
@@ -426,15 +386,42 @@ class page_action extends tform_actions {
 					$update_data = array(
 						'destination' => $destination,
 					);
-					if (isset($domain['sys_groupid'])) {
-						$update_data['sys_groupid'] = $domain['sys_groupid'];
-					}
 					$app->db->datalogUpdate('mail_forwarding', $update_data, 'forwarding_id', $rec['forwarding_id']);
 				}
 			}
 
 		} // end if email addess changed
 
+		$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord['email']);
+		if($tmp_user["id"] > 0) {
+			// There is already a record that we will update
+			if(!$skip_spamfilter_users_update) {
+				$update_data = array(
+					'policy_id' => $policy_id,
+				);
+				if (isset($domain['sys_groupid'])) {
+					$update_data['sys_groupid'] = $domain['sys_groupid'];
+				}
+				$app->db->datalogUpdate('spamfilter_users', $update_data, 'id', $tmp_user['id']);
+			}
+		} else {
+			// We create a new record
+			$insert_data = array(
+				"sys_userid" => $_SESSION["s"]["user"]["userid"],
+				"sys_groupid" => $domain["sys_groupid"],
+				"sys_perm_user" => 'riud',
+				"sys_perm_group" => 'riud',
+				"sys_perm_other" => '',
+				"server_id" => $domain["server_id"],
+				"priority" => 7,
+				"policy_id" => $policy_id,
+				"email" => $this->dataRecord["email"],
+				"fullname" => $app->functions->idn_decode($this->dataRecord["email"]),
+				"local" => 'Y'
+			);
+			$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
+		}
+
 		//* Change backup options when user mail backup options have been changed
 		if(isset($this->dataRecord['backup_interval']) && ($this->dataRecord['backup_interval'] != $this->oldDataRecord['backup_interval'] || $this->dataRecord['backup_copies'] != $this->oldDataRecord['backup_copies'])) {
 			$backup_interval = $this->dataRecord['backup_interval'];
diff --git a/interface/web/mail/spamfilter_blacklist_edit.php b/interface/web/mail/spamfilter_blacklist_edit.php
index b76334b387..c304dafd2b 100644
--- a/interface/web/mail/spamfilter_blacklist_edit.php
+++ b/interface/web/mail/spamfilter_blacklist_edit.php
@@ -84,7 +84,7 @@ class page_action extends tform_actions {
 			}
 		} // end if user is not admin
 
-		// Select and set the server_id so it matches the server_id of the spa,filter_users record
+		// Select and set the server_id so it matches the server_id of the spamfilter_users record
 		$tmp = $app->db->queryOneRecord("SELECT server_id FROM spamfilter_users WHERE id = ?", $this->dataRecord["rid"]);
 		$this->dataRecord["server_id"] = $tmp["server_id"];
 		unset($tmp);
diff --git a/interface/web/mail/spamfilter_policy_edit.php b/interface/web/mail/spamfilter_policy_edit.php
index 8b15f2fac6..e8dd7f7473 100644
--- a/interface/web/mail/spamfilter_policy_edit.php
+++ b/interface/web/mail/spamfilter_policy_edit.php
@@ -113,16 +113,9 @@ class page_action extends tform_actions {
 					// check if this is an email domain
 					if(substr($spamfilter_user['email'],0,1) == '@') {
 						$domain = substr($spamfilter_user['email'],1);
-						$forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source LIKE ? OR destination LIKE ?", "%@" . $domain, "%@" . $domain);
-
-						// Force-update aliases and forwards
-						if(is_array($forwardings)) {
-							foreach($forwardings as $rec) {
-								$app->db->datalogUpdate('mail_forwarding', array("source" => $rec['source']), 'forwarding_id', $rec['forwarding_id'],true);
-							}
-						}
-					}
 
+						// Nothing special to do for a domain
+					}
 				}
 			}
 		}
diff --git a/interface/web/mail/spamfilter_users_edit.php b/interface/web/mail/spamfilter_users_edit.php
index 98493173cc..c06e31fc72 100644
--- a/interface/web/mail/spamfilter_users_edit.php
+++ b/interface/web/mail/spamfilter_users_edit.php
@@ -65,6 +65,29 @@ class page_action extends tform_actions {
 		parent::onShowNew();
 	}
 
+	function onShowEnd() {
+		global $app, $conf;
+
+		// Get the spamfilter policies for the user
+		$tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]);
+		if (isset($_POST['policy_id'])) $tmp_user['policy_id'] = intval($_POST['policy_id']);
+		$sql = "SELECT id, policy_name FROM spamfilter_policy WHERE ".$app->tform->getAuthSQL('r') . " ORDER BY policy_name";
+		$policies = $app->db->queryAllRecords($sql);
+		$policy_select = "<option value='0'".(($tmp_user['policy_id'] == 0) ? " SELECTED>":">").$app->tform->lng("inherit_policy")."</option>";
+		if(is_array($policies)) {
+			foreach( $policies as $p) {
+				$selected = ($p["id"] == $tmp_user["policy_id"])?'SELECTED':'';
+				$policy_select .= "<option value='$p[id]' $selected>" . $app->functions->htmlentities($p['policy_name']) . "</option>\r\n";
+			}
+		}
+		$app->tpl->setVar("policy_id", $policy_select);
+		unset($policies);
+		unset($policy_select);
+		unset($tmp_user);
+
+		parent::onShowEnd();
+	}
+
 	function onBeforeUpdate() {
 		global $app, $conf;
 
@@ -109,7 +132,7 @@ class page_action extends tform_actions {
 
 		// If email changes fire spamfilter_wblist_update events so rspamd files are rewritten
 		if(isset($this->dataRecord['email']) && $this->oldDataRecord['email'] != $this->dataRecord['email']) {
-			$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_users WHERE rid = ?", $this->dataRecord['id']);
+			$tmp_wblist = $app->db->queryAllRecords("SELECT wblist_id FROM spamfilter_wblist WHERE rid = ?", $this->dataRecord['id']);
 			foreach ($tmp_wblist as $tmp) {
 				$app->db->datalogUpdate('spamfilter_wblist', array('rid' => $this->dataRecord['id']), 'wblist_id', $tmp['wblist_id']);
 			}
diff --git a/interface/web/mail/spamfilter_whitelist_edit.php b/interface/web/mail/spamfilter_whitelist_edit.php
index a404db0ef1..bc161e6e55 100644
--- a/interface/web/mail/spamfilter_whitelist_edit.php
+++ b/interface/web/mail/spamfilter_whitelist_edit.php
@@ -84,7 +84,7 @@ class page_action extends tform_actions {
 			}
 		} // end if user is not admin
 
-		// Select and set the server_id so it matches the server_id of the spa,filter_users record
+		// Select and set the server_id so it matches the server_id of the spamfilter_users record
 		$tmp = $app->db->queryOneRecord("SELECT server_id FROM spamfilter_users WHERE id = ?", $this->dataRecord["rid"]);
 		$this->dataRecord["server_id"] = $tmp["server_id"];
 		unset($tmp);
diff --git a/interface/web/mailuser/mail_user_spamfilter_edit.php b/interface/web/mailuser/mail_user_spamfilter_edit.php
index 8d1e70ba20..2c8759b795 100644
--- a/interface/web/mailuser/mail_user_spamfilter_edit.php
+++ b/interface/web/mailuser/mail_user_spamfilter_edit.php
@@ -79,32 +79,25 @@ class page_action extends tform_actions {
 		// Spamfilter policy
 		$policy_id = $app->functions->intval($this->dataRecord["policy"]);
 		$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $rec["email"]);
-		if($policy_id > 0) {
-			if($tmp_user["id"] > 0) {
-				// There is already a record that we will update
-				$app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]);
-			} else {
-				// We create a new record
-				$insert_data = array(
-					"sys_userid" => $domain["sys_userid"],
-					"sys_groupid" => $domain["sys_groupid"],
-					"sys_perm_user" => 'riud',
-					"sys_perm_group" => 'riud',
-					"sys_perm_other" => '',
-					"server_id" => $domain["server_id"],
-					"priority" => 10,
-					"policy_id" => $policy_id,
-					"email" => $rec["email"],
-					"fullname" => $rec["email"],
-					"local" => 'Y'
-				);
-				$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
-			}
-		}else {
-			if($tmp_user["id"] > 0) {
-				// There is already a record but the user shall have no policy, so we delete it
-				$app->db->datalogDelete('spamfilter_users', 'id', $tmp_user["id"]);
-			}
+		if($tmp_user["id"] > 0) {
+			// There is already a record that we will update
+			$app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]);
+		} else {
+			// We create a new record
+			$insert_data = array(
+				"sys_userid" => $domain["sys_userid"],
+				"sys_groupid" => $domain["sys_groupid"],
+				"sys_perm_user" => 'riud',
+				"sys_perm_group" => 'riud',
+				"sys_perm_other" => '',
+				"server_id" => $domain["server_id"],
+				"priority" => 7,
+				"policy_id" => $policy_id,
+				"email" => $rec["email"],
+				"fullname" => $rec["email"],
+				"local" => 'Y'
+			);
+			$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
 		} // endif spamfilter policy
 	}
 
@@ -114,26 +107,25 @@ class page_action extends tform_actions {
 		$rec = $app->tform->getDataRecord($this->id);
 		$app->tpl->setVar("email", $app->functions->idn_decode($rec['email']), true);
 
-		// Get the spamfilter policys for the user
+		// Get the spamfilter policies for the user
 		$tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = ?", $rec['email']);
 		$sql = "SELECT id, policy_name FROM spamfilter_policy WHERE ".$app->tform->getAuthSQL('r');
-		$policys = $app->db->queryAllRecords($sql);
-		$policy_select = "<option value='0'>".$app->tform->lng("inherit_policy")."</option>";
-		if(is_array($policys)) {
-			foreach( $policys as $p) {
+		$policies = $app->db->queryAllRecords($sql);
+		$policy_select = "<option value='0'".(($tmp_user['policy_id'] == 0)?" SELECTED>":">").$app->tform->lng("inherit_policy")."</option>";
+		if(is_array($policies)) {
+			foreach( $policies as $p) {
 				$selected = ($p["id"] == $tmp_user["policy_id"])?'SELECTED':'';
 				$policy_select .= "<option value='$p[id]' $selected>" . $app->functions->htmlentities($p['policy_name']) . "</option>\r\n";
 			}
 		}
 		$app->tpl->setVar("policy", $policy_select);
-		unset($policys);
+		unset($policies);
 		unset($policy_select);
 		unset($tmp_user);
 
 		parent::onShowEnd();
 	}
 
-
 }
 
 $app->tform_actions = new page_action;
diff --git a/interface/web/tools/resync.php b/interface/web/tools/resync.php
index ec947421b7..0aa6677ac3 100644
--- a/interface/web/tools/resync.php
+++ b/interface/web/tools/resync.php
@@ -93,34 +93,34 @@ class page_action extends tform_actions {
 
 		if($type == 'mail') {
 			$server_data = array (
-    			'mail_domain' => array (
-        			'index_field' => 'domain_id',
-        			'server_type' => 'mail',
+				'mail_domain' => array (
+					'index_field' => 'domain_id',
+					'server_type' => 'mail',
 					'server_id' => $server_id,
-    			),
+				),
 				'mail_get' => array (
 					'index_field' =>  'mailget_id',
 					'server_type' => 'mail',
 					'server_id' => $server_id,
 				),
-    			'mail_mailinglist' => array (
-        			'index_field' =>  'mailinglist_id',
-        			'server_type' => 'mail',
+				'mail_mailinglist' => array (
+					'index_field' =>  'mailinglist_id',
+					'server_type' => 'mail',
 					'server_id' => $server_id,
-    			),
-    			'mail_user' => array (
-        			'index_field' =>  'mailuser_id',
-        			'server_type' => 'mail',
+				),
+				'mail_user' => array (
+					'index_field' =>  'mailuser_id',
+					'server_type' => 'mail',
 					'server_id' => $server_id,
 				),
-    			'mail_transport' => array (
-        			'index_field' =>  'transport_id',
-        			'server_type' => 'mail',
+				'mail_transport' => array (
+					'index_field' =>  'transport_id',
+					'server_type' => 'mail',
 					'server_id' => $server_id,
 				),
-    			'mail_relay' => array (
-        			'index_field' =>  'relay_recipient_id',
-        			'server_type' => 'mail',
+				'mail_relay' => array (
+					'index_field' =>  'relay_recipient_id',
+					'server_type' => 'mail',
 					'server_id' => $server_id,
 				),
 			);
@@ -129,17 +129,17 @@ class page_action extends tform_actions {
 			$server_data = array (
 				'mail_access' => array (
 					'index_field' => 'access_id',
-        			'server_type' => 'mail',
+					'server_type' => 'mail',
 					'server_id' => $server_id,
-    			),
+				),
 				'mail_content_filter' => array (
 					'index_field' => 'content_filter_id',
-        			'server_type' => 'mail',
-    			),
+					'server_type' => 'mail',
+				),
 				'mail_user_filter' => array (
 					'index_field' => 'filter_id',
-        			'server_type' => 'mail',
-    			),
+					'server_type' => 'mail',
+				),
 				'spamfilter_policy' => array (
 					'index_field' => 'id',
 					'server_type' => 'mail',
@@ -158,26 +158,26 @@ class page_action extends tform_actions {
 		}
 		if($type == 'web'  ) {
 			$server_data = array (
-    			'web_domain' => array (
-        			'index_field' => 'domain_id',
-        			'server_type' => 'web',
+				'web_domain' => array (
+					'index_field' => 'domain_id',
+					'server_type' => 'web',
 					'server_id' => $server_id,
-    			),
-    			'shell_user' => array (
-        			'index_field' => 'shell_user_id',
-        			'server_type' => 'web',
+				),
+				'shell_user' => array (
+					'index_field' => 'shell_user_id',
+					'server_type' => 'web',
 					'server_id' => $server_id,
-    			),
-    			'cron' => array (
-        			'index_field' => 'id',
-        			'server_type' => 'cron',
+				),
+				'cron' => array (
+					'index_field' => 'id',
+					'server_type' => 'cron',
 					'server_id' => $server_id,
-    			),
-    			'ftp_user' => array (
-        			'index_field' => 'ftp_user_id',
-        			'server_type' => 'web',
+				),
+				'ftp_user' => array (
+					'index_field' => 'ftp_user_id',
+					'server_type' => 'web',
 					'server_id' => $server_id,
-    			),
+				),
 			);
 		}
 		if($type == 'dns' ) {
@@ -191,11 +191,11 @@ class page_action extends tform_actions {
 		}
 		if($type == 'file' ) {
 			$server_data = array (
-    			'webdav_user' => array (
-        			'index_field' => 'webdav_user_id',
-        			'server_type' => 'file',
+				'webdav_user' => array (
+					'index_field' => 'webdav_user_id',
+					'server_type' => 'file',
 					'server_id' => $server_id,
-    			),
+				),
 			);
 		}
 		if($type == 'db' ) {
diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php
index 0d2e52c4fc..2baf07ec7d 100644
--- a/server/plugins-available/mail_plugin.inc.php
+++ b/server/plugins-available/mail_plugin.inc.php
@@ -364,7 +364,7 @@ class mail_plugin {
 				$app->log('Moved invalid maildir to corrupted Maildirs folder: '.$data['new']['maildir'], LOGLEVEL_WARN);
 			}
 
-			//* Create the maildir, if it doesn not exist, set permissions, set quota.
+			//* Create the maildir, if it does not exist, set permissions, set quota.
 			if(!empty($maildomain_path) && !is_dir($maildomain_path.'/new')) {
 				$app->system->maildirmake($maildomain_path, $user, '', $group);
 
diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index 9d34ac8a36..112020deb7 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -243,17 +243,7 @@ class rspamd_plugin {
 		$settings_file = $this->users_config_dir . str_replace('@', '_', $settings_name) . '.conf';
 		//$app->log('Settings file for rspamd is ' . $settings_file, LOGLEVEL_WARN);
 		if($mode === 'delete') {
-			$delete_file = true;
-			if($type === 'spamfilter_user') {
-				$search_for_policy[] = $email_address;
-				$search_for_policy[] = substr($email_address, strpos($email_address, '@'));
-
-				$policy = $app->db->queryOneRecord("SELECT p.* FROM spamfilter_users as u INNER JOIN spamfilter_policy as p ON (p.id = u.policy_id) WHERE u.server_id = ? AND u.email IN ? ORDER BY u.priority DESC", $conf['server_id'], $search_for_policy);
-				if($policy) {
-					$delete_file = false;
-				}
-			}
-			if($delete_file === true && is_file($settings_file)) {
+			if(is_file($settings_file)) {
 				unlink($settings_file);
 			}
 		} else {
@@ -265,7 +255,12 @@ class rspamd_plugin {
 
 			// get policy for entry
 			if($type === 'spamfilter_user') {
-				$policy = $app->db->queryOneRecord("SELECT * FROM spamfilter_policy WHERE id = ?", intval($data['new']['policy_id']));
+				if (intval($data['new']['policy_id']) > 0) {
+					$policy = $app->db->queryOneRecord("SELECT * FROM spamfilter_policy WHERE id = ?", intval($data['new']['policy_id']));
+				} else {
+					$domain = substr($data['new']['email'], strpos($data['new']['email'], '@'));
+					$policy = $app->db->queryOneRecord("SELECT p.* FROM spamfilter_users as u INNER JOIN spamfilter_policy as p ON (p.id = u.policy_id) WHERE u.server_id = ? AND u.email = ?", $conf['server_id'], $domain);
+				}
 
 				$check = $app->db->queryOneRecord('SELECT `greylisting` FROM `mail_user` WHERE `server_id` = ? AND `email` = ? UNION SELECT `greylisting` FROM `mail_forwarding` WHERE `server_id` = ? AND `source` = ? ORDER BY (`greylisting` = ?) DESC', $conf['server_id'], $email_address, $conf['server_id'], $email_address, 'y');
 				if($check) {
@@ -286,7 +281,7 @@ class rspamd_plugin {
 				$app->system->mkdirpath($this->users_config_dir);
 			}
 
-			if(!$this->isValidEmail($app->functions->idn_encode($email_address))) {
+			if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || intval($data['new']['policy_id']) == 0) {
 				if(is_file($settings_file)) {
 					unlink($settings_file);
 				}
@@ -310,11 +305,13 @@ class rspamd_plugin {
 					} else {
 						$tpl->setVar('from_email', $app->functions->idn_encode($email_address));
 					}
+					// unneded? $spamfilter appears unused
 					$spamfilter = $data[$use_data];
 				} else {
 					$tpl->setVar('to_email', $app->functions->idn_encode($email_address));
 
 					// need to get matching spamfilter user if any
+					// unneded? $spamfilter appears unused
 					$spamfilter = $app->db->queryOneRecord('SELECT * FROM spamfilter_users WHERE `email` = ?', $email_address);
 				}
 
@@ -399,6 +396,7 @@ class rspamd_plugin {
 			} else {
 				$record_id = intval($data['new']['wblist_id']);
 				$wblist_file = $this->users_config_dir.'spamfilter_wblist_'.$record_id.'.conf';
+
 				$tmp = $app->db->queryOneRecord("SELECT email FROM spamfilter_users WHERE id = ?", intval($data['new']['rid']));
 				if($tmp && !empty($tmp)) {
 					$filter = array(
-- 
GitLab


From 06d5ca4782f2afa68a3fe24a22e0ac5ad9d46fd2 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 6 Aug 2021 16:42:41 -0600
Subject: [PATCH 425/441] add file_cleanup cronjob to catch abandoned rspamd
 config files

---
 .../classes/cron.d/600-file_cleanup.inc.php   | 143 ++++++++++++++++++
 server/lib/classes/cronjob.inc.php            |  27 +++-
 2 files changed, 169 insertions(+), 1 deletion(-)
 create mode 100644 server/lib/classes/cron.d/600-file_cleanup.inc.php

diff --git a/server/lib/classes/cron.d/600-file_cleanup.inc.php b/server/lib/classes/cron.d/600-file_cleanup.inc.php
new file mode 100644
index 0000000000..b487a529b8
--- /dev/null
+++ b/server/lib/classes/cron.d/600-file_cleanup.inc.php
@@ -0,0 +1,143 @@
+<?php
+
+/*
+Copyright (c) 2021, Jesse Norell
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+class cronjob_file_cleanup extends cronjob {
+
+	// job schedule
+	protected $_schedule = '* * * * *';
+	protected $_run_at_new = true;
+
+	public function onBeforeRun() {
+		global $app;
+
+		/* currently we only cleanup rspamd config files, so bail if not needed */
+		if (! is_dir("/etc/rspamd/local.d/users/")) {
+			return false;
+		}
+
+		return parent::onBeforeRun();
+	}
+
+	public function onRunJob() {
+		global $app, $conf;
+
+		$server_id = $conf['server_id'];
+
+		/* rspamd config file cleanup */
+		if (is_dir("/etc/rspamd/local.d/users/")) {
+			$mail_access = array();
+			$sql = "SELECT access_id as id FROM mail_access WHERE active = 'y' AND server_id = ?";
+			$records = $app->db->queryAllRecords($sql, $server_id);
+			if(is_array($records)) {
+				foreach($records as $rec){
+					$mail_access[$rec['id']] = $rec['id'];
+				}
+			}
+
+			$spamfilter_wblist = array();
+			$sql = "SELECT wblist_id as id FROM spamfilter_wblist WHERE active = 'y' AND server_id = ?";
+			$records = $app->db->queryAllRecords($sql, $server_id);
+			if(is_array($records)) {
+				foreach($records as $rec){
+					$spamfilter_wblist[$rec['id']] = $rec['id'];
+				}
+			}
+
+			$spamfilter_users = array();
+			$sql = "SELECT id FROM spamfilter_users WHERE policy_id != 0 AND server_id = ?";
+			$records = $app->db->queryAllRecords($sql, $server_id);
+			if(is_array($records)) {
+				foreach($records as $rec){
+					$spamfilter_users[$rec['id']] = $rec['id'];
+				}
+			}
+
+			$mail_user = array();
+			$sql = "SELECT mailuser_id as id FROM mail_user WHERE postfix = 'y' AND server_id = ?";
+			$records = $app->db->queryAllRecords($sql, $server_id);
+			if(is_array($records)) {
+				foreach($records as $rec){
+					$mail_user[$rec['id']] = $rec['id'];
+				}
+			}
+
+			$mail_forwarding = array();
+			$sql = "SELECT forwarding_id as id FROM mail_forwarding WHERE active = 'y' AND server_id = ?";
+			$records = $app->db->queryAllRecords($sql, $server_id);
+			if(is_array($records)) {
+				foreach($records as $rec){
+					$mail_forwarding[$rec['id']] = $rec['id'];
+				}
+			}
+
+			foreach (glob('/etc/rspamd/local.d/users/*.conf') as $file) {
+				if($handle = fopen($file, 'r')) {
+					if(($line = fgets($handle)) !== false) {
+						if(preg_match('/^((?:global|spamfilter)_wblist|ispc_(spamfilter_user|mail_user|mail_forwarding))[_-](\d+)\s/', $line, $matches)) {
+							switch($matches[1]) {
+							case 'global_wblist':
+								$remove = ! isset($mail_access[$matches[3]]);
+								break;
+							case 'spamfilter_wblist':
+								$remove = ! isset($spamfilter_wblist[$matches[3]]);
+								break;
+							case 'ispc_spamfilter_user':
+								$remove = ! isset($spamfilter_users[$matches[3]]);
+								break;
+							case 'ispc_mail_user':
+								$remove = ! isset($mail_user[$matches[3]]);
+								break;
+							case 'ispc_mail_forwarding':
+								$remove = ! isset($mail_forwarding[$matches[3]]);
+								break;
+							default:
+								$app->log("conf file has unhandled rule naming convention, ignoring: $file", LOGLEVEL_DEBUG);
+								$remove = false;
+							}
+							if($remove) {
+								$app->log("$matches[1] id $matches[3] not found, removing $file", LOGLEVEL_DEBUG);
+								unlink($file);
+								$this->restartServiceDelayed('rspamd', 'reload');
+							}
+						} else {
+							$app->log("conf file has unknown rule naming convention, ignoring: $file", LOGLEVEL_DEBUG);
+						}
+					}
+
+					fclose($handle);
+				}
+			}
+		}
+
+		parent::onRunJob();
+	}
+
+}
+
diff --git a/server/lib/classes/cronjob.inc.php b/server/lib/classes/cronjob.inc.php
index 61d45749a8..6ea7559570 100644
--- a/server/lib/classes/cronjob.inc.php
+++ b/server/lib/classes/cronjob.inc.php
@@ -43,6 +43,9 @@ class cronjob {
 	protected $_next_run = null;
 	private $_running = false;
 
+	// services for delayed restart/reload
+	private $_delayed_restart_services = array();
+
 	/** return schedule */
 
 
@@ -178,6 +181,12 @@ class cronjob {
 		global $app, $conf;
 
 		if($conf['log_priority'] <= LOGLEVEL_DEBUG) print "Called onAfterRun() for class " . get_class($this) . "\n";
+
+		if(is_array($this->_delayed_restart_services)) {
+			foreach ($this->_delayed_restart_services as $service => $mode) {
+				$this->restartService($service, $mode);
+			}
+		}
 	}
 
 	// child classes may NOT override this!
@@ -188,6 +197,22 @@ class cronjob {
 		$app->db->query("UPDATE `sys_cron` SET `running` = 0 WHERE `name` = ?", get_class($this));
 	}
 
+	// child classes may NOT override this!
+	protected function restartService($service, $mode='restart') {
+		global $app;
+
+		$mode = ($mode == 'reload' ? 'reload' : 'restart');
+		$app->system->exec_safe('service ? ?', $service, $mode);
+	}
+
+	// child classes may NOT override this!
+	protected function restartServiceDelayed($service, $mode='restart') {
+		$mode = ($mode == 'reload' ? 'reload' : 'restart');
+
+		if (is_array($this->_delayed_restart_services)) {
+			$this->_delayed_restart_services[$service] = $mode;
+		}
+	}
+
 }
 
-?>
-- 
GitLab


From 0c4b8450db406dcae9bd7707e828a830524100d7 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 16 Aug 2021 15:31:19 -0600
Subject: [PATCH 426/441] MR review suggestions/fixes

---
 .../web/mail/form/spamfilter_users.tform.php  |  2 +-
 interface/web/mail/mail_user_edit.php         |  2 +-
 .../classes/cron.d/600-file_cleanup.inc.php   | 10 +++++-----
 server/lib/classes/cronjob.inc.php            | 19 +++++++++++++------
 4 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/interface/web/mail/form/spamfilter_users.tform.php b/interface/web/mail/form/spamfilter_users.tform.php
index 1388217b64..1bb7b5f682 100644
--- a/interface/web/mail/form/spamfilter_users.tform.php
+++ b/interface/web/mail/form/spamfilter_users.tform.php
@@ -78,7 +78,7 @@ $form["tabs"]['users'] = array (
 		'policy_id' => array (
 			'datatype' => 'INTEGER',
 			'formtype' => 'SELECT',
-			'default' => '',
+			'default' => '0',
 			'datasource' => array (  'type' => 'SQL',
 				'querystring' => 'SELECT id,policy_name FROM spamfilter_policy WHERE {AUTHSQL} ORDER BY policy_name',
 				'keyfield'=> 'id',
diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php
index f13c5845a5..d8730fa2eb 100644
--- a/interface/web/mail/mail_user_edit.php
+++ b/interface/web/mail/mail_user_edit.php
@@ -296,7 +296,7 @@ class page_action extends tform_actions {
 				"sys_perm_group" => 'riud',
 				"sys_perm_other" => '',
 				"server_id" => $domain["server_id"],
-				"priority" => 5,
+				"priority" => 7,
 				"policy_id" => $policy_id,
 				"email" => $this->dataRecord["email"],
 				"fullname" => $app->functions->idn_decode($this->dataRecord["email"]),
diff --git a/server/lib/classes/cron.d/600-file_cleanup.inc.php b/server/lib/classes/cron.d/600-file_cleanup.inc.php
index b487a529b8..765b091041 100644
--- a/server/lib/classes/cron.d/600-file_cleanup.inc.php
+++ b/server/lib/classes/cron.d/600-file_cleanup.inc.php
@@ -103,19 +103,19 @@ class cronjob_file_cleanup extends cronjob {
 						if(preg_match('/^((?:global|spamfilter)_wblist|ispc_(spamfilter_user|mail_user|mail_forwarding))[_-](\d+)\s/', $line, $matches)) {
 							switch($matches[1]) {
 							case 'global_wblist':
-								$remove = ! isset($mail_access[$matches[3]]);
+								$remove = isset($mail_access[$matches[3]]) ? false : true;
 								break;
 							case 'spamfilter_wblist':
-								$remove = ! isset($spamfilter_wblist[$matches[3]]);
+								$remove = isset($spamfilter_wblist[$matches[3]]) ? false : true;
 								break;
 							case 'ispc_spamfilter_user':
-								$remove = ! isset($spamfilter_users[$matches[3]]);
+								$remove = isset($spamfilter_users[$matches[3]]) ? false : true;
 								break;
 							case 'ispc_mail_user':
-								$remove = ! isset($mail_user[$matches[3]]);
+								$remove = isset($mail_user[$matches[3]]) ? false : true;
 								break;
 							case 'ispc_mail_forwarding':
-								$remove = ! isset($mail_forwarding[$matches[3]]);
+								$remove = isset($mail_forwarding[$matches[3]]) ? false : true;
 								break;
 							default:
 								$app->log("conf file has unhandled rule naming convention, ignoring: $file", LOGLEVEL_DEBUG);
diff --git a/server/lib/classes/cronjob.inc.php b/server/lib/classes/cronjob.inc.php
index 6ea7559570..df410042db 100644
--- a/server/lib/classes/cronjob.inc.php
+++ b/server/lib/classes/cronjob.inc.php
@@ -198,19 +198,26 @@ class cronjob {
 	}
 
 	// child classes may NOT override this!
-	protected function restartService($service, $mode='restart') {
+	protected function restartService($service, $action='restart') {
 		global $app;
 
-		$mode = ($mode == 'reload' ? 'reload' : 'restart');
-		$app->system->exec_safe('service ? ?', $service, $mode);
+		$app->uses('system');
+
+		$retval = array('output' => '', 'retval' => 0);
+		if($action == 'reload') {
+			exec($app->system->getinitcommand($service, 'reload').' 2>&1', $retval['output'], $retval['retval']);
+		} else {
+			exec($app->system->getinitcommand($service, 'restart').' 2>&1', $retval['output'], $retval['retval']);
+		}
+		return $retval;
 	}
 
 	// child classes may NOT override this!
-	protected function restartServiceDelayed($service, $mode='restart') {
-		$mode = ($mode == 'reload' ? 'reload' : 'restart');
+	protected function restartServiceDelayed($service, $action='restart') {
+		$action = ($action == 'reload' ? 'reload' : 'restart');
 
 		if (is_array($this->_delayed_restart_services)) {
-			$this->_delayed_restart_services[$service] = $mode;
+			$this->_delayed_restart_services[$service] = $action;
 		}
 	}
 
-- 
GitLab


From 83bfd333c3eec4fba23a23c1f690774780fde229 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 17 Aug 2021 09:43:15 +0000
Subject: [PATCH 427/441] Deployment of packages on release

---
 .gitlab-ci.yml | 58 +++++++++++++++++++++++++++++++++-----------------
 1 file changed, 39 insertions(+), 19 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e1a4913454..6eedb90374 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,6 +17,7 @@ syntax:lint:
     - schedules
     - web
     - merge_requests
+    - /^\d+\.\d+\.\d+$/
 
   script:
     - echo "Syntax checking PHP files"
@@ -32,6 +33,12 @@ syntax_diff:lint:
     - pushes
     - branches
 
+  except:
+    - schedules
+    - web
+    - merge_requests
+    - /^\d+\.\d+\.\d+$/
+
   script:
     - echo "Syntax checking PHP files"
     - bash ./.git-scripts/syntax.sh commit
@@ -52,19 +59,22 @@ syntax_diff:lint:
 #    - vendor/bin/phplint
 
 
-test:install:
-  stage: test
-  image: jerob/docker-ispconfig
-  only:
-    - schedules
-    - web
-  script:
-    - $CI_PROJECT_DIR/helper_scripts/test_install_docker.sh
-    - apt-get update
-    - apt-get --yes install curl
-    - curl --insecure https://127.0.0.1:8080/login/
-    - ps xaf
-
+#test:install:
+#  stage: test
+#  image: jerob/docker-ispconfig
+#  only:
+#    - schedules
+#    - web
+#    - /^\d+\.\d+\.\d+$/
+#  
+#  script:
+#    - $CI_PROJECT_DIR/helper_scripts/test_install_docker.sh
+#    - apt-get update
+#    - apt-get --yes install curl
+#    - curl --insecure https://127.0.0.1:8080/login/
+#    - ps xaf
+#    
+#  needs: ["syntax:lint"]
 
 build:package:
     stage: build
@@ -72,13 +82,23 @@ build:package:
     only:
         refs:
             - /^\d+\.\d+\.\d+$/
-    except:
-        - branches
-        - merge_requests
-        - schedules
-        - pushes
+            - web
+
     script:
         - echo "Building release."
+        - if [[ "$VER" == "" ]] ; then VER="$CI_COMMIT_TAG" ; fi
+        - if [[ "$VER" == "" ]] ; then VER="3.2dev"$(date +%s) ; fi
+        - if [[ "$VER" != "" ]] ; then echo "Replacing 3.2dev by $VER" ; sed -i -r 's/3\.2dev/'${VER}'/g' install/tpl/config.inc.php.master install/sql/ispconfig3.sql ; fi
+        - RET=0
+        - tar -cpzf ISPConfig-${VER}.tar.gz --exclude "ISPConfig-${VER}.tar.gz" --exclude ".git*" --exclude ".phplint.yml" --transform 's,^\./,ispconfig3_install/,' . || RET=$?
+        - if [[ $RET > 1 ]] ; then exit $RET ; fi
+        - echo "Listing tar contents for verification"
+        - tar -tvf ISPConfig-${VER}.tar.gz
+        - echo "Uploading file to download server"
+        - curl -u "${DEPLOY_FTP_USER}:${DEPLOY_FTP_PASSWORD}" -T ISPConfig-${VER}.tar.gz ftp://${DEPLOY_FTP_SERVER}/web/
+        - if [[ "$VER" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then echo "Stable release ${VER}" ; curl -u "${DEPLOY_FTP_USER}:${DEPLOY_FTP_PASSWORD}" -T ISPConfig-${VER}.tar.gz ftp://${DEPLOY_FTP_SERVER}/web/ISPConfig-3-stable.tar.gz ; echo -n "${VER}" > ispconfig3_version.txt ; curl -u "${DEPLOY_FTP_USER}:${DEPLOY_FTP_PASSWORD}" -T ispconfig3_version.txt ftp://${DEPLOY_FTP_SERVER}/web/ ; else echo "Dev release ${VER}" ; fi
+        - rm ISPConfig-${VER}.tar.gz
+        - echo "Download url is https://download.ispconfig.org/ISPConfig-${VER}.tar.gz"
         
-    when: manual
+    needs: ["syntax:lint"]
     allow_failure: false
\ No newline at end of file
-- 
GitLab


From ba7d1e6842ba8a6bb16fb61af04f9ef7f45f68ef Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 17 Aug 2021 09:12:34 -0600
Subject: [PATCH 428/441] clamd@amavisd service name typo

---
 install/dist/conf/fedora9.conf.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/dist/conf/fedora9.conf.php b/install/dist/conf/fedora9.conf.php
index 19c9a4f625..23453ae48f 100644
--- a/install/dist/conf/fedora9.conf.php
+++ b/install/dist/conf/fedora9.conf.php
@@ -154,7 +154,7 @@ $conf['rspamd']['init_script'] = 'rspamd';
 
 //* ClamAV
 $conf['clamav']['installed'] = false; // will be detected automatically during installation
-$conf['clamav']['init_script'] = 'clamd.amavisd';
+$conf['clamav']['init_script'] = 'clamd@amavisd';
 
 //* Pureftpd
 $conf['pureftpd']['installed'] = false; // will be detected automatically during installation
-- 
GitLab


From 0f7af6dff344b06b572f686844358c7ec03c087b Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 17 Aug 2021 16:05:38 -0600
Subject: [PATCH 429/441] enable validate_root in php.ini

---
 .../plugins-available/apache2_plugin.inc.php  |  2 +-
 .../webserver_plugin.inc.php                  | 52 ++++++++++++++++---
 2 files changed, 45 insertions(+), 9 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 19f650d4b3..b0f87c192b 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -1178,7 +1178,7 @@ class apache2_plugin {
 			$app->system->chgrp('/var/log/ispconfig/httpd/'.$data['new']['domain'].'/error.log', 'root');
 		}
 
-		//* Write the custom php.ini file, if custom_php_ini fieled is not empty
+		//* Write the custom php.ini file, if custom_php_ini field is not empty
 		$custom_php_ini_dir = $web_config['website_basedir'].'/conf/'.$data['new']['system_user'];
 		if($data['new']['type'] == 'vhostsubdomain' || $data['new']['type'] == 'vhostalias') $custom_php_ini_dir .= '_' . $web_folder;
 		if(!is_dir($web_config['website_basedir'].'/conf')) $app->system->mkdir($web_config['website_basedir'].'/conf');
diff --git a/server/plugins-available/webserver_plugin.inc.php b/server/plugins-available/webserver_plugin.inc.php
index 0873826bde..b39ac65da8 100644
--- a/server/plugins-available/webserver_plugin.inc.php
+++ b/server/plugins-available/webserver_plugin.inc.php
@@ -37,8 +37,6 @@ class webserver_plugin {
 	 * This function is called during ispconfig installation to determine
 	 * if a symlink shall be created for this plugin.
 	 */
-
-
 	public function onInstall() {
 		global $conf;
 
@@ -92,10 +90,6 @@ class webserver_plugin {
 			'mode' => 'mod',
 			'php_version' => 0); // default;
 
-		$check_files[] = array('file' => $web_config['php_ini_path_cgi'],
-			'mode' => '', // all but 'mod' and 'fast-cgi'
-			'php_version' => 0); // default;
-
 		if($fastcgi_config["fastcgi_phpini_path"] && $fastcgi_config["fastcgi_phpini_path"] != $web_config['php_ini_path_cgi']) {
 			$check_files[] = array('file' => $fastcgi_config["fastcgi_phpini_path"],
 				'mode' => 'fast-cgi',
@@ -106,6 +100,16 @@ class webserver_plugin {
 				'php_version' => 0); // default;
 		}
 
+		$check_files[] = array('file' => $web_config['php_fpm_ini_path'],
+			'mode' => 'php-fpm',
+			'php_version' => 0); // default;
+
+		if(!array_search($web_config['php_ini_path_cgi'], array_column($check_files, 'file'))) {
+			$check_files[] = array('file' => $web_config['php_ini_path_cgi'],
+				'mode' => '', // all but 'mod' and 'fast-cgi'
+				'php_version' => 0); // default;
+		}
+
 
 		//** read additional php versions of this server
 		$php_versions = $app->db->queryAllRecords('SELECT server_php_id, php_fastcgi_ini_dir, php_fpm_ini_dir FROM server_php WHERE server_id = ?', $conf['server_id']);
@@ -114,7 +118,8 @@ class webserver_plugin {
 				$check_files[] = array('file' => $php['php_fastcgi_ini_dir'] . '/php.ini',
 					'mode' => 'fast-cgi',
 					'php_version' => $php['server_php_id']);
-			} elseif($php['php_fpm_ini_dir'] && $php['php_fpm_ini_dir'] . '/php.ini' != $web_config['php_ini_path_cgi']) {
+			}
+			if($php['php_fpm_ini_dir'] && $php['php_fpm_ini_dir'] . '/php.ini' != $web_config['php_fpm_ini_path']) {
 				$check_files[] = array('file' => $php['php_fpm_ini_dir'] . '/php.ini',
 					'mode' => 'php-fpm',
 					'php_version' => $php['server_php_id']);
@@ -134,6 +139,13 @@ class webserver_plugin {
 		}
 		if(!is_array($php_ini_md5)) $php_ini_md5 = array();
 
+		// verify needed php file settings if that hasn't been done since 15 minutes
+		$now = time();
+		$verify_php_ini=false;
+		if(!isset($php_ini_md5['last_verify_php_ini']) || ($now - intval($php_ini_md5['last_verify_php_ini']) > 15*60)) {
+			$verify_php_ini=true;
+		}
+
 		$processed = array();
 		foreach($check_files as $file) {
 			$file_path = $file['file'];
@@ -145,6 +157,11 @@ class webserver_plugin {
 			if(in_array($ident, $processed) == true) continue;
 			$processed[] = $ident;
 
+			//** check that needed php.ini settings/changes are made
+			if($verify_php_ini) {
+				$this->verify_php_ini($file);
+			}
+
 			//** check if md5sum of file changed
 			$file_md5 = md5_file($file_path);
 			if(array_key_exists($file_path, $php_ini_md5) == false || $php_ini_md5[$file_path] != $file_md5) {
@@ -158,13 +175,32 @@ class webserver_plugin {
 			$new_php_ini_md5[$file_path] = $file_md5;
 		}
 
+		$new_php_ini_md5['last_verify_php_ini'] = time();
+
 		//** write new md5 sums if something changed
-		if($php_ini_changed == true) $app->system->file_put_contents(SCRIPT_PATH . '/temp/php.ini.md5sum', base64_encode(serialize($new_php_ini_md5)));
+		if($php_ini_changed == true || $verify_php_ini == true) $app->system->file_put_contents(SCRIPT_PATH . '/temp/php.ini.md5sum', base64_encode(serialize($new_php_ini_md5)));
 		unset($new_php_ini_md5);
 		unset($php_ini_md5);
 		unset($processed);
 	}
 
+	/**
+	 * The method checks/sets needed php.ini settings
+	 */
+	public function verify_php_ini($file) {
+		global $app;
+
+		if(isset($file['file']) && is_file($file['file'])) {
+			$php_ini = $file['file'];
+			// ensure opcache.validate_root = 1
+			$app->system->exec_safe('grep ^opcache.validate_root ?', $php_ini);
+			if($app->system->last_exec_retcode() != 0) {
+				$app->log('verify_php_ini(): php.ini '.$php_ini.' is missing validate_root', LOGLEVEL_DEBUG);
+				$sed_script='s/; *opcache\.validate_root *= *.+$/opcache.validate_root = 1/g';
+				$app->system->exec_safe('sed -E -i ? ?', $sed_script, $php_ini);
+			}
+		}
+	}
 
 	/*
 	 * Checks for changes to jailkit settings in server config and schedules affected jails to be updated.
-- 
GitLab


From 7faccfcb7e8d51522b76e0777cadd969e70f96c2 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 18 Aug 2021 09:15:52 -0600
Subject: [PATCH 430/441] call verify_php_ini from server_php_{insert,update}
 events

---
 server/mods-available/web_module.inc.php      |  9 +++
 .../webserver_plugin.inc.php                  | 61 ++++++++++++++++++-
 2 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php
index 12ad81ef9c..6019100ed7 100644
--- a/server/mods-available/web_module.inc.php
+++ b/server/mods-available/web_module.inc.php
@@ -54,6 +54,9 @@ class web_module {
 		'web_backup_insert',
 		'web_backup_update',
 		'web_backup_delete',
+		'server_php_insert',
+		'server_php_update',
+		'server_php_delete',
 		'aps_instance_insert',
 		'aps_instance_update',
 		'aps_instance_delete',
@@ -112,6 +115,7 @@ class web_module {
 		$app->modules->registerTableHook('web_folder', 'web_module', 'process');
 		$app->modules->registerTableHook('web_folder_user', 'web_module', 'process');
 		$app->modules->registerTableHook('web_backup', 'web_module', 'process');
+		$app->modules->registerTableHook('server_php', 'web_module', 'process');
 		$app->modules->registerTableHook('aps_instances', 'web_module', 'process');
 		$app->modules->registerTableHook('aps_instances_settings', 'web_module', 'process');
 		$app->modules->registerTableHook('aps_packages', 'web_module', 'process');
@@ -167,6 +171,11 @@ class web_module {
 			if($action == 'u') $app->plugins->raiseEvent('web_backup_update', $data);
 			if($action == 'd') $app->plugins->raiseEvent('web_backup_delete', $data);
 			break;
+		case 'server_php':
+			if($action == 'i') $app->plugins->raiseEvent('server_php_insert', $data);
+			if($action == 'u') $app->plugins->raiseEvent('server_php_update', $data);
+			if($action == 'd') $app->plugins->raiseEvent('server_php_delete', $data);
+			break;
 		case 'aps_instances':
 			if($action == 'i') $app->plugins->raiseEvent('aps_instance_insert', $data);
 			if($action == 'u') $app->plugins->raiseEvent('aps_instance_update', $data);
diff --git a/server/plugins-available/webserver_plugin.inc.php b/server/plugins-available/webserver_plugin.inc.php
index b39ac65da8..7d307233d8 100644
--- a/server/plugins-available/webserver_plugin.inc.php
+++ b/server/plugins-available/webserver_plugin.inc.php
@@ -54,7 +54,11 @@ class webserver_plugin {
 		global $app;
 
 		$app->plugins->registerAction('server_plugins_loaded', $this->plugin_name, 'check_phpini_changes');
+
 		$app->plugins->registerEvent('server_update', $this->plugin_name, 'server_update');
+
+		$app->plugins->registerEvent('server_php_insert', $this->plugin_name, 'server_php_update');
+		$app->plugins->registerEvent('server_php_update', $this->plugin_name, 'server_php_update');
 	}
 
 	/**
@@ -184,6 +188,36 @@ class webserver_plugin {
 		unset($processed);
 	}
 
+	/**
+	 * The method runs each php.ini file through verify_php_ini()
+	 */
+	function server_php_update($event_name, $data) {
+		global $app, $conf;
+
+		if(isset($data['new']['php_fastcgi_ini_dir'])) {
+			$php_ini = $data['new']['php_fastcgi_ini_dir'] . '/php.ini';
+			if(file_exists($php_ini)) {
+				$this->verify_php_ini(array('file' => $php_ini,
+					'mode' => 'fast-cgi',
+					'php_version' => $data['new']['server_php_id'])
+				);
+			} else {
+				$app->log("Cannot verify php.ini, file not found: $php_ini", LOGLEVEL_WARN);
+			}
+		}
+		if(isset($data['new']['php_fpm_ini_dir'])) {
+			$php_ini = $data['new']['php_fpm_ini_dir'] . '/php.ini';
+			if(file_exists($php_ini)) {
+				$this->verify_php_ini(array('file' => $php_ini,
+					'mode' => 'php-fpm',
+					'php_version' => $data['new']['server_php_id'])
+				);
+			} else {
+				$app->log("Cannot verify php.ini, file not found: $php_ini", LOGLEVEL_WARN);
+			}
+		}
+	}
+
 	/**
 	 * The method checks/sets needed php.ini settings
 	 */
@@ -281,7 +315,32 @@ class webserver_plugin {
 				}
 			}
 		}
+
+		$check_files = array();
+		if ($old['php_ini_path_apache'] != $new['php_ini_path_apache']) {
+			$check_files[] = array('file' => $new['php_ini_path_apache'],
+				'mode' => 'mod',
+				'php_version' => 0);
+		}
+
+		if ($old['fastcgi_phpini_path'] != $new['fastcgi_phpini_path']) {
+			$check_files[] = array('file' => $new['fastcgi_phpini_path'],
+				'mode' => 'fast-cgi',
+				'php_version' => 0);
+		}
+		if ($old['php_ini_path_cgi'] != $new['php_ini_path_cgi']) {
+			$check_files[] = array('file' => $new['php_ini_path_cgi'],
+				'mode' => 'fast-cgi',
+				'php_version' => 0);
+		}
+		if ($old['php_fpm_ini_path'] != $new['php_fpm_ini_path']) {
+			$check_files[] = array('file' => $web_config['php_fpm_ini_path'],
+				'mode' => 'php-fpm',
+				'php_version' => 0);
+		}
+		foreach ($check_files as $file) {
+			$this->verify_php_ini($file);
+		}
 	}
 }
 
-?>
-- 
GitLab


From d78fc43c31c7352849eea020669ac35a8a41cd8e Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 19 Aug 2021 10:17:20 +0000
Subject: [PATCH 431/441] Update installer_base.lib.php

---
 install/lib/installer_base.lib.php | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index ec94fd4acf..d1a17f642e 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2792,6 +2792,7 @@ class installer_base {
 			$server_name = exec('hostname -f');
 		}
 
+		$reload_web_server = false;
 		$use_template = 'apache_acme.conf.master';
 		$use_symlink = '999-acme.conf';
 		$use_name = 'acme.conf';
@@ -2823,10 +2824,18 @@ class installer_base {
 
 		if(@is_link($vhost_conf_enabled_dir.'/' . $use_symlink)) {
 			unlink($vhost_conf_enabled_dir.'/' . $use_symlink);
+			$reload_web_server = true;
 		}
 		if(!@is_link($vhost_conf_enabled_dir.'/' . $use_symlink)) {
 			symlink($vhost_conf_dir.'/' . $use_name, $vhost_conf_enabled_dir.'/' . $use_symlink);
 		}
+
+		if($reload_web_server == true) {
+			if($conf['apache']['installed'] == true && $conf['apache']['init_script'] != '') system($this->getinitcommand($conf['apache']['init_script'], 'reload'));
+//* Reload is enough for nginx
+			if($conf['nginx']['installed'] == true && $conf['nginx']['php_fpm_init_script'] != '') system($this->getinitcommand($conf['nginx']['php_fpm_init_script'], 'reload'));
+		}
+
 	}
 
 	public function make_ispconfig_ssl_cert() {
-- 
GitLab


From cdf8f7ca6ab9d6b6575bce8f6d24ab7f7dbacebd Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 19 Aug 2021 13:14:21 +0000
Subject: [PATCH 432/441] Update installer_base.lib.php

---
 install/lib/installer_base.lib.php | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index d1a17f642e..e072055521 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2792,7 +2792,6 @@ class installer_base {
 			$server_name = exec('hostname -f');
 		}
 
-		$reload_web_server = false;
 		$use_template = 'apache_acme.conf.master';
 		$use_symlink = '999-acme.conf';
 		$use_name = 'acme.conf';
@@ -2824,18 +2823,10 @@ class installer_base {
 
 		if(@is_link($vhost_conf_enabled_dir.'/' . $use_symlink)) {
 			unlink($vhost_conf_enabled_dir.'/' . $use_symlink);
-			$reload_web_server = true;
 		}
 		if(!@is_link($vhost_conf_enabled_dir.'/' . $use_symlink)) {
 			symlink($vhost_conf_dir.'/' . $use_name, $vhost_conf_enabled_dir.'/' . $use_symlink);
 		}
-
-		if($reload_web_server == true) {
-			if($conf['apache']['installed'] == true && $conf['apache']['init_script'] != '') system($this->getinitcommand($conf['apache']['init_script'], 'reload'));
-//* Reload is enough for nginx
-			if($conf['nginx']['installed'] == true && $conf['nginx']['php_fpm_init_script'] != '') system($this->getinitcommand($conf['nginx']['php_fpm_init_script'], 'reload'));
-		}
-
 	}
 
 	public function make_ispconfig_ssl_cert() {
@@ -3035,6 +3026,9 @@ class installer_base {
 				# acme.sh does not set umask, resulting in incorrect permissions (ispconfig issue #6015)
 				$old_umask = umask(0022);
 
+				// Switch from zerossl to letsencrypt CA
+				exec("$acme --set-default-ca  --server  letsencrypt");
+
 				$out = null;
 				$ret = null;
 				if($conf['nginx']['installed'] == true || $conf['apache']['installed'] == true) {
-- 
GitLab


From bd55918d069ecc143f606153679bd18d1e87b5e2 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 19 Aug 2021 16:35:38 +0200
Subject: [PATCH 433/441] Add Debian 11 (Bullseye) to OS detection code in
 ISPConfig and update config for Debian testing (Sid)

---
 install/dist/conf/debian110.conf.php     | 239 +++++++++++++++++++++++
 install/dist/conf/debiantesting.conf.php |  16 +-
 install/lib/install.lib.php              |   7 +
 server/lib/classes/monitor_tools.inc.php |   6 +
 4 files changed, 260 insertions(+), 8 deletions(-)
 create mode 100644 install/dist/conf/debian110.conf.php

diff --git a/install/dist/conf/debian110.conf.php b/install/dist/conf/debian110.conf.php
new file mode 100644
index 0000000000..c60152df5c
--- /dev/null
+++ b/install/dist/conf/debian110.conf.php
@@ -0,0 +1,239 @@
+<?php
+
+/*
+Copyright (c) 2021, Till Brehm, ISPConfig UG
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+//***  Debian 11 default settings
+
+//* Main
+$conf['language'] = 'en';
+$conf['distname'] = 'debian110';
+$conf['hostname'] = 'server1.domain.tld'; // Full hostname
+$conf['ispconfig_install_dir'] = '/usr/local/ispconfig';
+$conf['ispconfig_config_dir'] = '/usr/local/ispconfig';
+$conf['ispconfig_log_priority'] = 2;  // 0 = Debug, 1 = Warning, 2 = Error
+$conf['ispconfig_log_dir'] = '/var/log/ispconfig';
+$conf['server_id'] = 1;
+$conf['init_scripts'] = '/etc/init.d';
+$conf['runlevel'] = '/etc';
+$conf['shells'] = '/etc/shells';
+$conf['pam'] = '/etc/pam.d';
+
+//* Services provided by this server, this selection will be overridden by the expert mode
+$conf['services']['mail'] = true;
+$conf['services']['web'] = true;
+$conf['services']['dns'] = true;
+$conf['services']['file'] = true;
+$conf['services']['db'] = true;
+$conf['services']['vserver'] = true;
+$conf['services']['proxy'] = false;
+$conf['services']['firewall'] = false;
+
+//* MySQL
+$conf['mysql']['installed'] = false; // will be detected automatically during installation
+$conf['mysql']['init_script'] = 'mysql';
+$conf['mysql']['host'] = 'localhost';
+$conf['mysql']['ip'] = '127.0.0.1';
+$conf['mysql']['port'] = '3306';
+$conf['mysql']['database'] = 'dbispconfig';
+$conf['mysql']['admin_user'] = 'root';
+$conf['mysql']['admin_password'] = '';
+$conf['mysql']['charset'] = 'utf8';
+$conf['mysql']['ispconfig_user'] = 'ispconfig';
+$conf['mysql']['ispconfig_password'] = md5(uniqid(rand()));
+$conf['mysql']['master_slave_setup'] = 'n';
+$conf['mysql']['master_host'] = '';
+$conf['mysql']['master_database'] = 'dbispconfig';
+$conf['mysql']['master_admin_user'] = 'root';
+$conf['mysql']['master_admin_password'] = '';
+$conf['mysql']['master_ispconfig_user'] = '';
+$conf['mysql']['master_ispconfig_password'] = md5(uniqid(rand()));
+
+//* Apache
+$conf['apache']['installed'] = false; // will be detected automatically during installation
+$conf['apache']['user'] = 'www-data';
+$conf['apache']['group'] = 'www-data';
+$conf['apache']['init_script'] = 'apache2';
+$conf['apache']['version'] = '2.4';
+$conf['apache']['vhost_conf_dir'] = '/etc/apache2/sites-available';
+$conf['apache']['vhost_conf_enabled_dir'] = '/etc/apache2/sites-enabled';
+$conf['apache']['vhost_port'] = '8080';
+$conf['apache']['php_ini_path_apache'] = '/etc/php/7.4/apache2/php.ini';
+$conf['apache']['php_ini_path_cgi'] = '/etc/php/7.4/cgi/php.ini';
+
+//* Website base settings
+$conf['web']['website_basedir'] = '/var/www';
+$conf['web']['website_path'] = '/var/www/clients/client[client_id]/web[website_id]';
+$conf['web']['website_symlinks'] = '/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/';
+
+//* Apps base settings
+$conf['web']['apps_vhost_ip'] = '_default_';
+$conf['web']['apps_vhost_port'] = '8081';
+$conf['web']['apps_vhost_servername'] = '';
+$conf['web']['apps_vhost_user'] = 'ispapps';
+$conf['web']['apps_vhost_group'] = 'ispapps';
+
+//* Fastcgi
+$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/7.4/cgi/';
+$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
+$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
+
+//* Postfix
+$conf['postfix']['installed'] = false; // will be detected automatically during installation
+$conf['postfix']['config_dir'] = '/etc/postfix';
+$conf['postfix']['init_script'] = 'postfix';
+$conf['postfix']['user'] = 'postfix';
+$conf['postfix']['group'] = 'postfix';
+$conf['postfix']['vmail_userid'] = '5000';
+$conf['postfix']['vmail_username'] = 'vmail';
+$conf['postfix']['vmail_groupid'] = '5000';
+$conf['postfix']['vmail_groupname'] = 'vmail';
+$conf['postfix']['vmail_mailbox_base'] = '/var/vmail';
+
+//* Mailman
+$conf['mailman']['installed'] = false; // will be detected automatically during installation
+$conf['mailman']['config_dir'] = '/etc/mailman';
+$conf['mailman']['init_script'] = 'mailman';
+
+//* mlmmj
+$conf['mlmmj']['installed'] = false; // will be detected automatically during installation
+$conf['mlmmj']['config_dir'] = '/etc/mlmmj';
+
+//* Getmail
+$conf['getmail']['installed'] = false; // will be detected automatically during installation
+$conf['getmail']['config_dir'] = '/etc/getmail';
+$conf['getmail']['program'] = '/usr/bin/getmail';
+
+//* Courier
+$conf['courier']['installed'] = false; // will be detected automatically during installation
+$conf['courier']['config_dir'] = '/etc/courier';
+$conf['courier']['courier-authdaemon'] = 'courier-authdaemon';
+$conf['courier']['courier-imap'] = 'courier-imap';
+$conf['courier']['courier-imap-ssl'] = 'courier-imap-ssl';
+$conf['courier']['courier-pop'] = 'courier-pop';
+$conf['courier']['courier-pop-ssl'] = 'courier-pop-ssl';
+
+//* Dovecot
+$conf['dovecot']['installed'] = false; // will be detected automatically during installation
+$conf['dovecot']['config_dir'] = '/etc/dovecot';
+$conf['dovecot']['init_script'] = 'dovecot';
+
+//* SASL
+$conf['saslauthd']['installed'] = false; // will be detected automatically during installation
+$conf['saslauthd']['config'] = '/etc/default/saslauthd';
+$conf['saslauthd']['init_script'] = 'saslauthd';
+
+//* Amavisd
+$conf['amavis']['installed'] = false; // will be detected automatically during installation
+$conf['amavis']['config_dir'] = '/etc/amavis';
+$conf['amavis']['init_script'] = 'amavis';
+
+//* Rspamd
+$conf['rspamd']['installed'] = false; // will be detected automatically during installation
+$conf['rspamd']['config_dir'] = '/etc/rspamd';
+$conf['rspamd']['init_script'] = 'rspamd';
+
+//* ClamAV
+$conf['clamav']['installed'] = false; // will be detected automatically during installation
+$conf['clamav']['init_script'] = 'clamav-daemon';
+
+//* Pureftpd
+$conf['pureftpd']['installed'] = false; // will be detected automatically during installation
+$conf['pureftpd']['config_dir'] = '/etc/pure-ftpd';
+$conf['pureftpd']['init_script'] = 'pure-ftpd-mysql';
+
+//* MyDNS
+$conf['mydns']['installed'] = false; // will be detected automatically during installation
+$conf['mydns']['config_dir'] = '/etc';
+$conf['mydns']['init_script'] = 'mydns';
+
+//* PowerDNS
+$conf['powerdns']['installed'] = false; // will be detected automatically during installation
+$conf['powerdns']['database'] = 'powerdns';
+$conf["powerdns"]["config_dir"] = '/etc/powerdns/pdns.d';
+$conf['powerdns']['init_script'] = 'pdns';
+
+//* BIND DNS Server
+$conf['bind']['installed'] = false; // will be detected automatically during installation
+$conf['bind']['bind_user'] = 'root';
+$conf['bind']['bind_group'] = 'bind';
+$conf['bind']['bind_zonefiles_dir'] = '/etc/bind';
+$conf['bind']['named_conf_path'] = '/etc/bind/named.conf';
+$conf['bind']['named_conf_local_path'] = '/etc/bind/named.conf.local';
+$conf['bind']['init_script'] = 'bind9';
+
+//* Jailkit
+$conf['jailkit']['installed'] = false; // will be detected automatically during installation
+$conf['jailkit']['config_dir'] = '/etc/jailkit';
+$conf['jailkit']['jk_init'] = 'jk_init.ini';
+$conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini';
+$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico /usr/bin/mysql /usr/bin/mysqldump /usr/bin/git /usr/bin/git-receive-pack /usr/bin/git-upload-pack /usr/bin/unzip /usr/bin/zip /bin/tar /bin/rm /usr/bin/patch';
+$conf['jailkit']['jailkit_chroot_cron_programs'] = '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php';
+
+//* Squid
+$conf['squid']['installed'] = false; // will be detected automatically during installation
+$conf['squid']['config_dir'] = '/etc/squid';
+$conf['squid']['init_script'] = 'squid';
+
+//* Nginx
+$conf['nginx']['installed'] = false; // will be detected automatically during installation
+$conf['nginx']['user'] = 'www-data';
+$conf['nginx']['group'] = 'www-data';
+$conf['nginx']['config_dir'] = '/etc/nginx';
+$conf['nginx']['vhost_conf_dir'] = '/etc/nginx/sites-available';
+$conf['nginx']['vhost_conf_enabled_dir'] = '/etc/nginx/sites-enabled';
+$conf['nginx']['init_script'] = 'nginx';
+$conf['nginx']['vhost_port'] = '8080';
+$conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket';
+$conf['nginx']['php_fpm_init_script'] = 'php7.4-fpm';
+$conf['nginx']['php_fpm_ini_path'] = '/etc/php/7.4/fpm/php.ini';
+$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.4/fpm/pool.d';
+$conf['nginx']['php_fpm_start_port'] = 9010;
+$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.4-fpm';
+
+//* OpenVZ
+$conf['openvz']['installed'] = false;
+
+//*Bastille-Firwall
+$conf['bastille']['installed'] = false;
+$conf['bastille']['config_dir'] = '/etc/Bastille';
+
+//* vlogger
+$conf['vlogger']['config_dir'] = '/etc';
+
+//* cron
+$conf['cron']['init_script'] = 'cron';
+$conf['cron']['crontab_dir'] = '/etc/cron.d';
+$conf['cron']['wget'] = '/usr/bin/wget';
+
+//* Metronome XMPP
+$conf['xmpp']['installed'] = false;
+$conf['xmpp']['init_script'] = 'metronome';
+
+
+?>
diff --git a/install/dist/conf/debiantesting.conf.php b/install/dist/conf/debiantesting.conf.php
index 6ea9112dff..cbc380fffb 100644
--- a/install/dist/conf/debiantesting.conf.php
+++ b/install/dist/conf/debiantesting.conf.php
@@ -32,7 +32,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 //* Main
 $conf['language'] = 'en';
-$conf['distname'] = 'debian100';
+$conf['distname'] = 'debian110';
 $conf['hostname'] = 'server1.domain.tld'; // Full hostname
 $conf['ispconfig_install_dir'] = '/usr/local/ispconfig';
 $conf['ispconfig_config_dir'] = '/usr/local/ispconfig';
@@ -83,8 +83,8 @@ $conf['apache']['version'] = '2.4';
 $conf['apache']['vhost_conf_dir'] = '/etc/apache2/sites-available';
 $conf['apache']['vhost_conf_enabled_dir'] = '/etc/apache2/sites-enabled';
 $conf['apache']['vhost_port'] = '8080';
-$conf['apache']['php_ini_path_apache'] = '/etc/php/7.3/apache2/php.ini';
-$conf['apache']['php_ini_path_cgi'] = '/etc/php/7.3/cgi/php.ini';
+$conf['apache']['php_ini_path_apache'] = '/etc/php/7.4/apache2/php.ini';
+$conf['apache']['php_ini_path_cgi'] = '/etc/php/7.4/cgi/php.ini';
 
 //* Website base settings
 $conf['web']['website_basedir'] = '/var/www';
@@ -99,7 +99,7 @@ $conf['web']['apps_vhost_user'] = 'ispapps';
 $conf['web']['apps_vhost_group'] = 'ispapps';
 
 //* Fastcgi
-$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/7.3/cgi/';
+$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/7.4/cgi/';
 $conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
 $conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
 
@@ -210,11 +210,11 @@ $conf['nginx']['vhost_conf_enabled_dir'] = '/etc/nginx/sites-enabled';
 $conf['nginx']['init_script'] = 'nginx';
 $conf['nginx']['vhost_port'] = '8080';
 $conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket';
-$conf['nginx']['php_fpm_init_script'] = 'php7.3-fpm';
-$conf['nginx']['php_fpm_ini_path'] = '/etc/php/7.3/fpm/php.ini';
-$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.3/fpm/pool.d';
+$conf['nginx']['php_fpm_init_script'] = 'php7.4-fpm';
+$conf['nginx']['php_fpm_ini_path'] = '/etc/php/7.4/fpm/php.ini';
+$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.4/fpm/pool.d';
 $conf['nginx']['php_fpm_start_port'] = 9010;
-$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.3-fpm';
+$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.4-fpm';
 
 //* OpenVZ
 $conf['openvz']['installed'] = false;
diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index 7a49939600..6ff32bb785 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -238,6 +238,13 @@ function get_distname() {
 			$distid = 'debian60';
 			$distbaseid = 'debian';
 			swriteln("Operating System: Debian 10.0 (Buster) or compatible\n");
+		} elseif(substr(trim(file_get_contents('/etc/debian_version')),0,2) == '11') {
+			$distname = 'Debian';
+			$distver = 'Bullseye';
+			$distconfid = 'debian110';
+			$distid = 'debian60';
+			$distbaseid = 'debian';
+			swriteln("Operating System: Debian 11.0 (Bullseye) or compatible\n");
 		} elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) {
 			$distname = 'Debian';
 			$distver = 'Testing';
diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index 9d7a225745..42ed9146e4 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -221,6 +221,12 @@ class monitor_tools {
 			$distconfid = 'debian100';
 			$distid = 'debian60';
 			$distbaseid = 'debian';
+		} elseif(substr(trim(file_get_contents('/etc/debian_version')),0,2) == '11') {
+			$distname = 'Debian';
+			$distver = 'Bullseye';
+			$distconfid = 'debian110';
+			$distid = 'debian60';
+			$distbaseid = 'debian';
 		} elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) {
 			$distname = 'Debian';
 			$distver = 'Testing';
-- 
GitLab


From 00c5a217a9dc91c19356a87195f4d5896452d199 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 20 Aug 2021 11:32:45 +0200
Subject: [PATCH 434/441] - fixed missing CSR in interface on creating
 self-signed cert

---
 server/plugins-available/apache2_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index b0f87c192b..3b5b290f33 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -353,10 +353,10 @@ class apache2_plugin {
 			if(is_file($ssl_cnf_file) && !is_link($ssl_cnf_file)) {
 				$openssl_cmd = 'openssl req -nodes -newkey rsa:4096 -x509 -days ? -keyout ? -out ? -config ?';
 				$app->system->exec_safe($openssl_cmd, $ssl_days, $openssl_cmd_key_file, $openssl_cmd_crt_file, $config_file);
+				$app->system->exec_safe("openssl req -new -sha256 -key ? -out ? -days ? -config ?", $openssl_cmd_key_file, $openssl_cmd_csr_file, $ssl_days, $config_file);
 
 				if(file_exists($web_config['CA_path'].'/openssl.cnf'))
 				{
-					$app->system->exec_safe("openssl req -new -sha256 -key ? -out ? -days ? -config ?", $openssl_cmd_key_file, $openssl_cmd_csr_file, $ssl_days, $config_file);
 					$app->system->exec_safe("openssl ca -batch -out ? -config ? -passin pass:? -in ? -extfile ?", $openssl_cmd_crt_file, $web_config['CA_path']."/openssl.cnf", $web_config['CA_pass'], $openssl_cmd_csr_file, $ssl_ext_file);
 					$app->log("Creating CA-signed SSL Cert for: $domain", LOGLEVEL_DEBUG);
 					if(filesize($crt_file) == 0 || !file_exists($crt_file)) {
-- 
GitLab


From 5f14605c125220dddc32973be21b761b808e964d Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 20 Aug 2021 11:39:14 +0200
Subject: [PATCH 435/441] - migrated apache2 code

---
 .../plugins-available/apache2_plugin.inc.php  |  2 +-
 server/plugins-available/nginx_plugin.inc.php | 45 +++++--------------
 2 files changed, 12 insertions(+), 35 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index b0f87c192b..3b5b290f33 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -353,10 +353,10 @@ class apache2_plugin {
 			if(is_file($ssl_cnf_file) && !is_link($ssl_cnf_file)) {
 				$openssl_cmd = 'openssl req -nodes -newkey rsa:4096 -x509 -days ? -keyout ? -out ? -config ?';
 				$app->system->exec_safe($openssl_cmd, $ssl_days, $openssl_cmd_key_file, $openssl_cmd_crt_file, $config_file);
+				$app->system->exec_safe("openssl req -new -sha256 -key ? -out ? -days ? -config ?", $openssl_cmd_key_file, $openssl_cmd_csr_file, $ssl_days, $config_file);
 
 				if(file_exists($web_config['CA_path'].'/openssl.cnf'))
 				{
-					$app->system->exec_safe("openssl req -new -sha256 -key ? -out ? -days ? -config ?", $openssl_cmd_key_file, $openssl_cmd_csr_file, $ssl_days, $config_file);
 					$app->system->exec_safe("openssl ca -batch -out ? -config ? -passin pass:? -in ? -extfile ?", $openssl_cmd_crt_file, $web_config['CA_path']."/openssl.cnf", $web_config['CA_pass'], $openssl_cmd_csr_file, $ssl_ext_file);
 					$app->log("Creating CA-signed SSL Cert for: $domain", LOGLEVEL_DEBUG);
 					if(filesize($crt_file) == 0 || !file_exists($crt_file)) {
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 2a1ba6c13a..ba80e7a135 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -112,7 +112,6 @@ class nginx_plugin {
 		$ssl_dir = $data['new']['document_root'].'/ssl';
 		$domain = ($data['new']['ssl_domain'] != '') ? $data['new']['ssl_domain'] : $data['new']['domain'];
 		$key_file = $ssl_dir.'/'.$domain.'.key';
-		$key_file2 = $ssl_dir.'/'.$domain.'.key.org';
 		$csr_file = $ssl_dir.'/'.$domain.'.csr';
 		$crt_file = $ssl_dir.'/'.$domain.'.crt';
 
@@ -126,10 +125,6 @@ class nginx_plugin {
 				$app->system->rename($key_file, $key_file.'.bak');
 				$app->system->chmod($key_file.'.bak', 0400);
 			}
-			if(file_exists($key_file2)){
-				$app->system->rename($key_file2, $key_file2.'.bak');
-				$app->system->chmod($key_file2.'.bak', 0400);
-			}
 			if(file_exists($csr_file)) $app->system->rename($csr_file, $csr_file.'.bak');
 			if(file_exists($crt_file)) $app->system->rename($crt_file, $crt_file.'.bak');
 
@@ -179,42 +174,35 @@ class nginx_plugin {
 			$ssl_ext_file = $ssl_dir.'/v3.ext';
 			$app->system->file_put_contents($ssl_ext_file, $ext_cnf);
 
-			$rand_file = $rand_file;
-			$key_file2 = $key_file2;
-			$openssl_cmd_key_file2 = $key_file2;
-			if(substr($domain, 0, 2) == '*.' && strpos($key_file2, '/ssl/\*.') !== false) $key_file2 = str_replace('/ssl/\*.', '/ssl/*.', $key_file2); // wildcard certificate
-			$key_file = $key_file;
 			$openssl_cmd_key_file = $key_file;
 			if(substr($domain, 0, 2) == '*.' && strpos($key_file, '/ssl/\*.') !== false) $key_file = str_replace('/ssl/\*.', '/ssl/*.', $key_file); // wildcard certificate
 			$ssl_days = 3650;
-			$csr_file = $csr_file;
 			$openssl_cmd_csr_file = $csr_file;
 			if(substr($domain, 0, 2) == '*.' && strpos($csr_file, '/ssl/\*.') !== false) $csr_file = str_replace('/ssl/\*.', '/ssl/*.', $csr_file); // wildcard certificate
 			$config_file = $ssl_cnf_file;
-			$crt_file = $crt_file;
 			$openssl_cmd_crt_file = $crt_file;
 			if(substr($domain, 0, 2) == '*.' && strpos($crt_file, '/ssl/\*.') !== false) $crt_file = str_replace('/ssl/\*.', '/ssl/*.', $crt_file); // wildcard certificate
 
 			if(is_file($ssl_cnf_file) && !is_link($ssl_cnf_file)) {
-
-				$app->system->exec_safe("openssl genrsa -des3 -rand ? -passout pass:? -out ? 2048", $rand_file, $ssl_password, $openssl_cmd_key_file2);
-				$app->system->exec_safe("openssl req -new -sha256 -passin pass:? -passout pass:? -key ? -out ? -days ? -config ?", $ssl_password, $ssl_password, $openssl_cmd_key_file2, $openssl_cmd_csr_file, $ssl_days, $config_file);
-				$app->system->exec_safe("openssl rsa -passin pass:? -in ? -out ?", $ssl_password, $openssl_cmd_key_file2, $openssl_cmd_key_file);
+				$openssl_cmd = 'openssl req -nodes -newkey rsa:4096 -x509 -days ? -keyout ? -out ? -config ?';
+				$app->system->exec_safe($openssl_cmd, $ssl_days, $openssl_cmd_key_file, $openssl_cmd_crt_file, $config_file);
+				$app->system->exec_safe("openssl req -new -sha256 -key ? -out ? -days ? -config ?", $openssl_cmd_key_file, $openssl_cmd_csr_file, $ssl_days, $config_file);
 
 				if(file_exists($web_config['CA_path'].'/openssl.cnf'))
 				{
 					$app->system->exec_safe("openssl ca -batch -out ? -config ? -passin pass:? -in ? -extfile ?", $openssl_cmd_crt_file, $web_config['CA_path']."/openssl.cnf", $web_config['CA_pass'], $openssl_cmd_csr_file, $ssl_ext_file);
 					$app->log("Creating CA-signed SSL Cert for: $domain", LOGLEVEL_DEBUG);
-					if (filesize($crt_file)==0 || !file_exists($crt_file)) $app->log("CA-Certificate signing failed.  openssl ca -out $openssl_cmd_crt_file -config ".$web_config['CA_path']."/openssl.cnf -passin pass:".$web_config['CA_pass']." -in $openssl_cmd_csr_file -extfile $ssl_ext_file", LOGLEVEL_ERROR);
-				};
+					if(filesize($crt_file) == 0 || !file_exists($crt_file)) {
+						$app->log("CA-Certificate signing failed.  openssl ca -out $openssl_cmd_crt_file -config " . $web_config['CA_path'] . "/openssl.cnf -passin pass:" . $web_config['CA_pass'] . " -in $openssl_cmd_csr_file -extfile $ssl_ext_file", LOGLEVEL_ERROR);
+					}
+				}
 				if (@filesize($crt_file)==0 || !file_exists($crt_file)){
-					$app->system->exec_safe("openssl req -x509 -passin pass:? -passout pass:? -key ? -in ? -out ? -days ? -config ?", $ssl_password, $ssl_password, $openssl_cmd_key_file2, $openssl_cmd_csr_file, $openssl_cmd_crt_file, $ssl_days, $config_file);
+					$app->system->exec_safe($openssl_cmd, $ssl_days, $openssl_cmd_key_file, $openssl_cmd_crt_file, $config_file);
 					$app->log("Creating self-signed SSL Cert for: $domain", LOGLEVEL_DEBUG);
-				};
+				}
 
 			}
 
-			$app->system->chmod($key_file2, 0400);
 			$app->system->chmod($key_file, 0400);
 			@$app->system->unlink($config_file);
 			@$app->system->unlink($rand_file);
@@ -276,10 +264,7 @@ class nginx_plugin {
 				$app->system->copy($key_file, $key_file.'~');
 				$app->system->chmod($key_file.'~', 0400);
 			}
-			if(file_exists($key_file2)){
-				$app->system->copy($key_file2, $key_file2.'~');
-				$app->system->chmod($key_file2.'~', 0400);
-			}
+
 			if(file_exists($csr_file)) $app->system->copy($csr_file, $csr_file.'~');
 			if(file_exists($crt_file)) $app->system->copy($crt_file, $crt_file.'~');
 
@@ -1377,7 +1362,6 @@ class nginx_plugin {
 		$tmp = $app->letsencrypt->get_website_certificate_paths($data);
 		$domain = $tmp['domain'];
 		$key_file = $tmp['key'];
-		$key_file2 = $tmp['key2'];
 		$csr_file = $tmp['csr'];
 		$crt_file = $tmp['crt'];
 		$bundle_file = $tmp['bundle'];
@@ -2080,8 +2064,7 @@ class nginx_plugin {
 
 					$ssl_dir = $data['new']['document_root'].'/ssl';
 					$domain = $data['new']['ssl_domain'];
-					$key_file = $ssl_dir.'/'.$domain.'.key.org';
-					$key_file2 = $ssl_dir.'/'.$domain.'.key';
+					$key_file = $ssl_dir.'/'.$domain.'.key';
 					$csr_file = $ssl_dir.'/'.$domain.'.csr';
 					$crt_file = $ssl_dir.'/'.$domain.'.crt';
 					//$bundle_file = $ssl_dir.'/'.$domain.'.bundle';
@@ -2091,17 +2074,12 @@ class nginx_plugin {
 						$app->system->copy($key_file, $key_file.'.err');
 						$app->system->chmod($key_file.'.err', 0400);
 					}
-					if(is_file($key_file2)){
-						$app->system->copy($key_file2, $key_file2.'.err');
-						$app->system->chmod($key_file2.'.err', 0400);
-					}
 					if(is_file($csr_file)) $app->system->copy($csr_file, $csr_file.'.err');
 					if(is_file($crt_file)) $app->system->copy($crt_file, $crt_file.'.err');
 					//if(is_file($bundle_file)) $app->system->copy($bundle_file,$bundle_file.'.err');
 
 					//* Restore the ~ backup files
 					if(is_file($key_file.'~')) $app->system->copy($key_file.'~', $key_file);
-					if(is_file($key_file2.'~')) $app->system->copy($key_file2.'~', $key_file2);
 					if(is_file($crt_file.'~')) $app->system->copy($crt_file.'~', $crt_file);
 					if(is_file($csr_file.'~')) $app->system->copy($csr_file.'~', $csr_file);
 					//if(is_file($bundle_file.'~')) $app->system->copy($bundle_file.'~',$bundle_file);
@@ -2121,7 +2099,6 @@ class nginx_plugin {
 		$this->ssl_certificate_changed = false;
 
 		if(@is_file($key_file.'~')) $app->system->unlink($key_file.'~');
-		if(@is_file($key_file2.'~')) $app->system->unlink($key_file2.'~');
 		if(@is_file($crt_file.'~')) $app->system->unlink($crt_file.'~');
 		if(@is_file($csr_file.'~')) $app->system->unlink($csr_file.'~');
 		//if(@is_file($bundle_file.'~')) $app->system->unlink($bundle_file.'~');
-- 
GitLab


From caede4c953779cdf3c0dab876c346eaec93a499b Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Fri, 20 Aug 2021 11:04:56 -0600
Subject: [PATCH 436/441] installer: remove dangling letsencrypt hook symlinks

---
 install/lib/installer_base.lib.php | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index e072055521..103abaef19 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2923,16 +2923,25 @@ class installer_base {
 			// This script is needed earlier to check and open http port 80 or standalone might fail
 			// Make executable and temporary symlink latest letsencrypt pre, post and renew hook script before install
 			if(file_exists(ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_pre_hook.sh') && !file_exists('/usr/local/bin/letsencrypt_pre_hook.sh')) {
+				if(is_link('/usr/local/bin/letsencrypt_pre_hook.sh')) {
+					unlink('/usr/local/bin/letsencrypt_pre_hook.sh');
+				}
 				symlink(ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_pre_hook.sh', '/usr/local/bin/letsencrypt_pre_hook.sh');
 				chown('/usr/local/bin/letsencrypt_pre_hook.sh', 'root');
 				chmod('/usr/local/bin/letsencrypt_pre_hook.sh', 0700);
 			}
 			if(file_exists(ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_post_hook.sh') && !file_exists('/usr/local/bin/letsencrypt_post_hook.sh')) {
+				if(is_link('/usr/local/bin/letsencrypt_post_hook.sh')) {
+					unlink('/usr/local/bin/letsencrypt_post_hook.sh');
+				}
 				symlink(ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_post_hook.sh', '/usr/local/bin/letsencrypt_post_hook.sh');
 				chown('/usr/local/bin/letsencrypt_post_hook.sh', 'root');
 				chmod('/usr/local/bin/letsencrypt_post_hook.sh', 0700);
 			}
 			if(file_exists(ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_renew_hook.sh') && !file_exists('/usr/local/bin/letsencrypt_renew_hook.sh')) {
+				if(is_link('/usr/local/bin/letsencrypt_renew_hook.sh')) {
+					unlink('/usr/local/bin/letsencrypt_renew_hook.sh');
+				}
 				symlink(ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_renew_hook.sh', '/usr/local/bin/letsencrypt_renew_hook.sh');
 				chown('/usr/local/bin/letsencrypt_renew_hook.sh', 'root');
 				chmod('/usr/local/bin/letsencrypt_renew_hook.sh', 0700);
-- 
GitLab


From b6698e0852bcba04839052e831c90ff3cedec817 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 19 Aug 2021 15:55:10 -0600
Subject: [PATCH 437/441] mail_forwarding source must be unique

---
 install/sql/incremental/upd_dev_collection.sql  | 4 ++++
 install/sql/ispconfig3.sql                      | 2 +-
 interface/web/mail/form/mail_alias.tform.php    | 2 ++
 interface/web/mail/form/mail_forward.tform.php  | 2 ++
 interface/web/mail/lib/lang/ar_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/ar_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/bg_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/bg_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/br_mail_forward.lng | 1 +
 interface/web/mail/lib/lang/ca_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/ca_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/cz_mail_forward.lng | 1 +
 interface/web/mail/lib/lang/de_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/de_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/dk_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/dk_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/el_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/el_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/en_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/en_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/es_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/es_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/fi_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/fi_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/fr_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/fr_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/hr_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/hr_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/hu_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/hu_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/id_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/id_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/it_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/it_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/ja_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/ja_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/nl_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/nl_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/pl_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/pl_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/pt_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/pt_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/ro_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/ro_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/ru_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/ru_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/se_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/se_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/sk_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/sk_mail_forward.lng | 2 +-
 interface/web/mail/lib/lang/tr_mail_alias.lng   | 1 -
 interface/web/mail/lib/lang/tr_mail_forward.lng | 2 +-
 52 files changed, 34 insertions(+), 47 deletions(-)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 2a9a9ffd09..75a6b01d93 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1,2 +1,6 @@
 -- default spamfilter_users.policy_id to 0
 ALTER TABLE `spamfilter_users` ALTER `policy_id` SET DEFAULT 0;
+
+-- mail_forwarding.source must be unique
+ALTER TABLE `mail_forwarding` DROP KEY `server_id`;
+ALTER TABLE `mail_forwarding` ADD UNIQUE KEY `server_id` (`server_id`, `source`);
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 9ebb69090f..709fa09c79 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -916,7 +916,7 @@ CREATE TABLE `mail_forwarding` (
   `allow_send_as` ENUM('n','y') NOT NULL DEFAULT 'n',
   `greylisting` enum('n','y' ) NOT NULL DEFAULT 'n',
   PRIMARY KEY  (`forwarding_id`),
-  KEY `server_id` (`server_id`,`source`),
+  UNIQUE KEY `server_id` (`server_id`, `source`),
   KEY `type` (`type`)
 ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
diff --git a/interface/web/mail/form/mail_alias.tform.php b/interface/web/mail/form/mail_alias.tform.php
index 9434ba3eec..39b485c7a5 100644
--- a/interface/web/mail/form/mail_alias.tform.php
+++ b/interface/web/mail/form/mail_alias.tform.php
@@ -83,6 +83,8 @@ $form["tabs"]['alias'] = array (
 			),
 			'validators' => array (  0 => array ( 'type' => 'ISEMAIL',
 					'errmsg'=> 'email_error_isemail'),
+				1 => array ( 'type' => 'UNIQUE',
+					'errmsg'=> 'email_error_unique'),
 			),
 			'default' => '',
 			'value'  => '',
diff --git a/interface/web/mail/form/mail_forward.tform.php b/interface/web/mail/form/mail_forward.tform.php
index 003e678455..db940f035e 100644
--- a/interface/web/mail/form/mail_forward.tform.php
+++ b/interface/web/mail/form/mail_forward.tform.php
@@ -83,6 +83,8 @@ $form["tabs"]['forward'] = array (
 			),
 			'validators' => array (  0 => array ( 'type' => 'ISEMAIL',
 					'errmsg'=> 'email_error_isemail'),
+				1 => array ( 'type' => 'UNIQUE',
+					'errmsg'=> 'email_error_unique'),
 			),
 			'default' => '',
 			'value'  => '',
diff --git a/interface/web/mail/lib/lang/ar_mail_alias.lng b/interface/web/mail/lib/lang/ar_mail_alias.lng
index 32a6b85e4e..98921ce7ce 100644
--- a/interface/web/mail/lib/lang/ar_mail_alias.lng
+++ b/interface/web/mail/lib/lang/ar_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/ar_mail_forward.lng b/interface/web/mail/lib/lang/ar_mail_forward.lng
index 3f9cfa956b..4291bd415c 100644
--- a/interface/web/mail/lib/lang/ar_mail_forward.lng
+++ b/interface/web/mail/lib/lang/ar_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Duplicate Emailaddress.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/bg_mail_alias.lng b/interface/web/mail/lib/lang/bg_mail_alias.lng
index 32a6b85e4e..98921ce7ce 100644
--- a/interface/web/mail/lib/lang/bg_mail_alias.lng
+++ b/interface/web/mail/lib/lang/bg_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/bg_mail_forward.lng b/interface/web/mail/lib/lang/bg_mail_forward.lng
index b5c80dd89d..1e12ca1ece 100644
--- a/interface/web/mail/lib/lang/bg_mail_forward.lng
+++ b/interface/web/mail/lib/lang/bg_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Duplicate Emailaddress.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/br_mail_forward.lng b/interface/web/mail/lib/lang/br_mail_forward.lng
index dd1eb9bb56..396262d787 100644
--- a/interface/web/mail/lib/lang/br_mail_forward.lng
+++ b/interface/web/mail/lib/lang/br_mail_forward.lng
@@ -9,6 +9,7 @@ $wb['source_txt'] = 'Endereço de email de origem';
 $wb['destination_error_empty'] = 'O endereço de email de destino não pode ficar vazio.';
 $wb['destination_error_isemail'] = 'O endereço de email de destino é inválido.';
 $wb['email_error_isemail'] = 'Por favor informe um endereço de email válido.';
+$wb['email_error_unique'] = 'Endereço de email duplicado.';
 $wb['send_as_txt'] = 'Enviar como';
 $wb['send_as_exp'] = 'Permitir o destino enviar emails usando este endereço como origem (se o destino for interno)';
 $wb['greylisting_txt'] = 'Habilitar greylist';
diff --git a/interface/web/mail/lib/lang/ca_mail_alias.lng b/interface/web/mail/lib/lang/ca_mail_alias.lng
index a1c3eacb67..0b8d9b0e45 100644
--- a/interface/web/mail/lib/lang/ca_mail_alias.lng
+++ b/interface/web/mail/lib/lang/ca_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/ca_mail_forward.lng b/interface/web/mail/lib/lang/ca_mail_forward.lng
index 7b8feb1e8f..2f9d26288f 100644
--- a/interface/web/mail/lib/lang/ca_mail_forward.lng
+++ b/interface/web/mail/lib/lang/ca_mail_forward.lng
@@ -9,7 +9,7 @@ $wb['source_txt'] = 'Source courriel';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Dupliquer l\'adresse courriel.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/cz_mail_forward.lng b/interface/web/mail/lib/lang/cz_mail_forward.lng
index f1deae4081..1faa74c26c 100644
--- a/interface/web/mail/lib/lang/cz_mail_forward.lng
+++ b/interface/web/mail/lib/lang/cz_mail_forward.lng
@@ -9,6 +9,7 @@ $wb['source_txt'] = 'Zdrojový e-mail';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Zadejte prosím platnou e-mailovou adresu.';
+$wb['email_error_unique'] = 'Duplikování e-mailové adresy.';
 $wb['send_as_txt'] = 'Odeslat jako';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
 $wb['greylisting_txt'] = 'Povolit greylisting';
diff --git a/interface/web/mail/lib/lang/de_mail_alias.lng b/interface/web/mail/lib/lang/de_mail_alias.lng
index 4cdcd03a6f..7d8099fdca 100644
--- a/interface/web/mail/lib/lang/de_mail_alias.lng
+++ b/interface/web/mail/lib/lang/de_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['send_as_txt'] = 'Senden als';
 $wb['send_as_exp'] = 'Ziel erlauben, den Alias als Absender zu benutzen';
 $wb['greylisting_txt'] = 'Aktiviere Greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/de_mail_forward.lng b/interface/web/mail/lib/lang/de_mail_forward.lng
index 4825ef7811..4435ce707c 100644
--- a/interface/web/mail/lib/lang/de_mail_forward.lng
+++ b/interface/web/mail/lib/lang/de_mail_forward.lng
@@ -9,7 +9,7 @@ $wb['source_txt'] = 'Quell E-Mail Adresse';
 $wb['destination_error_empty'] = 'Das Weiterleitungsziel darf nicht leer sein.';
 $wb['destination_error_isemail'] = 'Das Weiterleitungsziel enthält mindestens eine ungültige E-Mail-Adresse.';
 $wb['email_error_isemail'] = 'Bitte geben Sie eine gültige E-Mail Adresse an.';
+$wb['email_error_unique'] = 'Doppelte E-Mail Adresse.';
 $wb['send_as_txt'] = 'Senden als';
 $wb['send_as_exp'] = 'Ziel erlauben, die Adresse als Absender zu nutzen (Nur, falls das Ziel intern ist)';
 $wb['greylisting_txt'] = 'Aktiviere greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/dk_mail_alias.lng b/interface/web/mail/lib/lang/dk_mail_alias.lng
index 19b4112001..c0a66126f2 100644
--- a/interface/web/mail/lib/lang/dk_mail_alias.lng
+++ b/interface/web/mail/lib/lang/dk_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/dk_mail_forward.lng b/interface/web/mail/lib/lang/dk_mail_forward.lng
index ba47d8421d..55939b9deb 100644
--- a/interface/web/mail/lib/lang/dk_mail_forward.lng
+++ b/interface/web/mail/lib/lang/dk_mail_forward.lng
@@ -9,7 +9,7 @@ $wb['source_txt'] = 'Kilde E-mail';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Dupliker E-mailadresse.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/el_mail_alias.lng b/interface/web/mail/lib/lang/el_mail_alias.lng
index 5663822ce0..bcbb3220c7 100644
--- a/interface/web/mail/lib/lang/el_mail_alias.lng
+++ b/interface/web/mail/lib/lang/el_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/el_mail_forward.lng b/interface/web/mail/lib/lang/el_mail_forward.lng
index 8893b2fa0f..2519aa39e8 100644
--- a/interface/web/mail/lib/lang/el_mail_forward.lng
+++ b/interface/web/mail/lib/lang/el_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Διπλή διεύθυνση Email.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/en_mail_alias.lng b/interface/web/mail/lib/lang/en_mail_alias.lng
index 439ab74a09..23c567125d 100644
--- a/interface/web/mail/lib/lang/en_mail_alias.lng
+++ b/interface/web/mail/lib/lang/en_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/en_mail_forward.lng b/interface/web/mail/lib/lang/en_mail_forward.lng
index c38e2bf4ff..6be6ab7e70 100644
--- a/interface/web/mail/lib/lang/en_mail_forward.lng
+++ b/interface/web/mail/lib/lang/en_mail_forward.lng
@@ -9,7 +9,7 @@ $wb['source_txt'] = 'Source Email';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Duplicate Emailaddress.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/es_mail_alias.lng b/interface/web/mail/lib/lang/es_mail_alias.lng
index 18d1cb7347..7c0d7c7ccf 100644
--- a/interface/web/mail/lib/lang/es_mail_alias.lng
+++ b/interface/web/mail/lib/lang/es_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['no_domain_perm'] = 'No tiene permisos para usar este dominio.';
 $wb['send_as_exp'] = 'Permite al destinatario enviar correos usando este alias como origen';
 $wb['send_as_txt'] = 'Enviar como';
 $wb['source_txt'] = 'Alias';
-?>
diff --git a/interface/web/mail/lib/lang/es_mail_forward.lng b/interface/web/mail/lib/lang/es_mail_forward.lng
index 7ea99ea619..a295943f3c 100644
--- a/interface/web/mail/lib/lang/es_mail_forward.lng
+++ b/interface/web/mail/lib/lang/es_mail_forward.lng
@@ -6,10 +6,10 @@ $wb['duplicate_mailbox_txt'] = 'Ya existe un buzón con esta cuenta de correo.';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Por favor, introduzca una dirección de correo válida.';
+$wb['email_error_unique'] = 'Dirección de correo duplicada.';
 $wb['email_txt'] = 'Correo';
 $wb['greylisting_txt'] = 'Habilitar Lista Gris';
 $wb['limit_mailforward_txt'] = 'Ha alcanzado el número máx. de reenvíos de correos permitidos para su cuenta.';
 $wb['send_as_exp'] = 'Permitir al destino enviar correo usando esta dirección como origen (si el destino es interno)';
 $wb['send_as_txt'] = 'Enviar como';
 $wb['source_txt'] = 'Origen del correo';
-?>
diff --git a/interface/web/mail/lib/lang/fi_mail_alias.lng b/interface/web/mail/lib/lang/fi_mail_alias.lng
index 918db07761..20179dfdb6 100644
--- a/interface/web/mail/lib/lang/fi_mail_alias.lng
+++ b/interface/web/mail/lib/lang/fi_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/fi_mail_forward.lng b/interface/web/mail/lib/lang/fi_mail_forward.lng
index 80d34b5004..72b36cd082 100644
--- a/interface/web/mail/lib/lang/fi_mail_forward.lng
+++ b/interface/web/mail/lib/lang/fi_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Tämä aliasosoite on jo olemassa';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/fr_mail_alias.lng b/interface/web/mail/lib/lang/fr_mail_alias.lng
index 2baa476c65..b3868afc2c 100644
--- a/interface/web/mail/lib/lang/fr_mail_alias.lng
+++ b/interface/web/mail/lib/lang/fr_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/fr_mail_forward.lng b/interface/web/mail/lib/lang/fr_mail_forward.lng
index fd6d13c6bb..87caec79e0 100644
--- a/interface/web/mail/lib/lang/fr_mail_forward.lng
+++ b/interface/web/mail/lib/lang/fr_mail_forward.lng
@@ -9,7 +9,7 @@ $wb['source_txt'] = 'Source Email';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Dupliquer l’adresse e-mail.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/hr_mail_alias.lng b/interface/web/mail/lib/lang/hr_mail_alias.lng
index 180bcbeacd..152172a6b5 100644
--- a/interface/web/mail/lib/lang/hr_mail_alias.lng
+++ b/interface/web/mail/lib/lang/hr_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/hr_mail_forward.lng b/interface/web/mail/lib/lang/hr_mail_forward.lng
index 10abd5fe92..86430d19f7 100644
--- a/interface/web/mail/lib/lang/hr_mail_forward.lng
+++ b/interface/web/mail/lib/lang/hr_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Duplicirane email adrese.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/hu_mail_alias.lng b/interface/web/mail/lib/lang/hu_mail_alias.lng
index 7fc9e7a1d3..f2b5fab45a 100644
--- a/interface/web/mail/lib/lang/hu_mail_alias.lng
+++ b/interface/web/mail/lib/lang/hu_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/hu_mail_forward.lng b/interface/web/mail/lib/lang/hu_mail_forward.lng
index c58ae29d31..936b9781ef 100644
--- a/interface/web/mail/lib/lang/hu_mail_forward.lng
+++ b/interface/web/mail/lib/lang/hu_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Már létező email cím';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/id_mail_alias.lng b/interface/web/mail/lib/lang/id_mail_alias.lng
index e0efdb1504..aae76432fd 100644
--- a/interface/web/mail/lib/lang/id_mail_alias.lng
+++ b/interface/web/mail/lib/lang/id_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/id_mail_forward.lng b/interface/web/mail/lib/lang/id_mail_forward.lng
index 5f0c788878..792070d920 100644
--- a/interface/web/mail/lib/lang/id_mail_forward.lng
+++ b/interface/web/mail/lib/lang/id_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Alamat Email Ganda.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/it_mail_alias.lng b/interface/web/mail/lib/lang/it_mail_alias.lng
index fea4fe0c12..eab82caf51 100644
--- a/interface/web/mail/lib/lang/it_mail_alias.lng
+++ b/interface/web/mail/lib/lang/it_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/it_mail_forward.lng b/interface/web/mail/lib/lang/it_mail_forward.lng
index 3b5210fba1..6c4690c750 100644
--- a/interface/web/mail/lib/lang/it_mail_forward.lng
+++ b/interface/web/mail/lib/lang/it_mail_forward.lng
@@ -9,7 +9,7 @@ $wb['source_txt'] = 'Source Email';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Indirizzo email duplicato.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
 $wb['greylisting_txt'] = 'Enable greylisting';
-?>
diff --git a/interface/web/mail/lib/lang/ja_mail_alias.lng b/interface/web/mail/lib/lang/ja_mail_alias.lng
index c03bb825da..317a28337f 100644
--- a/interface/web/mail/lib/lang/ja_mail_alias.lng
+++ b/interface/web/mail/lib/lang/ja_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/ja_mail_forward.lng b/interface/web/mail/lib/lang/ja_mail_forward.lng
index f849f7bf18..0d6b4312ef 100644
--- a/interface/web/mail/lib/lang/ja_mail_forward.lng
+++ b/interface/web/mail/lib/lang/ja_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'メールアドレスが重複しています。';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/nl_mail_alias.lng b/interface/web/mail/lib/lang/nl_mail_alias.lng
index d327afa90c..1ab52542ab 100644
--- a/interface/web/mail/lib/lang/nl_mail_alias.lng
+++ b/interface/web/mail/lib/lang/nl_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/nl_mail_forward.lng b/interface/web/mail/lib/lang/nl_mail_forward.lng
index 6bf586a0d2..33dadeef6b 100644
--- a/interface/web/mail/lib/lang/nl_mail_forward.lng
+++ b/interface/web/mail/lib/lang/nl_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Duplicaat E-mail adres.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/pl_mail_alias.lng b/interface/web/mail/lib/lang/pl_mail_alias.lng
index 4833383342..6c49433b60 100644
--- a/interface/web/mail/lib/lang/pl_mail_alias.lng
+++ b/interface/web/mail/lib/lang/pl_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/pl_mail_forward.lng b/interface/web/mail/lib/lang/pl_mail_forward.lng
index ce79e10938..2c9c32adf7 100644
--- a/interface/web/mail/lib/lang/pl_mail_forward.lng
+++ b/interface/web/mail/lib/lang/pl_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Duplikat adresów e-mail.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/pt_mail_alias.lng b/interface/web/mail/lib/lang/pt_mail_alias.lng
index 91736e3020..afb7408eab 100644
--- a/interface/web/mail/lib/lang/pt_mail_alias.lng
+++ b/interface/web/mail/lib/lang/pt_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/pt_mail_forward.lng b/interface/web/mail/lib/lang/pt_mail_forward.lng
index db67461967..3f0dc04f7c 100644
--- a/interface/web/mail/lib/lang/pt_mail_forward.lng
+++ b/interface/web/mail/lib/lang/pt_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Endereço de correio duplicado.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/ro_mail_alias.lng b/interface/web/mail/lib/lang/ro_mail_alias.lng
index d5e8e0fb0f..65b9abbd52 100644
--- a/interface/web/mail/lib/lang/ro_mail_alias.lng
+++ b/interface/web/mail/lib/lang/ro_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/ro_mail_forward.lng b/interface/web/mail/lib/lang/ro_mail_forward.lng
index 5e00bf0527..3103f26dc8 100644
--- a/interface/web/mail/lib/lang/ro_mail_forward.lng
+++ b/interface/web/mail/lib/lang/ro_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Duplicat Emailaddress.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/ru_mail_alias.lng b/interface/web/mail/lib/lang/ru_mail_alias.lng
index e093ad9986..fd15ffbc91 100644
--- a/interface/web/mail/lib/lang/ru_mail_alias.lng
+++ b/interface/web/mail/lib/lang/ru_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Алиас';
 $wb['greylisting_txt'] = 'Включить серый список (Greylisting)';
 $wb['send_as_txt'] = 'Отправить как';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/ru_mail_forward.lng b/interface/web/mail/lib/lang/ru_mail_forward.lng
index 6eb11f4f91..0be6608b80 100644
--- a/interface/web/mail/lib/lang/ru_mail_forward.lng
+++ b/interface/web/mail/lib/lang/ru_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Включить серый список (Greylisting)
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Некорректный почтовый адрес.';
+$wb['email_error_unique'] = 'Такая запись уже есть.';
 $wb['send_as_txt'] = 'Отправить как';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/se_mail_alias.lng b/interface/web/mail/lib/lang/se_mail_alias.lng
index 441e33eac2..5011c02a1f 100644
--- a/interface/web/mail/lib/lang/se_mail_alias.lng
+++ b/interface/web/mail/lib/lang/se_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/se_mail_forward.lng b/interface/web/mail/lib/lang/se_mail_forward.lng
index 7b0aa2bc16..4ac59fb99c 100644
--- a/interface/web/mail/lib/lang/se_mail_forward.lng
+++ b/interface/web/mail/lib/lang/se_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Epostadressen finns redan.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/sk_mail_alias.lng b/interface/web/mail/lib/lang/sk_mail_alias.lng
index 70b6b1c246..da89509e76 100644
--- a/interface/web/mail/lib/lang/sk_mail_alias.lng
+++ b/interface/web/mail/lib/lang/sk_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
 $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
-?>
diff --git a/interface/web/mail/lib/lang/sk_mail_forward.lng b/interface/web/mail/lib/lang/sk_mail_forward.lng
index 399971261a..7730600125 100644
--- a/interface/web/mail/lib/lang/sk_mail_forward.lng
+++ b/interface/web/mail/lib/lang/sk_mail_forward.lng
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Please enter a valid email address.';
+$wb['email_error_unique'] = 'Duplicitná email adresa.';
 $wb['send_as_txt'] = 'Send as';
 $wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
-?>
diff --git a/interface/web/mail/lib/lang/tr_mail_alias.lng b/interface/web/mail/lib/lang/tr_mail_alias.lng
index ea440b2e63..f049c2b270 100644
--- a/interface/web/mail/lib/lang/tr_mail_alias.lng
+++ b/interface/web/mail/lib/lang/tr_mail_alias.lng
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Takma Ad';
 $wb['send_as_txt'] = 'Gönderen';
 $wb['send_as_exp'] = 'Hedef bu adresi kaynak olarak göstererek e-posta gönderebilsin';
 $wb['greylisting_txt'] = 'Gri Liste Kullanılsın';
-?>
diff --git a/interface/web/mail/lib/lang/tr_mail_forward.lng b/interface/web/mail/lib/lang/tr_mail_forward.lng
index bdcd02a862..03624e56b6 100644
--- a/interface/web/mail/lib/lang/tr_mail_forward.lng
+++ b/interface/web/mail/lib/lang/tr_mail_forward.lng
@@ -9,7 +9,7 @@ $wb['source_txt'] = 'Kaynak E-posta';
 $wb['destination_error_empty'] = 'The destination must not be empty.';
 $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
 $wb['email_error_isemail'] = 'Lütfen geçerli bir e-posta adresi yazın.';
+$wb['email_error_unique'] = 'Bu e-posta adresi zaten var';
 $wb['send_as_txt'] = 'Gönderen';
 $wb['send_as_exp'] = 'Hedef bu adresi kaynak olarak göstererek e-posta gönderebilsin (hedef iç kullanıcı ise)';
 $wb['greylisting_txt'] = 'Gri Liste Kullanılsın';
-?>
-- 
GitLab


From 36a29359184f68a04093182912e41bced9c01581 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Mon, 23 Aug 2021 18:07:07 -0600
Subject: [PATCH 438/441] installer: remove duplicate mail_forwarding prior to
 adding unique key

---
 install/patches/upd_0094.php | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 install/patches/upd_0094.php

diff --git a/install/patches/upd_0094.php b/install/patches/upd_0094.php
new file mode 100644
index 0000000000..b9516e232e
--- /dev/null
+++ b/install/patches/upd_0094.php
@@ -0,0 +1,14 @@
+<?php
+
+if(!defined('INSTALLER_RUN')) die('Patch update file access violation.');
+
+class upd_0094 extends installer_patch_update {
+
+	public function onBeforeSQL() {
+		global $inst;
+
+		// Remove any duplicate mail_forwardings prior to adding unique key
+		$inst->db->query("DELETE FROM mail_forwarding WHERE forwarding_id IN (SELECT forwarding_id FROM (SELECT forwarding_id, COUNT(source) AS source_count FROM mail_forwarding GROUP BY source HAVING source_count > 1) as t1)");
+	}
+
+}
-- 
GitLab


From 2fe1c421c4b76e04b5fc998bab61adcdd0258eee Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 26 Aug 2021 16:05:58 +0000
Subject: [PATCH 439/441] Missing asterisk for libnss*.so.*

---
 install/tpl/jk_init.ini.master | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/tpl/jk_init.ini.master b/install/tpl/jk_init.ini.master
index 418488194f..2563c40b04 100644
--- a/install/tpl/jk_init.ini.master
+++ b/install/tpl/jk_init.ini.master
@@ -6,7 +6,7 @@
 
 [uidbasics]
 comment = common files for all jails that need user/group information
-paths = /lib*/libnsl.so.*, /lib*/libnss*.so.*, /lib/*/libnsl.so.*, /lib/*/libnss.so.*, /etc/nsswitch.conf, /etc/ld.so.conf
+paths = /lib*/libnsl.so.*, /lib*/libnss*.so.*, /lib/*/libnsl.so.*, /lib/*/libnss*.so.*, /etc/nsswitch.conf, /etc/ld.so.conf
 
 [netbasics]
 comment = common files for all jails that need any internet connectivity
-- 
GitLab


From 1466839a06fff7701442b030cee9702dc4618c79 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 3 Sep 2021 08:03:42 +0000
Subject: [PATCH 440/441] Update upd_0093.sql

---
 install/sql/incremental/upd_0093.sql | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/install/sql/incremental/upd_0093.sql b/install/sql/incremental/upd_0093.sql
index 71efb3085e..96c5307f0e 100644
--- a/install/sql/incremental/upd_0093.sql
+++ b/install/sql/incremental/upd_0093.sql
@@ -12,10 +12,10 @@ ALTER TABLE mail_domain ADD COLUMN `relay_host` varchar(255) NOT NULL default ''
   ADD COLUMN `relay_user` varchar(255) NOT NULL default '' AFTER `relay_host`,
   ADD COLUMN `relay_pass` varchar(255) NOT NULL default '' AFTER `relay_user`;
 -- Purge apps & addons installer (#5795)
-DROP TABLE 'software_package';
-DROP TABLE 'software_repo';
-DROP TABLE 'software_update';
-DROP TABLE 'software_update_inst';
+DROP TABLE `software_package`;
+DROP TABLE `software_repo`;
+DROP TABLE `software_update`;
+DROP TABLE `software_update_inst`;
 
 -- Brexit
 UPDATE `country` SET `eu` = 'n' WHERE `iso` = 'GB';
-- 
GitLab


From caef217b5ec315a214e611bd05655f8b52f81687 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 3 Sep 2021 08:04:49 +0000
Subject: [PATCH 441/441] Update upd_dev_collection.sql

---
 install/sql/incremental/upd_dev_collection.sql | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 75a6b01d93..c0d4bf04f6 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -4,3 +4,9 @@ ALTER TABLE `spamfilter_users` ALTER `policy_id` SET DEFAULT 0;
 -- mail_forwarding.source must be unique
 ALTER TABLE `mail_forwarding` DROP KEY `server_id`;
 ALTER TABLE `mail_forwarding` ADD UNIQUE KEY `server_id` (`server_id`, `source`);
+
+-- Purge apps & addons installer (#5795) - second time due to syntax error in 0093
+DROP TABLE IF EXISTS `software_package`;
+DROP TABLE IF EXISTS `software_repo`;
+DROP TABLE IF EXISTS `software_update`;
+DROP TABLE IF EXISTS `software_update_inst`;
-- 
GitLab