Skip to content

Commit b097e18

Browse files
authored
Fix hestiacp#1438 Bug in exim config (hestiacp#2224)
* Fix bug in exim config * Fix hestiacp#1438 Bug in exim config There is a bug that certain HELO configuration are blocked from hostnames. Comparing the example configs vs Hestia / Vesta config there is a small difference this should fix it...
1 parent 3e1de0c commit b097e18

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

install/deb/exim/exim4.conf.4.94.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ acl_check_mail:
116116

117117
drop message = Helo name contains an IP address (HELO was $sender_helo_name) and not is valid
118118
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}}
119-
condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
119+
condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}}{$sender_helo_name}{no}{yes}}
120120
delay = 45s
121121

122122
drop condition = ${if isip{$sender_helo_name}}

install/deb/exim/exim4.conf.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ acl_check_mail:
114114
deny condition = ${if eq{$sender_helo_name}{}}
115115
message = HELO required before MAIL
116116

117-
drop message = Helo name contains an IP address (HELO was $sender_helo_name) and not is valid
117+
drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
118118
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}}
119-
condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
119+
condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}}{$sender_helo_name}{no}{yes}}
120120
delay = 45s
121121

122122
drop condition = ${if isip{$sender_helo_name}}

install/upgrade/versions/1.5.0.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,19 @@ if [ -n "$MAIL_SYSTEM" ]; then
3232
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
3333

3434
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
35+
36+
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}}' /etc/exim4/exim4.conf.template
3537
fi
3638

3739
# Clean up legacy mailhelo file
3840
rm -f /etc/${MAIL_SYSTEM}/mailhelo.conf
39-
40-
# Clean up legacy ip variable
41-
for ip in $($BIN/v-list-sys-ips plain | cut -f1); do
42-
sed '/^HELO/d' $HESTIA/data/ips/$ip > /dev/null
43-
done
4441
fi
4542

43+
# Clean up legacy ip variable
44+
for ip in $($BIN/v-list-sys-ips plain | cut -f1); do
45+
sed '/^HELO/d' $HESTIA/data/ips/$ip > /dev/null
46+
done
47+
4648
if [ -L "/var/log/hestia" ]; then
4749
echo "[ ! ] Move /usr/local/hestia/log/* to /var/log/hestia/"
4850
rm /var/log/hestia

0 commit comments

Comments
 (0)