Skip to content

Mailbox security

Two-step sign-in for webmail, a company-wide rule that makes it required, app passwords for mail apps on phones and computers, setup profiles for Apple devices, and the DNS records that let mail apps find their settings by themselves.

Overview#

A mailbox has one password. It signs in to webmail and, until two-step verification is turned on, to mail apps too. Each person manages their own security in webmail under the account menu → Security and devices (/mail/settings/security):

  • Two-step verification — an authenticator app, a passkey, or both, plus recovery codes.
  • App passwords — a separate password for each mail app, so the mailbox password never sits on a phone.
  • Where you’re signed in — every browser signed in to webmail, with a way to sign each one out.
  • Sign-in alerts — an email when a new browser signs in or an app password is made.

Team admins decide whether two-step is required (see Require two-step for your company) and can reset it for someone who lost their phone. They never see anyone’s codes or app passwords.

Two-step sign-in for webmail#

With two-step verification on, signing in to webmail takes the password and a second step. A mailbox can have any mix of these:

MethodHow it works
Authenticator appAny TOTP app. Scan the QR code (or type the key), then enter one 6-digit code to confirm within 15 minutes. Codes change every 30 seconds and each code works once.
PasskeyFace ID, a fingerprint or the device PIN. A passkey can also sign in on its own: Sign in with a passkey skips both the password and the code.
Recovery codes10 single-use codes, issued when the first method is added. Keep them somewhere safe; each one replaces a code once. Get new codes replaces all of them and needs the mailbox password.
  1. Open Security and devices

    In webmail, open the account menu → Security and devices.
  2. Add a method

    Choose Add a passkey or Add an authenticator app and follow the prompts.
  3. Save the recovery codes

    Download, print or copy the 10 recovery codes shown next. They are shown once; the page afterwards only says how many are left.

Adding the first method does three things at once:

  • every other browser signed in to the mailbox is signed out;
  • remembered devices are forgotten;
  • mail apps stop accepting the mailbox password and need an app password — unless the person ticks Let mail apps keep using my password. The switch Mail apps need an app password changes it later.

Removing the last method turns two-step off again and lets mail apps use the password; app passwords already made keep working.

Remember this device

The second step has a checkbox, Don’t ask again on this device for 30 days. That browser then signs in with the password alone for 30 days. Changing the password, turning on two-step, Sign out everywhere else and Forget them (under Where you’re signed in) all end it.

Sessions and sign-in alerts

Where you’re signed in lists each browser with its device, approximate place and last activity; sign one out, or use Sign out everywhere else. A webmail session ends after 30 days without use, and after 90 days at most.

With Sign-in alerts on (the default), the mailbox gets an email when a browser it has not seen before signs in, and when a new app password is made. It names the device, the approximate place, the IP address and the time, with a button to the security page.

Wrong codes

A sign-in waits 10 minutes for its second step. After 5 wrong codes it is cancelled and has to start again from the password. Wrong codes also count towards the same lockout as wrong passwords: 5 failures lock the address for a minute, 10 for 5 minutes, 15 for 30 minutes and 20 for 24 hours.

On your own webmail address

Passkeys belong to poststack.dev, so they work at poststack.dev/mail but not on a domain’s own webmail address such as mail.example.com (see Your own webmail address). There, sign in with the password and an authenticator code or a recovery code. A mailbox whose only second step is a passkey is told to sign in at poststack.dev/mail and add an authenticator app for the custom address.

Require two-step for your company#

Two-step can be required for every mailbox on the team, or only for the mailboxes on particular domains. A mailbox is covered when either applies.

ScopeDashboardAPI
Every mailbox on the teamSettings → Team → Mailbox sign-in security → Require two-step verification for every mailboxDashboard only
Mailboxes on one domainThe domain’s page → Mailbox sign-in security → Require two-step verification for mailboxes on this domainmailbox_two_factor_required on PATCH /domains/:id
curl -X PATCH https://api.poststack.dev/domains/dom_4k9x2m7q1w8r3t6y0p5s2d8a \
  -H "Authorization: Bearer $POSTSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "mailbox_two_factor_required": true }'

