Customizable login page

From now on, with Zextras, you can have a white-labeled login page for all the organization.
Pick the background image you prefer, insert your logo… and you’re done!

Let’s now take a quick look on how it works.

Custom Login Page

The Auth module provides a custom Login Page that can be used instead of Zimbra’s own one. You can set it at domain level and customize logo, background and favicon.

Enabling Login Page

The Zextras Login page uses the standard zimbraWebClientLoginURL to redirect the login request.

The zimbraWebClientLoginURL is evaluated after attributes that interfeer the standard login flow, such as ignoreLoginURL=1 and sso=1. Using this attributes will override the Zextras Login Page

To enable the login page, the Admin has to configure the zimbraWebClientLoginURL for all the domains. We strongly reccomend to configure zimbraPublicServiceHostname, zimbraPublicServiceProtocol used by the API to publish the other services.

Here is an example on how it works:

zmprov modifyDomain <domain.com> zimbraWebClientLoginURL /zx/login/page/?domain=<domain.com> 
zmprov modifyDomain <domain.com> zimbraPublicServiceHostname <domain.com> 
zmprov modifyDomain <domain.com> zimbraPublicServiceProtocol https

Personalizing the Login Page

You can make a custom login page using the loginPage Auth CLI command.

Image File Locations and Sizes

You can choose between two options for images:

  • Remote File: the image is hosted on a public online resource and can be directly accessed (just use the full URL to the resource in CLI Commands)
  • Local File: the image is hosted locally, in /<folder>/zimbra/jetty/webapps/zimbra/public/

In this case use the relative path to the file (e.g. /public/<image.ext>)

 The optimal size for a logo image is 320×80. The aspect ratio of 4:1 should always be maintained.
 It’s stongly advised to avoid images smaller than the current standard monitor resolutions to avoid vertical or horizontal bars to be displayed on screens with a bigger resolution than the background image.

Editing the Background

 You can set the background using the following command at domain level:

loginPage setBackgroundImage

Local

zxsuite auth loginPage setBackgroundImage domain <domain.com> "/public/<image.ext>"

Remote

zxsuite auth loginPage setBackgroundImage domain <domain.com> "https://domain.com/<path>/<image.ext>"

Login Page logo can be set using, at domain level, the loginPage setLogo  command.

As for the background you can use both local and remote images:

 Local

zxsuite auth loginPage setLogo domain <domain.com> "/public/<image.ext>"

Remote

zxsuite auth loginPage setLogo domain <domain.tcom> "https://domain.com/<path>/<image.ext>"

Editing the Favicon

Te command to set favicon is: loginPage setFavicon and must be given at domain level, like the others we already seen.

 As for the logo and background you can use both local and remote images:

 Local

zxsuite auth loginPage setFavicon domain <domain.com>"/public/<image.ext>"

Remote

zxsuite auth loginPage setFavicon domain <domain.tcom> "https://domain.com/<path>/<image.ext>

Viewing the current configuration

The current Login Page settings for a domain can be viewed through the getConfig command:

zimbra@mail:~$ zxsuite auth loginPage getConfig domain domain.com
zimbraPublicServiceHostname    mail.domain.com
loginPageBackgroundImage    /public/<image.ext>
zimbraPublicServicePort    443
zimbraPublicServiceProtocol    https
zimbraDomainName    domain.com
publicUrl    https://mail.domain.com
loginPageLogo    /public/l<image.ext>

Technical writer at Zextras. Linux and technology enthusiast. He describes himself as an atypical and polyhedric IT expert, thanks to a creative and open minded attitude, and to the experience gained over time as an IT technician, system engineer and developer.

Post your comment