install_roundcube.sh: support sieve scripts as autoresponder.

This commit is contained in:
Christoph 2022-06-22 15:42:45 +02:00
parent c121bc187e
commit 48ca1e52a4

View File

@ -229,6 +229,40 @@ echo ""
echo -e "\033[32m--\033[m"
echo ""
VACATION_PLUGIN=false
VACATION_SIEVE=false
_OK=false
echo ""
echo "With which method should an E-Mail Responder be realized??"
echo ""
echo " [1] Plugin 'vacation'"
echo " [2] With a sive script using managesieve plugin"
echo ""
echononl " Eingabe: "
while ! $_OK ; do
read _IN
if is_number "$_IN" && ( [[ $_IN -eq 1 ]] || [[ $_IN -eq 2 ]] ) ; then
if [[ $_IN -eq 1 ]] ; then
VACATION_PLUGIN=true
VACATION_SIEVE=false
else
VACATION_PLUGIN=false
VACATION_SIEVE=true
fi
_OK=true
else
echo ""
echo -e "\tFalsche Eingabe !"
echo ""
echononl " Eingabe: "
fi
done
echo ""
echo -e "\033[32m--\033[m"
echo ""
# - Default values
# -
@ -511,11 +545,18 @@ if [[ "$DB_TYPE" = "mysql" ]]; then
echo -e "\tMySQL Credentials (root access)......: $MYSQL_CREDENTIALS"
fi
echo ""
if $VACATION_PLUGIN ; then
echo -e "\tUse 'vacation'-plugin................: $VACATION_PLUGIN"
echo -e "\tHostname for Vacation Messages.......: $AUTOREPLY_HOSTNAME"
fi
if $VACATION_SIEVE ; then
echo -e "\tUse sieve script as autoresponder....: $VACATION_SIEVE"
fi
echo ""
echo -e "\tName of Junk Folder..................: $SPAM_FOLDER_NAME"
echo ""
echo ""
echo ""
echo -e "\tInclude 'acl' plugin?..................: $INCLUDE_ACL_PLUGIN"
echo ""
@ -2268,7 +2309,11 @@ fi
#fi
_key="managesieve_vacation"
if $VACATION_SIEVE ; then
_val="2"
else
_val="0"
fi
echononl "\tChange '$_key' to $_val"
perl -i -n -p -e "s#(^\s*\\\$config\['$_key'\].*)#//\!\1\n\\\$config['$_key'] = $_val;#" \
${WEBSITE_BASEDIR}/roundcubemail-${ROUNDCUBE_VERSION}/plugins/${_plugin}/config.inc.php > $log_file 2>&1
@ -2471,6 +2516,7 @@ echo -e "\tNothing more to do here. Plugin '$_plugin' will be added to array plu
# - vacation
# -
if $VACATION_PLUGIN ; then
_plugin="vacation"
add_plugin_arr+=("$_plugin")
@ -3274,6 +3320,8 @@ fi
echo -e "\tNothing more to do here. Plugin '$_plugin' will be added to array plugins later.."
fi # if $VACATION_PLUGIN
# - zipdownload
# -