Roundcube Community Forum

 

Rouncdube username problems

Started by jsmo, March 23, 2018, 09:52:10 AM

Previous topic - Next topic

jsmo

Hello!

Using Centos 7/64 and Webmin/Virtualmin, I have setup Roundcube for one domain (mydomain.com).

All is working fine but I have a couple of problems with usernames.

First, I wrote an interface to automatically create users at the domain, in Virtualmin (using the Virtualmin API). There, creating a user "test" will make it recorded as "test.mydomain".

To log into RoundCube I must enter test.mydomain as username.

Then, the RoundCube record of this user is:

username: test.mydomain
email: test.mydomain at mydomain.com

I would like this to be:

username: test
email: test at mydomain.com

And I would like users to log in as "test", simply. Or eventually (but it is worse) as "test at mydomain.com".

I tried changing the config.inc.php details:

The defaul was:
$config['default_host'] = 'localhost';

I setup
$config['default_host'] = 'mydomain.com';

and tried a few things with $config['mail_domain'] and $config['username_domain'] (options %n , %s, etc)

The result is never what I need...

Any suggestion would be welcome,

Thank you!

SKaero

It sounds like you want to use the virtuser_query plugin that ships with Roundcube.

jsmo

Thank you but it seems this plugin works with the already registered data in the roundcube database.

First it means that the record must be created, and for this the user must have logged in once. And then the username is "username.mydomain". So a SELECT there would return username.mydomain

Probably that would allow to login with emails like "[email protected]" that is not what I am looking for...

Really it looks strange that there is no easy way to login with the simple username...

alec

You can modify the plugin to do with the username what you need. I say your requirement is quite non-standard.

jsmo

Hum...

For an email address that is [email protected] I would say that login as "test.mydomain" IS the non standard method :)

Standard method would be "test" or "[email protected]"...

jsmo

Well I fixed this problem by adding ".mydomain" after the user submits "username" in the php script. So now, users automatically create their mailbox, sql records are added by my script upon creation (that allows to immediately setup the box with the data the user wants) and he can then login with his username, simply.