Hello,
Context
I have Nextcloud Mail installed on a Nextcloud instance packaged by Yunohost. In such context, adding & removing a user in Nextcloud is managed at Yunohostâs level. However at the current state, there seems to be the following issue in the package - when removing a user, it does not appear anymore in Nextcloudâs usersâs list but Nextcloudâs database is not cleared from the given userâs config. In particular, the table oc_mail_accounts
still contains the email account configured in Nextcloud Mail for the given user.
Issue
Now, even though the user is supposed to be deleted, Nextcloud Mail still tries to retrieve emails for the email account which was once configured for that user. It happens that that email account was actually deleted from the mail server, so the following is regularly output in Nextcloud Mailâs log:
Horde_Imap_Client_Exception: Authentication failed.
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 4565:
Horde_Imap_Client_Socket->_responseCode()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 4313:
Horde_Imap_Client_Socket->_getLine()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 4241:
Horde_Imap_Client_Socket->_sendCmdChunk()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 849:
Horde_Imap_Client_Socket->_sendCmd()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 512:
Horde_Imap_Client_Socket->_tryLogin("*** sensiti ... *")
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php - line 850:
Horde_Imap_Client_Socket->_login("*** sensiti ... *")
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php - line 2507:
Horde_Imap_Client_Base->login("*** sensiti ... *")
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php - line 2490:
Horde_Imap_Client_Base->_fetchWrapper()
/var/www/nextcloud/apps/mail/lib/IMAP/MessageMapper.php - line 674:
Horde_Imap_Client_Base->fetch()
/var/www/nextcloud/apps/mail/lib/IMAP/PreviewEnhancer.php - line 86:
OCA\Mail\IMAP\MessageMapper->getBodyStructureData()
/var/www/nextcloud/apps/mail/lib/Service/PreprocessingService.php - line 81:
OCA\Mail\IMAP\PreviewEnhancer->process()
/var/www/nextcloud/apps/mail/lib/BackgroundJob/PreviewEnhancementProcessingJob.php - line 94:
OCA\Mail\Service\PreprocessingService->process()
/var/www/nextcloud/lib/public/BackgroundJob/Job.php - line 78:
OCA\Mail\BackgroundJob\PreviewEnhancementProcessingJob->run()
/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php - line 103:
OCP\BackgroundJob\Job->start()
/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php - line 93:
OCP\BackgroundJob\TimedJob->start()
/var/www/nextcloud/cron.php - line 152:
OCP\BackgroundJob\TimedJob->execute()
Question
What would be the cleanest way to have Nextcloud Mail stop trying to connect to that email account ?
- Should I simply delete the row associated to the faulty email account in
oc_mail_accounts
table in Nextcloudâs database ? - Or is there anything else like a dedicated Cron job to remove (I couldnât locate it if so) which triggers the connection process?
Regards,
daokj