-
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
Restore Roundcube's password reset tool by removing PRAGMA journal_mode = WAL
from Roundcube source
#2199
Conversation
Is this the fix that would make the password change plugin function again? |
# Because Roundcube wants to set the PRAGMA we just deleted from the source, we apply it here | ||
# to the roundcube database (see https://github.com/roundcube/roundcubemail/issues/8035) | ||
# Database should exist, created by migration script | ||
sqlite3 $STORAGE_ROOT/mail/roundcube/roundcube.sqlite 'PRAGMA journal_mode=WAL;' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might this need to be set to DELETE or TRUNCATE instead if we are to not use WAL anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. This specific database is owned by roundcube and not used by postfix. Because roundcube would like to use WAL, and we just removed it from the source, we set it here explicitly.
A possible addition is setting the DELETE pragma for the MiaB database users.sqlite. Just to be sure it is set to a value that postfix understands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may break new installations. The roundcube.sqlite file isn't created by the migration script. It checks if the file exists before mangling it (and only does this once in migration_12).
This also emits "wal" to the console so it would be nice to silence it with e.g. > /dev/null
(if it's to STDOUT and not STDERR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 207 states "Run Roundcube database migration script (database is created if it does not exist)", so I kinda depend on that. There's also the chmod and chown commands that are applied to the database. Perhaps the comment about migration should mention the updatedb script? I'll take a closer look.
I will also look into silencing the command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahha! I'm sorry. I thought you meant the Mail-in-a-Box migration system (migrate.sh). I didn't look a few lines above. Yes ok then we are all good.
61f9ad5
to
86933d2
Compare
"@kiekerjan force-pushed the roundcubesqlitemod branch from 61f9ad5 to 86933d2 1 minute ago" |
PRAGMA journal_mode = WAL
from Roundcube source
… user database (mail-in-a-box#2198)" This reverts commit 1587248. See subsequent commits.
86933d2
to
8aa98b2
Compare
Thanks! I force-pushed, also, to consolidate all of the changes needed to restore the password plugin functionality. But I am not sure if it's quite right - I left a comment on the code. Hopefully we can resolve this quickly so I can include it in a MiaB release. |
…ode = WAL` from Roundcube source (mail-in-a-box#2199) (cherry picked from commit fb0a3b0)
This pull request disables the use of PRAGMA journal_mode=WAL from the Roundcube source. Thus avoiding the issue that postfix cannot handling a sqlite db with that pragma set.