Roundcube Community Forum

 

Shortned Login username

Started by Saint, July 26, 2006, 10:32:26 AM

Previous topic - Next topic

Saint

When I want to use RoundCube I have to type in "user@mydomain.com" as my username, when I'd rather just have to type in "user". I know this isn't a problem specific to RoundCube but I think there was a similar problem where the user used the virtuser table to fix his problem.

Can I use the virtuser table to fix my problem?

Also, I can't find the virtuser table. I go to etc/ and theres just mydomain.com and .boxtrapper there.

bpat1434

Or you can use the config file:

main.inc.php:
// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL connection, enter ssl://hostname:993
$rcmail_config['default_host'] = array('imap.domain.net' => 'Domain'
	
	
	
	
	
	
	
	
	
	
'imap.domain2.net' => 'Domain 2'
	
	
	
	
	
	
	
	
	
);

// TCP port used for IMAP connections
$rcmail_config['default_port'] = 143;

// 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('imap.domain.net' => 'domain.net',
	
	
	
	
	
	
	
	
	
	
 
'imap.domain2.net' => 'domain2.net'
	
	
	
	
	
	
	
	
	
	
 );

// 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'] = array('imap.domain.net' => 'domain.net',
	
	
	
	
	
	
	
	
	
 
'imap.domain2.net' => 'domain2.net'
	
	
	
	
	
	
	
	
	
);


Whatever tickles your fancy...
 
 

hitman36

How can you do it? If an example I have a username for login: 1111111 and the email address is info@something.com, how to modify that? Does this also goes to multiple domains? Your script is great!!!

bpat1434

Well here's the thing:

If you want to use just the username prior to the @ symbol, use the above code.

To use an alias or different username, you'll have to use either virtuser_query or the virtuser_table entries. The virtuser table, I'm not sure about. The query would look something like:
SELECT emailaddress
FROM users
WHERE alias = '$inputalias'
LIMIT 0, 1
 
 

sleezstak

Brett,
Thanks in advance for any help you can offer.

I am trying to append my domain the @****.org to the user name portion. We are only using RC for this domain and don't require an array. I have tried just about every combination...except for the correct one :D

Thanks
Sleezstak

coolant


sleezstak

I tried that method and it is shows @ ***.org when is should be ****.org. the first character is missing where is it getting the server info from... it worked when i typed the whole address before i made the change so I can't be sure.

Thanks

bpat1434

If you only want one domain use:

$rcmail_config['default_host'] = 'imap.domain.com';
$rcmail_config['username_domain'] = 'domain.com';
 
 

sleezstak

actually i had it wrong...i had imap.domain.com in both places but when I changed it...I still got login failed. any other suggestions

bpat1434

Hmm... i'm seeing this issue too.... I'll have to take some time to track it down. My logs say the domain name I'm looking for is unavailable even though Thunderbird uses it. I'll have to look into it....