Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #21  
Old 21st May 2010, 23:06
Grey Grey is offline
Member
 
Join Date: May 2008
Location: Germany
Posts: 70
Thanks: 9
Thanked 18 Times in 15 Posts
Default

This solution is a bit limited as you rewrite the default_host by looking which domain it is called from. But this isn't possible if you install it centrally via e.g. "webmail.serviceprovider.com" not only because of the www-part, but also because a central domain for all customers wouldn't hold any additional information. With my plugin approach, RC selects the server from the ISPConfig database so it will always match the right one, even if you move a user from one server to another.

Only thing left is the login mask. I have an idea about that, but that will have to wait until tomorrow.
Reply With Quote
The Following User Says Thank You to Grey For This Useful Post:
Hans (21st May 2010)
Sponsored Links
  #22  
Old 21st May 2010, 23:12
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

Ok i see, and i will test your plugins anyway!
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
Reply With Quote
  #23  
Old 23rd May 2010, 23:37
austingecko austingecko is offline
Junior Member
 
Join Date: May 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you post your plugin code so we can see the queries, etc. Thanks.
Reply With Quote
  #24  
Old 24th May 2010, 02:56
Grey Grey is offline
Member
 
Join Date: May 2008
Location: Germany
Posts: 70
Thanks: 9
Thanked 18 Times in 15 Posts
Default

Quote:
Originally Posted by austingecko View Post
Can you post your plugin code so we can see the queries, etc. Thanks.
As the plugin isn't currently working with Hans' setup, we are in progress of debugging. Perhaps it's some change in code from 0.3.1 to 0.4-beta but we'll see. As soon as it seems to work, I'll happily provide you with necessary details.
Reply With Quote
  #25  
Old 15th June 2010, 16:52
Grey Grey is offline
Member
 
Join Date: May 2008
Location: Germany
Posts: 70
Thanks: 9
Thanked 18 Times in 15 Posts
Default

Quote:
Originally Posted by Grey View Post
As the plugin isn't currently working with Hans' setup, we are in progress of debugging. Perhaps it's some change in code from 0.3.1 to 0.4-beta but we'll see. As soon as it seems to work, I'll happily provide you with necessary details.
As it seems in Hans' tests, the plugin only works for RC versions >= 0.4(-beta). Somehow the API hooks don't seem to work properly in 0.3.1 (old)stable. But as soon as 0.4 hits gold (shouldn't take that long), it will work as intended. So my plugin is 0.4 only (a pity) but if any of you need it before 0.4 gets gold, let me know.

Cheers
Reply With Quote
  #26  
Old 15th June 2010, 22:35
Horfic Horfic is offline
Senior Member
 
Join Date: Mar 2009
Location: Austria
Posts: 324
Thanks: 55
Thanked 93 Times in 58 Posts
Send a message via Skype™ to Horfic
Default

So... I quickly wrote a working autoselect plugin for Roundcube 0.3.x <=
You just have to put it in the plugin folder, add the plugin to the plugin array in the main config and also change the default_host to $rcmail_config['default_host'] = '';

Yes, the server field won't be shown. It will use the config file of the ISPConfig3_account plugin, if you are using it, otherwise you have to edit the config file which is in the config folder of the plugin.

Requirements:
*) The server names in ISPConfig 3 must be the domain of the Server. Like xen1.bb-hosting.org

Oh... nearly forgot, you have to add in the /usr/local/ispconfig/interface/lib/classes/remoting.inc.php this:
Code:
	//** server functions -----------------------------------------------------------------------------------	
  public function server_get_name($session_id, $server_id)
    {
		global $app;
		/*if(!$this->checkPerm($session_id, 'server_get')) {
			$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
			return false;
		}*/
		
		$server_id = intval($server_id);
		
		$rec = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ".$server_id);
		if(isset($rec['server_name'])) {
			return $rec['server_name'];
		} else {
			$this->server->fault('no_server_found', 'There is no server with this ID.');
			return false;
		}
		
	}
just before this
Code:
//** private functions -----------------------------------------------------------------------------------
PS: You can find it in my SVN Repository http://svn.web-wack.at/ispconfig3_roundcube3/trunk/

PPS: I know that I outcommented the checkPermission function
__________________
web wack creations - We create your custom web application
Mailuser interface for ISPConfig 3
Reply With Quote
The Following User Says Thank You to Horfic For This Useful Post:
Hans (15th June 2010)
  #27  
Old 15th June 2010, 22:43
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

Hi Horfic,
Thanks for your nice work as well!
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
Reply With Quote
  #28  
Old 30th August 2010, 21:45
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
 
Default

@Grey,
As i let you know already, your solution is working with RoundCube 0.4-stable! Maybe you would like to share your solution with other users as well ...
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable send receive emails vassilis3 Installation/Configuration 15 19th May 2007 14:34
No SPF record. beryl Installation/Configuration 6 17th May 2007 19:52
How to setup external mail servers? mxc Installation/Configuration 1 16th July 2006 12:39
godaddy and centos 4.3 setup with single ip on dsl using ispconfig sethtat HOWTO-Related Questions 3 21st June 2006 01:34
Single Server Setup mfiendd HOWTO-Related Questions 7 31st May 2006 21:32


All times are GMT +2. The time now is 20:48.


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