1

Topic: Different login page for each domain using it's own company logo

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  1.3.1
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MsSQL
- Web server (Apache or Nginx): NginX
- Manage mail accounts with iRedAdmin-Pro? Non-Pro
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello Guys,

Can i create a separate login page for each domain using it's own company logo?

The scenario is:  I have an existing domain and its working fine. then my boss asked me to create another domain and want me to create a login page for the new domain using it's own company logo.


I followed the below steps but it's not working:
a. copy the newly added company logo to  /opt/www/roundcubemail-1.4.7/skins/larry/images
b. #nano /opt/www/roundcubemail-1.4.7/skins/larry/login.html
c. add the below entry
<roundcube:if condition="$_SERVER['HTTP_HOST'] == 'mail.domain1.com'" />
    <roundcube:object name="logo" src="/images/domain1logo.png" id="logo" />
<roundcube:elseif condition="$_SERVER['HTTP_HOST'] == 'mail.domain2.com'" />
    <roundcube:object name="logo" src="/images/domain2logo.png" id="logo" />
<roundcube:endif />
d. restart postfix

Thanks for the help Guys,
JunG

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Different login page for each domain using it's own company logo

jung wrote:

Can i create a separate login page for each domain using it's own company logo?

FYI: https://github.com/roundcube/roundcubem … main-Setup

3

Re: Different login page for each domain using it's own company logo

ZhangHuangbin wrote:
jung wrote:

Can i create a separate login page for each domain using it's own company logo?

FYI: https://github.com/roundcube/roundcubem … main-Setup


Thanks Zhang, I will check and get back to you...

4 (edited by jung 2020-10-11 18:26:34)

Re: Different login page for each domain using it's own company logo

jung wrote:
ZhangHuangbin wrote:
jung wrote:

Can i create a separate login page for each domain using it's own company logo?

FYI: https://github.com/roundcube/roundcubem … main-Setup


Thanks Zhang, I will check and get back to you...

Hi Zhang, I followed steps on the link and i'm able to open the webpage. Now, i'm trying to figure out how to edit the login page per domain and use their corresponding logo.

Thanks
JunG

5 (edited by jung 2020-10-15 13:30:50)

Re: Different login page for each domain using it's own company logo

Hi Guys,

Able to resolved by doing the below steps:

1. Copy the logo.svg or .png of each domain to /opt/www/roundcubemail-1.4.7/skins/elastic/images
2. Edit the "login.html" located in  /opt/www/roundcubemail-1.4.7/skins/elastic/templates/login.html
3. Put a comment on the entry  as shown:
       <!-- <roundcube:object name="logo" src="/images/logo.svg" data-src-small="0" id="logo”alt="Logo"/> -->
4. Insert the below condition just after the commented entry.
<roundcube:if condition="$_SERVER['HTTP_HOST'] == 'mail.yourdomainname1.com'" />
    <roundcube:object name="logo" src="/images/domain1logo.png" id="logo" />
<roundcube:elseif condition="$_SERVER['HTTP_HOST'] == 'mail.yourdomainname2.com'" />
    <roundcube:object name="logo" src="/images/domain2logo.png" id="logo" />
<roundcube:endif />
5. restart apache
    #service php7.2-fpm restart
6. restart postfix
    #service postfix restart
=====================================
Login.html (entire content)

<roundcube:include file="includes/layout.html" />
<h1 class="voice"><roundcube:object name="productname" /> <roundcube:label name="login" /></h1>

<div id="layout-content" class="selected no-navbar" role="main">
       <!-- <roundcube:object name="logo" src="/images/logo.svg" data-src-small="0" id="logo”alt="Logo"/> -->
        <roundcube:if condition="$_SERVER['HTTP_HOST'] =='mail.yourdomainname1.com'" />
                        <roundcube:object name="logo" src="/images/logo.svg" id="logo" />
                   <roundcube:elseif condition="$_SERVER['HTTP_HOST'] == 'mail.yourdomainname2.com'" />
                        <roundcube:object name="logo" src="/images/slogo.png" id="logo" />
                   <roundcube:endif />
         <roundcube:form id="login-form" name="login-form" method="post" class="propform">
         <roundcube:object name="loginform" form="login-form" size="40" submit=true />
                        <div id="login-footer" role="contentinfo">
                        <roundcube:object name="productname" condition="config:display_product_info &gt; 0" />
                        <roundcube:object name="version" condition="config:display_product_info == 2" />
                        <roundcube:if condition="config:support_url" />
                                &nbsp;&bull;&nbsp; <a href="<roundcube:var name='config:support_url' />" target="_blank" class="support-link"><roundcube:label name="support" /></a>
                        <roundcube:endif />
                        <roundcube:container name="loginfooter" id="login-footer" />
                </div>
        </form>
</div>

<noscript>
        <p class="noscriptwarning"><roundcube:label name="noscriptwarning" /></p>
</noscript>
<roundcube:include file="includes/footer.html" />
================

Hope this help...

JunG

6

Re: Different login page for each domain using it's own company logo

I don't think you need to edit any HTML files for this customization.

Just follow this tutorial: https://github.com/roundcube/roundcubem … main-Setup
Parameter "skin_logo" can be used to customize logo images, put it in the per-domain config file should do the trick.

7

Re: Different login page for each domain using it's own company logo

ZhangHuangbin wrote:

I don't think you need to edit any HTML files for this customization.

Just follow this tutorial: https://github.com/roundcube/roundcubem … main-Setup
Parameter "skin_logo" can be used to customize logo images, put it in the per-domain config file should do the trick.

Hi Zhang,

I followed the link you've provided but unable to get the result. but with the steps that i've posted,Bingo.... it's working..

Thanks Zhang...

Jung.