You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to issues with the user account removal in older mail versions, orphaned accounts could be left over in the oc_mail_accounts table (probably #3135), resulting in "invisible Ghost accounts" in the mail app itself (they were not there, but the app expected multple inboxes) and errors displaying mails in the widget (see #3819).
I think, a feature allowing for a controlled/guided removal of these accounts would benefit self-made admins such as myself who are not too comfortable writing "DELETE FROM oc_mail_accounts WHERE ..." statements in SQL.
Summary
Since this is would not be a feature for regular use, I think it would best be kept as part of the "occ" maintenance tool.
As the admin of a nextcloud instance, I'd like to be able to log into the shell of my nextcloud and issue a command like "php occ mail:list-orphaned-accounts" after which the orphaned accounts are identified and listed with id, userid, server, ... , followed by "php occ mail:delete-orphaned-account 1" after which the account with the corresponding id is deleted.
... probably, in the background, there would have to be something like "DELETE FROM oc_mail_accounts WHERE id=1" but the user/admin would not have to know about SQL and the 'magic' would be the identification of the orphaned accounts. (In my case, I could only go via error messages - there's probably a smarter way to do that.)
The text was updated successfully, but these errors were encountered:
For more context it's about Nextcloud accounts deleted before #3009. But I'm also not sure if every user back-end emits the user deleted event, so it doesn't hurt to have this additional cleanup command.
The rough steps are
Iterate over all mail accounts or possibly just the grouped user_id column
Look up the user account through the user back-end
If the user does not exist, drop the mail account(s) of that UID
Feature Request
Due to issues with the user account removal in older mail versions, orphaned accounts could be left over in the oc_mail_accounts table (probably #3135), resulting in "invisible Ghost accounts" in the mail app itself (they were not there, but the app expected multple inboxes) and errors displaying mails in the widget (see #3819).
I think, a feature allowing for a controlled/guided removal of these accounts would benefit self-made admins such as myself who are not too comfortable writing "DELETE FROM oc_mail_accounts WHERE ..." statements in SQL.
Summary
Since this is would not be a feature for regular use, I think it would best be kept as part of the "occ" maintenance tool.
As the admin of a nextcloud instance, I'd like to be able to log into the shell of my nextcloud and issue a command like "php occ mail:list-orphaned-accounts" after which the orphaned accounts are identified and listed with id, userid, server, ... , followed by "php occ mail:delete-orphaned-account 1" after which the account with the corresponding id is deleted.
... probably, in the background, there would have to be something like "DELETE FROM oc_mail_accounts WHERE id=1" but the user/admin would not have to know about SQL and the 'magic' would be the identification of the orphaned accounts. (In my case, I could only go via error messages - there's probably a smarter way to do that.)
The text was updated successfully, but these errors were encountered: