Просмотр исходного кода

Remove additional configuration files when suspending mail domains

Kristan Kenney 6 лет назад
Родитель
Сommit
005a3d117a
3 измененных файлов с 6 добавлено и 1 удалено
  1. 2 0
      bin/v-suspend-mail-domain
  2. 2 0
      bin/v-unsuspend-mail-domain
  3. 2 1
      func/rebuild.sh

+ 2 - 0
bin/v-suspend-mail-domain

@@ -47,6 +47,8 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
     rm -f /etc/$MAIL_SYSTEM/domains/$domain
     rm -f /etc/$MAIL_SYSTEM/domains/$domain
 fi
 fi
 
 
+# Removing webmail configuration
+$BIN/v-delete-webmail $user $domain 'yes'
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Hestia                             #
 #                       Hestia                             #

+ 2 - 0
bin/v-unsuspend-mail-domain

@@ -46,6 +46,8 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
     ln -s $HOMEDIR/$user/conf/mail/$domain /etc/$MAIL_SYSTEM/domains/
     ln -s $HOMEDIR/$user/conf/mail/$domain /etc/$MAIL_SYSTEM/domains/
 fi
 fi
 
 
+# Enable webmail access
+$BIN/v-add-webmail $user $domain 'yes'
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Hestia                             #
 #                       Hestia                             #

+ 2 - 1
func/rebuild.sh

@@ -483,9 +483,10 @@ rebuild_mail_domain_conf() {
                 $HOMEDIR/$user/conf/mail/$domain/dkim.pem
                 $HOMEDIR/$user/conf/mail/$domain/dkim.pem
         fi
         fi
 
 
-        # Removing symbolic link if domain is suspended
+        # Removing configuration files if domain is suspended
         if [ "$SUSPENDED" = 'yes' ]; then
         if [ "$SUSPENDED" = 'yes' ]; then
             rm -f /etc/exim/domains/$domain_idn
             rm -f /etc/exim/domains/$domain_idn
+            rm -f /etc/dovecot/conf.d/domains/$domain_idn.conf
         fi
         fi
 
 
         # Adding mail directiry
         # Adding mail directiry