roundcube - Browser-based IMAP webmail client ChangeLog

HOWTO


# Roundcube 1.4.11
# ================
# Apache (or lighttpd, Cherokee, Hiawatha)
# PHP >= 5.4 and < 8.0
#  - See README in the source distribution for specific modules
# Composer
# MySQL >= 4.0.8, MariaDB, PostgreSQL, Oracle or SQLite (required)
# An IMAP server to connect to (...like Cyrus IMAP, uw-imap, ...)
# An SMTP server such as sendmail or Postfix
# ...or PHP configured for mail delivery via a SMTP server
# A GUI web-browser

# If you're looking for a straight text webmail, try SquirrelMail

# Security update 1.4.11
# GitHub release notes 1.4.11
# GitHub CHANGELOG.md from 'master'

# Get it
cd
test -f installed/roundcubemail-1.4.11.tar.gz &&
mv installed/roundcubemail-1.4.11.tar.gz .
test ! -f roundcubemail-1.4.11.tar.gz &&
wget https://github.com/roundcube/roundcubemail/releases/download/1.4.11/\
roundcubemail-1.4.11.tar.gz

# Verify tarball w/ sha256sum:
echo "524a6c8095508b8d911c0c5121ea6d16ca4c42894e10aaa0e29ded98368792\
3c  roundcubemail-1.4.11.tar.gz" | sha256sum -c

# Become root to install it
su

# Where to put it depends on how you want to handle the Apache configuration
# If you put it in /usr/local/roundcubemail-x.x.x, you'll need an Alias
# If you put it in a directory outside of htdocs, you may need Directory
# If you put a symlink under htdocs pointing to somewhere outside, you'll
# need FollowSymlinks to be allowed there
# Everything below assumes you'll install it under /usr/local
# (I'm not interested in hearing how you think it should go in /opt or
# whatever )

# If you have a large user base using Roundcube, now would be the time
# to put up a temporary web page saying it's down for maintenance

# If you have an existing /usr/local/roundcubemail symlink, remove that
test -L /usr/local/roundcubemail && rm /usr/local/roundcubemail

# If you want to back up previous version(s), this will create a tar.xz of
# each of them.  You probably only really need your configuration file
# though...
mkdir -p -m 0700 /root/backup
find /usr/local -maxdepth 1 -type d -name "roundcubemail-*" \
-exec tar cJvf /root/backup/roundcubemail-$(date +%Y%m%d).tar.xz {} \;

# Remove old versions
find /usr/local -maxdepth 1 -type d -name "roundcubemail-*" \
-exec rm -r {} \;
test -d /usr/local/roundcubemail && rm -r /usr/local/roundcubemail

# Extract it somewhere.  It can be untarred in to your 'htdocs', or
# anywhere else with an Apache Alias configured, or you can install it
# outside of htdocs, and put a symlink pointing to it under htdocs - after
# verifying that FollowSymlinks is set for the htdocs .
tar xzvf roundcubemail-1.4.11.tar.gz -C /usr/local/
ln -sf /usr/local/roundcubemail-1.4.11 /usr/local/roundcubemail

# Find out what user and group Apache is configured to run as
# [ generally 'daemon' by default with Apache from source ]
# If your Apache is from the Slackware package, httpd.conf is in /etc/httpd
# and the user and group will probably be 'apache'
egrep "^(User|Group) " /usr/local/apache2/conf/httpd.conf

# Change to the Roundcube directory
cd /usr/local/roundcubemail-1.4.11

# Make the extracted directory user-owned by root, group-owned by the
# user that runs your web server, remove write permissions for group,
# remove all permissions for 'other',
chown -R root:daemon .
chmod -R g-w .
chmod -R o-rwx .

# Read through README.md, INSTALL, and if upgrading, CHANGELOG and UPGRADING
# There's also the:
# Wiki
# and if you have any trouble:
# Roundcube Community Forum
# Mailing lists

