Hello everyone,
We are currently running SmarterMail on a Linux server and have recently completed a migration from another hosted mail provider (Rackspace).
Our infrastructure includes a daily off-server backup system that snapshots the entire SmarterMail data directory (/var/lib/smartermail) using rsync to a remote storage server. This works well for general recovery scenarios and we created a GREAT little bash script for historical restores.
However, one feature we previously relied on with another provider was the ability to restore a mailbox that had been deleted accidentally. In practice this meant that when an account was removed, the system retained a recoverable copy of the mailbox for a period of time (14 days).
What I am trying to determine is whether SmarterMail has any mechanism (or extension point) that would allow something similar on Linux.
Specifically:
When a user account is deleted from the SmarterMail administration interface, is there any way to trigger a script or event that could:
• Capture a snapshot of the mailbox directory for that user
• Store it in a temporary archive location
• Allow administrators to restore it later if required
For context, mailboxes are stored under:
/var/lib/smartermail/Domains/{domain}/Users/{user}
So the goal would be something like:
User deletion initiated in the control panel
A hook or event fires
The mailbox directory is archived before removal
I realise that daily backups already provide a recovery option, but a pre-deletion snapshot would make accidental user deletion much easier to recover from without needing to search historical backups.
If there is:
• a built-in feature for this
• an event hook / plugin system
• or a recommended best practice for Linux deployments
I would appreciate any guidance.
Thanks in advance.