Roundcube Login Failed for New Accounts

vahid07

Verified User
Joined
Apr 16, 2018
Messages
7
Hi

i can login to roundcube with my one email account without any problem. but about another accounts i cant login to them! also i created a new email account without problem but i cant login to it too!

i see these lines in roundcure error log :

Code:
[16-Feb-2019 15:56:29 +0000]: <37nnpg12> DB Error: [1364] Field 'alias' doesn't have a default value (SQL Query: INSERT INTO `users` (`created`, `last_login`, `username`, `mail_host`, `language`) VALUES (now(), now(), 'info@domain.com', 'localhost', 'fa_IR')) in /var/www/html/roundcubemail-1.3.8/program/lib/Roundcube/rcube_db.php on line 543 (POST /roundcube/?_task=login&_action=login)
[16-Feb-2019 15:56:29 +0000]: <37nnpg12> PHP Error: Failed to create new user in /var/www/html/roundcubemail-1.3.8/program/lib/Roundcube/rcube_user.php on line 688 (POST /roundcube/?_task=login&_action=login)
[16-Feb-2019 15:56:29 +0000]: <37nnpg12> PHP Error: Failed to create a user record. Maybe aborted by a plugin? in /var/www/html/roundcubemail-1.3.8/program/include/rcmail.php on line 652 (POST /roundcube/?_task=login&_action=login)
whats the problem?
 

BBM

Verified User
Joined
Jun 8, 2013
Messages
332
Location
Dutch Mountains
I encountered the same issue awhile back after creating a new domain under DA and trying to login to its webmail.

Code:
[16-Feb-2019 22:58:04 +0100]: <2733299c> DB Error: [1364] Field 'alias' doesn't have a default value (SQL Query: INSERT INTO `users` (`created`, `last_login`, `username`, `mail_host`, `language`) VALUES (now(), now(), 'webmail@newdomain.nl', 'localhost', 'en_US')) in /var/www/html/roundcubemail-1.3.8/program/lib/Roundcube/rcube_db.php on line 543 (POST /webmail/?_task=login&_action=login)
[16-Feb-2019 22:58:04 +0100]: <2733299c> PHP Error: Failed to create new user in /var/www/html/roundcubemail-1.3.8/program/lib/Roundcube/rcube_user.php on line 688 (POST /webmail/?_task=login&_action=login)
[16-Feb-2019 22:58:04 +0100]: <2733299c> PHP Error: Failed to create a user record. Maybe aborted by a plugin? in /var/www/html/roundcubemail-1.3.8/program/include/rcmail.php on line 652 (POST /webmail/?_task=login&_action=login)
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,221
Location
Maastricht
I found the same on a Plesk forum.
They said as cause:
Roundcube default database structure was modified due to a plugin installation, and it was not completely uninstalled.
And give the same option to repair as was given to BBM in his thread:
1. Make a backup of the database.
2. Check if there is any data in the alias folder.
3. If not, it is safe to assume that it is not used. Drop the column or make it nullable.
4. Presto!

Plesk even advised to remove the column with a database command somewhat like this:
Code:
db "ALTER TABLE roundcubemail.users DROP COLUMN roundcubemail.users.alias"
So it seems you have to check your plugins. Maybe it's sieve? I don't know.

But this error seems to happen regularly in general.
 

vahid07

Verified User
Joined
Apr 16, 2018
Messages
7
I found the same on a Plesk forum.
They said as cause:


And give the same option to repair as was given to BBM in his thread:
1. Make a backup of the database.
2. Check if there is any data in the alias folder.
3. If not, it is safe to assume that it is not used. Drop the column or make it nullable.
4. Presto!

Plesk even advised to remove the column with a database command somewhat like this:
Code:
db "ALTER TABLE roundcubemail.users DROP COLUMN roundcubemail.users.alias"
So it seems you have to check your plugins. Maybe it's sieve? I don't know.

But this error seems to happen regularly in general.
Thank you, do you try it?

i think there is must a dedicated solution for directadmin users:(
 
Last edited:

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,221
Location
Maastricht
Thank you, do you try it?
No I did not since I never encountered the issues you're having. However as you can see it fixed things for BBM.

i think there is must a dedicated solution for directadmin users
I don't think so, because this error is happening also on other platforms. Seems to me a plugin issue should be fixed by the plugin programmer. Unless that is DA ofcourse in this case. :)
 

chronic

Verified User
Joined
Dec 14, 2006
Messages
53
I had the same problem today, I made the column alias nullable and now it works. I hope it is the right solution and that I will not create any new problems in the future.

Thanks
 

vahid07

Verified User
Joined
Apr 16, 2018
Messages
7
1. Make a backup of the database.
2. Check if there is any data in the alias folder.
3. If not, it is safe to assume that it is not used. Drop the column or make it nullable.
4. Presto!

Plesk even advised to remove the column with a database command somewhat like this:
Code:
db "ALTER TABLE roundcubemail.users DROP COLUMN roundcubemail.users.alias"
Hi again

Maybe please guide me step by step to do this? im not familier with sql command through SSH
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,932
Looking at both the installer .sql commands, and their update commands the user.alias field was dropped in 2012:
Code:
2012080700.sql:ALTER TABLE `users` DROP COLUMN `alias`;
meaning, at some point in the past, an update failed to run correctly.

You could do a one-call way of dropping it, as root in ssh:
Code:
mysql --defaults-extra-file=/usr/local/directadmin/conf/my.cnf -e 'ALTER TABLE da_roundcube.users DROP COLUMN alias;' --host=localhost
John
 

hakabe

New member
Joined
Dec 7, 2015
Messages
4
Still not working

Looking at both the installer .sql commands, and their update commands the user.alias field was dropped in 2012:
Code:
2012080700.sql:ALTER TABLE `users` DROP COLUMN `alias`;
meaning, at some point in the past, an update failed to run correctly.

You could do a one-call way of dropping it, as root in ssh:
Code:
mysql --defaults-extra-file=/usr/local/directadmin/conf/my.cnf -e 'ALTER TABLE da_roundcube.users DROP COLUMN alias;' --host=localhost
John
Hi John,

It seems this was fixed for the newest version as I got "ERROR 1091 (42000) at line 1: Can't DROP COLUMN `alias`; check that it exists"

However, I'm still having the same problem as described in the topic. I made a new account to my friend, but the given username cannot login to Roundcube (username@domain.com). The CMD change email password URL doesn't work either.

I tried replicating the problem and I got the same result. However, if the user creates a new email address, that works just fine.

Any ideas? Is there a way to stop DA making default inboxes as they're inaccessible. These inboxes cannot be deleted either?
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,469
Hi John,

It seems this was fixed for the newest version as I got "ERROR 1091 (42000) at line 1: Can't DROP COLUMN `alias`; check that it exists"

However, I'm still having the same problem as described in the topic. I made a new account to my friend, but the given username cannot login to Roundcube (username@domain.com). The CMD change email password URL doesn't work either.

I tried replicating the problem and I got the same result. However, if the user creates a new email address, that works just fine.

Any ideas? Is there a way to stop DA making default inboxes as they're inaccessible. These inboxes cannot be deleted either?
If I understand you correctly, you are trying to login to a default system email account in Roundcube by using this user name format: username@domain.com

If that is what you are trying to do, then this will not work. The default system email account user name is only "username", only extra email accounts you create has the full email address as username.

So please try to login to Roundcube webmail by using the same username and password as the DirectAdmin account username and password, then it should work.
 
Top