nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
850 stars 262 forks source link

oc_mail_messages and oc_mail_recipients not cleared after deleting mail account from app #10333

Open github3845 opened 1 week ago

github3845 commented 1 week ago

Steps to reproduce

  1. Install mail app
  2. Add email account and read some mails
  3. Delete email account
  4. dump database and search for emails

Expected behavior

The emails are supposed to be deleted from the database once I delete the mail account. I set up a cron job every 5 minutes and did not configure a window thing, so 5 minutes after deleting the mail account from the app, there should not be a trace of it left in the nextcloud database.

Actual behavior

The emails remain in the database after the mail account was deleted from the app.

Mail app version

4.0.2

Nextcloud version

30.0.2

Mailserver or service

imap server

Operating system

Ubuntu 24.04

PHP engine version

PHP 8.3

Nextcloud memory caching

No response

Web server

Nginx

Database

MySQL

Additional info

The emails also remain in the database when the app is uninstalled.

kesselb commented 1 week ago

The background job to remove stale data runs once per 24 hours: https://github.com/nextcloud/mail/blob/main/lib/BackgroundJob/CleanupJob.php