File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22# info: add webmail support for a domain
3- # options: USER DOMAIN WEBMAIL [RESTART] [QUIET]
3+ # options: USER DOMAIN [ WEBMAIL] [RESTART] [QUIET]
44# labels: hestia
55#
66# example: v-add-sys-webmail user domain.com
7+ # example: v-add-sys-webmail user domain.com rainloop
8+ # example: v-add-sys-webmail user domain.com roundcube
79#
8- # this function adds support for webmail services
9- # to a mail domain.
10+ # this function enables webmail client for a mail domain.
1011
1112# ----------------------------------------------------------#
1213# Variable&Function #
@@ -51,7 +52,7 @@ if [ -z "$webmail" ]; then
5152 done
5253fi
5354
54- check_args ' 3 ' " $# " ' USER DOMAIN WEBMAIL [RESTART]'
55+ check_args ' 2 ' " $# " ' USER DOMAIN [ WEBMAIL] [RESTART]'
5556is_format_valid ' user' ' domain'
5657is_system_enabled " $WEB_SYSTEM " ' WEB_SYSTEM'
5758is_system_enabled " $IMAP_SYSTEM " ' IMAP_SYSTEM'
Original file line number Diff line number Diff line change @@ -60,7 +60,12 @@ decrease_user_value "$user" '$SUSPENDED_MAIL'
6060
6161# Enable webmail access
6262if [ ! -z " $IMAP_SYSTEM " ]; then
63- $BIN /v-add-sys-webmail $user $domain ' yes'
63+ if [ ! -z " $WEBMAIL_SYSTEM " ]; then
64+ for client in ${WEBMAIL_SYSTEM// ,/ } ; do
65+ webmail=" $client "
66+ done
67+ $BIN /v-add-sys-webmail $user $domain $webmail ' yes'
68+ fi
6469fi
6570# Logging
6671log_event " $OK " " $ARGUMENTS "
You can’t perform that action at this time.
0 commit comments