Author Topic: Rouncdube username problems  (Read 5921 times)

Offline jsmo

  • Newbie
  • *
  • Posts: 5
Rouncdube username problems
« on: March 23, 2018, 09:52:10 AM »
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!

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Rouncdube username problems
« Reply #1 on: March 23, 2018, 06:56:29 PM »
It sounds like you want to use the virtuser_query plugin that ships with Roundcube.

Offline jsmo

  • Newbie
  • *
  • Posts: 5
Re: Rouncdube username problems
« Reply #2 on: March 24, 2018, 02:54:11 AM »
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 "username.mydomain@mydomain.com" that is not what I am looking for...

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

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Rouncdube username problems
« Reply #3 on: March 24, 2018, 03:35:41 AM »
You can modify the plugin to do with the username what you need. I say your requirement is quite non-standard.

Offline jsmo

  • Newbie
  • *
  • Posts: 5
Re: Rouncdube username problems
« Reply #4 on: March 24, 2018, 05:01:32 AM »
Hum...

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

Standard method would be "test" or "test@mydomain.com"...

Offline jsmo

  • Newbie
  • *
  • Posts: 5
Re: Rouncdube username problems
« Reply #5 on: March 25, 2018, 03:31:36 AM »
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.