Roundcube Community Forum

 

open different accounts in same browser

Started by apps4u, May 13, 2013, 12:16:06 AM

Previous topic - Next topic

apps4u

Hi I could not rind a answer to this . We have postfix/dovecot mail server setup with postfixadmin to host virtual domains in a mysql database . We want to move all our users to webmail we tried squirrel mail but it look dated and did not work right so I have now setup round cube and it great but all our staff have at lest 4 email account one for each domain and one feature squirrel mail had that I can not get working is having 3 tabs open with each tab having a different email account as all email run on same domain name we have sharp****.com.au as our public domain name and MX host for all our domains so I can not have http://domain-name.com/roundcube for each email account so our staff could have different domain name in each browser tab . I could setup a vm for each domain which is a lot of work as we have around 15 domains just for this one business. so if any one can point in is the right direction if there is a plugin or if I can code this myself my a good php/ajax programmer so if I have to hack the way sessions are stored I can . any would be good

canobi

This is just a theoretical approach and a hack, but one way you could achieve this would be:

  • Make an Alias in your apache configuration for each domain, that points to the same RC installation: http://webmail.host/domain1, http://webmail.host/domain2, etc. - each pointing to /var/www/html/roundcube (or wherever your RC installation sits)
  • Hack the RC config file and define a (new) cookie path setting with the value of "dirname($_SERVER['REQUEST_URI']);" there are at least 3 cookies that RC sets, and you need to find where they're defined and then patch the code to use your setting to limit the cookies to a certain path; additionally, if there's any use of the "installation path" anywhere, you'll need to make sure that it's also not fixed but rather that it's taken from the current URL
  • define different incoming/IMAP and outgoing/SMTP servers (if applicable) based on the URL/domain that was accessed

In addition to that, you might need to also hack around with database (maybe even use separate databases for separate domains), and temp storage location.

Quite a bit of work, depending on your setup of domains, but it boils down to recognizing the URL you were called from, and acting upon it.

A clean solution would be writing a plugin, akeen to "Multiple accounts" plugin from myroundcube.com, with maybe improved functionality that would let users aggregate multiple mailboxes on the same interface (as desktop email clients do), without the need to switch between them.

JohnDoh

I think it is simplier than canobi says. especially since you are using different URLs. in any case there are the session_domain and session_path settings in the config file. setting these based on the URL used to access RC allows you to run multiple instances in different tabs. there is no need to change anything in the core.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...