Skip to content

Commit 7e5e7cf

Browse files
author
Kristan Kenney
committed
Fix issues with webmail and mail domain un-suspend
1 parent 2373f75 commit 7e5e7cf

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

bin/v-add-sys-webmail

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
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
5253
fi
5354

54-
check_args '3' "$#" 'USER DOMAIN WEBMAIL [RESTART]'
55+
check_args '2' "$#" 'USER DOMAIN [WEBMAIL] [RESTART]'
5556
is_format_valid 'user' 'domain'
5657
is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
5758
is_system_enabled "$IMAP_SYSTEM" 'IMAP_SYSTEM'

bin/v-unsuspend-mail-domain

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ decrease_user_value "$user" '$SUSPENDED_MAIL'
6060

6161
# Enable webmail access
6262
if [ ! -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
6469
fi
6570
# Logging
6671
log_event "$OK" "$ARGUMENTS"

0 commit comments

Comments
 (0)