Branding
A server that hosts mail for an organisation, or for several, can present the WebUI under their identity instead of Stalwart’s. The logo shown by the WebUI can be replaced for the whole server. In multi-tenant deployments, it can also be replaced separately for each tenant and each domain, so that each organisation sees its own logo when its users sign in.
Logo selection
Section titled “Logo selection”The server chooses the logo from the hostname of the request, from the most specific source to the most general. It uses the first of these sources that provides a logo:
- The
logoof the Domain that matches the hostname. - The
logoof the Tenant that the domain belongs to. - The
logoof the Enterprise singleton, which is the default for the server. It is found in the WebUI under Settings › Enterprise. - Stalwart’s built-in logo.
A logo set on the Enterprise singleton therefore applies everywhere, unless a tenant or a domain sets its own.
Logo values
Section titled “Logo values”The logo fields of the three objects accept the same values:
- An https URL of the image
- An http URL, accepted only on the Enterprise singleton and on domains not owned by a tenant
- The image itself, base64-encoded or as a
data:URI
The image may be PNG, JPEG, GIF, WebP, ICO or SVG, and at most 1 MiB in size.
A logo given as a URL is downloaded by the server, not by the browser. The download must complete within 15 seconds and follow at most 5 redirects. Logos of tenants and of tenant-owned domains are subject to a stricter rule: they must use https URLs that resolve to public IP addresses.
SVG images can contain scripts, so the server serves every logo with a restrictive content security policy. An SVG logo therefore cannot run scripts.
The following update sets the server-wide logo:
{ "logo": "https://www.example.com/assets/logo.svg"}