1

Topic: How can i enable different roundcube login window for differnet domain

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====
Hai,
I have installed iredmail 0.8.7. on centos 6.7.Now my roundcubemail path is /var/www/roundcubemail.
I have more then one domains (abc.xyz.in,.,abc.xyz.org,..abc.bz.in etc).I need different roundcubemail login screen for different domains.
Please help me if it possible...

----

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

2

Re: How can i enable different roundcube login window for differnet domain

It's best if you tell us what exactly you want to change. The logo? The CSS? The template? All 3? That way we avoid making it more complicated than necessary.

3

Re: How can i enable different roundcube login window for differnet domain

I want to change the logo,CSS.and template.
as an example ,for my xyz.in domain need a logo,CSS,template.and in my abc.in domain need another logo.CSS,template also.
Is it possible?

4 (edited by hdco 2014-11-26 03:14:08)

Re: How can i enable different roundcube login window for differnet domain

Ok, open up roundcube/skins/your_theme/templates/login.html (this is in /usr/share/apache2 in Debian) and pick something you want to change, say, the logo. You'll see:

<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" />

Wrap it in template conditionals, accounting for each domain.

<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:elseif condition="$_SERVER['HTTP_HOST'] == 'mail.domain3.com'" />
    <roundcube:object name="logo" src="/images/domain3logo.png" id="logo" />
<roundcube:endif />

You might need to enable PHP in templates though the config file, I can't remember if PHP in conditionals counts as PHP...

Repeat for other elements like <link> tags, text, or anything else. You could also just have one entire template file per domain (<roundcube:include file="domain1template.html" />), but that'll be messy unless each one will be very different.

In your other thread, you asked about virtualhosts. If you do what I posted, you will also need to add your other hosts are ServerAliases.

ServerName mail.domain1.com
ServerAlias mail.domain2.com
ServerAlias mail.domain3.com
ServerAlias ...

However, you should only do all this if each domain will have SSL. Sacrificing security for whitelabeling isn't worth it in my opinion.