Connect mailboxes
Connect mailboxes
How adding a mailbox works in Postern, which connection types exist, where the sign-ins are kept, mailbox states, sync behaviour and limits.
A mailbox is one email account that Postern reads and sends from: a Gmail address, an Outlook account, an iCloud address or any IMAP account. This page explains how adding a mailbox works, what happens after it is connected and what each mailbox state means. The pages for each provider walk through the setup step by step.
Pick your provider #
| Provider | Easiest path | Also possible | Guide |
|---|---|---|---|
Gmail (@gmail.com, @googlemail.com) |
App password over IMAP | Sign in with Google, with your own Google OAuth client | Gmail |
| Google Workspace (your domain on Google) | Sign in with Google, with your own Internal OAuth client | App password, if your admin allows it | Google Workspace |
| Outlook.com, Hotmail, Live, MSN, Microsoft 365 | Sign in with Microsoft (needs a Microsoft client ID on the Hub) | Sign in with a code | Microsoft |
iCloud Mail (@icloud.com, @me.com, @mac.com, iCloud+ domains) |
App-specific password | iCloud | |
| Yahoo Mail and AOL | App password | Yahoo and AOL | |
| Fastmail | API token (JMAP) | App password over IMAP | Fastmail |
| GMX, WEB.DE, Posteo, mailbox.org, Zoho, Proton (Bridge), your host, your own server | Password or app password over IMAP and SMTP | Any IMAP server | |
| Other JMAP servers | API token | JMAP |
Postern does not support POP3 or Exchange Web Services (EWS).
Add a mailbox #
You can start adding a mailbox from several places in the web and desktop app:
- Settings → Mailboxes → Add mailbox
- the + button next to Mailboxes in the sidebar (its tooltip says Add a mailbox)
- the command palette (⌘K or Ctrl+K): Add a mailbox…
- Add a mailbox on the empty inbox, when you have no mailbox yet
In the iOS and Android app, open Settings → Mailboxes → Add mailbox.
The dialog then asks a few questions:
- Where does your mail live? Pick Google (Gmail, Google Workspace), Microsoft (Outlook, Microsoft 365), iCloud (iCloud Mail, me.com) or Other (Fastmail, Yahoo, any IMAP).
- Your email address. Type the full address and click Continue (for Google and Microsoft the button says Sign in with Google or Sign in with Microsoft).
- How to sign in. The Hub looks up your address (see autodetection) and offers the ways in that work for this provider and this Hub, the best one first, marked Recommended. When only one way is possible, the dialog goes straight to it.
- Sign in. Depending on the way you picked: Google or Microsoft's own sign-in page, a code to type on Microsoft's page, or a password form.
- Done. The dialog shows you@example.com is connected and a progress bar while your mail downloads. You can start using Postern right away; older mail keeps arriving. Click Add another for the next mailbox or Done.
Before it saves a password or token, the Hub signs in to the provider once to check it. For IMAP that means a sign-in to the IMAP server and a connection to the SMTP server; nothing is stored when either fails, and the dialog shows why (see errors).
Note
Your mail stays with your provider. Postern reads it, keeps a local copy for fast search and offline use, and writes your changes (read, archived, moved, deleted) back to the provider.
The connection types #
| Way to sign in | Button in the dialog | What the Hub uses | Providers |
|---|---|---|---|
| Password or app password | Use a password | IMAP to read, SMTP to send | Every IMAP provider: iCloud, Yahoo, AOL, Gmail, Fastmail, GMX, your own server |
| Sign in with Google | Sign in with Google | Gmail API, with an OAuth client that you create in Google Cloud | Gmail, Google Workspace |
| Sign in with Microsoft | Sign in with Microsoft | Microsoft Graph, with an app you register in Microsoft Entra | Outlook.com, Microsoft 365 |
| Sign in with a code | Sign in with Microsoft using a code | Microsoft Graph, through Microsoft's device code sign-in | Outlook.com, Microsoft 365 |
| API token | Use an API token | JMAP | Fastmail; other JMAP servers through the API |
The Google and Microsoft sign-ins only appear when the Hub admin has set them up (see
Gmail and Microsoft). Postern ships no shared
Google or Microsoft app: each Hub uses its own. The browser sign-ins (Google, and Microsoft
without a code) also need the Hub to be opened over https:// or on localhost, because Google
and Microsoft only send you back to such addresses. Without that, Google sign-in is not offered
and Microsoft falls back to the code.
On a phone, Google accounts are added in the Hub's web app: the app opens it for you (Open the web app), you add the mailbox there, and it appears on the phone by itself. On the desktop app, the Google page opens in your normal browser, which must be signed in to your Hub's web app with the same account. Microsoft's code sign-in works the same everywhere.
Autodetection #
When you type your address, the Hub works out the provider and the server settings. It tries, in this order, and uses the first answer:
- A built-in list of large providers: Gmail, Outlook.com (and Hotmail, Live, MSN, Passport), iCloud, Yahoo, AOL, Fastmail and its alias domains, GMX, WEB.DE, Posteo, mailbox.org, Zoho and Proton.
- The domain's MX records. This recognizes your own domain when it is hosted by Google Workspace, Microsoft 365, iCloud+, Fastmail, Zoho, mailbox.org or Proton.
- Published settings, looked up at the same time: Mozilla's provider database (the one
Thunderbird uses) for your domain, your domain's own autoconfig file
(
autoconfig.example.comandexample.com/.well-known/autoconfig), Mozilla's database for the company that runs your MX servers, and DNS SRV records (_imaps._tcp,_imap._tcp,_submissions._tcp,_submission._tcp). - A guess from the MX host:
imap.andsmtp.on the domain of your mail server, if those names exist. - A plain guess:
imap.example.com(ormail.example.com) on port 993 with TLS andsmtp.example.com(ormail.example.com) on port 587 with STARTTLS.
A guess says so in the dialog ("No published settings were found for this domain. These server
names are a guess; check them with your mail provider."). Open Server settings in the
password form to check or change them. Lookups only go to public https:// addresses, and
results are remembered for an hour per domain (a guess for 10 minutes).
Details per provider, including the exact servers, are on the provider pages and on Any IMAP server.
Errors while adding #
| What the dialog shows | What it means | What to do |
|---|---|---|
| The sign-in was rejected. The server rejected the sign-in. Check the username and password. Gmail, iCloud, Yahoo and many others require an app-specific password when two-step verification is on. | The provider said no to the username and password. | Use an app password, not your normal password. Check Username under Server settings. |
| The mail server didn't answer. Couldn't connect to imap.example.com: the connection timed out. Check the server name, port and security setting. | The Hub could not reach the server in time. | Check host, port and security under Server settings. The server must be reachable from the Hub's machine. |
| The mail server didn't answer. Check the server settings below and try again. | Another connection error (refused, certificate, wrong security setting). | Same as above; see Any IMAP server. |
| This way of signing in isn't set up on your Hub. | Google or Microsoft sign-in has no client on this Hub, or the Hub is not on https://. |
Admins get an Open provider settings button. Everyone else can use an app password or ask the admin. |
| This mailbox is already connected. Update its credentials instead. | The same address is already connected in the same way. | Use Update sign-in on the existing mailbox. |
| Your Hub can't be reached. | The app has no connection to your Hub. | See When the Hub is away. |
Where your sign-ins are kept #
Passwords, app passwords, API tokens and Google and Microsoft refresh tokens are stored on your Hub, encrypted with a key that belongs to your Postern account (see Encryption). They are never written to the Hub's logs. When Google or Microsoft hands out a fresh token, the Hub stores it encrypted again.
The desktop, iOS and Android apps get mail straight from your providers. To do that, they fetch your mailbox sign-ins from the Hub once:
- only apps signed in with your password, a passkey or single sign-on get them (an app approved only from a browser session is asked to sign in properly first: "Sign in on this device with your password, passkey or single sign-on to use your mailbox credentials here.");
- the web app never gets them;
- every handover is recorded under Settings → Security → Recent security activity as Mailbox sign-ins sent to one of your devices.
For Google mailboxes the app also gets the Hub's Google client ID and secret, so it can renew the token itself. Removing a device signs it out; to make a handed-over password useless, change it at the provider and reconnect the mailbox.
Manage a mailbox #
Everything is in Settings → Mailboxes. Each mailbox has a card with its address, provider, status and these settings:
| Setting or button | What it does |
|---|---|
| Color | The mailbox color in the sidebar and message list. |
| Sender name | The name people see on mail you send from this mailbox. The first identity of a new mailbox uses it. |
| Notifications | Use my default, All new mail, VIPs only or None for this mailbox. See Notifications. |
| Pause / Resume | Stops fetching mail for this mailbox until you resume. Nothing is deleted. |
| Download again… | Fetches all mail of the mailbox again from the provider. Nothing is deleted, but it takes a while and uses data. Use it when the copy in Postern looks wrong. |
| Update sign-in | Enter a new password or token, or sign in to Google or Microsoft again. |
| Remove… | Removes the mailbox from Postern. |
The address itself cannot be renamed: it is the account. To show a different name on outgoing mail, change Sender name, or edit the identities (below).
Reconnect #
When a provider stops accepting the sign-in (you changed your password, revoked the app password, or an admin removed access), the mailbox shows The sign-in no longer works. Reconnect to keep getting mail. and a Reconnect button. The sidebar shows Reconnect next to the mailbox, and you get one notification: Reconnect you@example.com.
Click Reconnect (or Update sign-in at any time):
- Password mailboxes: enter the password or a new app password and click Reconnect. The Hub checks it first. The dialog only asks for the password; to change the server settings, remove the mailbox and add it again.
- API token (JMAP): enter a new token.
- Google and Microsoft: click Continue to Gmail or Continue to Outlook and sign in again. Sign in with the same address: signing in as someone else ends with "You signed in as other@example.com, but this mailbox is you@example.com." Microsoft without browser sign-in goes through the code step again.
After a successful reconnect the mailbox shows Connecting… and then catches up from where it stopped.
Remove #
Remove… asks for confirmation (Remove mailbox). The mailbox's mail, folders, identities and pending changes are deleted from the Hub and from all your devices, and the mailbox is taken out of every space. Nothing is deleted at the provider. If you add the same address again later, its existing mail is not announced as new mail.
To also revoke Postern's access at the provider, delete the app password or token there, or remove the app in your Google or Microsoft account (links on the provider pages).
Mailbox states #
The status line under each mailbox in Settings → Mailboxes:
| Status shown | State | What it means |
|---|---|---|
| Connecting… | connecting |
Just added, resumed or reconnected; the first sync is starting. |
| Downloading mail, 42% done | backfilling |
The first download of your existing mail is running, newest first. New mail already arrives meanwhile. |
| Up to date (with "checked …") | live |
Synced. New mail arrives as described in How new mail arrives. |
| Having trouble getting new mail. Trying again automatically. | degraded |
Temporary errors. The Hub retries with growing pauses (2 seconds up to 5 minutes). |
| The sign-in no longer works. Reconnect to keep getting mail. | auth_error |
The provider rejected the stored sign-in. Nothing is fetched until you reconnect. |
| Paused. No new mail is fetched. | paused |
You paused it. |
For Having trouble… and The sign-in no longer works…, Technical details shows a plain sentence about the cause:
| Technical details | Cause |
|---|---|
| The mail provider no longer accepts the sign-in for this mailbox. Reconnect it to keep receiving mail. | Wrong or revoked password, expired or revoked token. |
| Can't reach the mail server at imap.example.com. Trying again. | Network error, DNS failure, timeout. |
| Can't make a secure connection to the mail server at imap.example.com. Check the server address and security setting of this mailbox. | Certificate or TLS problem. |
| Gmail is limiting how fast this mailbox can sync. Syncing continues by itself; nothing needs to be done. | The provider is rate limiting. Shown only when it lasts 15 minutes or longer. |
| This mailbox is full at the provider. Free up space there and syncing continues. | The provider reports the storage quota as full. |
| Gmail is having trouble right now. Trying again. | Server errors at the provider. |
| Something went wrong while syncing. Trying again. | Anything else. The full error is in the Hub's log and in the admin's sync overview. |
A mailbox that is up to date only switches to Having trouble… after three failed checks in a row or five minutes of failures, so a single timeout does not show a warning. Admins see the raw error of every mailbox in Settings → Admin → Mailboxes on your Hub (see Admin panel).
Sync #
The first download #
A new mailbox first downloads its existing mail, newest first, folder by folder (inbox first,
trash and spam last). By default the Hub fetches your whole history. The Hub admin can limit
that with POSTERN_BACKFILL_DAYS (see Configuration). While the download
runs, the mailbox shows its progress, and new mail arrives normally.
Message bodies of the last 30 days are fetched ahead in the background
(POSTERN_BODY_CACHE_DAYS), except messages larger than 8 MB. Everything else is fetched the
first time you open it.
How the Hub keeps your mail #
The apps on your devices get mail straight from your providers. The Hub keeps the sign-ins, your settings and the state of every message in sync between them, runs rules and sends notifications. It keeps a full copy of your mail only while you use the web app:
- For 7 days after you last used the web app, the Hub syncs every folder and fetches bodies, as described above.
- After that, it only watches each mailbox's inbox (the last 7 days, without bodies). That is enough for notifications, rules, the Screener and snooze.
- After 30 days without the web app (
POSTERN_HUB_MAIL_COPY_DAYS), the Hub deletes its copy of older mail. The next time you open the web app, it downloads it again.
To keep a full copy on the Hub all the time, turn on Settings → Reading & sending → Keep a full copy of my mail on my Hub.
How new mail arrives #
Every connection type has a push channel that wakes the sync as soon as the provider reports a change, plus regular checks as a safety net:
| Connection | Push | Regular check |
|---|---|---|
| IMAP (password) | IMAP IDLE on the inbox | every 2 minutes |
| Gmail (sign in with Google) | IMAP IDLE on imap.gmail.com as a doorbell |
every 10 seconds |
| Microsoft | IMAP IDLE on outlook.office365.com as a doorbell |
every 45 seconds |
| JMAP | JMAP event stream (all folders) | every 5 minutes |
When the provider does not allow the push connection (for example IMAP disabled by an admin), the mailbox keeps working with the regular checks only. The Check for new mail button above the message list (pull to refresh on a phone) checks at once.
Changes you make #
Reading, flagging, archiving, moving, deleting and tagging are applied in Postern at once and written to the provider in the background. Tags become Gmail labels, Outlook categories or IMAP and JMAP keywords. Sent mail ends up in the provider's Sent folder: Gmail, Microsoft and JMAP store it themselves, and for IMAP the Hub saves a copy there.
Identities and aliases #
Every mailbox has at least one identity: its own address with your sender name. In Settings → Identities & signatures you can, per mailbox:
- Add an address (an alias), with its own name,
- set a Reply-to address and a Signature for each address,
- Make default to choose the address new mail starts from, and delete extra addresses.
A reply starts from the address the message was sent to. Postern does not check aliases with the provider: the provider must allow sending from the address. Gmail needs it under Settings → See all settings → Accounts and Import → Send mail as in Gmail, Microsoft needs send-as rights (otherwise sending fails), Fastmail and iCloud need the alias set up in their settings.
When the Hub is away #
The desktop and mobile apps can add a password mailbox while the Hub is unreachable: the dialog
fills in common server names (imap. and smtp. on your domain) for you to check, the app
verifies the sign-in itself and hands it to the Hub later. Google sign-in needs the Hub ("Connecting
Google needs your Hub, which can't be reached right now"). See Offline use.
Limits #
- Providers' own limits apply. Gmail meters API use per account; Postern paces itself (see Gmail quota). Microsoft and other providers can slow down large downloads; the Hub waits and continues.
- Google sign-in with an unverified OAuth client can be used by at most 100 Google accounts. See Gmail.
- Message size for sending depends on the provider. Through Microsoft Graph, messages up to 150 MB are sent. See Writing mail.
- Server settings of a password mailbox cannot be edited in the app after adding it: remove and add the mailbox again.
- JMAP is less tested than the other connection types. See JMAP.