HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=29)
-   -   Single RoundCube setup for multiple ISPConfig3 servers (http://www.howtoforge.com/forums/showthread.php?t=44011)

Hans 11th March 2010 10:24

Single RoundCube setup for multiple ISPConfig3 servers
 
Since 'm using ISPConfig3, i'm interested in a single installation of the RoundCube webmail client, for all my ISPConfig3 servers.
For maintenance reasons, i prefer one single setup instead of one RoundCube webmail client on every ISPConfig3 server.

Within the RoundCube configuration file main.inc.php i can change the line $rcmail_config['default_host'] = 'localhost'; into $rcmail_config['default_host'] = '';
By doing this an extra field on the login screen appears, so the hostname of the imap-server can be filled in there.
However this is not what i want.
Another possibility is to give one ISPConfig 3 server the task of mailserver and nothing else.
By doing this, RoundCube needs only one host, so that's a possibility, but it's not what i prefer.

So my question is: does anybody know how to configure RoundCube, so that it can access multiple hosts?

Grey 19th May 2010 15:36

Quote:

By doing this an extra field on the login screen appears, so the hostname of the imap-server can be filled in there.
However this is not what i want.
Hi Hans,

if that's not what you wanted, what result do you intend to achieve? A dropdown with hosts listed? Can you describe your setup a bit, too? Perhaps than I may be able to help.

Hans 19th May 2010 16:35

@Grey,
Thanks for your help, I wanted no dropdownlist, but that's a little complicated with more then one mailserver, i guess.
(I'm not a programmer). After all. i decided to work with a dropdownlist, which works fine.
So, now i use one single RoundCube installation (for maintenance), from which i can access every ISPConfig3-server in my network. My RoundCube installation can be visited form every website when the suffix /webmail has been added or by clicking the Webmail icon in the ISPConfig3 controlpanel.

nachbar 19th May 2010 23:04

Hi Hans,

i search such the same setup you have or you want. How have you configured ispconfig3 or / and roundcube to solve the problem?

Lets take an example:
We have seperate hosts e.g. 1 to 3. And a seperate ispconfig3 server

So the roundcube single installation will be on ispconfig3 server too. So how to tell roundcube to choose the correct server? E.g. user@test.com is hostet on host 2. How knows roundcube to take host 2 as login server?

Hans 19th May 2010 23:21

What i explain above is functioning fine already.
Here is my RC login screen. As you can see, i have a dropdown list. As you can see i have 6 mailservers (each ISPConfig3). What the client has to do is: login with its username and password and choose the mailserver (1-6). If you need an example of the RoundCube main.inc.configuration file i can post it here for you.

Grey 19th May 2010 23:45

Quote:

Originally Posted by Hans (Post 228709)
What i explain above is functioning fine already.
Here is my RC login screen. As you can see, i have a dropdown list. As you can see i have 6 mailservers (each ISPConfig3). What the client has to do is: login with its username and password and choose the mailserver (1-6). If you need an example of the RoundCube main.inc.configuration file i can post it here for you.

I think I know what you meant. You have 6 different mail servers, all running ISPConfig 3 and configured via a central ISPConfig instance, right? So what you would need for RC to work would be to automatically select the according server to the given user.

E.g:
User xyz_abc logs in - his account is on server 5, so mailserver 5 would be selected.
User abc_123 logs in - her account is on server 2.

Am I suspecting that right?

nachbar 20th May 2010 09:42

@Grey

Yeah. That is what i mean. I dont want that the customers have to select the correct server. I want that the correct server will be selected automatic.

So for this i search a solution. How could it be managed?

Hans 20th May 2010 09:43

Quote:

Originally Posted by Grey (Post 228711)
I think I know what you meant. You have 6 different mail servers, all running ISPConfig 3 and configured via a central ISPConfig instance, right? So what you would need for RC to work would be to automatically select the according server to the given user.

E.g:
User xyz_abc logs in - his account is on server 5, so mailserver 5 would be selected.
User abc_123 logs in - her account is on server 2.

Am I suspecting that right?

Yes, you understand me completely.

On an ISPConfig 3 server, the username for the mailbox is the same as the e-mailaddress.
To logon succesfully, we need 3 things:

- user name (username@example.com)
- password
- server name

Until now, i use the default dropdown menu to select the right server name, as i do not know how tweak RoundCube, so that the right server is selected automaticly.

If you are able to do that, it would be great!

Grey 20th May 2010 12:06

Quote:

Originally Posted by Hans (Post 228741)
Yes, you understand me completely.

On an ISPConfig 3 server, the username for the mailbox is the same as the e-mailaddress.
To logon succesfully, we need 3 things:

- user name (username@example.com)
- password
- server name

Until now, i use the default dropdown menu to select the right server name, as i do not know how tweak RoundCube, so that the right server is selected automaticly.

If you are able to do that, it would be great!

As we are in progress of evaluating to switch from ISPConfig 2 to V3 it sure will be a thing I will look into, as we are happy users of your last RoundCube Package for v2 for a long time, Hans. Thanks for that again. So if I can help you this time, it would be a great "payback" ;)

So as I see things, it would be necessary for Roundcube to be able to select the server according to the username given automagically. I don't have a DB dump of a v3 database at hand, but I think there has to be a connection between the mail user account and it's corresponding mailserver somewhere (has to, as ISPConfig has to know which server to make changes to mailpasswords or sth).

So I suppose the trick would be for roundcube to not only connect to the server, but make an additional SQL query and select the corresponding mailserver and then connect with it. My guess is, one would add a patch or an addon for roundcube for that. I have to look into the roundcube plugins, if that is doable via plugins or if it requires some codebase hack. Would the second be a problem? If I would do it via hacking the code I would supply some .patch file or sth alike.

Greets

Edit:
I had a quick look on the Roundcube site and found: http://www.needful.de/en/opensource/roundcube.html
That is a plugin for the authentication process to rewrite user names (email-address) to Confixx users names. So as RC allows plugins to hook into the authentication process, I think that shouldn't be a big problem to write one, that makes a SQL call to the ISPConfig DB and selects the correct server.

till 20th May 2010 12:31

Quote:

So as I see things, it would be necessary for Roundcube to be able to select the server according to the username given automagically. I don't have a DB dump of a v3 database at hand, but I think there has to be a connection between the mail user account and it's corresponding mailserver somewhere (has to, as ISPConfig has to know which server to make changes to mailpasswords or sth).
The ispconfig mail_user table has a field server_id which holds the ID of the server this address belongs to. Yoou can lookup the server hostname then with tis ID in the server table.


All times are GMT +2. The time now is 18:02.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.