# Postern > Postern is a self-hosted mail client in two parts: the Hub, one small Go server you run on your own Linux machine (Docker or systemd), and web, desktop (macOS, Windows, Linux), iOS and Android apps that sign in to it. It connects to the mailboxes you already have (Gmail, Microsoft 365, iCloud, Yahoo, Fastmail, any IMAP/SMTP, JMAP); it is not a mail server. Unified inbox, Spaces, search, rules that run on the Hub while devices are off, push through a relay you run. No telemetry. Source-available under PolyForm Noncommercial 1.0.0. Beta: no published releases yet; build from source. Every page below is plain Markdown. The HTML pages live at the same address without `.md` and with a trailing slash. All pages in one file: https://docs.posternmail.app/llms-full.txt. Agents setting up a Hub start with https://docs.posternmail.app/agents.md. ## Start here - [Postern documentation](https://docs.posternmail.app/index.md): The documentation of Postern, a self-hosted mail client for all your mailboxes. Install the Hub, connect your mailboxes and apps, write rules and run it safely. - [How Postern works](https://docs.posternmail.app/how-it-works.md): The parts of Postern (the Hub, the apps, the optional push relay), who keeps which data, and what happens when mail arrives, when you send, and when the Hub is down. - [Requirements](https://docs.posternmail.app/requirements.md): What you need to run a Postern Hub and the apps: the machine, its system, memory, disk, network and clock, your mailboxes and the apps. - [Setup guide](https://docs.posternmail.app/setup.md): Install a Postern Hub from scratch with one command, choose how your devices reach it, create your account, add your first mailbox and get the apps. - [Set up with an AI agent](https://docs.posternmail.app/setup-with-ai.md): Ready-to-copy prompts that let an AI coding agent with shell access install a Postern Hub for you, one per install method, with what it must ask you, what it must never do and how it checks its work. ## Reaching your Hub - [Reaching your Hub](https://docs.posternmail.app/reach.md): How your devices reach the Hub, why it only listens on 127.0.0.1 by default, and how to choose between Tailscale, a reverse proxy, Cloudflare Tunnel, LAN only and the Hub's own TLS. - [Reach your Hub with Tailscale](https://docs.posternmail.app/reach/tailscale.md): Reach your Hub from your own devices over Tailscale, with a real HTTPS certificate and nothing exposed to the internet. - [Reach your Hub through a reverse proxy](https://docs.posternmail.app/reach/reverse-proxy.md): Put Caddy, nginx or Traefik in front of the Hub to reach it at your own domain over HTTPS, with the full configuration files, firewall commands and checks. - [Reach your Hub with Cloudflare Tunnel](https://docs.posternmail.app/reach/cloudflare.md): Publish your Hub at your own domain through Cloudflare Tunnel without opening ports, and lock it with Cloudflare Access and a service token for the apps. - [Reach your Hub on your home network only](https://docs.posternmail.app/reach/lan.md): Make the Hub reachable on your home network over plain HTTP, what stops working without HTTPS, and how to keep it safe. - [HTTPS and passkeys](https://docs.posternmail.app/reach/https.md): Let the Hub serve HTTPS itself with Let's Encrypt or your own certificate, how passkeys are bound to your domain, changing the domain later, and why self-signed certificates do not work. ## Connect mailboxes - [Connect mailboxes](https://docs.posternmail.app/providers.md): How adding a mailbox works in Postern, which connection types exist, where the sign-ins are kept, mailbox states, sync behaviour and limits. - [Connect a Gmail account](https://docs.posternmail.app/providers/gmail.md): Connect a personal Gmail account with an app password, or with Google sign-in through your own Google OAuth client. - [Connect a Google Workspace account](https://docs.posternmail.app/providers/google-workspace.md): Connect Google Workspace accounts with your own Internal OAuth client or an app password, and the Workspace admin settings that can block them. - [Connect Microsoft 365 and Outlook.com](https://docs.posternmail.app/providers/microsoft.md): Connect Outlook.com and Microsoft 365 mailboxes through Microsoft Graph, with your own Microsoft Entra app, browser sign-in or a sign-in code. - [Connect iCloud Mail](https://docs.posternmail.app/providers/icloud.md): Connect iCloud Mail (icloud.com, me.com, mac.com and iCloud+ custom domains) with an app-specific password. - [Connect Yahoo Mail and AOL](https://docs.posternmail.app/providers/yahoo.md): Connect Yahoo Mail and AOL Mail with an app password over IMAP and SMTP. - [Connect Fastmail](https://docs.posternmail.app/providers/fastmail.md): Connect Fastmail with an API token over JMAP (recommended) or with an app password over IMAP and SMTP. - [Connect any IMAP server](https://docs.posternmail.app/providers/imap.md): Connect any IMAP and SMTP mail account, what autodetection checks, ports and security options, certificates, folder mapping, IDLE and troubleshooting. - [Connect over JMAP](https://docs.posternmail.app/providers/jmap.md): Connect a mailbox over JMAP with an API token, what works, which servers, and the current limits of JMAP support. ## Apps - [Apps](https://docs.posternmail.app/apps.md): The four Postern apps (web, desktop, iOS, Android), how they get your mail, what each needs, and how the Hub and the apps stay compatible. - [Web app](https://docs.posternmail.app/apps/web.md): The web app built into your Hub, signing in, installing it as an app, Web Push notifications, and the copy of your mail the Hub keeps while you use it. - [Desktop app](https://docs.posternmail.app/apps/desktop.md): The Postern desktop app for macOS, Windows and Linux, building it from source, connecting to a Hub, menus, options, updates, the built-in Hub, data folder and logs. - [iOS app](https://docs.posternmail.app/apps/ios.md): The Postern app for iPhone and iPad, building it with Xcode until it is in the App Store, connecting, notifications, App Lock, swipe actions and what iOS pauses in the background. - [Android app](https://docs.posternmail.app/apps/android.md): The Postern app for Android, building it from source, what push notifications need (Firebase Cloud Messaging), UnifiedPush, and Android's rules for unencrypted Hubs. - [Pairing a device](https://docs.posternmail.app/apps/pairing.md): Signing in a new device with a QR code or a short code, approving it on a device that is already signed in, signing in through the browser, revoking devices and what to do when one is lost. - [Working offline](https://docs.posternmail.app/apps/offline.md): What keeps working when your Hub is down or the device is offline, what needs the Hub, how changes made offline sync back, and how conflicts are resolved. - [Updates](https://docs.posternmail.app/updates.md): How Postern's apps and the Hub update themselves, where updates come from, how they are checked, and how to turn automatic updates off. ## Using Postern - [Inbox and conversations](https://docs.posternmail.app/using/inbox.md): The unified inbox and folders, Spaces, the split inbox, conversations, Smart From, everyday actions, bulk actions, one-click unsubscribe and how remote images load. - [Search](https://docs.posternmail.app/using/search.md): How search works in Postern, what it covers, every operator with examples, and where the search runs. - [Compose, reply and forward](https://docs.posternmail.app/using/compose.md): Writing, replying and forwarding in Postern, choosing the From address, signatures, attachments and their size limit, drafts on every device, formatting and address suggestions. - [Snooze, send later and follow-ups](https://docs.posternmail.app/using/later.md): Snooze, send later, undo send, templates and follow-up reminders in Postern, where each one runs, and what happens while your devices are off. - [Screener](https://docs.posternmail.app/using/screener.md): The Screener holds mail from people writing to you for the first time until you let them in or screen them out. How it decides, what each choice does, and where held mail goes. - [Tags](https://docs.posternmail.app/using/tags.md): Tags in Postern, one set for all your mailboxes: create, colour, apply, how they sync across devices and how they are stored as Gmail labels, Outlook categories or IMAP and JMAP keywords. - [Keyboard shortcuts and command palette](https://docs.posternmail.app/using/shortcuts.md): Every keyboard shortcut of the Postern web app, how to change or turn them off, and the command palette. - [Notifications](https://docs.posternmail.app/using/notifications.md): How Postern decides when to notify you, the account, per-mailbox and per-device notification settings, quiet hours, previews on phones, Web Push in browsers, desktop and mobile notifications. - [Settings reference](https://docs.posternmail.app/using/settings.md): A tour of every Settings screen of the Postern web app, with each setting, what it does, its default, and whether it syncs to all devices or applies to one device. ## Rules - [Rules](https://docs.posternmail.app/rules.md): What rules are, where and when they run, the order they run in, a first rule step by step, and how Postern keeps rule actions safe. - [Conditions and exceptions](https://docs.posternmail.app/rules/conditions.md): Every rule condition and exception, with its fields, operators and value formats, pattern syntax, how addresses and headers are matched, automated mail, and time of day. - [Steps](https://docs.posternmail.app/rules/steps.md): Every rule step, what it does on Gmail, Microsoft, IMAP and JMAP, its fields and limits, which steps can be combined, and the risks of the steps that send or remove mail. - [Test mode](https://docs.posternmail.app/rules/test-mode.md): How Test mode works, what "Test against recent mail" shows, why rules that send mail start in Test, and how to switch a rule to Live safely. - [Activity and undo](https://docs.posternmail.app/rules/activity.md): The rule activity log, what each entry and outcome means, the detail messages, how long entries are kept, and what Undo can and cannot reverse. - [Sending queue](https://docs.posternmail.app/rules/sending-queue.md): The sending queue for rule mail, its stages and statuses, retries, unconfirmed sends, bounces, and the actions Retry, Change recipient, Restore to mailbox and Download .eml. - [Captured mail](https://docs.posternmail.app/rules/captured-mail.md): The mail your Hub keeps for rules (captured, redirected and deleted-for-good messages), how it is stored and encrypted, how long it is kept, and how to read, download, restore or delete it. - [Limits and guards](https://docs.posternmail.app/rules/limits.md): The daily limits and burst pause for rule mail, the loop guards that stop mail from going around in circles, bounce handling, and every setting under Limits and storage. - [Alerts](https://docs.posternmail.app/rules/alerts.md): What raises a rule alert, where you see it, and how to send alerts to ntfy, Discord or Gotify, including servers in your own network. - [Webhooks](https://docs.posternmail.app/rules/webhooks.md): The Call a web address rule step, the exact HTTP request and JSON payload it sends, retries and delivery guarantees, address restrictions, and how to receive it safely. - [Import from MailManager](https://docs.posternmail.app/rules/mailmanager.md): Import your MailManager rules into Postern with postern-hub import-mailmanager, for Docker, systemd and the desktop app's built-in Hub, and what is and is not carried over. ## Push relay - [How push works](https://docs.posternmail.app/relay.md): How new-mail notifications reach phones, why Postern needs a push relay for that, and how to point your Hub at one. - [Run your own relay](https://docs.posternmail.app/relay/run-your-own.md): Build, configure and run your own Postern push relay with your own Apple and Google credentials, and point your Hub at it. - [What the relay sees](https://docs.posternmail.app/relay/what-it-sees.md): Every field the push relay receives, stores and forwards to Apple and Google, with previews on and off, and what its logs contain. ## Administration - [Users and invites](https://docs.posternmail.app/admin/users.md): Add people to your Hub with invites or from the command line, manage roles, reset passwords and two-step verification, and delete accounts. - [Sign-in methods](https://docs.posternmail.app/admin/sign-in.md): How people sign in to a Postern Hub - passwords, two-step verification, passkeys and single sign-on with Authelia, Authentik or Keycloak - plus sessions, re-authentication and rate limits. - [The admin panel](https://docs.posternmail.app/admin/admin-panel.md): A tour of the admin panel in the web app - Hub status and warnings, Hub name, registration, people, invites, the Google and Microsoft sign-in clients and the mailbox overview - with every default. - [Backups and restore](https://docs.posternmail.app/admin/backups.md): What to back up on a Postern Hub, how scheduled and manual backups work, how to restore (also onto a new machine or from the desktop app to a server), off-site copies and what backups mean for deleted accounts. - [Upgrades](https://docs.posternmail.app/admin/upgrades.md): Upgrade a Postern Hub built from source, what happens on the first start of a new version, how releases will work, version compatibility with the apps, and how to uninstall. - [Logs](https://docs.posternmail.app/admin/logs.md): Where the Postern Hub writes its log for each install method, log levels and formats, what is and is not logged, the per-account security log, useful filters and what to include in a bug report. - [Doctor](https://docs.posternmail.app/admin/doctor.md): Run postern-hub doctor for each install method, what every check means and how to fix each warning and problem, exit codes, and the setup-code command. - [Migrating from MailClient](https://docs.posternmail.app/migrating-from-mailclient.md): For Hubs installed before the rename from MailClient to Postern - what changed, what still works unchanged, and how to move to the new names if you want to. ## Reference - [Configuration reference](https://docs.posternmail.app/configuration.md): Every environment variable the Postern Hub reads, with its default, format, validation errors and where to set it for each install method. - [Command-line reference](https://docs.posternmail.app/reference/cli.md): Every postern-hub command, subcommand and flag, with usage, prompts, output, exit codes and an example, and how to run them for each install method. - [Ports and paths](https://docs.posternmail.app/reference/ports-and-paths.md): Every port the Hub and its tools use, and every file and folder they create for each install method, with owners and modes. - [HTTP API](https://docs.posternmail.app/reference/api.md): An overview of the Hub's HTTP API: base path, authentication, CSRF rules, the WebSocket, errors, rate limits and every endpoint, grouped. - [Capabilities and settings](https://docs.posternmail.app/reference/capabilities.md): The capabilities a Hub advertises in /api/v1/info, what each one means, what each mail provider supports, and how settings are stored for your account, each device and the whole Hub. - [Build from source and development](https://docs.posternmail.app/development.md): Build the Hub, the Docker image, the desktop and mobile apps and the push relay from source, run everything locally, run the tests, and follow the project's conventions. ## Security - [Security](https://docs.posternmail.app/security.md): Postern's threat model, its trust boundaries, how sign-in is protected, how to report a vulnerability and how to verify releases. - [Encryption at rest](https://docs.posternmail.app/security/encryption.md): How the Hub encrypts data at rest with a master key and per-user keys, what is and is not encrypted, sealed key files, key rotation, and what the apps store on devices. - [How mail is shown safely](https://docs.posternmail.app/security/mail-rendering.md): How Postern cleans HTML mail, shows it without scripts in every app, loads remote images through a proxy, removes tracking pixels and handles links and attachments. - [Hardening checklist](https://docs.posternmail.app/security/hardening.md): A checklist for people who run a Postern Hub - network exposure, proxies, accounts, keys, systemd and container hardening, firewall, updates and backups. ## Help - [Troubleshooting](https://docs.posternmail.app/troubleshooting.md): Find your symptom or error message, learn the cause and fix it, with commands for each install method, and collect doctor output and logs for a bug report. - [Frequently asked questions](https://docs.posternmail.app/faq.md): Short answers to the questions people ask most about Postern, the Hub, mail storage, providers, the license, apps, push and privacy, with links to the details. - [For AI agents](https://docs.posternmail.app/agents.md): Instructions for AI agents that install, configure or troubleshoot a Postern Hub - the facts, paths, commands, checks and rules to follow, and where the Markdown docs are. - [License](https://docs.posternmail.app/license.md): Postern's license in plain words - PolyForm Noncommercial 1.0.0 with an Additional Permission that allows running it for your own mail, also at work - and what it does not allow. ## Optional - [Source code](https://github.com/TheOriUHD/postern): the repository, with the developer contract in docs/dev/ - [Website](https://posternmail.app/): the product page