Skip to content

Commit 005a3d1

Browse files
author
Kristan Kenney
committed
Remove additional configuration files when suspending mail domains
1 parent d093ec9 commit 005a3d1

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

bin/v-suspend-mail-domain

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
4747
rm -f /etc/$MAIL_SYSTEM/domains/$domain
4848
fi
4949

50+
# Removing webmail configuration
51+
$BIN/v-delete-webmail $user $domain 'yes'
5052

5153
#----------------------------------------------------------#
5254
# Hestia #

bin/v-unsuspend-mail-domain

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
4646
ln -s $HOMEDIR/$user/conf/mail/$domain /etc/$MAIL_SYSTEM/domains/
4747
fi
4848

49+
# Enable webmail access
50+
$BIN/v-add-webmail $user $domain 'yes'
4951

5052
#----------------------------------------------------------#
5153
# Hestia #

func/rebuild.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,10 @@ rebuild_mail_domain_conf() {
483483
$HOMEDIR/$user/conf/mail/$domain/dkim.pem
484484
fi
485485

486-
# Removing symbolic link if domain is suspended
486+
# Removing configuration files if domain is suspended
487487
if [ "$SUSPENDED" = 'yes' ]; then
488488
rm -f /etc/exim/domains/$domain_idn
489+
rm -f /etc/dovecot/conf.d/domains/$domain_idn.conf
489490
fi
490491

491492
# Adding mail directiry

0 commit comments

Comments
 (0)