-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing password via roundcube does not function #2185
Comments
Created a quick fix to the configuration, see this pull request. However, it does not work: If I do a |
It looks like If the www-data user can't run doveadm, what about setting |
Yeah, I already changed %D into %P. I'll try the sha512-crypt algorithm, that's a good idea. |
I tested with:
which seems to produce a password that is accepted by Roundcube when logging in. |
I'll have to retry this on 22.04; using the above config and restarting postfix the password is accepted. I wonder what changed with doveadm in 22.04 too |
You might want to check /var/log/mail.log on postfix errors. As seen in the issue mentioned by ddavness, Roundcube 1.6.0 introduces an sqlite configuration that's incompatible with postfix. Or simply check if you can send mail on that box. |
The above pull request fixes the configuration of the password plugin. Note: both issues were introduced with the 1.6.0 release of Roundcube. I can think of several fixes:
I'm sure there are more variants to think of ;) , so please add your thoughts on this here. My current feeling is that patching sqlite database handling of the password plugin is simplest, and at the same time keeping the functionality. |
The journal changing pragma was almost certainly intended for roundcube's database only, so this is probably a roundcube bug. That's probably the right avenue to explore, IMO. I don't think commenting out the PRAGMA code entirely is viable as it was added to address another issue (PR is mentioned in the roundcube code). Another possible fix for your list of several fixes: that there may be a way to juggle the permissions so that roundcube and postfix both have r/w access to the -wal and -shm files created by sqlite. When these files are created, they retain the same mode as users.sqlite, but with the owner and group set to that of the calling process. Setting a common group on the parent directory plus the group sticky bit, would cause the files to inherit the parent's group. |
For sure you are right. And because Roundcube uses the same code to open other sqlite databases, it also applies to MiaB's database. However, reading through the original issue I think MiaB is better off without the PRAGMA than with.
How did you test this? I tried the following:
This did not work for me. The permissions were set as follows (I did not touch these)
|
You're right, it doesn't work. I was only looking at this theoretically and didn't test it. After loading a test system, it looks like the permissions are okay as-is. Not exactly sure why postfix would gain access to the -wal and -shm files when not being in the www-data group. What fixed the issue for me was to remove the chroot flag for the trivial-rewrite and cleanup postfix services (there may be others that need changing as well, I didn't test thoroughly). That's done by setting the chroot field to 'n' for those two services in /etc/postfix/master.cf. I'm using a modified miab that uses ldap for the user database and doesn't have this issue, so I'm going to take myself out of this. I probably shouldn't have posted in the first place, but it looked interesting. I hope what I provided helps. |
sqlite3 users.sqlite ".dump" | sqlite3 users.sqlite_new and renaming the file fixed the corrutped sqlite db for me |
Found this thread which pretty much describes the postfix issue we're seeing here. The takeaway seems to be that's it's either a permissions issue or not supported (at least not advised) by postfix. |
I'm sorry, don't know what happened there. Thick fingers probably 😞 |
I like the solution of ddavness. Just to have a choice, I have 2 pull requests which are a little more reviewable ;)
|
In the issue linked above, this fixed my issue as well. For the time being, until a solution is merged, this might be a decent recommended fix. |
…for postfix See mail-in-a-box#2185. (cherry picked from commit 3c15081)
…for postfix See mail-in-a-box#2185. (cherry picked from commit 3c15081)
Changing the password via the Roundcube settings does not work. See report here.
The error reported via /var/log/roundcubemail/errors.log:
DB Error: [1] near "%": syntax error (SQL Query: UPDATE users SET password=%D WHERE email='a@b.c') in /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_db.php on line 564 (POST /mail/?_task=settings&_action=plugin.password-save)
The sql update query contains %D which was removed from the 1.6.0 version of roundcube (see 1.6.0 versus 1.5.3)
Several observations:
$config['password_algorithm'] = 'clear';
should probably be set todovecot
The text was updated successfully, but these errors were encountered: