• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Input Quick tip on branding Roundcube

Denis Gomes Franco

Regular Pleskian
I'd like to share a quick and dirty hack that I used to brand my customers' Roundcube interface (now that it is running on v1.4) with their own logos. It was a fun little project and they absolutely loved it. With this, the customer will see their own logo on the login page and on the top left corner of the webmail interface.
Roundcube kinda allows for per-domain configuration but I figured this type of customization could be done without this. Here's what I did:

1. Created a "branding" directory inside /usr/share/psa-roundcube/ (or wherever your Roundcube instance is installed)
2. Uploaded customers logos to that directory. Files should be in PNG format with a square aspect ratio, and their names should be the same as the subdomain where Roundcube runs, eg., if the access URL is "webmail.mysupercompany.com" the file should be named "webmail.mysupercompany.com.png". You can upload logos for all your domains to that directory.
3. Added the following lines to /usr/share/psa-roundcube/config/config.inc.php:

PHP:
$logo_cliente = $_SERVER['SERVER_NAME'] . '.png';
if (file_exists('./branding/' . $logo_cliente)) {
  $config['skin_logo'] = '../../branding/' . $logo_cliente;
  } else {
  $config['skin_logo'] = '../../branding/placeholder.png';
}

Note that the above code is referencing a placeholder.png file. You should also upload a placeholder logo under that name, as it will be used instead whenever there is no custom logo present for a domain, or when you don't want to brand a particular domain. This configuration will override the Elastic skin default logo, and I am using my company logo as a placeholder. But if you'd like to use the default Elastic skin logo then just delete that line and the ELSE condition right above it.

Hope that helps! For me it works just like a charm :)
 
Last edited:
I'd like to share a quick and dirty hack that I used to brand my customers' Roundcube interface (now that it is running on v1.4) with their own logos. It was a fun little project and they absolutely loved it. With this, the customer will see their own logo on the login page and on the top left corner of the webmail interface.
Roundcube kinda allows for per-domain configuration but I figured this type of customization could be done without this. Here's what I did:

1. Created a "branding" directory inside /usr/share/psa-roundcube/ (or wherever your Roundcube instance is installed)
2. Uploaded customers logos to that directory. Files should be in PNG format with a square aspect ratio, and their names should be the same as the subdomain where Roundcube runs, eg., if the access URL is "webmail.mysupercompany.com" the file should be named "webmail.mysupercompany.com.png". You can upload logos for all your domains to that directory.
3. Added the following lines to /usr/share/psa-roundcube/config/config.inc.php:

PHP:
$logo_cliente = $_SERVER['SERVER_NAME'] . '.png';
if (file_exists('./branding/' . $logo_cliente)) {
  $config['skin_logo'] = '../../branding/' . $logo_cliente;
  } else {
  $config['skin_logo'] = '../../branding/placeholder.png';
}

Note that the above code is referencing a placeholder.png file. You should also upload a placeholder logo under that name, as it will be used instead whenever there is no custom logo present for a domain, or when you don't want to brand a particular domain. This configuration will override the Elastic skin default logo, and I am using my company logo as a placeholder. But if you'd like to use the default Elastic skin logo then just delete that line and the ELSE condition right above it.

Hope that helps! For me it works just like a charm :)
Perfectly done with no erros. Great contribution!
 
Back
Top