Parcourir la source

Integrate SnappyMail and Drop support Rainloop (#3590)

* Integrate SnappyMail
* Drop support Rainloop
+ Update docs to remove rainloop
* Minor changes installer
* Set port during install
---------

Co-authored-by: djmaze <>
Co-authored-by: m hagoort <djmaze@laptop.mhxs>
Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
the-djmaze il y a 2 ans
Parent
commit
4e1f0bbcb3
33 fichiers modifiés avec 359 ajouts et 492 suppressions
  1. 1 1
      .github/ISSUE_TEMPLATE/BUG-REPORT.yml
  2. 5 0
      bin/v-add-mail-domain-ssl
  3. 1 1
      bin/v-add-mail-domain-webmail
  4. 0 177
      bin/v-add-sys-rainloop
  5. 169 0
      bin/v-add-sys-snappymail
  6. 3 0
      bin/v-change-sys-hostname
  7. 3 3
      bin/v-change-sys-port
  8. 1 1
      docs/_data/features.ts
  9. 9 0
      docs/docs/reference/cli.md
  10. 7 7
      docs/docs/server-administration/email.md
  11. 1 1
      docs/docs/user-guide/mail-domains.md
  12. 12 12
      func/upgrade.sh
  13. 73 0
      install/common/snappymail/install.php
  14. 0 23
      install/deb/rainloop/change_password.php
  15. 0 16
      install/deb/rainloop/default.ini
  16. 0 142
      install/deb/rainloop/plugins/hestia-change-password/HestiaChangePasswordDriver.php
  17. 0 20
      install/deb/rainloop/plugins/hestia-change-password/LICENSE
  18. 0 3
      install/deb/rainloop/plugins/hestia-change-password/README
  19. 0 1
      install/deb/rainloop/plugins/hestia-change-password/VERSION
  20. 0 59
      install/deb/rainloop/plugins/hestia-change-password/index.php
  21. 0 3
      install/deb/rainloop/plugins/plugin-add-x-originating-ip-header.ini
  22. 0 4
      install/deb/rainloop/plugins/plugin-hestia-change-password.ini
  23. 31 0
      install/deb/templates/mail/apache2/snappymail.stpl
  24. 25 0
      install/deb/templates/mail/apache2/snappymail.tpl
  25. 2 2
      install/deb/templates/mail/nginx/default_snappymail.stpl
  26. 2 2
      install/deb/templates/mail/nginx/default_snappymail.tpl
  27. 1 1
      install/deb/templates/mail/nginx/snappymail.stpl
  28. 1 1
      install/deb/templates/mail/nginx/snappymail.tpl
  29. 1 1
      install/upgrade/manual/upgrade_multi_php.sh
  30. 2 2
      install/upgrade/upgrade.conf
  31. 2 2
      src/deb/hestia/postinst
  32. 2 2
      src/rpm/hestia/hestia.spec
  33. 5 5
      test/test.bats

+ 1 - 1
.github/ISSUE_TEMPLATE/BUG-REPORT.yml

@@ -44,7 +44,7 @@ body:
         - Let's Encrypt SSL
         - Mail (Exim, Dovecot)
         - Mail Security (Antivirus, Antispam)
-        - Webmail (Roundcube, Rainloop)
+        - Webmail (Roundcube, SnappyMail)
         - Firewall (Iptables, Fail2ban)
     validations:
       required: true

+ 5 - 0
bin/v-add-mail-domain-ssl

@@ -92,6 +92,11 @@ if [ "$WEBMAIL" == "roundcube" ]; then
 	if [ "$WEB_SYSTEM" = "nginx" ]; then
 		WEBMAIL_TEMPLATE="web_system"
 	fi
+elif [ "$WEBMAIL" == "snappymail" ]; then
+	WEBMAIL_TEMPLATE="snappymail"
+	if [ -n "$PROXY_SYSTEM" ]; then
+		PROXY_TEMPLATE="default_snappymail"
+	fi
 elif [ "$WEBMAIL" == "rainloop" ]; then
 	WEBMAIL_TEMPLATE="rainloop"
 	if [ -n "$PROXY_SYSTEM" ]; then

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

@@ -3,7 +3,7 @@
 # options: USER DOMAIN [WEBMAIL] [RESTART] [QUIET]
 #
 # 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 snappymail
 # example: v-add-sys-webmail user domain.com roundcube
 #
 # This function enables webmail client for a mail domain.

+ 0 - 177
bin/v-add-sys-rainloop

@@ -1,177 +0,0 @@
-#!/bin/bash
-# info: Install Rainloop webmail client
-# options: [MODE]
-#
-# This function installs the Rainloop webmail client.
-
-#----------------------------------------------------------#
-#                Variables & Functions                     #
-#----------------------------------------------------------#
-
-# Includes
-# shellcheck source=/etc/hestiacp/hestia.conf
-source /etc/hestiacp/hestia.conf
-# shellcheck source=/usr/local/hestia/func/main.sh
-source $HESTIA/func/main.sh
-# load config file
-source_conf "$HESTIA/conf/hestia.conf"
-# upgrade config file
-source "$HESTIA/install/upgrade/upgrade.conf"
-
-MODE=$1
-UPDATE="no"
-# Version and Download paths
-# Version to be moved to upgrade script
-RL_FILE="rainloop-latest.zip"
-# For removal of folder
-RL_EXTRACT_MAIN="rainloop"
-
-# Downloading full version
-RL_URL="https://www.rainloop.net/repository/webmail/rainloop-latest.zip"
-
-# Folder paths
-RL_INSTALL_DIR="/var/lib/rainloop"
-RL_CONFIG_DIR="/etc/rainloop"
-RL_LOG="/var/log/rainloop"
-
-#----------------------------------------------------------#
-#                    Verifications                         #
-#----------------------------------------------------------#
-
-# Checking root permissions
-if [ "x$(id -u)" != 'x0' ]; then
-	echo "ERROR: v-add-sys-rainloop can only be executed by the root user"
-	exit 10
-fi
-
-# Ensure that $HESTIA (/usr/local/hestia/) and other variables are valid.
-if [ -z "$HESTIA" ]; then
-	HESTIA="/usr/local/hestia"
-fi
-
-if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then
-	echo "ERROR: Environment variables not present, installation aborted."
-	exit 2
-fi
-
-# Get current version
-if [ -f "/var/lib/rainloop/data/VERSION" ]; then
-	version=$(cat $RL_INSTALL_DIR/data/VERSION)
-	if [ "$version" == "$rl_v" ]; then
-		echo "Error: Installed version ($version) is equal to the available version ($rl_v)"
-		exit 2
-	else
-		UPDATE="yes"
-	fi
-fi
-
-# Perform verification if read-only mode is enabled
-check_hestia_demo_mode
-
-#----------------------------------------------------------#
-#                       Action                             #
-#----------------------------------------------------------#
-
-if [ "$UPDATE" == "no" ]; then
-	rm -f -r $RL_INSTALL_DIR
-	rm -f -r $RL_CONFIG_DIR
-
-	mkdir $RL_INSTALL_DIR
-	mkdir $RL_CONFIG_DIR
-
-	cd "$RL_INSTALL_DIR"
-	[ ! -f "${RC_INSTALL_DIR}/${RC_FILE}" ] && wget "$RL_URL" --retry-connrefused --quiet -O "${RL_INSTALL_DIR}/${RL_FILE}"
-
-	key=$(openssl rand -hex 4)
-
-	admin_account="admin_$key"
-	admin_password=$(generate_password)
-	r=$(generate_password)
-
-	echo "Username: admin_$key" > ~/.rainloop
-	echo "Password: $admin_password" >> ~/.rainloop
-	echo "Secret key: admin_$key" >> ~/.rainloop
-
-	unzip -q ${RL_INSTALL_DIR}/${RL_FILE}
-
-	mv ./data $RL_CONFIG_DIR/
-	ln -s $RL_CONFIG_DIR/data/ ./data
-
-	SALT=$(openssl rand -base64 64)
-	cp ./data/VERSION ./data/INSTALLED
-	echo "<?php //$SALT" > ./data/SALT.php
-	echo "Forbidden" > ./data/index.php
-	echo "Forbidden" > ./data/index.html
-
-	# Create database
-	mysql -e "CREATE DATABASE rainloop"
-	# Mysql available on system
-	r=$(generate_password)
-	mysql -e "GRANT ALL ON rainloop.*
-     TO rainloop@localhost IDENTIFIED BY '$r'"
-
-	mkdir -p $RL_CONFIG_DIR/data/_data_/_default_/configs
-	php -f $HESTIA_INSTALL_DIR/rainloop/change_password.php "admin_$key" "$admin_password" "$r"
-	mkdir -p $RL_CONFIG_DIR/data/_data_/_default_/domains
-	cp -f $HESTIA_INSTALL_DIR/rainloop/default.ini $RL_CONFIG_DIR/data/_data_/_default_/domains
-	mkdir -p $RL_CONFIG_DIR/data/_data_/_default_/plugins
-	cp -f -r $HESTIA_INSTALL_DIR/rainloop/plugins/hestia-change-password/ $RL_CONFIG_DIR/data/_data_/_default_/plugins
-	mkdir -p $RL_CONFIG_DIR/data/_data_/_default_/plugins/add-x-originating-ip-header
-	# Download add-x-originating-ip-header from rainloop github
-	wget --quiet -O $RL_CONFIG_DIR/data/_data_/_default_/plugins/add-x-originating-ip-header/index.php https://raw.githubusercontent.com/RainLoop/rainloop-webmail/master/plugins/add-x-originating-ip-header/index.php
-	wget --quiet -O $RL_CONFIG_DIR/data/_data_/_default_/plugins/add-x-originating-ip-header/VERSION https://raw.githubusercontent.com/RainLoop/rainloop-webmail/master/plugins/add-x-originating-ip-header/VERSION
-	wget --quiet -O $RL_CONFIG_DIR/data/_data_/_default_/plugins/add-x-originating-ip-header/README https://raw.githubusercontent.com/RainLoop/rainloop-webmail/master/plugins/add-x-originating-ip-header/README
-	wget --quiet -O $RL_CONFIG_DIR/data/_data_/_default_/plugins/add-x-originating-ip-header/LICENSE https://raw.githubusercontent.com/RainLoop/rainloop-webmail/master/plugins/add-x-originating-ip-header/LICENSE
-
-	cp -f $HESTIA_INSTALL_DIR/rainloop/plugins/plugin-add-x-originating-ip-header.ini $RL_CONFIG_DIR/data/_data_/_default_/configs/plugin-add-x-originating-ip-header.ini
-	cp -f $HESTIA_INSTALL_DIR/rainloop/plugins/plugin-hestia-change-password.ini $RL_CONFIG_DIR/data/_data_/_default_/configs/plugin-hestia-change-password.ini
-
-	sed -i "s/%hostname%/$(hostname)/g" $RL_CONFIG_DIR/data/_data_/_default_/configs/plugin-hestia-change-password.ini
-	sed -i "s/%port%/$BACKEND_PORT/g" $RL_CONFIG_DIR/data/_data_/_default_/configs/plugin-hestia-change-password.ini
-
-	chown -R www-data:www-data ./data
-	chown -R www-data:www-data $RL_CONFIG_DIR/
-
-	rm ${RL_INSTALL_DIR}/${RL_FILE}
-	# Add robots.txt
-	echo "User-agent: *" > $RL_INSTALL_DIR/robots.txt
-	echo "Disallow: /" >> $RL_INSTALL_DIR/robots.txt
-
-	# Updating hestia.conf
-	if [ -z "$(grep WEBMAIL_SYSTEM $HESTIA/conf/hestia.conf)" ]; then
-		$BIN/v-change-sys-config-value 'WEBMAIL_SYSTEM' 'rainloop'
-	else
-		if [ -z "$(echo "$WEBMAIL_SYSTEM" | grep -w 'rainloop')" ]; then
-			if [ -n "$WEBMAIL_SYSTEM" ]; then
-				$BIN/v-change-sys-config-value 'WEBMAIL_SYSTEM' "rainloop,$WEBMAIL_SYSTEM"
-			else
-				$BIN/v-change-sys-config-value 'WEBMAIL_SYSTEM' "rainloop"
-			fi
-		fi
-	fi
-
-else
-	[ ! -f "${RC_INSTALL_DIR}/${RC_FILE}" ] && wget "$RL_URL" --quiet -O "${RL_INSTALL_DIR}/${RL_FILE}"
-	version=$(cat $RL_INSTALL_DIR/data/VERSION)
-
-	unzip -q -j ${RL_INSTALL_DIR}/${RL_FILE} "data/VERSION" -d $RL_INSTALL_DIR/
-	version_source=$(cat $RL_INSTALL_DIR/VERSION)
-
-	# Check version inside .zip file in case hestia didn't update yet
-	if [ "$version" != "$version_source" ]; then
-		unzip -q -o ${RL_INSTALL_DIR}/${RL_FILE} -d $RL_INSTALL_DIR/
-		rm $RL_INSTALL_DIR/$RL_FILE
-	fi
-	rm ${RL_INSTALL_DIR}/VERSION
-fi
-
-#----------------------------------------------------------#
-#                       Hestia                             #
-#----------------------------------------------------------#
-
-if [ "$UPDATE" = "yes" ]; then
-	$BIN/v-log-action "system" "Info" "Plugins" "Rainloop updated (Version: $version)."
-else
-	$BIN/v-log-action "system" "Info" "Plugins" "Rainloop enabled (Version: $version)."
-fi
-log_event "$OK" "$ARGUMENTS"

+ 169 - 0
bin/v-add-sys-snappymail

@@ -0,0 +1,169 @@
+#!/bin/bash
+# info: Install SnappyMail webmail client
+# options: [MODE]
+#
+# This function installs the SnappyMail webmail client.
+
+#----------------------------------------------------------#
+#                Variables & Functions                     #
+#----------------------------------------------------------#
+
+# Includes
+# shellcheck source=/etc/hestiacp/hestia.conf
+source /etc/hestiacp/hestia.conf
+# shellcheck source=/usr/local/hestia/func/main.sh
+source $HESTIA/func/main.sh
+# load config file
+source_conf "$HESTIA/conf/hestia.conf"
+# upgrade config file
+source "$HESTIA/install/upgrade/upgrade.conf"
+
+MODE=$1
+UPDATE="no"
+# Version and Download paths
+# Version to be moved to upgrade script
+SM_FILE="snappymail-latest.tar.gz"
+# For removal of folder
+SM_EXTRACT_MAIN="snappymail"
+
+# Downloading full version
+SM_URL="https://snappymail.eu/repository/latest.tar.gz"
+
+# Folder paths
+SM_INSTALL_DIR="/var/lib/snappymail"
+SM_CONFIG_DIR="/etc/snappymail"
+SM_LOG="/var/log/snappymail"
+
+#----------------------------------------------------------#
+#                    Verifications                         #
+#----------------------------------------------------------#
+
+# Checking root permissions
+if [ "x$(id -u)" != 'x0' ]; then
+	echo "ERROR: v-add-sys-snappymail can only be executed by the root user"
+	exit 10
+fi
+
+# Ensure that $HESTIA (/usr/local/hestia/) and other variables are valid.
+if [ -z "$HESTIA" ]; then
+	HESTIA="/usr/local/hestia"
+fi
+
+if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then
+	echo "ERROR: Environment variables not present, installation aborted."
+	exit 2
+fi
+
+if [ -z "$(echo "$DB_SYSTEM" | grep -w 'mysql')" ]; then
+	echo "ERROR: Mysql not available. Installation aborted"
+	exit 2
+fi
+
+# Get current version
+if [ -f "/var/lib/snappymail/data/VERSION" ]; then
+	version=$(cat $SM_INSTALL_DIR/data/VERSION)
+	if [ "$version" == "$sm_v" ]; then
+		echo "Error: Installed version ($version) is equal to the available version ($sm_v)"
+		exit 2
+	else
+		UPDATE="yes"
+	fi
+fi
+
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
+#----------------------------------------------------------#
+#                       Action                             #
+#----------------------------------------------------------#
+
+if [ "$UPDATE" == "no" ]; then
+	rm -f -r $SM_INSTALL_DIR
+	rm -f -r $SM_CONFIG_DIR
+
+	mkdir $SM_INSTALL_DIR
+	mkdir $SM_CONFIG_DIR
+
+	cd "$SM_INSTALL_DIR"
+	[ ! -f "${SM_INSTALL_DIR}/${SM_FILE}" ] && wget "$SM_URL" --retry-connrefused --quiet -O "${SM_INSTALL_DIR}/${SM_FILE}"
+
+	if [ ! -f "${SM_INSTALL_DIR}/${SM_FILE}" ]; then
+		echo "ERROR: Download failed, installation aborted."
+		exit 2
+	fi
+
+	# Get current version
+
+	key=$(openssl rand -hex 4)
+
+	admin_account="admin_$key"
+	admin_password=$(generate_password)
+
+	echo "Username: admin_$key" > ~/.snappymail
+	echo "Password: $admin_password" >> ~/.snappymail
+	echo "Secret key: admin_$key" >> ~/.snappymail
+
+	tar -xzf ${SM_INSTALL_DIR}/${SM_FILE}
+
+	mv ./data $SM_CONFIG_DIR/
+	ln -s $SM_CONFIG_DIR/data/ ./data
+
+	if [ -f '/usr/bin/mariadb' ]; then
+		mariadb -e "CREATE DATABASE snappymail" 2>&1
+		r=$(generate_password)
+		mariadb -e "GRANT ALL ON snappymail.*
+		 TO snappymail@localhost IDENTIFIED BY '$r'"
+	else
+		mysql -e "CREATE DATABASE snappymail" 2>&1
+		r=$(generate_password)
+		mysql -e "GRANT ALL ON snappymail.*
+		 TO snappymail@localhost IDENTIFIED BY '$r'"
+	fi
+	php -f $HESTIA_COMMON_DIR/snappymail/install.php "admin_$key" "$admin_password" "$r" "$BACKEND_PORT"
+
+	chown -R www-data:www-data ./data
+	chown -R www-data:www-data $SM_CONFIG_DIR/
+
+	rm ${SM_INSTALL_DIR}/${SM_FILE}
+	# Add robots.txt
+	echo "User-agent: *" > $SM_INSTALL_DIR/robots.txt
+	echo "Disallow: /" >> $SM_INSTALL_DIR/robots.txt
+
+	# Updating hestia.conf
+	if [ -z "$(grep WEBMAIL_SYSTEM $HESTIA/conf/hestia.conf)" ]; then
+		$BIN/v-change-sys-config-value 'WEBMAIL_SYSTEM' 'snappymail'
+	else
+		if [ -z "$(echo "$WEBMAIL_SYSTEM" | grep -w 'snappymail')" ]; then
+			if [ -n "$WEBMAIL_SYSTEM" ]; then
+				$BIN/v-change-sys-config-value 'WEBMAIL_SYSTEM' "snappymail,$WEBMAIL_SYSTEM"
+			else
+				$BIN/v-change-sys-config-value 'WEBMAIL_SYSTEM' "snappymail"
+			fi
+		fi
+	fi
+
+else
+	[ ! -f "${SM_INSTALL_DIR}/${SM_FILE}" ] && wget "$SM_URL" --quiet -O "${SM_INSTALL_DIR}/${SM_FILE}"
+	version=$(cat $SM_INSTALL_DIR/data/VERSION)
+
+	tar -xzf snappymail-latest.tar.gz "data/VERSION" $SM_INSTALL_DIR/
+	version_source=$(cat $SM_INSTALL_DIR/VERSION)
+
+	# Check version inside .tar.gz file in case hestia didn't update yet
+	if [ "$version" != "$version_source" ]; then
+		tar -xzf ${SM_INSTALL_DIR}/${SM_FILE}
+		rm $SM_INSTALL_DIR/$SM_FILE
+	fi
+	rm ${SM_INSTALL_DIR}/VERSION
+fi
+
+#----------------------------------------------------------#
+#                       Hestia                             #
+#----------------------------------------------------------#
+
+if [ "$UPDATE" = "yes" ]; then
+	$BIN/v-log-action "system" "Info" "Plugins" "SnappyMail updated (Version: $version)."
+else
+	$BIN/v-log-action "system" "Info" "Plugins" "SnappyMail enabled (Version: $version)."
+fi
+log_event "$OK" "$ARGUMENTS"

+ 3 - 0
bin/v-change-sys-hostname

@@ -58,6 +58,9 @@ fi
 if [ -d /etc/rainloop/ ]; then
 	sed -i "/hestia_host/c\hestia_host = \"$domain\"" /etc/rainloop/data/_data_/_default_/configs/plugin-hestia-change-password.ini
 fi
+if [ -d /etc/snappymail/ ]; then
+	sed -i "/\"hestia_host\":/c\\\"hestia_host\": \"$domain\"," /etc/snappymail/data/_data_/_default_/configs/plugin-change-password.json
+fi
 
 if [ -f /etc/hosts ]; then
 	if ! cat /etc/hosts | grep $domain > /dev/null; then

+ 3 - 3
bin/v-change-sys-port

@@ -12,7 +12,7 @@
 
 # Argument definition
 PORT=$1
-NGINX_CONFIG="$HESTIA/nginx/conf/nginx.conf"									
+NGINX_CONFIG="$HESTIA/nginx/conf/nginx.conf"
 
 # Includes
 # shellcheck source=/etc/hestiacp/hestia.conf
@@ -70,8 +70,8 @@ else
 	if [ -d /etc/roundcube/ ]; then
 		sed -i "/password_hestia_port/c\$rcmail_config['password_hestia_port'] = '$PORT';" /etc/roundcube/plugins/password/config.inc.php
 	fi
-	if [ -d /etc/rainloop/ ]; then
-		sed -i "/hestia_port/c\hestia_port = $PORT" /etc/rainloop/data/_data_/_default_/configs/plugin-hestia-change-password.ini
+	if [ -d /etc/snappymail/ ]; then
+		sed -i "/\"hestia_port\":/c\\\"hestia_host\": $PORT" /etc/snappymail/data/_data_/_default_/configs/plugin-change-password.json
 	fi
 
 	if [ -f "$HESTIA/data/firewall/rules.conf" ]; then

+ 1 - 1
docs/_data/features.ts

@@ -53,7 +53,7 @@ export const mail: FeatureListItem[] = [
 	{ text: "Rate limit adjustable per user or email account" },
 	{ text: "Let’s Encrypt support for mail domains" },
 	{ text: "Latest version of Roundcube" },
-	{ text: "Optional Rainloop installation" },
+	{ text: "Optional SnappyMail installation" },
 ];
 
 export const dns: FeatureListItem[] = [

+ 9 - 0
docs/docs/reference/cli.md

@@ -551,6 +551,7 @@ add webmail support for a domain
 
 ```bash
 v-add-sys-webmail user domain.com
+example: v-add-sys-webmail user domain.com snappymail
 example: v-add-sys-webmail user domain.com rainloop
 example: v-add-sys-webmail user domain.com roundcube
 ```
@@ -682,6 +683,14 @@ Install Rainloop webmail client
 
 This function installs the Rainloop webmail client.
 
+## v-add-sys-snappymail
+
+Install SnappyMail webmail client
+
+**Options**: `[MODE]`
+
+This function installs the SnappyMail webmail client.
+
 ## v-add-sys-roundcube
 
 Install Roundcube webmail client

+ 7 - 7
docs/docs/server-administration/email.md

@@ -49,17 +49,17 @@ If you are unable to receive emails, make sure you have setup your DNS properly.
 
 When you are done you can check the configuration via [MXToolBox](https://mxtoolbox.com/MXLookup.aspx).
 
-## How do I install Rainloop?
+## How do I install SnappyMail?
 
-You can install Rainloop by running the following command:
+You can install SnappyMail by running the following command:
 
 ```bash
-v-add-sys-rainloop
+v-add-sys-snappymail
 ```
 
-## Can I login into the backend of Rainloop
+## Can I login into the backend of SnappyMail
 
-In the root folder, there is an file called `.rainloop` containing the username and password:
+In the root folder, there is a file called `.snappymail` containing the username and password:
 
 ```bash
 Username: admin_f0e5a5aa
@@ -97,9 +97,9 @@ During Hestia’s installation, use the `--sieve` flag. If Hestia is already ins
 
 Open port 4190 in the firewall. [Read the firewall documentation](./firewall.md).
 
-## How can I enable ManageSieve for Rainloop?
+## How can I enable ManageSieve for Snappymail?
 
-Edit `/etc/rainloop/data/_data_/_default_/domains/default.ini` and modify the following settings:
+Edit `/etc/snappymail/data/_data_/_default_/domains/default.ini` and modify the following settings:
 
 ```bash
 sieve_use = On

+ 1 - 1
docs/docs/user-guide/mail-domains.md

@@ -31,7 +31,7 @@ To manage your mail domains, navigate to the **Mail <i class="fas fa-fw fa-mail-
 
 ### Webmail client
 
-We currently support Roundcube and Rainloop (optional install). You can also disable webmail access.
+We currently support Roundcube, Rainloop and SnappyMail (optional install). You can also disable webmail access.
 
 ### Catch all email
 

+ 12 - 12
func/upgrade.sh

@@ -319,8 +319,8 @@ upgrade_init_backup() {
 	if [ -d "/etc/roundcube/" ]; then
 		mkdir -p $HESTIA_BACKUP/conf/roundcube/
 	fi
-	if [ -d "/etc/rainloop/" ]; then
-		mkdir -p $HESTIA_BACKUP/conf/rainloop/
+	if [ -d "/etc/snappymail/" ]; then
+		mkdir -p $HESTIA_BACKUP/conf/snappymail/
 	fi
 	if [ -d "/etc/phpmyadmin/" ]; then
 		mkdir -p $HESTIA_BACKUP/conf/phpmyadmin/
@@ -463,11 +463,11 @@ upgrade_start_backup() {
 		fi
 		cp -fr /etc/roundcube/* $HESTIA_BACKUP/conf/roundcube
 	fi
-	if [ -d "/etc/rainloop" ]; then
+	if [ -d "/etc/snappymail" ]; then
 		if [ "$DEBUG_MODE" = "true" ]; then
-			echo "      ---- Rainloop"
+			echo "      ---- SnappyMail"
 		fi
-		cp -fr /etc/rainloop/* $HESTIA_BACKUP/conf/rainloop
+		cp -fr /etc/snappymail/* $HESTIA_BACKUP/conf/snappymail
 	fi
 	if [ -d "/etc/phpmyadmin" ]; then
 		if [ "$DEBUG_MODE" = "true" ]; then
@@ -702,14 +702,14 @@ upgrade_roundcube() {
 	fi
 }
 
-upgrade_rainloop() {
-	if [ -n "$(echo "$WEBMAIL_SYSTEM" | grep -w 'rainloop')" ]; then
-		rl_version=$(cat /var/lib/rainloop/data/VERSION)
-		if ! version_ge "$rl_version" "$rl_v"; then
-			echo "[ ! ] Upgrading Rainloop to version $rl_v..."
-			$BIN/v-add-sys-rainloop
+upgrade_snappymail() {
+	if [ -n "$(echo "$WEBMAIL_SYSTEM" | grep -w 'snappymail')" ]; then
+		sm_version=$(cat /var/lib/snappymail/data/VERSION)
+		if ! version_ge "$sm_version" "$sm_v"; then
+			echo "[ ! ] Upgrading SnappyMail to version $sm_v..."
+			$BIN/v-add-sys-snappymail
 		else
-			echo "[ * ] Rainloop is up to date ($rl_v)..."
+			echo "[ * ] SnappyMail is up to date ($sm_v)..."
 		fi
 	fi
 }

+ 73 - 0
install/common/snappymail/install.php

@@ -0,0 +1,73 @@
+<?php
+
+$_ENV["SNAPPYMAIL_INCLUDE_AS_API"] = true;
+require_once "/var/lib/snappymail/index.php";
+
+$oConfig = \RainLoop\Api::Config();
+
+// Change default login data / key
+$oConfig->Set("security", "admin_login", $argv[1]);
+$oConfig->Set("security", "admin_panel_key", $argv[1]);
+$oConfig->SetPassword($argv[2]);
+
+// Allow Contacts to be saved in database
+$oConfig->Set("contacts", "enable", "On");
+$oConfig->Set("contacts", "allow_sync", "On");
+$oConfig->Set("contacts", "type", "mysql");
+$oConfig->Set("contacts", "pdo_dsn", "mysql:host=127.0.0.1;port=3306;dbname=snappymail");
+$oConfig->Set("contacts", "pdo_user", "snappymail");
+$oConfig->Set("contacts", "pdo_password", $argv[3]);
+
+// Plugins
+$oConfig->Set("plugins", "enable", "On");
+
+\SnappyMail\Repository::installPackage("plugin", "change-password");
+\SnappyMail\Repository::installPackage("plugin", "change-password-hestia");
+
+$sFile = APP_PRIVATE_DATA . "configs/plugin-change-password.json";
+if (!file_exists($sFile)) {
+	file_put_contents(
+		"$sFile",
+		json_encode(
+			[
+				"plugin" => [
+					"pass_min_length" => 8,
+					"pass_min_strength" => 60,
+					"driver_hestia_enabled" => true,
+					"driver_hestia_allowed_emails" => "*",
+					"hestia_host" => gethostname(),
+					"hestia_port" => $argv[4], // $BACKEND_PORT
+				],
+			],
+			JSON_PRETTY_PRINT,
+		),
+	);
+}
+\SnappyMail\Repository::enablePackage("change-password");
+
+\SnappyMail\Repository::installPackage("plugin", "add-x-originating-ip-header");
+\SnappyMail\Repository::enablePackage("add-x-originating-ip-header");
+$sFile = APP_PRIVATE_DATA . "configs/plugin-add-x-originating-ip-header.json";
+if (!file_exists($sFile)) {
+	file_put_contents(
+		"$sFile",
+		json_encode(
+			[
+				"plugin" => [
+					"check_proxy" => true,
+				],
+			],
+			JSON_PRETTY_PRINT,
+		),
+	);
+}
+
+$oConfig->Save();
+
+$sFile = APP_PRIVATE_DATA . "domains/hestia.json";
+if (!file_exists($sFile)) {
+	$config = json_decode(APP_PRIVATE_DATA . "domains/default.json", true);
+	$config["IMAP"]["shortLogin"] = true;
+	$config["SMTP"]["shortLogin"] = true;
+	file_put_contents($sFile, json_encode($config, JSON_PRETTY_PRINT));
+}

+ 0 - 23
install/deb/rainloop/change_password.php

@@ -1,23 +0,0 @@
-<?php
-// Example usage
-// change_password.php "admin_account admin_password mysql_password"
-$_ENV["RAINLOOP_INCLUDE_AS_API"] = true;
-include "/var/lib/rainloop/index.php";
-
-$oConfig = \RainLoop\Api::Config();
-// Change default login data / key
-$oConfig->Set("security", "admin_login", $argv[1]);
-$oConfig->Set("security", "admin_panel_key", $argv[1]);
-$oConfig->SetPassword($argv[2]);
-// Allow Contacts to be saved in database
-$oConfig->Set("contacts", "enable", "On");
-$oConfig->Set("contacts", "allow_sync", "On");
-$oConfig->Set("contacts", "type", "mysql");
-$oConfig->Set("contacts", "pdo_dsn", "mysql:host=127.0.0.1;port=3306;dbname=rainloop");
-$oConfig->Set("contacts", "pdo_user", "rainloop");
-$oConfig->Set("contacts", "pdo_password", $argv[3]);
-// Plugins
-$oConfig->Set("plugins", "enable", "On");
-$oConfig->Set("plugins", "enabled_list", "add-x-originating-ip-header,hestia-change-password");
-$oConfig->Save();
-?>

+ 0 - 16
install/deb/rainloop/default.ini

@@ -1,16 +0,0 @@
-imap_host = "localhost"
-imap_port = 993
-imap_secure = "SSL"
-imap_short_login = Off
-sieve_use = Off
-sieve_allow_raw = Off
-sieve_host = ""
-sieve_port = 4190
-sieve_secure = "None"
-smtp_host = "localhost"
-smtp_port = 465
-smtp_secure = "SSL"
-smtp_short_login = Off
-smtp_auth = On
-smtp_php_mail = Off
-white_list = ""

+ 0 - 142
install/deb/rainloop/plugins/hestia-change-password/HestiaChangePasswordDriver.php

@@ -1,142 +0,0 @@
-<?php
-
-class HestiaChangePasswordDriver implements
-	\RainLoop\Providers\ChangePassword\ChangePasswordInterface {
-	/**
-	 * @var string
-	 */
-	private $sHost = "";
-
-	/**
-	 * @var string
-	 */
-	private $iPort = 8083;
-
-	/**
-	 * @var string
-	 */
-	private $sAllowedEmails = "";
-
-	/**
-	 * @var \MailSo\Log\Logger
-	 */
-	private $oLogger = null;
-
-	/**
-	 * @param string $sHost
-	 * @param int $iPort
-	 *
-	 * @return \HestiaChangePasswordDriver
-	 */
-	public function SetConfig($sHost, $iPort) {
-		$this->sHost = $sHost;
-		$this->iPort = $iPort;
-
-		return $this;
-	}
-
-	/**
-	 * @param string $sAllowedEmails
-	 *
-	 * @return \HestiaChangePasswordDriver
-	 */
-	public function SetAllowedEmails($sAllowedEmails) {
-		$this->sAllowedEmails = $sAllowedEmails;
-		return $this;
-	}
-
-	/**
-	 * @param \MailSo\Log\Logger $oLogger
-	 *
-	 * @return \HestiaChangePasswordDriver
-	 */
-	public function SetLogger($oLogger) {
-		if ($oLogger instanceof \MailSo\Log\Logger) {
-			$this->oLogger = $oLogger;
-		}
-
-		return $this;
-	}
-
-	/**
-	 * @param \RainLoop\Account $oAccount
-	 *
-	 * @return bool
-	 */
-	public function PasswordChangePossibility($oAccount) {
-		return $oAccount &&
-			$oAccount->Email() &&
-			\RainLoop\Plugins\Helper::ValidateWildcardValues(
-				$oAccount->Email(),
-				$this->sAllowedEmails,
-			);
-	}
-
-	/**
-	 * @param \RainLoop\Account $oAccount
-	 * @param string $sPrevPassword
-	 * @param string $sNewPassword
-	 *
-	 * @return bool
-	 */
-	public function ChangePassword(\RainLoop\Account $oAccount, $sPrevPassword, $sNewPassword) {
-		if ($this->oLogger) {
-			$this->oLogger->Write("Hestia: Try to change password for " . $oAccount->Email());
-		}
-
-		$bResult = false;
-		if (!empty($this->sHost) && 0 < $this->iPort && $oAccount) {
-			$sEmail = \trim(\strtolower($oAccount->Email()));
-
-			$sHost = \trim($this->sHost);
-			$sHost = \str_replace("{user:host-imap}", $oAccount->Domain()->IncHost(), $sHost);
-			$sHost = \str_replace("{user:host-smtp}", $oAccount->Domain()->OutHost(), $sHost);
-			$sHost = \str_replace(
-				"{user:domain}",
-				\MailSo\Base\Utils::GetDomainFromEmail($sEmail),
-				$sHost,
-			);
-			$sHost = \rtrim($this->sHost, "/\\");
-			$sHost = "https://" . $sHost;
-
-			$sUrl = $sHost . ":" . $this->iPort . "/reset/mail/";
-
-			$iCode = 0;
-			$oHttp = \MailSo\Base\Http::SingletonInstance();
-
-			if ($this->oLogger) {
-				$this->oLogger->Write("Hestia[Api Request]:" . $sUrl);
-			}
-
-			$mResult = $oHttp->SendPostRequest(
-				$sUrl,
-				[
-					"email" => $sEmail,
-					"password" => $sPrevPassword,
-					"new" => $sNewPassword,
-				],
-				"MailSo Http User Agent (v1)",
-				$iCode,
-				$this->oLogger,
-			);
-
-			if (false !== $mResult && 200 === $iCode) {
-				$aRes = null;
-				@\parse_str($mResult, $aRes);
-				if (is_array($aRes) && (!isset($aRes["error"]) || (int) $aRes["error"] !== 1)) {
-					$bResult = true;
-				} else {
-					if ($this->oLogger) {
-						$this->oLogger->Write("Hestia[Error]: Response: " . $mResult);
-					}
-				}
-			} else {
-				if ($this->oLogger) {
-					$this->oLogger->Write("Hestia[Error]: Empty Response: Code:" . $iCode);
-				}
-			}
-		}
-
-		return $bResult;
-	}
-}

+ 0 - 20
install/deb/rainloop/plugins/hestia-change-password/LICENSE

@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 RainLoop Team
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 0 - 3
install/deb/rainloop/plugins/hestia-change-password/README

@@ -1,3 +0,0 @@
-Plugin that adds functionality to change the email account password (Hestia Control Panel).
-Script has been altered / modified to use Hestia naming
-See https://github.com/RainLoop/rainloop-webmail/tree/master/plugins/vesta-change-password for original

+ 0 - 1
install/deb/rainloop/plugins/hestia-change-password/VERSION

@@ -1 +0,0 @@
-1.0

+ 0 - 59
install/deb/rainloop/plugins/hestia-change-password/index.php

@@ -1,59 +0,0 @@
-<?php
-
-class HestiaChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin {
-	public function Init() {
-		$this->addHook("main.fabrica", "MainFabrica");
-	}
-
-	/**
-	 * @param string $sName
-	 * @param mixed $oProvider
-	 */
-	public function MainFabrica($sName, &$oProvider) {
-		switch ($sName) {
-			case "change-password":
-				$sHost = \trim($this->Config()->Get("plugin", "hestia_host", ""));
-				$iPort = (int) $this->Config()->Get("plugin", "hestia_port", 8083);
-
-				if (!empty($sHost) && 0 < $iPort) {
-					include_once __DIR__ . "/HestiaChangePasswordDriver.php";
-
-					$oProvider = new HestiaChangePasswordDriver();
-					$oProvider->SetLogger(
-						$this->Manager()
-							->Actions()
-							->Logger(),
-					);
-					$oProvider->SetConfig($sHost, $iPort);
-					$oProvider->SetAllowedEmails(
-						\strtolower(\trim($this->Config()->Get("plugin", "allowed_emails", ""))),
-					);
-				}
-
-				break;
-		}
-	}
-
-	/**
-	 * @return array
-	 */
-	public function configMapping() {
-		return [
-			\RainLoop\Plugins\Property::NewInstance("hestia_host")
-				->SetLabel("Hestia Host")
-				->SetDefaultValue("")
-				->SetDescription("Ex: localhost or domain.com"),
-			\RainLoop\Plugins\Property::NewInstance("hestia_port")
-				->SetLabel("Hestia Port")
-				->SetType(\RainLoop\Enumerations\PluginPropertyType::INT)
-				->SetDefaultValue(8083),
-			\RainLoop\Plugins\Property::NewInstance("allowed_emails")
-				->SetLabel("Allowed emails")
-				->SetType(\RainLoop\Enumerations\PluginPropertyType::STRING_TEXT)
-				->SetDescription(
-					"Allowed emails, space as delimiter, wildcard supported. Example: user1@domain1.net user2@domain1.net *@domain2.net",
-				)
-				->SetDefaultValue("*"),
-		];
-	}
-}

+ 0 - 3
install/deb/rainloop/plugins/plugin-add-x-originating-ip-header.ini

@@ -1,3 +0,0 @@
-; RainLoop Webmail plugin (add-x-originating-ip-header)
-[plugin]
-check_proxy = On

+ 0 - 4
install/deb/rainloop/plugins/plugin-hestia-change-password.ini

@@ -1,4 +0,0 @@
-[plugin]
-hestia_host = "%hostname%"
-hestia_port = %port%
-allowed_emails = "*"

+ 31 - 0
install/deb/templates/mail/apache2/snappymail.stpl

@@ -0,0 +1,31 @@
+<VirtualHost %ip%:%web_ssl_port%>
+ServerName %domain_idn%
+ServerAlias %alias_idn%
+Alias / /var/lib/snappymail/
+Alias /error/ %home%/%user%/web/%root_domain%/document_errors/
+#SuexecUserGroup %user% %group%
+
+SSLEngine on
+SSLVerifyClient none
+SSLCertificateFile         %home%/%user%/conf/mail/%root_domain%/ssl/%root_domain%.crt
+SSLCertificateKeyFile      %home%/%user%/conf/mail/%root_domain%/ssl/%root_domain%.key
+
+<Directory /var/lib/snappymail/>
+    Options +FollowSymLinks
+    # This is needed to parse /var/lib/snappymail/.htaccess. See its
+    # content before setting AllowOverride to None.
+    AllowOverride All
+    order allow,deny
+    allow from all
+</Directory>
+
+# Protecting basic directories:
+<Directory /var/lib/snappymail/data>
+        Options -FollowSymLinks
+        AllowOverride None
+</Directory>
+
+
+IncludeOptional %home%/%user%/conf/mail/%root_domain%/%web_system%.ssl.conf_*
+
+</VirtualHost>

+ 25 - 0
install/deb/templates/mail/apache2/snappymail.tpl

@@ -0,0 +1,25 @@
+<VirtualHost %ip%:%web_port%>
+    ServerName %domain_idn%
+    ServerAlias %alias_idn%
+    Alias / /var/lib/snappymail/
+    Alias /error/ %home%/%user%/web/%root_domain%/document_errors/
+    #SuexecUserGroup %user% %group%
+
+    IncludeOptional %home%/%user%/conf/mail/%root_domain%/apache2.forcessl.conf*
+
+    <Directory /var/lib/snappymail/>
+        Options +FollowSymLinks
+        # This is needed to parse /var/lib/snappymail/.htaccess. See its
+        # content before setting AllowOverride to None.
+        AllowOverride All
+        order allow,deny
+        allow from all
+    </Directory>
+
+    # Protecting basic directories:
+    <Directory /var/lib/snappymail/data>
+            Options -FollowSymLinks
+            AllowOverride None
+    </Directory>
+    IncludeOptional %home%/%user%/conf/mail/%root_domain%/%web_system%.conf_*
+</VirtualHost>

+ 2 - 2
install/deb/templates/mail/nginx/default_rainloop.stpl → install/deb/templates/mail/nginx/default_snappymail.stpl

@@ -1,7 +1,7 @@
 server {
 listen      %ip%:%proxy_ssl_port% ssl http2;
 server_name %domain_idn% %alias_idn%;
-root        /var/lib/rainloop;
+root        /var/lib/snappymail;
 index       index.php index.html index.htm;
 access_log /var/log/nginx/domains/%domain%.log combined;
 error_log  /var/log/nginx/domains/%domain%.error.log error;
@@ -24,7 +24,7 @@ location ~ ^/(README.md|config|temp|logs|bin|SQL|INSTALL|LICENSE|CHANGELOG|UPGRA
 location / {
     proxy_pass https://%ip%:%web_ssl_port%;
     try_files $uri $uri/ =404;
-    alias /var/lib/rainloop/;
+    alias /var/lib/snappymail/;
     location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
         expires 7d;
         fastcgi_hide_header "Set-Cookie";

+ 2 - 2
install/deb/templates/mail/nginx/default_rainloop.tpl → install/deb/templates/mail/nginx/default_snappymail.tpl

@@ -1,7 +1,7 @@
 server {
 listen      %ip%:%proxy_port%;
 server_name %domain_idn% %alias_idn%;
-root        /var/lib/rainloop;
+root        /var/lib/snappymail;
 index       index.php index.html index.htm;
 access_log /var/log/nginx/domains/%domain%.log combined;
 error_log  /var/log/nginx/domains/%domain%.error.log error;
@@ -26,7 +26,7 @@ location ~ ^/(README.md|config|temp|logs|bin|SQL|INSTALL|LICENSE|CHANGELOG|UPGRA
 location / {
     proxy_pass http://%ip%:%web_port%;
     try_files $uri $uri/ =404;
-    alias /var/lib/rainloop/;
+    alias /var/lib/snappymail/;
     location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
         expires 7d;
         fastcgi_hide_header "Set-Cookie";

+ 1 - 1
install/deb/templates/mail/nginx/rainloop.stpl → install/deb/templates/mail/nginx/snappymail.stpl

@@ -1,7 +1,7 @@
 server {
 listen      %ip%:%web_ssl_port% ssl http2;
 server_name %domain_idn% %alias_idn%;
-root        /var/lib/rainloop;
+root        /var/lib/snappymail;
 index       index.php index.html index.htm;
 access_log /var/log/nginx/domains/%domain%.log combined;
 error_log  /var/log/nginx/domains/%domain%.error.log error;

+ 1 - 1
install/deb/templates/mail/nginx/rainloop.tpl → install/deb/templates/mail/nginx/snappymail.tpl

@@ -1,7 +1,7 @@
 server {
 listen      %ip%:%web_port%;
 server_name %domain_idn% %alias_idn%;
-root        /var/lib/rainloop;
+root        /var/lib/snappymail;
 index       index.php index.html index.htm;
 access_log /var/log/nginx/domains/%domain%.log combined;
 error_log  /var/log/nginx/domains/%domain%.error.log error;

+ 1 - 1
install/upgrade/manual/upgrade_multi_php.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 # Update www.conf to a different version so users can safely delete older php version.
-# www.conf is used for Roundcube, Rainloop and phpmyadmin
+# www.conf is used for Roundcube, Rainloop, SnappyMail and phpmyadmin
 # Removal of the "www.conf" php version will cause issues with Rainloop not working. Current script updates it to the latest version of PHP installed. If that is not wanted use this script
 
 version=$1

+ 2 - 2
install/upgrade/upgrade.conf

@@ -52,8 +52,8 @@ pga_v='7.14.4'
 # Note: only applies to "non-apt installs >= 1.4.0 or manually phased out"
 rc_v='1.6.1'
 
-# Set version of Rainloop (Webmail) to update during upgrade if not already installed
-rl_v='1.17.0'
+# Set version of SnappyMail (Webmail) to update during upgrade if not already installed
+sm_v='2.27.3'
 
 # Update the File Manager or it's configuration file
 # Check if Filegator requires an update based on current version and setting below

+ 2 - 2
src/deb/hestia/postinst

@@ -77,8 +77,8 @@ upgrade_rebuild_dns_templates | tee -a $LOG
 # Upgrade File Manager and update configuration
 upgrade_filemanager | tee -a $LOG
 
-# Upgrade Rainloop if applicable
-upgrade_rainloop | tee -a $LOG
+# Upgrade SnappyMail if applicable
+upgrade_snappymail | tee -a $LOG
 
 # Upgrade Roundcube if applicable
 upgrade_roundcube | tee -a $LOG

+ 2 - 2
src/rpm/hestia/hestia.spec

@@ -99,8 +99,8 @@ if [ -e "/usr/local/hestia/data/users/admin" ]; then
     # Upgrade File Manager and update configuration
     upgrade_filemanager | tee -a $LOG
 
-    # Upgrade Rainloop if applicable
-    upgrade_rainloop | tee -a $LOG
+    # Upgrade SnappyMail if applicable
+    upgrade_snappymail | tee -a $LOG
 
     # Upgrade Roundcube if applicable
     upgrade_roundcube | tee -a $LOG

+ 5 - 5
test/test.bats

@@ -1479,16 +1479,16 @@ function check_ip_not_banned(){
     validate_webmail_domain $user $domain 'Welcome to Roundcube Webmail'
 }
 
-@test "MAIL: Add mail domain webmail client (Rainloop)" {
-    if [ -z "$(echo $WEBMAIL_SYSTEM | grep -w "rainloop")" ]; then
-        skip "Webmail client Rainloop not installed"
+@test "MAIL: Add mail domain webmail client (SnappyMail)" {
+    if [ -z "$(echo $WEBMAIL_SYSTEM | grep -w "snappymail")" ]; then
+        skip "Webmail client SnappyMail not installed"
     fi
-    run v-add-mail-domain-webmail $user $domain "rainloop" "yes"
+    run v-add-mail-domain-webmail $user $domain "snappymail" "yes"
     assert_success
     refute_output
     validate_mail_domain $user $domain
 
-    validate_webmail_domain $user $domain 'RainLoop Webmail'
+    validate_webmail_domain $user $domain 'SnappyMail Webmail'
 }
 
 @test "MAIL: Disable webmail client" {