Tooling to find and remove orphaned resources (eber)
- Shell 100%
The emitted script no longer runs rm -rf. For each validated mailbox it
moves /home/vmail/<domain>/<localpart> into
/home/vmail/DELETED/<domain>/<localpart>, leaving the DELETED tree for the
operator to handle manually.
- new dest: plain mv
- pre-existing dest: merge with cp -a (overwrite collisions), then drop the
duplicated source
- mailbox dir absent on disk: skipped silently, no failure (set -e safe)
Both sanity layers retained; quarantine root and DELETED-as-domain guarded.
Verified in a sandbox: move, merge/overwrite, and 325/326-absent --run all
behave and exit 0.
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .gitignore | ||
| build-deletion-script.sh | ||
| README.md | ||
eber-remove-orphans
Tooling to find and remove orphaned resources (eber).