Mail Deletion Policy
How MoovMail handles trash, permanent delete, automatic retention, and admin recovery — similar to Gmail and Microsoft 365.
Overview
MoovMail uses a three-stage lifecycle for deleted mail:
- Trash / Spam — message moved to a folder; still visible to the user.
- Recoverable Items — after permanent delete, hidden from the user but restorable by admins.
- Hard purge — database row and S3/MinIO storage removed; not recoverable.
Manual deletion (end user)
Move to Trash
Deleting mail from Inbox, Sent, or other folders moves it to Trash. The message stays in your mailbox until you empty Trash or automatic retention removes it.
Delete permanently (Delete forever)
From Trash or Spam, use Delete permanently (toolbar or bulk action). The message disappears from your mailbox immediately.
It is not destroyed right away. It enters your organization's Recoverable Itemsqueue for 14–30 days(admin-configurable). During that window, an administrator can restore the message to the user's mailbox.
After the recovery window expires, MoovMail automatically hard-deletes the message from the database and removes associated objects from S3/MinIO storage (raw message, bodies, attachments).
Automatic deletion (system)
Trash and Spam retention
Messages sitting in Trash or Spam are automatically purged after a retention period based on when they were moved to that folder (moved_to_folder_at).
- Default: 21 days
- User override: Settings → Other → Trash & spam auto-delete (15, 21, or 30 days where supported)
Automatic trash/spam purge performs a hard delete— no Recoverable Items stage — because the user did not choose "Delete permanently."
Recoverable Items purge
A background job runs hourly. Messages with an expired recoverable_until timestamp are hard-deleted from the database and storage.
Comparison table
| Action | User sees | Admin can restore? | Storage removed |
|---|---|---|---|
| Move to Trash | Message in Trash | No (user can move back) | No |
| Auto-delete from Trash/Spam | Gone | No | Yes — immediately on purge |
| Delete permanently | Gone | Yes — 14–30 days | Yes — after recovery window |

