Skip to content

Commit 0b1fa12

Browse files
committed
Revert "Fix hestiacp#1438 Bug in exim config (hestiacp#2224)"
Fix caused issues with unauthenticated smtp users This reverts commit b097e18.
1 parent f5ebf1a commit 0b1fa12

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
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 a ip address (HELO was $sender_helo_name) and not is valid
117+
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/upgrade/versions/1.5.0.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,17 @@ 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}}|g' /etc/exim4/exim4.conf.template
3735
fi
3836

3937
# Clean up legacy mailhelo file
4038
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
4144
fi
4245

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-
4846
if [ -L "/var/log/hestia" ]; then
4947
echo "[ ! ] Move /usr/local/hestia/log/* to /var/log/hestia/"
5048
rm /var/log/hestia

0 commit comments

Comments
 (0)