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

Revert "Fix #1438 Bug in exim config (#2224)"

Fix caused issues with unauthenticated smtp users 

This reverts commit b097e18b815bf0651aabe7663f600553b0c010d0.
Jaap Marcus 4 лет назад
Родитель
Сommit
0b1fa128a5

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

@@ -116,7 +116,7 @@ acl_check_mail:
 
   drop    message       = Helo name contains an IP address (HELO was $sender_helo_name) and not is valid
           condition     = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
-          condition     = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}}{$sender_helo_name}{no}{yes}}
+          condition     = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
           delay         = 45s
 
   drop    condition     = ${if isip{$sender_helo_name}}

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

@@ -114,9 +114,9 @@ acl_check_mail:
   deny    condition     = ${if eq{$sender_helo_name}{}}
           message       = HELO required before MAIL
 
-  drop    message       = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+  drop    message       = Helo name contains an IP address (HELO was $sender_helo_name) and not is valid
           condition     = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
-          condition     = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}}{$sender_helo_name}{no}{yes}}
+          condition     = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
           delay         = 45s
 
   drop    condition     = ${if isip{$sender_helo_name}}

+ 5 - 7
install/upgrade/versions/1.5.0.sh

@@ -32,19 +32,17 @@ if [ -n "$MAIL_SYSTEM" ]; then
         sed -i 's/^smtp_active_hostname = \${if exists {\/etc\/exim4\/mailhelo\.conf}{\${lookup{\$interface_address}lsearch{\/etc\/exim4\/mailhelo\.conf}{\$value}{\$primary_hostname}}}{\$primary_hostname}}$/smtp_active_hostname = \${lookup dnsdb{ptr=\$interface_address}{\$value}{\$primary_hostname}}/' /etc/exim4/exim4.conf.template
     
         sed -i 's/^  helo_data = \${if exists {\/etc\/exim4\/mailhelo\.conf}{\${lookup{\$sending_ip_address}lsearch{\/etc\/exim4\/mailhelo\.conf}{\$value}{\$primary_hostname}}}{\$primary_hostname}}$/  helo_data = \${lookup dnsdb{ptr=\$sending_ip_address}{\$value}{\$primary_hostname}}/' /etc/exim4/exim4.conf.template
-    
-        sed -i 's|condition     = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\\}{$sender_helo_name}{no}{yes}}|condition     = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}}{$sender_helo_name}{no}{yes}}|g' /etc/exim4/exim4.conf.template
     fi
     
     # Clean up legacy mailhelo file
     rm -f /etc/${MAIL_SYSTEM}/mailhelo.conf
+    
+    # Clean up legacy ip variable
+    for ip in $($BIN/v-list-sys-ips plain | cut -f1); do
+        sed '/^HELO/d' $HESTIA/data/ips/$ip  > /dev/null
+    done
 fi
 
-# Clean up legacy ip variable
- for ip in $($BIN/v-list-sys-ips plain | cut -f1); do
-     sed '/^HELO/d' $HESTIA/data/ips/$ip  > /dev/null
- done
-
 if [ -L "/var/log/hestia" ]; then
     echo "[ ! ] Move /usr/local/hestia/log/* to /var/log/hestia/"
     rm /var/log/hestia