Skip to content

Commit eca25ef

Browse files
authored
Upgrade Roundcube to 1.6 (hestiacp#2810)
* Merge "Roudcube" config files to common * Add /install/common/ folder to main.sh * Upgrade RC to 1.6.0 * Update installers and use non ssl * Also update "Update script" roundcube * Rename 1.6.5 to 1.6.6 And add check to make sure it is localhost
1 parent 97d6ae3 commit eca25ef

23 files changed

+46
-1128
lines changed

bin/v-add-sys-roundcube

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if [ -z "$HESTIA" ]; then
4646
HESTIA="/usr/local/hestia"
4747
fi
4848

49-
if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then
49+
if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_COMMON_DIR" ]; then
5050
echo "ERROR: Environment variables not present, installation aborted."
5151
exit 2
5252
fi
@@ -97,21 +97,21 @@ if [ "$UPDATE" == "no" ]; then
9797
rm -f -r $RC_INSTALL_DIR/config/
9898
ln -s $RC_CONFIG_DIR/ ./config
9999
# Replace with Hestia config
100-
cp -f $HESTIA_INSTALL_DIR/roundcube/main.inc.php $RC_CONFIG_DIR/config.inc.php
101-
cp -f $HESTIA_INSTALL_DIR/roundcube/mimetypes.php $RC_CONFIG_DIR/mimetypes.php
100+
cp -f $HESTIA_COMMON_DIR/roundcube/main.inc.php $RC_CONFIG_DIR/config.inc.php
101+
cp -f $HESTIA_COMMON_DIR/roundcube/mimetypes.php $RC_CONFIG_DIR/mimetypes.php
102102
chmod 644 $RC_CONFIG_DIR/*.php
103103

104-
cp -f $HESTIA_INSTALL_DIR/roundcube/hestia.php $RC_INSTALL_DIR/plugins/password/drivers/
104+
cp -f $HESTIA_COMMON_DIR/roundcube/hestia.php $RC_INSTALL_DIR/plugins/password/drivers/
105105
mkdir -p $RC_CONFIG_DIR/plugins/password
106106
mkdir -p $RC_CONFIG_DIR/plugins/newmail_notifier
107107
mkdir -p $RC_CONFIG_DIR/plugins/zipdownload
108108

109109
# Allow changes to the respective config / Create symlinks to /etc/roundcube/
110-
cp -f $HESTIA_INSTALL_DIR/roundcube/config.inc.php $RC_CONFIG_DIR/plugins/password/config.inc.php
110+
cp -f $HESTIA_COMMON_DIR/roundcube/config.inc.php $RC_CONFIG_DIR/plugins/password/config.inc.php
111111
ln -s $RC_CONFIG_DIR/plugins/password/config.inc.php ./plugins/password/config.inc.php
112-
cp -f $HESTIA_INSTALL_DIR/roundcube/plugins/config_newmail_notifier.inc.php $RC_CONFIG_DIR/plugins/newmail_notifier/config.inc.php
112+
cp -f $HESTIA_COMMON_DIR/roundcube/plugins/config_newmail_notifier.inc.php $RC_CONFIG_DIR/plugins/newmail_notifier/config.inc.php
113113
ln -s $RC_CONFIG_DIR/plugins/newmail_notifier/config.inc.php ./plugins/newmail_notifier/config.inc.php
114-
cp -f $HESTIA_INSTALL_DIR/roundcube/plugins/config_zipdownload.inc.php $RC_CONFIG_DIR/plugins/zipdownload/config.inc.php
114+
cp -f $HESTIA_COMMON_DIR/roundcube/plugins/config_zipdownload.inc.php $RC_CONFIG_DIR/plugins/zipdownload/config.inc.php
115115
ln -s $RC_CONFIG_DIR/plugins/zipdownload/config.inc.php ./plugins/zipdownload/config.inc.php
116116

117117
# Set up correct permissions roundcube

func/main.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ BACKUP_DISK_LIMIT=95
1414
BACKUP_LA_LIMIT=`cat /proc/cpuinfo | grep processor | wc -l`
1515
RRD_STEP=300
1616
BIN=$HESTIA/bin
17-
HESTIA_INSTALL_DIR=$HESTIA/install/deb
17+
HESTIA_INSTALL_DIR="$HESTIA/install/deb"
18+
HESTIA_COMMON_DIR="$HESTIA/install/common"
1819
HESTIA_BACKUP="/root/hst_backups/$(date +%d%m%Y%H%M)"
1920
USER_DATA=$HESTIA/data/users/$user
2021
WEBTPL=$HESTIA/data/templates/web
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@
2929
// For example %n = mail.domain.tld, %t = domain.tld
3030
// WARNING: After hostname change update of mail_host column in users table is
3131
// required to match old user data records with the new host.
32-
$config['default_host'] = 'ssl://localhost';
33-
34-
// TCP port used for IMAP connections
35-
$config['default_port'] = 993;
32+
$config['imap_host'] = 'localhost:143';
3633

3734
// IMAP socket context options
3835
// See http://php.net/manual/en/context.ssl.php
@@ -103,7 +100,7 @@
103100

104101
$config['default_pass'] = '%p';
105102

106-
$config['smtp_host'] = 'ssl://localhost';
103+
$config['smtp_host'] = 'localhost:587';
107104

108105
// Log session authentication errors to <log_dir>/session or to syslog
109106
$config['log_session'] = true;

install/deb/roundcube/plugins/config_managesieve.inc.php renamed to install/common/roundcube/plugins/config_managesieve.inc.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
<?php
22

3-
// managesieve server port. When empty the port will be determined automatically
4-
// using getservbyname() function, with 4190 as a fallback.
5-
$config['managesieve_port'] = 4190;
6-
73
// managesieve server address, default is localhost.
84
// Replacement variables supported in host name:
95
// %h - user's IMAP hostname
106
// %n - http hostname ($_SERVER['SERVER_NAME'])
117
// %d - domain (http hostname without the first part)
128
// For example %n = mail.domain.tld, %d = domain.tld
13-
$config['managesieve_host'] = 'localhost';
9+
$config['managesieve_host'] = 'localhost:4190';
1410

1511
// authentication method. Can be CRAM-MD5, DIGEST-MD5, PLAIN, LOGIN, EXTERNAL
1612
// or none. Optional, defaults to best method supported by server.

install/deb/roundcube/plugins/config_newmail_notifier.inc.php renamed to install/common/roundcube/plugins/config_newmail_notifier.inc.php

File renamed without changes.

0 commit comments

Comments
 (0)