File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,10 @@ rebuild_mail_domain_conf
6868if [ ! -z " $WEB_SYSTEM " ] || [ ! -z " $PROXY_SYSTEM " ]; then
6969 if [ ! -z " $IMAP_SYSTEM " ]; then
7070 WEBMAIL=$( get_object_value ' web' ' DOMAIN' " $domain " " $WEBMAIL " )
71- if [ -z " $WEBMAIL " ]; then WEBMAIL=' roundcube' ; fi
72- $BIN /v-delete-mail-domain-webmail $user $domain ' ' $restart ' yes'
73- $BIN /v-add-mail-domain-webmail $user $domain $WEBMAIL ' ' $restart ' yes'
71+ if [ ! -z " $WEBMAIL " ]; then
72+ $BIN /v-delete-mail-domain-webmail $user $domain ' ' $restart ' yes'
73+ $BIN /v-add-mail-domain-webmail $user $domain $WEBMAIL ' ' $restart ' yes'
74+ fi
7475 fi
7576fi
7677
Original file line number Diff line number Diff line change @@ -110,6 +110,15 @@ if [ "$MAIL_SYSTEM" == "exim4" ]; then
110110 fi
111111fi
112112
113+ # Set default webmail system for mail domains
114+ if [ ! -z " $WEBMAIL_SYSTEM " ]; then
115+ for user in $( $BIN /v-list-users plain | cut -f1) ; do
116+ for domain in $( $BIN /v-list-mail-domains $user plain | cut -f1) ; do
117+ $BIN /v-add-mail-domain-webmail $user $domain
118+ done
119+ done
120+ fi
121+
113122# Fix PostgreSQL repo
114123if [ -f /etc/apt/sources.list.d/postgresql.list ]; then
115124 echo " [ * ] Updating PostgreSQL repository..."
You can’t perform that action at this time.
0 commit comments