Author Topic: Shortned Login username  (Read 4650 times)

Offline Saint

  • Jr. Member
  • **
  • Posts: 11
Shortned Login username
« on: July 26, 2006, 10:32:26 AM »
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.

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: Shortned Login username
« Reply #1 on: July 26, 2006, 11:54:59 AM »
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...
 
  

Offline hitman36

  • Newbie
  • *
  • Posts: 1
Re: Shortned Login username
« Reply #2 on: July 29, 2006, 03:56:10 AM »
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!!!

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: Shortned Login username
« Reply #3 on: July 29, 2006, 09:53:20 AM »
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:
Code: [Select]
SELECT emailaddress
FROM users
WHERE alias = '$inputalias'
LIMIT 0, 1
 
  

Offline sleezstak

  • Newbie
  • *
  • Posts: 9
Re: Shortned Login username
« Reply #4 on: July 29, 2006, 05:54:31 PM »
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

Offline coolant

  • Newbie
  • *
  • Posts: 2
Re: Shortned Login username
« Reply #5 on: July 29, 2006, 08:28:21 PM »
You may also want to look into what I wrote - http://roundcubeforum.net/index.php?topic=212.0

Offline sleezstak

  • Newbie
  • *
  • Posts: 9
Re: Shortned Login username
« Reply #6 on: July 29, 2006, 09:32:17 PM »
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

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: Shortned Login username
« Reply #7 on: July 30, 2006, 06:24:05 AM »
If you only want one domain use:

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

Offline sleezstak

  • Newbie
  • *
  • Posts: 9
Re: Shortned Login username
« Reply #8 on: July 30, 2006, 09:30:39 AM »
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

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: Shortned Login username
« Reply #9 on: July 30, 2006, 11:23:15 PM »
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....