ReviewOS

mail-os/mail

Harden production mail storage, recovery, and off-host backups

#4
Closed chris opened this 9 days ago ·
9 days ago

Goal

Make production mail storage recoverable after total Hetzner host loss while retaining strong encryption and repeatable operations.

Scope

  • Move the LUKS2 image onto a dedicated Hetzner volume with monitored capacity.
  • Add authenticated, client-side encrypted off-host backups to S3 using an established repository format.
  • Snapshot SQLite consistently before backup.
  • Add automated retention, integrity checks, and restore drills.
  • Keep S3 SSE-KMS as defense in depth.
  • Add a second recovery keyslot with custody independent from AWS.
  • Use a customer-managed KMS key and least-privilege policies for the operational secret and backup objects.
  • Document boot unlock, restore, key rotation, and break-glass recovery.

Acceptance criteria

  • Dedicated volume survives instance replacement.
  • Latest off-host backup is less than 24 hours old.
  • Backup contents are encrypted and authenticated before upload.
  • Automated check and isolated restore succeed.
  • Volume usage alerts before 70/85/95%.
  • Two independently held LUKS keyslots verify.
  • Production lock/unlock and reboot recovery are tested.
  • Runbook and reusable commands are committed.
9 days ago

Implemented in commits 2fee633 (encrypted storage/recovery) and 9f7fb90 (mail layout/forwarding), now under review in #8.

Production verification completed: dedicated 20 GiB Hetzner volume; LUKS2 AES-XTS 512-bit; AWS external primary key under customer-managed KMS; independent macOS Keychain recovery slot; encrypted LUKS header escrow; daily Restic plus hourly health timers; latest backup and restore validation passed with 725 messages and SQLite quick_check; reboot correctly stayed locked until an authorized AWS unlock; mail then returned active on all five SMTP/IMAP ports.

Sign in to comment on this issue.