Преглед изворни кода

Merge branch 'main' into fix/firewall-rules

Jaap Marcus пре 4 година
родитељ
комит
976cd278bd

+ 9 - 0
CHANGELOG.md

@@ -5,9 +5,18 @@ All notable changes to this project will be documented in this file.
 
 ### Features
 
+- Include DMARC record in DNS record list #1836
+
 ### Bugfixes
+
 - Improve the calculated disk size of a new backup estimated by excluding the exclude folders, mail accounts and database in backups (#1616) @Myself5
 - Improve v-update-firewall / v-stop-firewarewall to make it self healing (#1892) @myrevery 
+- Update phpMyAdmin version to 1.5.1 (See https://www.phpmyadmin.net/news/2021/6/4/phpmyadmin-511-released/)
+- Fixed a bug after rebuilding mail with Exim4 and suspended domains (#1886)
+- Fixed "Allowed IP addresses for API" field with strange behaviour #1866
+- Fixed an issue where the "Saved confirmation" was not set due to a redirect #1879
+- Increased minimal memory requirements for ClamD / ClamAV.  #1840
+- Restore of backup did not rebuild the "Forced SSL" and "HSTS" config on new account #1862
 
 ## [1.4.2] - Service release
 

+ 2 - 2
bin/v-restore-user

@@ -317,8 +317,8 @@ if [ "$web" != 'no' ] && [ ! -z "$WEB_SYSTEM" ]; then
             str="$str CUSTOM_DOCROOT='$CUSTOM_DOCROOT' CUSTOM_PHPROOT='$CUSTOM_PHPROOT'"
             str="$str REDIRECT='$REDIRECT' REDIRECT_CODE='$REDIRECT_CODE'"
             str="$str FASTCGI_CACHE='$FASTCGI_CACHE' FASTCGI_DURATION='$FASTCGI_DURATION'"
-            str="$str TPL='$TPL' SSL='$SSL' SSL_HOME='$SSL_HOME'"
-            str="$str LETSENCRYPT='$LETSENCRYPT' FTP_USER='$FTP_USER'"
+            str="$str TPL='$TPL' SSL='$SSL' SSL_HOME='$SSL_HOME' SSL_HSTS='$SSL_HSTS'"
+            str="$str SSL_FORCE='$SSL_FORCE' LETSENCRYPT='$LETSENCRYPT' FTP_USER='$FTP_USER'"
             str="$str FTP_MD5='$FTP_MD5' FTP_PATH='$FTP_PATH'"
             str="$str BACKEND='$BACKEND' PROXY='$PROXY'"
             str="$str PROXY_EXT='$PROXY_EXT' STATS='$STATS'"

+ 1 - 1
func/rebuild.sh

@@ -580,7 +580,7 @@ rebuild_mail_domain_conf() {
 
         # Removing configuration files if domain is suspended
         if [ "$SUSPENDED" = 'yes' ]; then
-            rm -f /etc/exim/domains/$domain_idn
+            rm -f /etc/$MAIL_SYSTEM/domains/$domain_idn
             rm -f /etc/dovecot/conf.d/domains/$domain_idn.conf
         fi
 

+ 3 - 0
install/hst-install-debian.sh

@@ -258,6 +258,9 @@ set_default_value 'dovecot' 'yes'
 if [ $memory -lt 1500000 ]; then
     set_default_value 'clamd' 'no'
     set_default_value 'spamd' 'no'
+elif [ $memory -lt 300000 ]; then
+    set_default_value 'clamd' 'no'
+    set_default_value 'spamd' 'yes'
 else
     set_default_value 'clamd' 'yes'
     set_default_value 'spamd' 'yes'

+ 3 - 0
install/hst-install-ubuntu.sh

@@ -239,6 +239,9 @@ set_default_value 'dovecot' 'yes'
 if [ $memory -lt 1500000 ]; then
     set_default_value 'clamd' 'no'
     set_default_value 'spamd' 'no'
+elif [ $memory -lt 300000 ]; then
+    set_default_value 'clamd' 'no'
+    set_default_value 'spamd' 'yes'
 else
     set_default_value 'clamd' 'yes'
     set_default_value 'spamd' 'yes'

+ 8 - 4
web/edit/server/index.php

@@ -181,7 +181,7 @@ $v_ssl_issuer = $ssl_str['HESTIA']['ISSUER'];
 
 // Check POST request
 if (!empty($_POST['save'])) {
-
+    $require_refresh = false;
     // Check token
     if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
         header('location: /login/');
@@ -813,8 +813,7 @@ if (!empty($_POST['save'])) {
                 unset($output);
                 if ($_POST['v_policy_user_change_theme']) { 
                     unset ($_SESSION['userTheme']);
-                    $refresh = $_SERVER['REQUEST_URI'];
-                    header("Location: $refresh");
+                    $require_refresh = true;
                 }
                 if (empty($_SESSION['error_msg'])) $v_policy_user_change_theme = $_POST['v_policy_user_change_theme'];
             }
@@ -943,7 +942,12 @@ if (!empty($_POST['save'])) {
     if (empty($_SESSION['error_msg'])) {
         $_SESSION['ok_msg'] = _('Changes has been saved.');
     }
-
+    if ($require_refresh == true){
+        $refresh = $_SERVER['REQUEST_URI'];
+        $_SESSION['ok_msg'] = _('Changes has been saved.');
+        header("Location: $refresh");
+        die();
+    }
 }
     
 // Check system configuration

+ 4 - 6
web/templates/pages/edit_server.html

@@ -981,13 +981,11 @@
 															</tr>
 															<tr>
 																<td>
-																	<textarea size="20" class="vst-textinput short" name="v_api_allowed_ip">
-																		<?php 
-																			foreach(explode(',',$_SESSION['API_ALLOWED_IP']) as $ip ){
-																				echo $ip."\n";
+																	<textarea size="20" class="vst-textinput short" name="v_api_allowed_ip"><?php 
+																		foreach(explode(',',$_SESSION['API_ALLOWED_IP']) as $ip ){ 
+                                                                            echo trim($ip)."\n";
 																			}
-																		?>
-																	</textarea>
+																		?></textarea>
 																	<br><br>
 																</td>
 															</tr>

+ 21 - 3
web/templates/pages/list_mail_dns.html

@@ -36,11 +36,20 @@
 		<div class="l-unit__col l-unit__col--right">
 			<div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" style="width:200px !important;" value="mail.<?=htmlspecialchars($_GET['domain']);?>" /></b> </div>
 			<div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>A</b></div>
-			<div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>10</b></div>
+			<div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>0</b></div>
 			<div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>14400</b></div>
 			<div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" value="<?=array_key_first($ips);?>" /></b></div>
 		</div>
 	</div>
+    <div class="l-unit animated fadeIn">
+        <div class="l-unit__col l-unit__col--right">
+            <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" style="width:200px !important;" value="mail.<?=htmlspecialchars($_GET['domain']);?>" /></b> </div>
+            <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>MX</b></div>
+            <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>10</b></div>
+            <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>14400</b></div>
+            <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" value="<?=htmlspecialchars($_GET['domain']);?>." /></b></div>
+        </div>
+    </div>
 	<?php if($_SESSION['WEBMAIL_SYSTEM']){?>
 		<div class="l-unit animated fadeIn">
 			<div class="l-unit__col l-unit__col--right">
@@ -58,9 +67,18 @@
 			<div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>TXT</b></div>
 			<div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>&nbsp;</b></div>
 			<div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>14400</b></div>
-			<div class="clearfix l-unit__stat-col--left  wide-3 "><b><input type="text" class="vst-input" value="<?=htmlspecialchars('"v=spf1 a mx ip4:'.array_key_first($ips).'; -all"');?>" /></b></div>
+			<div class="clearfix l-unit__stat-col--left  wide-3 "><b><input type="text" class="vst-input" value="<?=htmlspecialchars('v=spf1 a mx ip4:'.array_key_first($ips).'; -all');?>" /></b></div>
 		</div>
 	</div>
+    <div class="l-unit animated fadeIn">
+        <div class="l-unit__col l-unit__col--right">
+            <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" style="width:200px !important;" value="_dmarc" /></b> </div>
+            <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>TXT</b></div>
+            <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>&nbsp;</b></div>
+            <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>14400</b></div>
+            <div class="clearfix l-unit__stat-col--left  wide-3 "><b><input type="text" class="vst-input" value="<?=htmlspecialchars('v=DMARC1; p=quarantine; pct=100');?>" /></b></div>
+        </div>
+    </div>
 	<?php foreach($dkim as $key => $value){ ?>
 		<div class="l-unit animated fadeIn">
 			<div class="l-unit__col l-unit__col--right">
@@ -68,7 +86,7 @@
 				<div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>TXT</b></div>
 				<div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>&nbsp;</b></div>
 				<div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>3600</b></div>
-				<div class="clearfix l-unit__stat-col--left  wide-3 "><b><input type="text" class="vst-input" value="<?=htmlspecialchars(str_replace("'",'"',$dkim[$key]['TXT']));?>" </b></div>
+				<div class="clearfix l-unit__stat-col--left  wide-3 "><b><input type="text" class="vst-input" value="<?=htmlspecialchars(str_replace(array('"',"'"),'',$dkim[$key]['TXT']));?>" </b></div>
 			</div>
 		</div>
 	<?php } ?>