I am trying to get a list on the login page for the domain. You see the server is localhost so there are no problems with that, but then people have to login using
[email protected] and I would like to set it up so they just have to put in their username and then select the domain from a pop-up menu. I have tried doing this but it does not seem to work:
// 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
$rcmail_config['username_domain'] = array('localhost' => 'domain1.net', 'localhost' => 'domain2.com.au');
Any ideas?
Cheers,
Jeff
HI :)
This is line > // This domain will be used to form e-mail addresses of new users
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['mail_domain'] = '';
Specific multiple the domain also?
This mod was posted in the mod section quite some time ago and is used in the CPanel Password change mod as well. What they do is replace
// try to log in
if ($_action=='login' && $_task=='mail')
{
$host = rcmail_autoselect_host();
With this
// try to log in
if(isset($_POST['_user']) && $_action == 'login' && $_task == 'mail')
{
if($_SERVER['SERVER_NAME'] and !preg_match('/(.*)\@(.*)/',$_POST['_user'])){
$domain = preg_replace('/^(\w*)\./','',$_SERVER['SERVER_NAME']);
$_POST['_user'] = $_POST['_user']."@".$domain;
}
What that will do is allow the user to log in with just their user name and it will populate the @domain.com part with the domain name they are accessing. Rather than have my users chose from a list of domains which also shows them how many and what domains I host I prefer this method.
Ok... but this code I insert in main.inc.php???
you have this main.inc.php?? I need equal with mine...
Thx alot..
Elton Rauh
Use this function like the following:
Quote// 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
$rcmail_config['username_domain'] = array('mail.xx.hu' => 'xx.hu', 'mail.xy.hu' => 'xy.hu', 'mail.xv.hu' => 'xv.hu');
I the same have a server with HOST and domain differentââÂ,¬Ã,¦ what I make?
ex: $rcmail_config['default_host'] = array('192.168.1.10' => 'ccs.org.br', '192.168.1.10' => 'altera.com');
Att..
Elton Rauh
Quote from: dano This mod was posted in the mod section quite some time ago and is used in the CPanel Password change mod as well. What they do is replace
// try to log in
if ($_action=='login' && $_task=='mail')
{
$host = rcmail_autoselect_host();
With this
// try to log in
if(isset($_POST['_user']) && $_action == 'login' && $_task == 'mail')
{
if($_SERVER['SERVER_NAME'] and !preg_match('/(.*)\@(.*)/',$_POST['_user'])){
$domain = preg_replace('/^(\w*)\./','',$_SERVER['SERVER_NAME']);
$_POST['_user'] = $_POST['_user']."@".$domain;
}
What that will do is allow the user to log in with just their user name and it will populate the @domain.com part with the domain name they are accessing. Rather than have my users chose from a list of domains which also shows them how many and what domains I host I prefer this method.
I'm sorry, these changes should be made to the index.php in the root folder of your RoundCube install.
ahhh... ok... I will go test.... tomorrow... now I need go sleep... :) thx man...
cya...
Elton Rauh...
Thanks for the replies guys, I havnt been around for a while and I'll probably get flamed for binging up an old post but I wanted to show my appreciation, and also a big thanks also to dano - that seemed to do the trick quite nicely :D