# Make these only readable by root, they don't need to be web accessible
# Don't even let people dig around and find out what version you have...
chown root:root CHANGELOG INSTALL LICENSE README.md UPGRADING \
composer.json-dist
chmod 600 CHANGELOG INSTALL LICENSE README.md UPGRADING composer.json-dist
chmod 700 bin/*.sh

# Make the temp and logs directories writable by the web server group
chmod 770 temp logs

# Get Composer
test ! -f ./composer.phar &&
wget https://getcomposer.org/download/2.1.5/composer.phar
chmod 600 composer.phar

# Use commandline PHP to use Composer to install dependencies
# It's going to complain if you run it as root
test ! -f ./composer.json && cp -a composer.json-dist composer.json
php composer.phar install --no-scripts --no-plugins
chmod 600 composer.lock
chmod -R o-rwx vendor/
chgrp -R daemon vendor/

# Install JavaScript dependencies
bin/install-jsdeps.sh
chown -R root:daemon plugins/ program/js/ skins/
find plugins/ program/js/ skins/ -type d -exec chmod 750 {} \;
find plugins/ program/js/ skins/ -type f -exec chmod 640 {} \;

## If you have an existing Roundcube installation and want to delete
## the database and start over with a new one, do this first
## (you may have to specify the full path or run
##  '. /etc/profile.d/mysql.sh' first)
## Just remember, the user you had previously created will still be there
# mysqladmin -u root -p drop roundcubemail

# If this is a new installation (not an upgrade), and you are using
# MySQL/MariaDB, create the database, grant SQL privileges to a database
# user.
#
# If you have phpMyAdmin set up, you can do it in there instead if you like.
#
#'mysql -p' will ask for the root password to do it, but the user
# that you grant privileges to does not need to be root.  In this example,
# the user is 'roundcube'.  The GRANT line should be all on one line, but
# your browser may wrap it.  Remember the user and password you specify here
# for Roundcube's configuration.  Obviously, don't actually use "password".
test -f /etc/profile.d/mysql.sh && . /etc/profile.d/mysql.sh
test -f /etc/profile.d/mariadb.sh && . /etc/profile.d/mariadb.sh
mysql -p -u root
CREATE DATABASE roundcubemail CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'roundcube'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'localhost';
FLUSH PRIVILEGES;
quit;

# Import the SQL commands for creating all of the MySQL/MariaDB tables
# (use the files in SQL/mysql/ instead if this is an upgrade)
mysql -p -u root roundcubemail < SQL/mysql.initial.sql

### Typical locations for Apache configuration are:
## Source:
# /usr/local/apache2/conf/httpd.conf
# /usr/local/apache2/conf/extra/httpd-ssl.conf
# /usr/local/apache2/conf/extra/httpd-vhosts.conf
## Slackware's httpd package:
# /etc/httpd/httpd.conf
# /etc/httpd/extra/httpd-ssl.conf
# /etc/httpd/extra/httpd-vhosts.conf
## Ubuntu package:
# /etc/apache2/sites-enabled/000-default
# /etc/apache2/sites-enabled/ssl

## Apache Module mod_alias
## Apache Core Features - <Directory> Directive
#
## If you extracted it under Apache's 'htdocs' directory, and your Apache
## is already configured to use .htaccess files, then you don't need to
## change any Apache configuration.
#
## If you like, you can extract it to a directory outside of Apache's
## 'htdocs' directory, as done above, use an Apache Alias to point to it, and
## redirect a few alternate URIs to it like so:
#
#
#   Alias /roundcubemail /usr/local/roundcubemail
#   Redirect permanent /roundcube https://www.example.com/roundcubemail
#   Redirect permanent /webmail https://www.example.com/roundcubemail
#

#
#   AllowOverride All   
#   Require all granted
#

#
## You can also extract it to a directory outside of Apache's htdocs, as
## done above, and then create a symlink pointing to it in htdocs, as long as
## you configure Apache's htdocs (the main one or the one in your VirtualHost,
## whichever is the case here) with FollowSymlinks via the
## section.
# cd /usr/local/apache2/htdocs
# ln -s /usr/local/roundcubemail

# After changing Apache configuration, check it:
test -x /etc/profile.d/apache2.sh
apachectl configtest

# ...and if it says it's OK, restart it:
apachectl restart

# Now that Apache or whatever you use is ready, go to the URL for the
# installer (https://example.com/roundcubemail/installer/), follow it's
# instructions.

# Remove or move the installer directory somewhere else, or less good, tighten
# up the permissions so nobody can read/write/use it
chown -R root:root /usr/local/roundcubemail-1.4.11/installer/
chmod -R go-rwx /usr/local/roundcubemail-1.4.11/installer/

# Verify and/or tighten permissions on the config directory and files in it
( cd /usr/local/roundcubemail-1.4.11/config
  chown root:root . config.inc.php.sample
  chown root:daemon . .htaccess *.php
  chmod 750 .
  chmod 600 config.inc.php.sample
  chmod 640 config.inc.php defaults.inc.php mimetypes.php )

# If you're going to use the Enigma plugin for PGP encryption, read
# plugins/enigma/README

# Now go to your regular Roundcube URL and make sure everything looks OK
# (i.e. https://foo/roundcubemail/

# Add a cron job to clean up the database every day
echo '#!/bin/sh' > /etc/cron.daily/roundcube.sh
echo 'PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin' >> \
/etc/cron.daily/roundcube.sh
echo '/usr/local/roundcubemail/bin/cleandb.sh' >> \
/etc/cron.daily/roundcube.sh
chmod 700 /etc/cron.daily/roundcube.sh

# Become your non-root user again
exit

# Keep the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/roundcubemail-*.tar.*
mv roundcubemail-1.4.11.tar.gz installed/

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2021-08-09 4:07pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]