RoundCube Webmail Forum  

Go Back   RoundCube Webmail Forum > Release Support > Older Versions > Release Candidate 2

For more information about the ads and why they're here, please see the FAQ
Reply
  #1  
Old 11-05-2007, 06:38 AM
Registered User
 
Join Date: Nov 2007
Posts: 18
Downloads: 0
Uploads: 0
Default Automatically figuring out host with email login???

I have users from many different domains logging into Roundcube webmail. Because of this I left this blank in main.inc.php:
$rcmail_config['default_host'] = '';

The problem is users find this really confusing when they have an emails address, password and host to fill out during the log in page. What I'd like to do is get the domain from the email loggin and place is in the $rcmail_config['default_host'] value. So for example, when someone logs in as john@fundomain.com, the host should automatically be valued at fundomain.com.

In the wiki it says:
// Automatically add this domain to user names for login
// Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
// $serverut = $_SERVER['SERVER_NAME']; <<< get the server name example www.site.com
// $wsrt = 'www.'; <<< string to replace
// $serverput = str_replace($wsrt,'',$serverut); <<< replace the host address deleting the www in this case
// $rcmail_config['username_domain'] = $serverput; <<< and the var is ready!

The problem with this is that SERVER_NAME is already figured out before the users fills it their information. I want to fill the host value after the user has filled their information. How would I implement this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 11-21-2007, 01:58 PM
OJM OJM is offline
Registered User
 
Join Date: Jan 2007
Posts: 3
Downloads: 0
Uploads: 0
Default Re: Automatically figuring out host with email login???

This is exactly what I'd like to achieve aswell.

Off the top of my head, the SMTP user authentication uses '%u' as the username of the account. Would it be possible to find out how this is being set, and add another function to strip off the @ sign and everything before? You could then use this new 'function' to pass through as the host name...?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 11-26-2007, 08:59 PM
Registered User
 
Join Date: Nov 2007
Posts: 18
Downloads: 0
Uploads: 0
Default Re: Automatically figuring out host with email login???

I'm also trying to tackle this. The RoundCube code doesn't really seem to be coded for change. What I was going to do is hack the login page with Javascript. All I need to do is add an onsubmit to the form in roundcube\program\include\rcmail_template.inc. I was going to add it in this line "$form_start = !strlen($attrib['form']) ? '<form name="form" action="./" method="post">' : '';", but that just creates a 2nd form if I mess with the conditions.

To get the domain from the email address, this is the formula I was going to use:
document.getElementById('rcmloginuser').value.subs tring(document.getElementById('rcmloginuser').valu e.substring(0,document.getElementById('rcmloginuse r').value.lastIndexOf('@')+1).length,document.getE lementById('rcmloginuser').value.length+1)

So all I have to do in the form is this (notice just the onsubmit):
<form name="form" action="./" method="post" onsubmit="document.getElementById('rcmloginhost'). value = "mail." + document.getElementById('rcmloginuser').value.subs tring(document.getElementById('rcmloginuser').valu e.substring(0,document.getElementById('rcmloginuse r').value.lastIndexOf('@')+1).length,document.getE lementById('rcmloginuser').value.length+1)">

Then I can make the 'rcmloginhost' input hidden. I'm getting closer but really need help from a RoundCube coder or guru. Any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 03-13-2008, 01:06 AM
Registered User
 
Join Date: Mar 2008
Posts: 5
Downloads: 0
Uploads: 0
Default Re: Automatically figuring out host with email login???

I need to do this as well...
Anyone have any updates on this?

Exactly what I need to do is this,
I have several domains with a few users on each.
So I need them to be able to login to a single webmail.MyMainDomain.com

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 04-08-2008, 05:27 PM
Registered User
 
Join Date: Apr 2008
Posts: 2
Downloads: 0
Uploads: 0
Default Re: Automatically figuring out host with email login???

Looking also for this feature ... but I need to configure different mail-servers according to the login.

Like user1@domain1.com uses domain1-mail.somedomain.com; user2@domain2.com uses domain2-mail.somedomain.com, etc.

Looking forward to such feature :-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are On
Pingbacks are On
Refbacks are On

For more information about the ads and why they're here, please see the FAQ

All times are GMT. The time now is 04:21 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright © 2006-2008 RoundCube Webmail Community