I’m sending this report just in case it might be problematic for someone else (everything is working correctly for me). During the update to version v63 of Mail-in-a-Box, I received these messages while Nextcloud was updating.
After the update and after making the usual adjustments for my environment, I have been able to verify that apparently everything is working without issues. I even accessed the Nextcloud installation created by Mail-in-a-Box, and the contact and calendar modules seem to still be working (although I never use those modules).
I just wanted to leave this note here in case this could pose any problems or needs to be corrected, although I must say: everything seems to be working fine.
For what it’s worth, I ran as root, going from MIAB v61.1 to v63:
Upgraded to Nextcloud 24.0.12 fine.
Upgrading to Nextcloud 25.0.7 I received the following:
I made the v63 upgrade, tested it many times over again and experienced this problem too, yet it has a different cause. In short: you have duplicate user entries. Caused by an older version before that.
I follow the instructions that your link brings me and i see some errors. If I execute this command…
root@box:/home/user-data/owncloud# sqlite3 owncloud.db "select * from oc_users_external;"
I can see this information
user1@deleteddomain.org|{127.0.0.1:993/imap/ssl/novalidate-cert}|
user2@deleteddomain.org|{127.0.0.1:993/imap/ssl/novalidate-cert}|
user3@deleteddomain.net|{127.0.0.1:993/imap/ssl/novalidate-cert}|
....
user1@deleteddomain.org|127.0.0.1|
user2@deleteddomain.org|127.0.0.1|
user3@deleteddomain.net|127.0.0.1|
...
rightuser1@rightdomain.com|127.0.0.1|
rightuser2@rightdomain.com|127.0.0.1|
rightuser3@rightdomain.com|127.0.0.1|
I can see a lot of users that i had deleted previously. In first place i see something that seems certificate errors. Then i can see the some users another time (Some users are in the two zones and some users are only in the first or second zone) and then the actual users. So i run this commands:
root@box:/home/user-data/owncloud# sqlite3 owncloud.db "SELECT * FROM oc_users_external WHERE EXISTS (SELECT 1 FROM oc_users_external p2 WHERE oc_users_external.uid = p2.uid AND oc_users_external.rowid > p2.rowid);"
user1@deleteddomain.org|127.0.0.1|
user2@deleteddomain.org|127.0.0.1|
user3@deleteddomain.org|127.0.0.1|
Note that now the users only appears one time.
root@box:/home/user-data/owncloud# sqlite3 owncloud.db "DELETE FROM oc_users_external WHERE EXISTS (SELECT 1 FROM oc_users_external p2 WHERE oc_users_external.uid = p2.uid AND oc_users_external.rowid > p2.rowid);"
root@box:/home/user-data/owncloud# sqlite3 owncloud.db "select * from oc_users_external;"
user1@deleteddomain.org|{127.0.0.1:993/imap/ssl/novalidate-cert}|
user2@deleteddomain.org|{127.0.0.1:993/imap/ssl/novalidate-cert}|
user3@deleteddomain.org|{127.0.0.1:993/imap/ssl/novalidate-cert}|
...
user4@deleteddomain.org|127.0.0.1|
user5@deleteddomain.org|127.0.0.1|
user6@deleteddomain.org|127.0.0.1|
...
rightuser1@rightdomain.com|127.0.0.1|
rightuser2@rightdomain.com|127.0.0.1|
rightuser3@rightdomain.com|127.0.0.1|
Now all the users appears only one time.
But… I still see users that were deleted a lot of years ago in domains that now don’t exist. ¿Is this normal?
When administrators launch the next release of mail-in-a-box i’ll see if the upgrade errors dissapear.
The instructions make sure a user has a single entry in the table. Also, don’t forget to do the last instruction sqlite3 owncloud.db "UPDATE oc_users_external SET backend='127.0.0.1';"
I guess the old users are not cleaned up. It will probably not hurt you. This table is used by nextcloud plugin user_external to store a display name. If a user does not exist in the imap configuration (maintained by mailinabox), it cannot login.
Looking into it a bit more, I’m pretty sure this table can be cleaned up, and its rows will be recreated when necessary. Not tested! So don’t do it unless you know what you’re doing!
Perfect. I will check if the next Mail-in-a-Box update with these changes stops displaying errors. In any case, unless I’m very wrong, this shouldn’t have occurred. @alento, it might be convenient that during the next Mail-in-a-Box update, these commands are executed automatically (from the installer itself) to solve this problem for those who still have it. Consider it.
I’m very grateful for your help, @KiekerJan . Thanks.