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

Fix issues with webmail and mail domain un-suspend

Kristan Kenney 5 лет назад
Родитель
Сommit
7e5e7cf2ed
2 измененных файлов с 11 добавлено и 5 удалено
  1. 5 4
      bin/v-add-sys-webmail
  2. 6 1
      bin/v-unsuspend-mail-domain

+ 5 - 4
bin/v-add-sys-webmail

@@ -1,12 +1,13 @@
 #!/bin/bash
 # info: add webmail support for a domain
-# options: USER DOMAIN WEBMAIL [RESTART] [QUIET]
+# options: USER DOMAIN [WEBMAIL] [RESTART] [QUIET]
 # labels: hestia
 #
 # example: v-add-sys-webmail user domain.com
+# example: v-add-sys-webmail user domain.com rainloop
+# example: v-add-sys-webmail user domain.com roundcube
 #
-# this function adds support for webmail services
-# to a mail domain.
+# this function enables webmail client for a mail domain.
 
 #----------------------------------------------------------#
 #                    Variable&Function                     #
@@ -51,7 +52,7 @@ if [ -z "$webmail" ]; then
     done
 fi
 
-check_args '3' "$#" 'USER DOMAIN WEBMAIL [RESTART]'
+check_args '2' "$#" 'USER DOMAIN [WEBMAIL] [RESTART]'
 is_format_valid 'user' 'domain'
 is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
 is_system_enabled "$IMAP_SYSTEM" 'IMAP_SYSTEM'

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

@@ -60,7 +60,12 @@ decrease_user_value "$user" '$SUSPENDED_MAIL'
 
 # Enable webmail access
 if [ ! -z "$IMAP_SYSTEM" ]; then
-    $BIN/v-add-sys-webmail $user $domain 'yes'
+    if [ ! -z "$WEBMAIL_SYSTEM" ]; then
+        for client in ${WEBMAIL_SYSTEM//,/ };do
+            webmail="$client"
+        done
+        $BIN/v-add-sys-webmail $user $domain $webmail 'yes'
+    fi   
 fi
 # Logging
 log_event "$OK" "$ARGUMENTS"