Login page Branding: multiple mail domain on single host Roundcube

Multiple Mail Domain Branding on a Single Host with Roundcube

Enhance the branding experience of your multiple mail domains by implementing Roundcube’s convenient feature for a unified interface. Follow these simple steps to configure branding for each domain on a single host:

Step 1: Create a “branding” directory
Start by creating a “branding” directory within your Roundcube instance’s installation directory, typically located at /var/www/roundcube/. You can choose an alternative installation path if necessary.

Step 2: Upload customer logos
Upload your customers’ logos to the newly created “branding” directory. Ensure that the logo files are in PNG format and have a square aspect ratio. It is crucial to name each logo file after the respective subdomain where Roundcube runs. For example, if your access URL is “webmail.mysupercompany.com,” the corresponding logo file should be named “webmail.mysupercompany.com.png.” Feel free to upload logos for all your domains to this directory.

Step 3: Modify the configuration file
Open the configuration file located at /var/www/roundcube/config/config.inc.php (or the relevant path where your Roundcube configuration file is stored). Add the following lines of code to enable domain-specific branding:

$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';
}

The code snippet above dynamically sets the logo based on the server name of the accessed Roundcube instance. It checks if a logo file exists in the “branding” directory with the corresponding name. If the logo file exists, it will be used as the skin logo. Otherwise, a default placeholder logo (“placeholder.png”) will be displayed.

By following these steps, you can effortlessly customize the branding of each mail domain on your Roundcube host, providing a visually consistent experience for your users.

Note: Make sure to adjust the paths and file names mentioned in the instructions to match your actual setup.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Liked this post? Share with others!

Do you want to boost your business today?

This is your chance to invite visitors to contact you. Tell them you’ll be happy to answer all their questions as soon as possible.