# DirectAdmin Roundcube Branding: Custom Webmail URL

Source: https://srvscripts.com/guides/directadmin-roundcube-branding-webmail/
Updated: 2026-10-06
Publisher: srvScripts (https://srvscripts.com/)

DirectAdmin ships Roundcube through CustomBuild, currently at 1.7.4, and exposes it under `/roundcube` on every hosted domain as well as on the panel hostname. Providers usually want three things beyond the default: a clean `webmail.customer-domain` address, a logo and product name that match their brand, and a webmail link in the panel that logs the user straight in. All three are supported without patching Roundcube, provided the customisations live in the places CustomBuild preserves.

In short: Set Roundcube as the CustomBuild webmail client with da build set roundcube yes and rewrite the configuration so webmail. subdomains land on it, then set webmail_link and one_click_webmail_link with da config-set for the panel button.

**Short answer:** Set Roundcube as the CustomBuild webmail client with `da build set roundcube yes` and rewrite the configuration so `webmail.` subdomains land on it, then set `webmail_link` and `one_click_webmail_link` with `da config-set` for the panel button. Put a copy of `config.inc.php` containing `product_name`, `skin_logo` and `support_url` under `custombuild/custom/roundcube/` so the branding survives every `da build roundcube`.

## The webmail subdomain

CustomBuild’s web-server templates already include a virtual host for `webmail.` on every domain, alongside `mail.`, and DirectAdmin adds the matching A record to new zones. The template variable that controls the target is the webmail choice in CustomBuild; set it to Roundcube and rebuild the configuration if the subdomain currently lands on a different client or on the domain’s own document root:

```
da build set roundcube yes
da build roundcube
da build rewrite_confs
```

Existing zones that predate the setting lack the `webmail` record. Add it to the DNS template so new domains get it, and to existing zones in bulk:

```
grep -L '^webmail' /var/named/*.db
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
```

Because the new ACME TLS system issues certificates per domain with up to 25 names, `webmail.` and `mail.` are included automatically for domains that opted in, so the subdomain serves a valid certificate. Domains still on manual certificates need the name included by hand.

## The one-click login link

1.688 introduced `one_click_webmail_link`. When enabled, the webmail button in the Evolution email pages opens Roundcube with a short-lived token instead of asking the user for the mailbox password again:

```
da config-set one_click_webmail_link 1
```

Since 1.710 `da config-set` reloads the panel automatically. The feature relies on the panel and Roundcube sharing the same hostname or the `webmail_link` setting pointing at a Roundcube instance the panel trusts; if the link opens the login form instead of the inbox, check that `webmail_link` matches the URL the browser is actually redirected to.

Where a provider hosts one branded webmail address for all customers, set the panel’s link to it:

```
da config-set webmail_link https://webmail.provider.example/
```

## Branding without losing it on rebuild

Roundcube’s files live in `/var/www/html/roundcube`, and `da build roundcube` replaces them on every version bump. Anything edited in place is lost. CustomBuild reads overrides from its `custom` directory instead:

```
mkdir -p /usr/local/directadmin/custombuild/custom/roundcube
cp /var/www/html/roundcube/config/config.inc.php /usr/local/directadmin/custombuild/custom/roundcube/config.inc.php
```

Edit the copy. The settings that carry the branding are `product_name`, `skin_logo` and `support_url`; `skin_logo` accepts a path relative to the Roundcube root or an absolute URL:

```
$config['product_name'] = 'Provider Webmail';
$config['skin_logo'] = 'https://webmail.provider.example/branding/logo.svg';
$config['support_url'] = 'https://provider.example/support/';
$config['login_lc'] = 2;
```

For a custom skin, place it under `custombuild/custom/roundcube/skins/` and reference it with `$config['skin']`. CustomBuild copies the custom directory over the fresh install at the end of each build, so the skin and config survive. Check the CustomBuild changelog for your version if the path layout differs; the `custom/roundcube` behaviour has been stable for several years but the list of files copied has grown.

Rebuild once to confirm the override is applied:

```
da build roundcube
grep product_name /var/www/html/roundcube/config/config.inc.php
```

## Common pitfall: hard-coding the database or des_key

Copying the whole `config.inc.php` into `custom/` freezes values that CustomBuild normally generates, notably the database password and `des_key`. If the Roundcube database password is later rotated, the override still carries the old one and webmail fails with a database error. Either keep only the branding lines in the custom file and let CustomBuild merge the rest, which recent versions support, or remember to update the override whenever credentials change. The [Roundcube database error guide](/guides/roundcube-database-error-login-loop/) covers the symptom, and the fix is the same on DirectAdmin.

## Verify

Open `https://webmail.example.com/` for a hosted domain and confirm the logo, product name and a valid certificate. From the shell, check the virtual host resolved to Roundcube rather than the domain’s document root:

```
curl -sI https://webmail.example.com/ | grep -i -E 'location|server'
curl -s https://webmail.example.com/ | grep -o '[^
