Browse Source

Update add_webmail_config routines

Kristan Kenney 7 years ago
parent
commit
54988215ec
2 changed files with 7 additions and 2 deletions
  1. 6 1
      bin/v-add-mail-domain
  2. 1 1
      func/domain.sh

+ 6 - 1
bin/v-add-mail-domain

@@ -128,7 +128,12 @@ if [ ! -z "$DNS_SYSTEM" ] && [ "$dkim" = 'yes' ]; then
 fi
 
 # Add webmail configuration to mail domain
-add_webmail_config "$WEB_SYSTEM" "default.tpl"
+if [ ! -z "$WEB_SYSTEM" ]; then
+    add_webmail_config "$WEB_SYSTEM" "default.tpl"
+fi
+if [ ! -z "$PROXY_SYSTEM" ]; then
+    add_webmail_config "$PROXY_SYSTEM" "default.tpl"
+fi
 
 #----------------------------------------------------------#
 #                       Hestia                             #

+ 1 - 1
func/domain.sh

@@ -600,7 +600,7 @@ add_webmail_config() {
     ssl_pem="$HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem"
     ssl_ca="$HOMEDIR/$user/conf/mail/$domain/ssl/$domain.ca"
 
-    cat $MAILTPL/$WEB_BACKEND/$2 | \
+    cat $MAILTPL/$1/$WEB_BACKEND/$2 | \
         sed -e "s|%ip%|$local_ip|g" \
             -e "s|%domain%|$domain|g" \
             -e "s|%domain_idn%|$domain_idn|g" \