What the people on those mailboxes notice:

  • At the next webmail sign-in, after the password, anyone without two-step sees Protect your email and must add a passkey or an authenticator app before the mailbox opens. There is no grace period.
  • Browsers already signed in stay signed in; the rule applies the next time each one signs in.
  • The last method cannot be removed while the rule applies (409, “Your organisation requires two-step verification. Add another way to verify before removing this one.”).
  • Mail apps switch to app passwords as soon as the person turns two-step on, unless they chose to keep using the password (see App passwords). Tell people before you switch the rule on, so phones do not suddenly stop fetching mail.

Lost phone: reset two-step

In the dashboard, open the mailbox’s menu → Sign-in security. It shows whether two-step is on and how, whether mail apps need app passwords, and every app password with when and from where it was last used. From there an admin can:

  • Turn two-step verification off — removes the authenticator app and passkeys and signs out every browser. App passwords keep working. If two-step is required, the person sets it up again at their next sign-in.
  • Revoke one app password, or all of them — the apps using them are signed out.

A reset is written to the team’s audit log. Admins cannot create app passwords or read codes for someone else.

App passwords for mail apps#

An app password is a separate password for one mail app or device — Apple Mail, Outlook, Thunderbird, the mail app on an Android phone. Each one can be removed on its own, which signs out just that app, and the mailbox password never has to be typed into a phone.

  1. Create it

    In webmail, account menu → Security and devices → New app password. Name it after the app or device (iPhone Mail, Outlook at the office) and confirm with the mailbox password.
  2. Copy it into the app

    It is 16 lowercase letters, shown in four groups (abcd efgh ijkl mnop). Spaces do not matter. It is shown once — make a new one if you lose it.
  3. Sign in

    In the app, the username is the full email address and the password is the app password, for both incoming and outgoing mail.
Signs in toApp passwordMailbox password
IMAP (993) and POP3 (995)YesOnly while mail apps may use the password
SMTP (465 and 587)YesOnly while mail apps may use the password
Calendars and contactsYesOnly while mail apps may use the password
WebmailNoYes, plus the second step when two-step is on
  • A mailbox can have up to 25 app passwords.
  • The list shows when each was last used, over which protocol and from where, or Not used yet.
  • Removing one signs that app out at its next connection. Changing the mailbox password does not touch app passwords.
  • When the mailbox password is refused (two-step is on), a mail app sees an ordinary sign-in failure — the same as a wrong password. Creating an app password and entering it is the fix.

Set up a phone or computer#

Webmail’s account menu → Set up on phone or computer (/mail/settings/setup) has step-by-step instructions for iPhone or iPad, Mac, Android, Outlook (Windows or Mac; iPhone or Android), Thunderbird and any other app, with the server settings and a button that makes an app password for the chosen device. The settings, if you enter them by hand:

ServerPortSecurity
Incoming (IMAP)poststack.dev993SSL/TLS
Incoming (POP3)poststack.dev995SSL/TLS
Outgoing (SMTP)poststack.dev465SSL/TLS (or 587 with STARTTLS)
Username
The full email address, for incoming and outgoing.
Password
An app password — or the mailbox password if the mailbox has no two-step verification and mail apps may use it.

The server is poststack.dev even when webmail runs on your own mail.yourdomain address.

Apple setup profile (iPhone, iPad, Mac)

On Apple devices, a setup profile adds the account in one go instead of typing the settings:

  1. Make the profile

    In Set up on phone or computer, choose iPhone or iPad, or Mac, and make a setup profile (it asks for the mailbox password). You get a link and a QR code.
  2. Open it on the device

    Scan the QR code with the iPhone or iPad camera, or open the link on the Mac. The link works once, for 15 minutes.
  3. Install it

    iPhone and iPad: Settings → Profile Downloaded → Install. Mac: open System Settings, find the downloaded profile under Device Management (or Profiles), and choose Install.

