Announcement

Collapse
No announcement yet.

How to Customize Roundcube Web-mail

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Customize Roundcube Web-mail

    Overview

    This document explains how cPanel & WHM versions 11.46 and later update the Roundcube webmail application, and how you can customize your Roundcube installation.

    Important: Customization of Roundcube gives you full control over the end user experience. However, cPanel does Not support these customizations.

    General installation procedure

    Before you customize your Roundcube installation, it is useful to understand how cPanel & WHM updates Roundcube.

    When the /scripts/upcp script runs to update cPanel & WHM, it executes the /usr/local/cpanel/install/webmail script. The /usr/local/cpanel/install/webmail script then executes the /usr/local/cpanel/bin/update-roundcube script.

    The /usr/local/cpanel/bin/update-roundcube script performs the following actions:

    1. It uses the following command to remove the current Roundcube installation:
    rm -rf /usr/local/cpanel/base/3rdparty/roundcube

    2.It extracts the appropriate Roundcube source tarball to the /usr/local/cpanel/base/3rdparty directory.

    Note: During this step, the /usr/local/cpanel/bin/update-roundcube script checks for custom Roundcube tarballs. For more information, read the Where to place a custom Roundcube tarball section below.

    3.It changes the ownership of the Roundcube installation to the root user and the wheel group.

    4.The /usr/local/cpanel/bin/update-roundcube script checks for the existence of the /var/cpanel/roundcube/install file.

    Note: For more information, read the Prevent changes to Roundcube's configuration files section below.

    5.It extracts MySQL configuration values from the system settings.

    6.It backs up Roundcube's MySQL database to the /var/cpanel/roundcube/roundcube.backup.sql.currenttimestamp file, where currenttimestamp is the time at which the script ran.

    Note:The /var/cpanel/roundcube/ directory only retains the four most recent copies of the Roundcube database backup.

    7.It drops the Roundcube database from MySQL.
    8.It updates Roundcube's configuration files and MySQL files with the server's settings.
    9.It recreates Roundcube's database from the MySQL files.
    10.It reloads the previous Roundcube database backup and finishes the update.

    Prevent changes to Roundcube's configuration files

    During step 4 of the installation procedure, the /usr/local/cpanel/bin/update-roundcube script checks for the existence of the /var/cpanel/roundcube/install file.

    1.If that file exists and is executable, the /usr/local/cpanel/bin/update-roundcube script will execute it and terminate.
    2.This bypasses cPanel & WHM's manipulation of the Roundcube configuration files.
    3.In this case, steps 5 through 9 of the installation procedure do not occur.
    4.If the /var/cpanel/roundcube/install file exists but is not executable, the file contents will print to STDOUT and the normal cPanel & WHM configuration of Roundcube will continue with the installation procedure.

    Warning: Because the /usr/local/cpanel/bin/update-roundcube script only retains the last four backups, continuous execution of the /usr/local/cpanel/bin/update-roundcube script may cause you to lose your data. We Strongly recommend that you maintain external backups and avoid continuous backups of non-operational Roundcube installations.


    Install a customized instance of Roundcube

    You may customize Roundcube in a number of ways. For example, you can make simple configuration changes or completely replace the Roundcube tarball.

    For instructions on how to customize Roundcube, see the Roundcube wiki.

    Where to place a custom Roundcube tarball

    During step 2 of the installation procedure, the /usr/local/cpanel/bin/update-roundcube script checks for custom Roundcube tarballs in the following locations:

    1./var/cpanel/roundcube/roundcube-$RCUBE_VERSION-local.tar.gz Use this location for a compressed tarball that you want to apply to a specific Roundcube version.
    2./var/cpanel/roundcube/roundcube-$RCUBE_VERSION-local.tar Use this location for an uncompressed tarball that you want to apply to a specific Roundcube version.
    3./var/cpanel/roundcube/roundcube-local.tar.gz Use this location for a compressed tarball that you want to apply to Roundcube regardless of version.
    4./var/cpanel/roundcube/roundcube-local.tar Use this location for an uncompressed tarball that you want to apply to Roundcube regardless of version.

    If any of these tarball files exist, cPanel & WHM will use them instead of the cPanel-provided tarball. If the script locates multiple tarballs, it will use them in the order that is listed above.

    For example, cPanel & WHM will use the /var/cpanel/roundcube/roundcube-0.4-local.tar.gz file if the following statements are true:

    The /var/cpanel/roundcube/roundcube-local.tar and /var/cpanel/roundcube/roundcube-0.4-local.tar.gz files exist.
    The /var/cpanel/roundcube/roundcube-0.4-local.tar.gz file matches the version number that the /usr/local/cpanel/bin/update-roundcube script specifies.

    The value that $RCUBE_VERSION represents in these locations must match the $RCUBE_VERSION variable that the /usr/local/cpanel/bin/update-roundcube script defines. For example, if the $RCUBE_VERSION parameter is set to the 0.4 version in the /usr/local/cpanel/bin/update-roundcube script, save your custom tarball as the roundcube-0.4-local.tar.gz file.

    Important: These tarballs must extract to the /usr/local/cpanel/base/3rdparty/roundcube/ directory.

    Where to place a custom overlay file

    The overlay tarball allows you to customize specific aspects of Roundcube. For example, you can use an overlay to change graphics, themes, or plugins.

    The overlay does not need to contain a complete SquirrelMail distribution. It only needs to contain the components that you wish to modify, because cPanel & WHM will "overlay" it onto the Roundcube installation. For example, it can contain one image file.

    The overlay does, however, need to contain a directory structure that matches the structure of the /usr/local/cpanel/base/3rdparty/roundcube directory and starts with roundcube.

    After you determine which tarball to use for the source install and extract it, the update-roundcube script checks for the following:

    1./var/cpanel/roundcube/overlay.$RCUBE_VERSION.tar.gz Use this location for a compressed overlay you want to apply to a specific Roundcube version.

    2./var/cpanel/roundcube/overlay.$RCUBE_VERSION.tar Use this location for an uncompressed overlay you want to apply to a specific Roundcube version.

    3./var/cpanel/roundcube/overlay.tar.gz Use this location for a compressed overlay you want to apply to Roundcube regardless of version.

    4./var/cpanel/roundcube/overlay.tar Use this location for an uncompressed overlay you want to apply to Roundcube regardless of version.

    As with the custom Roundcube tarballs above, the following statements are true:

    1.If the script locates multiple tarballs, it will use them in the order that is listed above.
    2.The value of the $RCUBE_VERSION variable must match the version number that the /usr/local/cpanel/bin/update-roundcube script specifies.


    Regards,
    Dexter
    www.webhosting.uk.com
Working...
X