Skip to content

Commit ec9874e

Browse files
committed
Merge branch 'main' into release
2 parents 48c03ed + 40193ba commit ec9874e

File tree

17 files changed

+85
-27
lines changed

17 files changed

+85
-27
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [1.4.12] - Service release
5+
6+
### Bugfixes
7+
8+
- Allow custom mail domains with own certificates #2061 @myrevery
9+
- Fixed Replace tabulation with \u0009 in v-list-dns-records #2089 @codibit
10+
- Fix #2087 Exim 4.94 Did not send any email to remote servers.
11+
- Fixed #2082 v-delete-web-php creates always new config file
12+
- Add /home/user/.composer in open_basedir #2088 @anvme
13+
414
## [1.4.11] - Service release
515

616
### Features
717

8-
- Added support for Debian 11 (Bullseye) #1611
18+
- Added support for Debian 11 (Bullseye) #1661
919
- Added support for openssl in hestia-php
1020
- Use hestia-php for installing dependencies to solve issue user configurations (hestia-php 7.4.22 required)
1121
- Replace old firewall system with systemd service / startup script #2064 @myrevery

bin/v-delete-web-php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,13 @@ fi
9393
[[ -d /etc/php/$version ]] && rm -rf "/etc/php/$version"
9494

9595
if [ "$WEB_BACKEND" = "php-fpm" ]; then
96-
# Check if www.conf is still missing
97-
if [ ! -f "/etc/php/*/fpm/pool.d/www.conf" ]; then
96+
conf=$(find /etc/php* -name www.conf)
97+
# Check if www.conf exists
98+
if [ -z "$conf" ]; then
9899
# If not grab the "last php version
99-
last=$($HESTIA/bin/v-list-sys-php "shell" | tail -n1);
100+
last=$($BIN/v-list-sys-php "shell" | tail -n1);
100101
cp -f $HESTIA/install/deb/php-fpm/www.conf /etc/php/$last/fpm/pool.d/www.conf
101-
$HESTIA/bin/v-restart-web-backend
102+
$BIN/v-restart-web-backend
102103
fi
103104
fi
104105

