Skip to content

Commit df9c596

Browse files
committed
Merge branch 'main' into staging/1.5.1
2 parents a733c93 + 3bcbc4c commit df9c596

File tree

7 files changed

+30
-8
lines changed

7 files changed

+30
-8
lines changed

bin/v-add-sys-sftp-jail

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,19 @@ fi
7575
# Checking users
7676
shells="rssh|nologin"
7777
for user in $(grep "$HOMEDIR" /etc/passwd |egrep "$shells" |cut -f 1 -d:); do
78-
$BIN/v-add-user-sftp-jail "$user" "$restart"
78+
if [ -d "$HESTIA/data/users/$user" ]; then
79+
$BIN/v-add-user-sftp-jail "$user" "no"
80+
fi
7981
done
8082

83+
# Restart ssh service
84+
if [ "$restart" = 'no' ]; then
85+
# Skip restart of SSH daemon
86+
echo "" > /dev/null 2>&1
87+
else
88+
service ssh restart > /dev/null 2>&1
89+
fi
90+
8191
# Add v-add-sys-sftp-jail to startup
8292
if [ ! -e "/etc/cron.d/hestia-sftp" ]; then
8393
echo "@reboot root sleep 60 && /usr/local/hestia/bin/v-add-sys-sftp-jail" > /etc/cron.d/hestia-sftp

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#CLAMD = yes
1010

1111
smtp_banner = $smtp_active_hostname
12-
smtp_active_hostname = ${lookup dnsdb{>: ptr=$interface_address}{${listextract{1}{$value}}}{$primary_hostname}}
12+
smtp_active_hostname = ${lookup dnsdb{>: defer_never,ptr=$interface_address}{${listextract{1}{$value}}}{$primary_hostname}}
1313
add_environment = <; PATH=/bin:/usr/bin
1414
keep_environment =
1515
disable_ipv6 = true
@@ -345,7 +345,7 @@ smtp_relay_smtp:
345345

346346
remote_smtp:
347347
driver = smtp
348-
helo_data = ${lookup dnsdb{>: ptr=$sending_ip_address}{${listextract{1}{$value}}}{$primary_hostname}}
348+
helo_data = ${lookup dnsdb{>: defer_never,ptr=$sending_ip_address}{${listextract{1}{$value}}}{$primary_hostname}}
349349
dkim_domain = DKIM_DOMAIN
350350
dkim_selector = mail
351351
dkim_private_key = DKIM_PRIVATE_KEY

install/deb/exim/exim4.conf.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#CLAMD = yes
1010

1111
smtp_banner = $smtp_active_hostname
12-
smtp_active_hostname = ${lookup dnsdb{>: ptr=$interface_address}{${listextract{1}{$value}}}{$primary_hostname}}
12+
smtp_active_hostname = ${lookup dnsdb{>: defer_never,ptr=$interface_address}{${listextract{1}{$value}}}{$primary_hostname}}
1313
add_environment = <; PATH=/bin:/usr/bin
1414
keep_environment =
1515
disable_ipv6 = true
@@ -345,7 +345,7 @@ smtp_relay_smtp:
345345

346346
remote_smtp:
347347
driver = smtp
348-
helo_data = ${lookup dnsdb{>: ptr=$sending_ip_address}{${listextract{1}{$value}}}{$primary_hostname}}
348+
helo_data = ${lookup dnsdb{>: defer_never,ptr=$sending_ip_address}{${listextract{1}{$value}}}{$primary_hostname}}
349349
dkim_domain = DKIM_DOMAIN
350350
dkim_selector = mail
351351
dkim_private_key = DKIM_PRIVATE_KEY

install/hst-install-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1817,7 +1817,7 @@ if [ "$sieve" = 'yes' ]; then
18171817
# 10-master.conf
18181818
sed -i -E -z "s/ }\n user = dovecot\n}/ \}\n unix_listener auth-master \{\n group = mail\n mode = 0660\n user = dovecot\n \}\n user = dovecot\n\}/g" /etc/dovecot/conf.d/10-master.conf
18191819
# 15-lda.conf
1820-
sed -i "s/\#mail_plugins = \\\$mail_plugins/mail_plugins = \$mail_plugins sieve\n auth_socket_path = \/var\/run\/dovecot\/auth-master/g" /etc/dovecot/conf.d/15-lda.conf
1820+
sed -i "s/\#mail_plugins = \\\$mail_plugins/mail_plugins = \$mail_plugins quota sieve\n auth_socket_path = \/var\/run\/dovecot\/auth-master/g" /etc/dovecot/conf.d/15-lda.conf
18211821
# 20-imap.conf
18221822
sed -i "s/mail_plugins = quota imap_quota/mail_plugins = quota imap_quota imap_sieve/g" /etc/dovecot/conf.d/20-imap.conf
18231823

