mailvault
TL;DR: mailvault reads your email and document exports on your own Mac. It decides what to keep, archive or discard using protective rules and two local AI models. Everything worth archiving goes to your Google Drive folder as an encrypted, signed, verifiable vault. Nothing is ever deleted until you press Enter on that one item, and only after its archive copy has been re-read and checked. No mail content leaves your machine.
flowchart LR
X[Takeout · IMAP · Outlook · Apple Mail · Drive/Office] --> R[rules + dedupe] --> AI[local AI, two tiers] --> G[PolicyGate]
G -->|keep| K[stays where it is]
G -->|archive / discard| V[(encrypted vault in Drive)]
V --> Rev[mailvault review: you approve each deletion]
Promises
- Never deletes without your approval. Only
mailvault reviewdeletes, one item at a time, after Enter. There is no batch-delete option. - Archive before delete, verified. An item can be deleted only once its archive copy has been written, checksummed, re-read and hash-matched.
- Uncertain means keep. Low confidence, model errors and unreadable files all mean the item stays.
- Protected categories are never touched by AI. Banking, tax, immigration, legal, medical, government ID, employment, insurance, property and your own keep rules.
- Your data stays local. The models run on your Mac (Ollama). Logs and reports hold opaque keys and hashes only.
Quickstart
TL;DR: install, create keys, write a config, dry-run, run, then review.
pipx install mailvault-archiver # or: uv tool install mailvault-archiver
mailvault --help
mailvault init-keys # keys in ~/.mailvault/keys; store RECOVERY.md offline
ollama pull qwen2.5:14b && ollama pull llama3.3:70b # optional; without them everything is kept
Create ~/.mailvault/config.yaml (it names real paths, so keep it out of any repo):
operator: Your Name
user_addresses: [you@example.com]
state_dir: ~/.mailvault/state
archive_root: ~/Google Drive/My Drive/mailvault # a Drive for desktop folder
tsa_url: http://timestamp.digicert.com # optional RFC 3161 timestamps (hash only)
sources:
- {name: gmail-takeout, kind: mbox, path: ~/Takeout/Mail, account: personal}
- {name: drive-docs, kind: documents, path: ~/Google Drive/My Drive/Documents, account: personal}
mailvault run --config ~/.mailvault/config.yaml --dry-run # decide only, write nothing
mailvault run --config ~/.mailvault/config.yaml # archive, verify, queue for review
mailvault search "invoice" --config ~/.mailvault/config.yaml --after 2021-01-01
mailvault review --config ~/.mailvault/config.yaml --dry-run
mailvault review --config ~/.mailvault/config.yaml # Enter deletes the one item shown
mailvault verify --archive "~/Google Drive/My Drive/mailvault" --key-dir ~/.mailvault/keys
mailvault restore ITEM_KEY --archive "~/Google Drive/My Drive/mailvault" --out ~/restored
An interrupted run resumes when you run it again (--fresh starts over).
Sources
| kind | reads | deletion after approval |
|---|---|---|
mbox |
Google Takeout .mbox file or Mail/ folder; any mbox |
appended to a Gmail worklist of search links you delete by hand |
imap |
any IMAP account, read-only, app password in the macOS Keychain | optional (allow_delete: true): moved to that account's Trash |
olm |
Outlook for Mac export (.pst: convert with readpst to mbox) |
by hand, or through an IMAP source |
applemail |
~/Library/Mail .emlx files |
by hand, or through an IMAP source |
documents |
Google Drive, OneDrive or any folder: PDF, Word, Excel, PowerPoint, text | moved to <state_dir>/trash/, never unlinked |
Details: knowledge/connectors/. How decisions are made: knowledge/pipelines/classification.md. What the archive proves, and what it does not: knowledge/architecture/archive.md. The archive is forensically sound and tamper-evident, but it is not a legal certification.
Development
TL;DR: strict TDD, 100% coverage, every decision an ADR. See CLAUDE.md.
uv venv --python 3.12 .venv && uv pip install --python .venv/bin/python -e ".[dev]"
.venv/bin/python -m pytest --cov
.venv/bin/python -m mailvault.devtools demo --out /tmp/mailvault-demo # whole lifecycle on synthetic data
.venv/bin/python -m mailvault.devtools artifacts --out artifacts/local
MIT licensed. Distribution name mailvault-archiver; the import and the command are mailvault.
Metadata
Release files for mailvault-archiver 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mailvault_archiver-0.1.0.tar.gz | 94.2 kB | With provenance | Details for mailvault_archiver-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mailvault_archiver-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mailvault_archiver-0.1.0-py3-none-any.whl |
Total release size: 215.7 kB
Release files / mailvault_archiver-0.1.0.tar.gz
| Download URL | mailvault_archiver-0.1.0.tar.gz |
|---|---|
| Size | 94.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27475b6cfea7889772b98cf5a4df6b51d4d555022512e0a7701c945f5e913cec
|
|
BLAKE2b-256 checksum How to use checksums |
552541334c8e6e48f748091811afc93f323b078bd1348dbadf6c805fa360171e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / mailvault_archiver-0.1.0-py3-none-any.whl
| Download URL | mailvault_archiver-0.1.0-py3-none-any.whl |
|---|---|
| Size | 121.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dcf88ab5cb7a0439b18f71bceafec2854cf5d6b30556311726f5ce5b3cbc8250
|
|
BLAKE2b-256 checksum How to use checksums |
31ed34148d293d086f8a4c3852769d97d58f3fb645f63bf68201b14bd53c5fd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for mailvault-archiver 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mailvault_archiver-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.