Просмотр исходного кода

Merge branch 'main' into release

Jaap Marcus 3 лет назад
Родитель
Сommit
85261cc350

+ 5 - 0
CHANGELOG.md

@@ -1,6 +1,11 @@
 # Changelog
 # Changelog
 All notable changes to this project will be documented in this file.
 All notable changes to this project will be documented in this file.
 
 
+## [1.6.2] - Service release
+
+- Fixed an issue with rate limits in Exim4 and make it more bullet proof (#2703)
+- Fixed an issue with system-filter not propperly loaded in Exim4 for Exim 4.94 and Ugrades from 1.5.x 
+
 ## [1.6.1] - Service release
 ## [1.6.1] - Service release
 
 
 ### Bugfixes
 ### Bugfixes

+ 1 - 1
README.md

@@ -2,7 +2,7 @@
 
 
 [Hestia Control Panel](https://www.hestiacp.com/)
 [Hestia Control Panel](https://www.hestiacp.com/)
 ==================================================
 ==================================================
-**Latest stable release:** Version 1.6.1 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md) | [![Build Status](https://drone.hestiacp.com/api/badges/hestiacp/hestiacp/status.svg?ref=refs/heads/main)](https://drone.hestiacp.com/hestiacp/hestiacp) <br>
+**Latest stable release:** Version 1.6.2 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md) | [![Build Status](https://drone.hestiacp.com/api/badges/hestiacp/hestiacp/status.svg?ref=refs/heads/main)](https://drone.hestiacp.com/hestiacp/hestiacp) <br>
 
 
 **Web:** [www.hestiacp.com](https://www.hestiacp.com/)<br>
 **Web:** [www.hestiacp.com](https://www.hestiacp.com/)<br>
 **Documentation:** [docs.hestiacp.com](https://docs.hestiacp.com/)<br>
 **Documentation:** [docs.hestiacp.com](https://docs.hestiacp.com/)<br>

+ 1 - 1
bin/v-add-mail-domain

@@ -18,7 +18,7 @@ antivirus=${4-yes}
 dkim=${5-yes}
 dkim=${5-yes}
 dkim_size=${6-1024}
 dkim_size=${6-1024}
 restart=${7-yes}
 restart=${7-yes}
-reject=${8-yes}
+reject=${8-no}
 
 
 # Includes
 # Includes
 # shellcheck source=/etc/hestiacp/hestia.conf
 # shellcheck source=/etc/hestiacp/hestia.conf

+ 5 - 1
install/deb/exim/exim4.conf.4.94.template

@@ -82,6 +82,10 @@ SMTP_RELAY_PORT = ${lookup{port}lsearch{SMTP_RELAY_FILE}}
 SMTP_RELAY_USER = ${lookup{user}lsearch{SMTP_RELAY_FILE}}
 SMTP_RELAY_USER = ${lookup{user}lsearch{SMTP_RELAY_FILE}}
 SMTP_RELAY_PASS = ${lookup{pass}lsearch{SMTP_RELAY_FILE}}
 SMTP_RELAY_PASS = ${lookup{pass}lsearch{SMTP_RELAY_FILE}}
 
 
+# Custom Filter
+system_filter = /etc/exim4/system.filter
+system_filter_user = Debian-exim
+
 ######################################################################
 ######################################################################
 #                       ACL CONFIGURATION                            #
 #                       ACL CONFIGURATION                            #
 #         Specifies access control lists for incoming SMTP mail      #
 #         Specifies access control lists for incoming SMTP mail      #
@@ -134,7 +138,7 @@ acl_check_rcpt:
 
 
 # Limit per email account for SMTP auhenticated users
 # Limit per email account for SMTP auhenticated users
   deny    message       = Email account $authenticated_id is sending too many emails - rate overlimit = $sender_rate / $sender_rate_period
   deny    message       = Email account $authenticated_id is sending too many emails - rate overlimit = $sender_rate / $sender_rate_period
-          set acl_c_msg_limit = ${if exists{/etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains/}}/limits} {${extract{1}{:}{${lookup{$authenticated_id}lsearch{/etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains/}}/limits}}}}} {${readfile{/etc/exim4/limit.conf}}} }
+          set acl_c_msg_limit  = ${if exists{/etc/exim4/domains/${lookup{${domain:$authenticated_id}}dsearch{/etc/exim4/domains/}}/limits}{${lookup {$authenticated_id} lsearch{/etc/exim4/domains/${lookup{${domain:$authenticated_id}}dsearch{/etc/exim4/domains/}}/limits}{$value}{${readfile{/etc/exim4/limit.conf}}}}}{${readfile{/etc/exim4/limit.conf}}} } 
           ratelimit     = $acl_c_msg_limit / 1h / strict/ $authenticated_id
           ratelimit     = $acl_c_msg_limit / 1h / strict/ $authenticated_id
   
   
   warn    ratelimit     = ${eval:$acl_c_msg_limit / 2} / 1h / strict / $authenticated_id
   warn    ratelimit     = ${eval:$acl_c_msg_limit / 2} / 1h / strict / $authenticated_id

+ 1 - 1
install/deb/exim/exim4.conf.template

@@ -138,7 +138,7 @@ acl_check_rcpt:
 
 
 # Limit per email account for SMTP auhenticated users
 # Limit per email account for SMTP auhenticated users
   deny    message       = Email account $authenticated_id is sending too many emails - rate overlimit = $sender_rate / $sender_rate_period
   deny    message       = Email account $authenticated_id is sending too many emails - rate overlimit = $sender_rate / $sender_rate_period
-          set acl_c_msg_limit = ${if exists{/etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains/}}/limits} {${extract{1}{:}{${lookup{$authenticated_id}lsearch{/etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains/}}/limits}}}}} {${readfile{/etc/exim4/limit.conf}}} }
+      set acl_c_msg_limit  = ${if exists{/etc/exim4/domains/${lookup{${domain:$authenticated_id}}dsearch{/etc/exim4/domains/}}/limits}{${lookup {$authenticated_id} lsearch{/etc/exim4/domains/${lookup{${domain:$authenticated_id}}dsearch{/etc/exim4/domains/}}/limits}{$value}{${readfile{/etc/exim4/limit.conf}}}}}{${readfile{/etc/exim4/limit.conf}}} } 
           ratelimit     = $acl_c_msg_limit / 1h / strict/ $authenticated_id
           ratelimit     = $acl_c_msg_limit / 1h / strict/ $authenticated_id
 
 
   warn    ratelimit     = ${eval:$acl_c_msg_limit / 2} / 1h / strict / $authenticated_id
   warn    ratelimit     = ${eval:$acl_c_msg_limit / 2} / 1h / strict / $authenticated_id

+ 1 - 1
install/hst-install-debian.sh

@@ -31,7 +31,7 @@ HESTIA_INSTALL_DIR="$HESTIA/install/deb"
 VERBOSE='no'
 VERBOSE='no'
 
 
 # Define software versions
 # Define software versions
-HESTIA_INSTALL_VER='1.6.1'
+HESTIA_INSTALL_VER='1.6.2'
 # Dependencies
 # Dependencies
 pma_v='5.2.0'
 pma_v='5.2.0'
 rc_v="1.5.3"
 rc_v="1.5.3"

+ 1 - 1
install/hst-install-ubuntu.sh

@@ -31,7 +31,7 @@ HESTIA_INSTALL_DIR="$HESTIA/install/deb"
 VERBOSE='no'
 VERBOSE='no'
 
 
 # Define software versions
 # Define software versions
-HESTIA_INSTALL_VER='1.6.1'
+HESTIA_INSTALL_VER='1.6.2'
 # Dependencies
 # Dependencies
 pma_v='5.2.0'
 pma_v='5.2.0'
 rc_v="1.5.3"
 rc_v="1.5.3"

+ 1 - 1
install/upgrade/versions/1.6.1.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Hestia Control Panel upgrade script for target version 1.6.0
+# Hestia Control Panel upgrade script for target version 1.6.1
 
 
 #######################################################################################
 #######################################################################################
 #######                      Place additional commands below.                   #######
 #######                      Place additional commands below.                   #######

+ 36 - 0
install/upgrade/versions/1.6.2.sh

@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# Hestia Control Panel upgrade script for target version 1.6.2
+
+#######################################################################################
+#######                      Place additional commands below.                   #######
+#######################################################################################
+####### Pass through information to the end user in case of a issue or problem  #######
+#######                                                                         #######
+####### Use add_upgrade_message "My message here" to include a message          #######
+####### in the upgrade notification email. Example:                             #######
+#######                                                                         #######
+####### add_upgrade_message "My message here"                                   #######
+#######                                                                         #######
+####### You can use \n within the string to create new lines.                   #######
+#######################################################################################
+
+upgrade_config_set_value 'UPGRADE_UPDATE_WEB_TEMPLATES' 'no'
+upgrade_config_set_value 'UPGRADE_UPDATE_DNS_TEMPLATES' 'no'
+upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'no'
+upgrade_config_set_value 'UPGRADE_REBUILD_USERS' 'no'
+upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
+
+alc=$(cat /etc/exim4/exim4.conf.template | grep '${lookup{${domain:$authenticated_id}}dsearch{/etc/exim4/domains/}}/limits');
+if [ -z "$alc" ]; then
+    sed -i 's| set acl_c_msg_limit|#string1\n#replaceme|'  /etc/exim4/exim4.conf.template
+    sed -i '/#replaceme/d' /etc/exim4/exim4.conf.template
+    sed -i 's|#string1|set acl_c_msg_limit  = \${if exists{/etc/exim4/domains/\${lookup{\${domain:\$authenticated_id}}dsearch{/etc/exim4/domains/}}/limits}{\${lookup {\$authenticated_id} lsearch{/etc/exim4/domains/\${lookup{${domain:\$authenticated_id}}dsearch{/etc/exim4/domains/}}/limits}{\$value}{\${readfile{/etc/exim4/limit.conf}}}}}{\${readfile{/etc/exim4/limit.conf}}} }|g' /etc/exim4/exim4.conf.template
+fi
+
+system_filter=$(cat /etc/exim4/exim4.conf.template | grep 'system_filter');
+if [ -z "$system_filter" ]; then
+    sed -i '/SMTP_RELAY_PASS = \${lookup{pass}lsearch{SMTP_RELAY_FILE}}/a #shouldberemoved\n# Custom Filter\nsystem_filter = \/etc\/exim4\/system.filter\nsystem_filter_user = Debian-exim' /etc/exim4/exim4.conf.template
+    # Keep the spacing between the reley_pass and Custom Filter we need to insert a dummy text and remove it later on
+    sed -i 's/#shouldberemoved//g' /etc/exim4/exim4.conf.template
+fi

+ 1 - 1
src/deb/hestia/control

@@ -1,7 +1,7 @@
 Source: hestia
 Source: hestia
 Package: hestia
 Package: hestia
 Priority: optional
 Priority: optional
-Version: 1.6.1
+Version: 1.6.2
 Section: admin
 Section: admin
 Maintainer: HestiaCP <info@hestiacp.com>
 Maintainer: HestiaCP <info@hestiacp.com>
 Homepage: https://www.hestiacp.com
 Homepage: https://www.hestiacp.com