Discussion:
[RCU] Roundcube login with username OR username@domain.com and merge them
Daniel Santos
2018-04-23 12:38:09 UTC
Permalink
Hello List,


I have a single domain mail server where I would like the users to be
able to login with:

***@domain.com
or
user

I have successfully accomplished this by setting the
virtual_mailbox_domains in postfix + $config['default_host'] in
roundcube.

However, depending on what username does the user uses 2 separate
entries gets created for him in the DB with 2 settings.

This is problematic because I would like to add automatic address
collection, vacation and other things which then will be binded to 2
separate
accounts, depending on which format does the user uses to login.

*************************** 1. row ***************************
user_id: 1
username: test
mail_host: domain.com
created: 2018-04-23 13:46:46
last_login: 2018-04-23 14:24:28
failed_login: NULL
failed_login_counter: NULL
language: en_US
preferences:
a:2:{s:11:"search_mods";a:4:{s:1:"*";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:4:"Sent";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:6:"Drafts";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:5:"INBOX";a:1:{s:4:"text";i:1;}}s:11:"client_hash";s:16:"P8AYcIa0hrn5LiPp";}
*************************** 2. row ***************************
user_id: 2
username: ***@domain.com
mail_host: domain.com
created: 2018-04-23 14:24:00
last_login: 2018-04-23 14:24:00
failed_login: NULL
failed_login_counter: NULL
language: en_US
preferences:
a:2:{s:11:"search_mods";a:3:{s:1:"*";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:4:"Sent";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:6:"Drafts";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}}s:11:"client_hash";s:16:"aL4mNejbFMtvV1DE";}
2 rows in set (0.00 sec)

Is there any possibility to merge these in the database automatically?
Loading...