Skip to content

๐Ÿ“ง Mail Archiver Documentation

Self-hosted email archiving โ€” archive, search and export mail from any provider. Set it up once, keep every message, and find it again years later.

  • Getting started


    Install Mail Archiver with Docker Compose and connect your first mailbox.

    Setup and parameters

  • Find anything


    Full-text search across every account, with filters, sorting and bulk actions.

    Mail search

  • Automate it


    Read your archive from scripts and AI agents โ€” read-only, scoped API keys.

    REST API ยท MCP server

  • Secure it


    Two-factor authentication, SSO, access logging and retention policies.

    Two-factor auth ยท OIDC / SSO

๐Ÿ› ๏ธ Installation & Maintenance

  • Setup and parameters


    Every environment variable, Kestrel HTTPS and secrets management.

    Read

  • Reverse proxy


    Put Mail Archiver behind nginx or Caddy with TLS termination.

    Read

  • PostgreSQL upgrade


    Move to a new major PostgreSQL version without losing data.

    Read

  • Database maintenance


    VACUUM, ANALYZE and keeping the archive responsive over time.

    Read

  • Backup and restore


    Back up the database and restore it โ€” including Proxmox setups.

    Read

  • Local test environment


    Run a throwaway instance locally before touching production.

    Read

๐Ÿ“ฅ Getting Mail In

  • Account import


    Add many accounts at once from a CSV file.

    Read

  • Synchronization


    Quick vs. full sync, checkpoints, and what happens when a sync fails.

    Read

  • CLI local import


    Import existing archives from the command line.

    Read

  • Web import (EML / MBox)


    Upload an MBox file or a ZIP of EML files through the browser.

    Read

  • Rate limit handling


    Bandwidth tracking, and how paused syncs resume on their own.

    Read

๐Ÿ” Working with the Archive

  • Mail search


    Query syntax, filters, sorting, paging and bulk actions.

    Read

  • Background jobs


    Watch syncs, imports, restores and exports โ€” and cancel them safely.

    Read

  • Mailbox migration


    Copy mail between mailboxes while preserving the folder structure.

    Read

  • Account export (EML / MBox)


    Write a whole account back out as a portable EML or MBox archive.

    Read

  • Attachment deduplication


    How identical attachments are stored once instead of many times.

    Read

  • Date-windowed offload


    Move older mail to another account, window by window.

    Read

  • Per-account storage


    See how much space each mailbox takes up.

    Read

๐Ÿ” Administration & Security

  • User management


    Create users, grant admin rights, assign mailbox permissions and change your own password.

    Read

  • Two-factor authentication


    TOTP setup, backup codes, and what to do when a device is lost.

    Read

  • OIDC / SSO


    Sign in through Entra ID, Authelia or another identity provider.

    Read

  • Access logging


    Who opened, searched, exported or deleted what.

    Read

  • Audit data export


    Export the audit trail for compliance reviews.

    Read

  • Emergency account recovery


    Regain access when an account is locked out.

    Read

  • Retention policies


    Automatic deletion from the mail server or the local archive.

    Read

โ˜๏ธ Provider Guides

  • Azure app registration (M365)


    Register an app and configure retention for Microsoft 365.

    Read

  • M365 tenant mailbox import


    Bulk-import every mailbox of a tenant from a single form.

    Read

  • Personal Microsoft accounts


    Outlook.com, Hotmail and M365 Family via device code flow.

    Read

  • Gmail best practices


    App passwords, labels, expunge and Gmail's rate limits.

    Read

  • Yahoo mail limitations


    What Yahoo's IMAP and export endpoints will not do.

    Read

๐Ÿ”Œ Programmatic Access

  • REST API


    Read-only access to the archive with scoped per-user API keys.

    Read

  • MCP server


    Expose the archive to AI agents as discoverable tools.

    Read

๐Ÿงฐ Operations & Development

  • Language and localization


    Switch the interface language, and how to add a translation.

    Read

  • Docker Compose logs


    Read container logs and change the log level.

    Read

  • Development versions


    Switch to a dev tag to test upcoming changes.

    Read