{"id":687,"date":"2021-07-23T12:35:40","date_gmt":"2021-07-23T12:35:40","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/how-to-customize-roundcube-webmail\/"},"modified":"2021-07-23T12:35:40","modified_gmt":"2021-07-23T12:35:40","slug":"how-to-customize-roundcube-webmail","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/how-to-customize-roundcube-webmail\/","title":{"rendered":"How to Customize Roundcube Webmail"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>This document is <strong>only<\/strong> valid for cPanel &#038; WHM version 11.46 through 56. Customizations that use this method will <strong>not<\/strong> function in cPanel &#038; WHM version 58 and later, because these versions ship Roundcube as an RPM.<\/li>\n<li>Because cPanel, L.L.C. doesn\u2019t develop Roundcube, cPanel Technical Support can\u2019t help with customization.<\/li>\n<li>To customize Roundcube for cPanel &#038; WHM version 58 and later, read our How to Build and Install Custom RPMs documentation.<\/li>\n<li>cPanel, L.L.C. does <strong>not<\/strong> support Roundcube user experience customizations.<\/li>\n<\/ul><\/div>\n<\/div>\n<p>You can update and customize the Roundcube webmail application.<\/p>\n<h2 id=\"path-and-filenames-for-the-database\">Path and filenames for the database<\/h2>\n<p>The SQLite database uses the following path and filename, where <code>username<\/code> represents a cPanel account username and <code>domain<\/code> represents a domain name:<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\"><span style=\"color:#e6db74\">\/home\/<\/span>username<span style=\"color:#e6db74\">\/etc\/<\/span>domain<span style=\"color:#f92672\">\/<\/span>username<span style=\"color:#f92672\">.<\/span>rcube<span style=\"color:#f92672\">.<\/span>db<\/code><\/pre>\n<\/div>\n<p>Additionally, the database applies the following naming conventions, where username represents a cPanel account username:<\/p>\n<table>\n<thead>\n<tr>\n<th align=\"left\">Filename<\/th>\n<th align=\"left\">Description<\/th>\n<th align=\"left\">Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"left\"><code>\/home\/username\/etc\/domain\/username.rcube.db.unixtimestamp<\/code><\/td>\n<td align=\"left\">A backup file with a Unix timestamp.<\/td>\n<td align=\"left\"><code>username.rcube.db.1495814375<\/code><\/td>\n<\/tr>\n<tr>\n<td align=\"left\"><code>\/home\/username\/etc\/domain\/username.rcube.db.latest<\/code><\/td>\n<td align=\"left\">A symlink to the latest Roundcube backup.<\/td>\n<td align=\"left\"><code>username.rcube.db.latest<\/code><\/td>\n<\/tr>\n<tr>\n<td align=\"left\"><code>\/home\/username\/etc\/domain\/username.rcube.db.YYYYMMDDHHMMSS.sqlite2<\/code><\/td>\n<td align=\"left\">A SQLite v2 backup file.<\/td>\n<td align=\"left\"><code>username.rcube.db.20170523105040.sqlite2<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"roundcube-updates\">Roundcube updates<\/h2>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<p>Because the <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script <strong>only<\/strong> retains the last four backups, continuous execution of the <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script may result in data loss. We <strong>strongly<\/strong> recommend that you maintain external backups and avoid continuous backups of non-operational Roundcube installations.<\/p>\n<\/p><\/div>\n<\/div>\n<p>The method that cPanel &#038; WHM uses to update Roundcube affects your customizations. cPanel &#038; WHM uses the following process to update Roundcube:<\/p>\n<ol>\n<li>\n<p>The system runs the <code>\/scripts\/upcp<\/code> script to update cPanel &#038; WHM.<\/p>\n<\/li>\n<li>\n<p>The <code>\/scripts\/upcp<\/code> script runs the <code>\/usr\/local\/cpanel\/install\/webmail<\/code> script.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>During this step, the script will check for custom Roundcube tarballs. For more information, read the Where to save a custom Roundcube tarball installation section.<\/p>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li>\n<p>The <code>\/usr\/local\/cpanel\/install\/webmail<\/code> script executes the <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script.<\/p>\n<\/li>\n<li>\n<p>The <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script runs the following command to remove the current Roundcube installation:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">  rm <span style=\"color:#f92672\">-<\/span>rf <span style=\"color:#e6db74\">\/usr\/<\/span>local<span style=\"color:#e6db74\">\/cpanel\/<\/span>base<span style=\"color:#e6db74\">\/3rdparty\/<\/span>roundcube\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>The <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script extracts the appropriate source tarball to the <code>\/usr\/local\/cpanel\/base\/3rdparty\/<\/code> directory.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>During this step, the <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script checks for the existence of the <code>\/var\/cpanel\/roundcube\/install<\/code> file and performs one of the following actions:<\/p>\n<ul>\n<li>If the <code>\/var\/cpanel\/roundcube\/install<\/code> is not an executable file, the file\u2019s contents print to the <code>STDOUT<\/code> file and Roundcube continues with the installation procedure of the normal cPanel &#038; WHM configuration.<\/li>\n<li>\n<p>If the <code>\/var\/cpanel\/roundcube\/install<\/code> is an executable file, the <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script executes this file and then terminates the script.<\/p>\n<ul>\n<li>This bypasses cPanel &#038; WHM\u2019s manipulation of the Roundcube configuration files.<\/li>\n<li>If the file successfully executes, steps 5 through 9 of the installation procedure do <strong>not<\/strong> occur.<\/li>\n<\/ul>\n<\/li>\n<\/ul><\/div>\n<\/div>\n<\/li>\n<li>\n<p>The <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script changes the ownership of the Roundcube installation to the <code>root<\/code> user and the <code>wheel<\/code> group.<\/p>\n<\/li>\n<li>\n<p>The <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script checks for the existence of the <code>\/var\/cpanel\/roundcube<\/code>\/install file.<\/p>\n<\/li>\n<li>\n<p>The <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script extracts MySQL\u00ae configuration values from the system settings.<\/p>\n<\/li>\n<li>\n<p>The <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script backs up Roundcube\u2019s MySQL database to the <code>\/var\/cpanel\/roundcube\/roundcube.backup.sql.currenttimestamp<\/code> file, where <code>currenttimestamp<\/code> represents the time at which the script ran.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>The <code>\/var\/cpanel\/roundcube\/<\/code> directory <strong>only<\/strong> retains the four most recent copies of the Roundcube database backup.<\/p>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li>\n<p>The <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script drops the Roundcube database from MySQL.<\/p>\n<\/li>\n<li>\n<p>The <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script updates Roundcube\u2019s configuration files and MySQL files with the server\u2019s settings.<\/p>\n<\/li>\n<li>\n<p>The <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script recreates Roundcube\u2019s database from the MySQL files.<\/p>\n<\/li>\n<li>\n<p>The <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script reloads the previous Roundcube database backup and finishes the update.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"install-a-customized-instance-of-roundcube\">Install a customized instance of Roundcube<\/h2>\n<p>There are many ways that you can customize Roundcube. For example, you can make simple configuration changes or completely replace the Roundcube tarball.<\/p>\n<p>For instructions on how to customize Roundcube, read the Roundcube wiki.<\/p>\n<h3 id=\"savetarball\">Where to save a custom Roundcube tarball<\/h3>\n<p>During step 2 of the Roundcube update installation procedure, the <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script checks for custom Roundcube tarballs. If <strong>any<\/strong> of these tarball files exist, cPanel &#038; WHM uses them instead of the cPanel-provided tarball.<\/p>\n<p>If the script locates multiple tarballs, it uses them in the following order, where <code>RCUBE_VERSION<\/code> represents the Roundcube version number:<\/p>\n<ul>\n<li><code>\/var\/cpanel\/roundcube\/roundcube-RCUBE_VERSION-local.tar.gz<\/code> \u2014 Use this location for a compressed tarball that you want to apply to a specific Roundcube version.<\/li>\n<li><code>\/var\/cpanel\/roundcube\/roundcube-RCUBE_VERSION-local.tar<\/code> \u2014 Use this location for an uncompressed tarball that you want to apply to a specific Roundcube version.<\/li>\n<li><code>\/var\/cpanel\/roundcube\/roundcube-local.tar.gz<\/code> \u2014 Use this location for a compressed tarball that you want to apply to Roundcube, regardless of version.<\/li>\n<li><code>\/var\/cpanel\/roundcube\/roundcube-local.tar<\/code> \u2014 Use this location for an uncompressed tarball that you want to apply to Roundcube, regardless of version.<\/li>\n<\/ul>\n<h4 id=\"example\">Example<\/h4>\n<p>For example, cPanel &#038; WHM uses the <code>\/var\/cpanel\/roundcube\/roundcube-0.4-local.tar.gz<\/code> file if the following statements are true:<\/p>\n<ul>\n<li>The <code>\/var\/cpanel\/roundcube\/roundcube-local.tar<\/code> and <code>\/var\/cpanel\/roundcube\/roundcube-0.4-local.tar.gz<\/code> files exist.<\/li>\n<li>The <code>\/var\/cpanel\/roundcube\/roundcube-0.4-local.tar.gz<\/code> file matches the version number that the \/<code>usr\/local\/cpanel\/bin\/update-roundcube<\/code> script specifies.<\/li>\n<\/ul>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>The value that <code>RCUBE_VERSION<\/code> represents in these locations <strong>must<\/strong> match the <code>RCUBE_VERSION<\/code> variable that the <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script defines. For example, if the <code>RCUBE_VERSION<\/code> parameter is version 0.4 in the <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script, you <strong>must<\/strong> save your custom tarball as the <code>roundcube-0.4-local.tar.gz<\/code> filename.<\/li>\n<li>These tarballs must extract to the <code>\/usr\/local\/cpanel\/base\/3rdparty\/roundcube\/<\/code> directory.<\/li>\n<\/ul><\/div>\n<\/div>\n<h3 id=\"where-to-store-a-custom-overlay-file\">Where to store a custom overlay file<\/h3>\n<p>The overlay tarball allows you to customize specific attributes of Roundcube, such as the use of an overlay to change graphics, themes, or plugins. It can also contain one image file.<\/p>\n<p>The overlay does <strong>not<\/strong> require a complete Roundcube distribution. It only requires the components that you wish to modify, because cPanel &#038; WHM will overlay it onto the Roundcube installation. However, the overlay requires a directory structure that matches the <code>\/usr\/local\/cpanel\/base\/3rdparty\/roundcube<\/code> directory structure and begins with the <code>roundcube<\/code> name.<\/p>\n<p>After you determine which tarball to use for the source installation and extract it, the <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script checks for the following directories. If the script locates multiple tarballs, it uses them in the following order, where <code>RCUBE_VERSION<\/code> represents a Roundcube version number:<\/p>\n<ul>\n<li>\n<p><code>\/var\/cpanel\/roundcube\/overlay.RCUBE_VERSION.tar.gz<\/code> \u2014 Use this location for a compressed overlay that you want to apply to a specific Roundcube version.<\/p>\n<\/li>\n<li>\n<p><code>\/var\/cpanel\/roundcube\/overlay.tar.gz<\/code> \u2014 Use this location for a compressed overlay that you want to apply to Roundcube, regardless of version.<\/p>\n<\/li>\n<li>\n<p><code>\/var\/cpanel\/roundcube\/overlay.RCUBE_VERSION.tar<\/code> \u2014 Use this location for an uncompressed overlay that you want to apply to a specific Roundcube version.<\/p>\n<\/li>\n<li>\n<p><code>\/var\/cpanel\/roundcube\/overlay.tar<\/code> \u2014 Use this location for an uncompressed overlay that you want to apply to Roundcube, regardless of version.<\/p>\n<\/li>\n<\/ul>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<p>The value of the <code>RCUBE_VERSION<\/code> variable <strong>must<\/strong> match the version number that the <code>\/usr\/local\/cpanel\/bin\/update-roundcube<\/code> script specifies.<\/p>\n<\/p><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview Warning: This document is only valid for cPanel &#038; WHM version 11.46 through 56. Customizations that use this method will not function in cPanel &#038; WHM version 58 and later, because these versions ship Roundcube as an RPM. Because cPanel, L.L.C. doesn\u2019t develop Roundcube, cPanel Technical Support can\u2019t help with customization. To customize Roundcube &hellip;<\/p>\n","protected":false},"author":1,"featured_media":688,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/687"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=687"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/687\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/688"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}