install/hst-install-ubuntu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1823,7 +1823,7 @@ if [ "$sieve" = 'yes' ]; then
18231823
# 10-master.conf
18241824
sed -i -E -z "s/ }\n user = dovecot\n}/ \}\n unix_listener auth-master \{\n group = mail\n mode = 0660\n user = dovecot\n \}\n user = dovecot\n\}/g" /etc/dovecot/conf.d/10-master.conf
18251825
# 15-lda.conf
1826-
sed -i "s/\#mail_plugins = \\\$mail_plugins/mail_plugins = \$mail_plugins sieve\n auth_socket_path = \/var\/run\/dovecot\/auth-master/g" /etc/dovecot/conf.d/15-lda.conf
1826+
sed -i "s/\#mail_plugins = \\\$mail_plugins/mail_plugins = \$mail_plugins quota sieve\n auth_socket_path = \/var\/run\/dovecot\/auth-master/g" /etc/dovecot/conf.d/15-lda.conf
18271827
# 20-imap.conf
18281828
sed -i "s/mail_plugins = quota imap_quota/mail_plugins = quota imap_quota imap_sieve/g" /etc/dovecot/conf.d/20-imap.conf
18291829

install/upgrade/manual/install_sieve.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if [ "$HAS_DOVECOT_SIEVE_INSTALLED" = "0" ]; then
3535
# 10-master.conf
3636
sed -i -E -z "s/ }\n user = dovecot\n}/ \}\n unix_listener auth-master \{\n group = mail\n mode = 0660\n user = dovecot\n \}\n user = dovecot\n\}/g" /etc/dovecot/conf.d/10-master.conf
3737
# 15-lda.conf
38-
sed -i "s/\#mail_plugins = \\\$mail_plugins/mail_plugins = \$mail_plugins sieve\n auth_socket_path = \/var\/run\/dovecot\/auth-master/g" /etc/dovecot/conf.d/15-lda.conf
38+
sed -i "s/\#mail_plugins = \\\$mail_plugins/mail_plugins = \$mail_plugins quota sieve\n auth_socket_path = \/var\/run\/dovecot\/auth-master/g" /etc/dovecot/conf.d/15-lda.conf
3939
# 20-imap.conf
4040
sed -i "s/mail_plugins = quota imap_quota/mail_plugins = quota imap_quota imap_sieve/g" /etc/dovecot/conf.d/20-imap.conf
4141

install/upgrade/versions/1.5.1.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,15 @@ esac
4141

4242
echo "[ * ] Update /etc/apt/sources.list.d/hestia.list"
4343
sed -i "s|deb https://$RHOST/ $codename main|deb [arch=$ARCH] https://$RHOST/ $codename main|g" /etc/apt/sources.list.d/hestia.list
44+
45+
if [ -n "$IMAP_SYSTEM" ]; then
46+
sed -i "s/mail_plugins = \$mail_plugins sieve/mail_plugins = \$mail_plugins quota sieve/g" /etc/dovecot/conf.d/15-lda.conf
47+
fi
48+
49+
if [ -n "$MAIL_SYSTEM" ]; then
50+
echo "[ ! ] Update Exim config"
51+
if [ -f "/etc/exim4/exim4.conf.template" ]; then
52+
sed -i 's/^smtp_active_hostname = \${lookup dnsdb{>: ptr=\$interface_address}{\${listextract{1}{\$value}}}{\$primary_hostname}}$/smtp_active_hostname = \${lookup dnsdb{>: defer_never,ptr=\$interface_address}{\${listextract{1}{\$value}}}{\$primary_hostname}}/' /etc/exim4/exim4.conf.template
53+
sed -i 's/^ helo_data = \${lookup dnsdb{>: ptr=\$sending_ip_address}{\${listextract{1}{\$value}}}{\$primary_hostname}}$/ helo_data = \${lookup dnsdb{>: defer_never,ptr=\$sending_ip_address}{\${listextract{1}{\$value}}}{\$primary_hostname}}/' /etc/exim4/exim4.conf.template
54+
fi
55+
fi

0 commit comments

Comments
 (0)