The profile adds one mail account — IMAP on 993 and SMTP on 465, both SSL — with a new app password already filled in, named iPhone (setup profile), iPad (setup profile) or Mac (setup profile). Remove that app password and the device is signed out. Installing a new profile for the same mailbox replaces the old account. Calendars and contacts are not part of the profile; add them as described in Calendars and contacts.

Automatic setup and DNS records#

Most mail apps can find their settings from the email address alone. PostStack answers each of the ways they ask:

ClientHow it finds the settings
ThunderbirdFollows the domain’s MX to https://autoconfig.poststack.dev/mail/config-v1.1.xml — IMAP, POP3 and SMTP, plus the calendar and address book. Needs only the MX record.
Outlook (classic, Windows)Looks up _autodiscover._tcp.yourdomain, asks once whether to trust poststack.dev for the address, then reads https://poststack.dev/autodiscover/autodiscover.xml.
Outlook (JSON lookup)https://poststack.dev/autodiscover/autodiscover.json/v1.0/you@yourdomain?Protocol=AutodiscoverV1 points to the same XML document.
Apps using RFC 6186 / 6764_imaps._tcp and _submissions._tcp for mail, _caldavs._tcp and _carddavs._tcp for calendars and contacts.
iPhone, iPad, MacUse the setup profile above, or enter the settings.

SRV records to publish

While a domain has at least one active mailbox, its DNS records in the dashboard include five SRV records (and they are removed again when the last active mailbox is deleted). If PostStack runs the domain’s DNS they are published for you. Otherwise add them at your DNS host exactly as listed — they never block verification, but without them Outlook and DAV apps cannot find the server by themselves:

NameTypePriorityWeightPortTarget
_imaps._tcpSRV01993poststack.dev
_submissions._tcpSRV01465poststack.dev
_caldavs._tcpSRV01443poststack.dev
_carddavs._tcpSRV01443poststack.dev
_autodiscover._tcpSRV01443poststack.dev

The names are relative to your domain: _autodiscover._tcp is _autodiscover._tcp.example.com for example.com. A DNS host that takes the value as one line wants 0 1 443 poststack.dev (priority, weight, port, target); some want a trailing dot on the target (poststack.dev.). TTL 3600 is fine. No autodiscover or autoconfig CNAME is needed in your zone.

_imaps._tcp.example.com.         3600 IN SRV 0 1 993 poststack.dev.
_submissions._tcp.example.com.   3600 IN SRV 0 1 465 poststack.dev.
_caldavs._tcp.example.com.       3600 IN SRV 0 1 443 poststack.dev.
_carddavs._tcp.example.com.      3600 IN SRV 0 1 443 poststack.dev.
_autodiscover._tcp.example.com.  3600 IN SRV 0 1 443 poststack.dev.

Troubleshooting#

A phone stopped fetching mail after two-step was turned on

With two-step on, mail apps need an app password. Make one under Security and devices and enter it in the app instead of the mailbox password — or, on an iPhone, iPad or Mac, install a new setup profile.

Outlook asks whether to allow poststack.dev to configure the account

That is the _autodiscover._tcp record working: classic Outlook asks once before it trusts a server under a different name. Tick Don’t ask me about this website again and allow it.

The passkey is not offered on mail.example.com

Passkeys only work at poststack.dev/mail. On your own webmail address, sign in with the password and an authenticator code or a recovery code.

Someone lost their phone and their recovery codes

An admin opens the mailbox’s menu → Sign-in security → turn two-step verification off. The person signs in with the password and sets two-step up again.

The setup link says it has expired or was already used

A setup profile link works once, for 15 minutes. Make a new one in Set up on phone or computer.

Next steps

Was this page helpful?

Related

Webmail overviewMail in the browser on your own domain, with two-step sign-in.