bin/v-list-dns-records

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ json_list() {
3131
unset TTL
3232
parse_object_kv_list "$str"
3333
[ -z "$TTL" ] && TTL="$zone_ttl"
34-
VALUE=$(echo "$VALUE" |sed -e 's/"/\\"/g' -e "s/%quote%/'/g")
34+
VALUE=$(echo "$VALUE" |sed -e 's/"/\\"/g' -e "s/%quote%/'/g" -e 's/ /\\u0009/g')
3535
echo -n ' "'$ID'": {
3636
"RECORD": "'$RECORD'",
3737
"TYPE": "'$TYPE'",

func/domain.sh

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,25 @@ is_mail_domain_new() {
621621
if [ "$2" == 'mail' ]; then
622622
check_result $E_EXISTS "Mail domain $1 exists"
623623
fi
624-
mail_user=$(echo "$mail" |cut -f 7 -d /)
624+
mail_user=$(echo "$mail" | cut -f 7 -d /)
625625
if [ "$mail_user" != "$user" ]; then
626626
check_result $E_EXISTS "Mail domain $1 exists"
627627
fi
628628
fi
629+
mail_sub=$(echo "$1" | cut -f 1 -d .)
630+
mail_nosub=$(echo "$1" | cut -f 1 -d . --complement)
631+
for mail_reserved in $(echo "mail $WEBMAIL_ALIAS"); do
632+
if [ ! -z "$(ls $HESTIA/data/users/*/mail/$mail_reserved.$1.conf 2>/dev/null)" ]; then
633+
if [ "$2" == 'mail' ]; then
634+
check_result $E_EXISTS "Required subdomain \"$mail_reserved.$1\" already exists"
635+
fi
636+
fi
637+
if [ ! -z "$(ls $HESTIA/data/users/*/mail/$mail_nosub.conf 2>/dev/null)" ] && [ "$mail_sub" = "$mail_reserved" ]; then
638+
if [ "$2" == 'mail' ]; then
639+
check_result $E_INVALID "The subdomain \"$mail_sub.\" is reserved by \"$mail_nosub\""
640+
fi
641+
fi
642+
done
629643
}
630644

631645
# Checking mail account existance
@@ -641,16 +655,15 @@ is_mail_new() {
641655
fi
642656
}
643657

644-
645658
# Add mail server SSL configuration
646659
add_mail_ssl_config() {
647660
# Ensure that SSL certificate directories exists
648661
if [ ! -d $HOMEDIR/$user/conf/mail/$domain/ssl/ ]; then
649662
mkdir -p $HOMEDIR/$user/conf/mail/$domain/ssl/
650663
fi
651664

652-
if [ ! -d /usr/local/hestia/ssl/mail ]; then
653-
mkdir -p /usr/local/hestia/ssl/mail
665+
if [ ! -d $HESTIA/ssl/mail ]; then
666+
mkdir -p $HESTIA/ssl/mail
654667
fi
655668

656669
if [ ! -d /etc/dovecot/conf.d/domains ]; then
@@ -684,23 +697,30 @@ add_mail_ssl_config() {
684697
rm -f /etc/dovecot/conf.d/domains/$domain.conf
685698
fi
686699

700+
echo "" >> /etc/dovecot/conf.d/domains/$domain.conf
701+
echo "local_name $domain {" >> /etc/dovecot/conf.d/domains/$domain.conf
702+
echo " ssl_cert = <$HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem" >> /etc/dovecot/conf.d/domains/$domain.conf
703+
echo " ssl_key = <$HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key" >> /etc/dovecot/conf.d/domains/$domain.conf
704+
echo "}" >> /etc/dovecot/conf.d/domains/$domain.conf
687705
echo "" >> /etc/dovecot/conf.d/domains/$domain.conf
688706
echo "local_name mail.$domain {" >> /etc/dovecot/conf.d/domains/$domain.conf
689707
echo " ssl_cert = <$HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem" >> /etc/dovecot/conf.d/domains/$domain.conf
690708
echo " ssl_key = <$HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key" >> /etc/dovecot/conf.d/domains/$domain.conf
691709
echo "}" >> /etc/dovecot/conf.d/domains/$domain.conf
692710

693711
# Add domain SSL configuration to exim4
694-
ln -s $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem /usr/local/hestia/ssl/mail/mail.$domain.crt
695-
ln -s $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key /usr/local/hestia/ssl/mail/mail.$domain.key
712+
ln -s $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem $HESTIA/ssl/mail/$domain.crt
713+
ln -s $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key $HESTIA/ssl/mail/$domain.key
714+
ln -s $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem $HESTIA/ssl/mail/mail.$domain.crt
715+
ln -s $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key $HESTIA/ssl/mail/mail.$domain.key
696716

697717
# Set correct permissions on certificates
698-
chmod 750 $HOMEDIR/$user/conf/mail/$domain/ssl
718+
chmod 0750 $HOMEDIR/$user/conf/mail/$domain/ssl
699719
chown -R $MAIL_USER:mail $HOMEDIR/$user/conf/mail/$domain/ssl
700720
chmod 0644 $HOMEDIR/$user/conf/mail/$domain/ssl/*
701721
chown -h $user:mail $HOMEDIR/$user/conf/mail/$domain/ssl/*
702-
chmod -R 0644 /usr/local/hestia/ssl/mail/*
703-
chown -h $user:mail /usr/local/hestia/ssl/mail/*
722+
chmod -R 0644 $HESTIA/ssl/mail/*
723+
chown -h $user:mail $HESTIA/ssl/mail/*
704724
}
705725

706726
# Delete SSL support for mail domain
@@ -719,7 +739,8 @@ del_mail_ssl_config() {
719739

720740
# Remove SSL certificates
721741
rm -f $HOMEDIR/$user/conf/mail/$domain/ssl/*
722-
rm -f /usr/local/hestia/ssl/mail/mail.$domain.*
742+
rm -f $HESTIA/ssl/mail/$domain.crt $HESTIA/ssl/mail/$domain.key
743+
rm -f $HESTIA/ssl/mail/mail.$domain.crt $HESTIA/ssl/mail/mail.$domain.key
723744
}
724745

725746
# Delete generated certificates from user configuration data directory

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ DKIM_DOMAIN = ${lc:${domain:$h_from:}}
7373
DKIM_FILE = /etc/exim4/domains/${lookup{${lc:${domain:$h_from:}}}dsearch{/etc/exim4/domains/}}/dkim.pem
7474
DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
7575

76-
OUTGOING_IP = /etc/exim4/domains/$sender_address_domain/ip
76+
OUTGOING_IP = /etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains}}/ip
7777

78-
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}}
78+
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}}
7979
SMTP_RELAY_HOST = ${lookup{host}lsearch{SMTP_RELAY_FILE}}
8080
SMTP_RELAY_PORT = ${lookup{port}lsearch{SMTP_RELAY_FILE}}
8181
SMTP_RELAY_USER = ${lookup{user}lsearch{SMTP_RELAY_FILE}}

install/deb/multiphp/nginx/PHP-73.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ if [ ! -f "$pool_file_73" ]; then
7272
service php7.3-fpm restart
7373
fi
7474

75+
if [ -f "$pool_file_74" ]; then
76+
rm $pool_file_74
77+
service php7.4-fpm restart
78+
fi
79+
7580
if [ -f "$pool_file_80" ]; then
7681
rm $pool_file_80
7782
service php8.0-fpm restart

install/deb/php-fpm/multiphp.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pm.status_path = /status
1717

1818
php_admin_value[upload_tmp_dir] = /home/%user%/tmp
1919
php_admin_value[session.save_path] = /home/%user%/tmp
20-
php_admin_value[open_basedir] = /home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/private:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt
20+
php_admin_value[open_basedir] = /home/%user%/.composer:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/private:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt
2121
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f admin@%domain%
2222

2323
env[PATH] = /usr/local/bin:/usr/bin:/bin

install/deb/templates/web/php-fpm/default.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pm.status_path = /status
1717

1818
php_admin_value[upload_tmp_dir] = /home/%user%/tmp
1919
php_admin_value[session.save_path] = /home/%user%/tmp
20-
php_admin_value[open_basedir] = /home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/private:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt
20+
php_admin_value[open_basedir] = /home/%user%/.composer:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/private:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt
2121
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f admin@%domain%
2222

2323
env[HOSTNAME] = $HOSTNAME

install/deb/templates/web/php-fpm/socket.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pm.status_path = /status
1717

1818
php_admin_value[upload_tmp_dir] = /home/%user%/tmp
1919
php_admin_value[session.save_path] = /home/%user%/tmp
20-
php_admin_value[open_basedir] = /home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/var/www/html:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt
20+
php_admin_value[open_basedir] = /home/%user%/.composer:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/var/www/html:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt
2121
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f admin@%domain%
2222

2323
env[HOSTNAME] = $HOSTNAME

install/hst-install-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ HESTIA_INSTALL_DIR="$HESTIA/install/deb"
2323
VERBOSE='no'
2424

2525
# Define software versions
26-
HESTIA_INSTALL_VER='1.4.11'
26+
HESTIA_INSTALL_VER='1.4.12'
2727
pma_v='5.1.1'
2828
rc_v="1.4.11"
2929
multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0")

0 commit comments

Comments
 (0)