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

Fix issue #2087 sender_address_domain tainted. (#2091)

Jaap Marcus 4 лет назад
Родитель
Сommit
60b80ec301
3 измененных файлов с 9 добавлено и 2 удалено
  1. 1 0
      CHANGELOG.md
  2. 2 2
      install/deb/exim/exim4.conf.4.94.template
  3. 6 0
      install/upgrade/versions/1.4.12.sh

+ 1 - 0
CHANGELOG.md

@@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
 ## [Development] 
 
 - Allow custom mail domains with own certificates #2061 @myrevery 
+- Fix #2087 Exim 4.94 Did not send any email to remote servers. 
 - Fixed #2082 v-delete-web-php creates always new config file
 
 ## [1.4.11] - Service release 

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

@@ -73,9 +73,9 @@ DKIM_DOMAIN = ${lc:${domain:$h_from:}}
 DKIM_FILE = /etc/exim4/domains/${lookup{${lc:${domain:$h_from:}}}dsearch{/etc/exim4/domains/}}/dkim.pem
 DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
 
-OUTGOING_IP = /etc/exim4/domains/$sender_address_domain/ip
+OUTGOING_IP = /etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains}}/ip
 
-SMTP_RELAY_FILE = ${if exists{/etc/exim4/domains/${sender_address_domain}/smtp_relay.conf}{/etc/exim4/domains/$sender_address_domain/smtp_relay.conf}{/etc/exim4/smtp_relay.conf}}
+SMTP_RELAY_FILE = ${if exists{/etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains}}/smtp_relay.conf}{/etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains}}/smtp_relay.conf}{/etc/exim4/smtp_relay.conf}}
 SMTP_RELAY_HOST = ${lookup{host}lsearch{SMTP_RELAY_FILE}}
 SMTP_RELAY_PORT = ${lookup{port}lsearch{SMTP_RELAY_FILE}}
 SMTP_RELAY_USER = ${lookup{user}lsearch{SMTP_RELAY_FILE}}

+ 6 - 0
install/upgrade/versions/1.4.12.sh

@@ -5,3 +5,9 @@
 #######################################################################################
 #######                      Place additional commands below.                   #######
 #######################################################################################
+
+if [ -f "/etc/exim4/exim4.conf.template" ]; then 
+	sed -i 's|OUTGOING_IP = /etc/exim4/domains/$sender_address_domain/ip|OUTGOING_IP = /etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains}}/ip|g' /etc/exim4/exim4.conf.template
+	sed -i 's|SMTP_RELAY_FILE = ${if exists{/etc/exim4/domains/${sender_address_domain}/smtp_relay.conf}{/etc/exim4/domains/$sender_address_domain/smtp_relay.conf}{/etc/exim4/smtp_relay.conf}}|SMTP_RELAY_FILE = ${if exists{/etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains}}/smtp_relay.conf}{/etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains}}/smtp_relay.conf}{/etc/exim4/smtp_relay.conf}}|g' /etc/exim4/exim4.conf.template
+fi
+