Connect mailboxes
Connect a Google Workspace account
Connect Google Workspace accounts with your own Internal OAuth client or an app password, and the Workspace admin settings that can block them.
Google Workspace accounts (your own domain, hosted by Google) work like personal Gmail, with one advantage: if you administer the Workspace, your OAuth client can be an Internal app. Internal apps need no verification, show no warning, have no 100-account limit and do not expire sign-ins after 7 days. This page covers what is different for Workspace.
| Path | When |
|---|---|
| Internal OAuth client (recommended) | You are the Workspace admin, or the admin creates the client for you. |
| App password | Your admin allows 2-Step Verification and app passwords, and IMAP is on. |
| External OAuth client | The same Hub must also connect personal @gmail.com accounts with Google sign-in. See Personal Gmail and Workspace on one Hub. |
How Postern recognizes Workspace #
When you type you@example.com, the Hub looks up the domain's MX records. If they point to
Google (*.google.com or *.googlemail.com), the dialog calls the provider Google
Workspace (for example Connect Google Workspace) and shows: "This domain uses Google Workspace. Sign in with Google using your own OAuth client (as
an Internal app, no verification needed), or use an app password over IMAP if your
administrator allows it."
In Settings → Mailboxes the mailbox is labelled Gmail either way.
Option A: Internal OAuth client #
What you need #
- A Workspace admin account (or an admin who does steps 1 to 3 for you).
- Your Hub opened over
https://or onlocalhost, andPOSTERN_PUBLIC_URLset to that address. See Gmail: what you need. - Admin rights on the Hub.
1. Create the project inside your organization #
- Open https://console.cloud.google.com/ signed in with your Workspace account.
- In the project picker click New project. Under Organization (or Location) choose
your Workspace organization. Name it
Postern Huband click Create. - Open APIs & Services → Library, search for Gmail API and click Enable.
Check: the project picker shows Postern Hub under your organization, and Enabled APIs
& services lists Gmail API.
If it did not work: if your organization does not appear, your account is not allowed to create projects in it. Ask a Workspace admin for the Project Creator role.
2. Configure the consent screen as Internal #
- Open Google Auth Platform and click Get started if asked.
- Branding: app name
Postern Hub, support email and developer contact. - Audience: user type Internal. Internal apps have no Testing or In production status and need no verification.
- Data Access → Add or remove scopes: add
https://mail.google.com/under Manually add scopes, then Update and Save.
Check: Audience shows User type: Internal.
If it did not work: Internal is only offered for projects inside a Workspace organization. Go back to step 1.
3. Create the client and give it to your Hub #
Follow Gmail, step 3 and
Gmail, step 4 unchanged: a Web application client
with the redirect URI from Settings → Admin → Sign-in with Google and Microsoft, then the
client ID and secret in the admin panel or in POSTERN_GOOGLE_CLIENT_ID and
POSTERN_GOOGLE_CLIENT_SECRET.
Check: the admin panel shows Google (Gmail) as Set up or Set in the Hub's configuration.
If it did not work: see the Gmail troubleshooting.
4. Allow the app in the Admin console (if your organization restricts apps) #
If your organization limits which apps may access Google data, mark the client as trusted:
- Open the Google Admin console, https://admin.google.com/.
- Go to Security → Access and data control → API controls.
- Click Manage Third-Party App Access, then Add app → OAuth App Name Or Client ID.
- Search for your client ID, select it, choose who it applies to and set it to Trusted.
Google's help: https://support.google.com/a/answer/7281227.
Check: the app appears in the list with access Trusted.
If it did not work: changes in the Admin console can take a while to apply. Wait and try the sign-in again.
5. Add the mailbox #
Settings → Mailboxes → Add mailbox, pick Google, type your work address and click Sign in with Google. Internal apps show no "unverified" warning. Allow access and you are back in Postern.
Check: Settings → Mailboxes shows the address with Downloading mail, …% done.
If it did not work: see Troubleshooting.
Option B: App password #
1. Make sure your admin allows it #
In the Google Admin console:
- Security → Authentication → 2-step verification: Allow users to turn on 2-Step Verification must be on. Organizations that enforce security keys only may hide app passwords.
- Apps → Google Workspace → Gmail → End User Access: POP and IMAP access must be enabled for your users. Google's help: https://support.google.com/a/answer/105694.
Check: you can open https://myaccount.google.com/apppasswords with your work account.
If it did not work: "The setting you are looking for is not available for your account" means app passwords are not allowed for you. Use Option A.
2. Create the app password and add the mailbox #
Follow Gmail, Option A from step 1. In the dialog, pick Other and type your work address so you can choose Use a password (picking Google goes straight to Google sign-in when the Hub has it).
| Server | Port | Security | |
|---|---|---|---|
| Incoming (IMAP) | imap.gmail.com |
993 | TLS |
| Outgoing (SMTP) | smtp.gmail.com |
465 | TLS |
| Username | your full work address |
Check: the mailbox shows Gmail · Downloading mail, …% done.
If it did not work: The sign-in was rejected usually means IMAP access is off for your account or the app password is wrong.
What the Hub does with Workspace #
The same as with Gmail. One difference matters more in
organizations: with Google sign-in, the Hub uses an IMAP connection to imap.gmail.com to learn
about new mail quickly. If your admin turned IMAP off, sign-in still works and the Hub checks
for changes every 10 seconds through the Gmail API instead.
Aliases of your Workspace account (for example sales@example.com) can be added under
Settings → Identities & signatures. Gmail must also know them as Send mail as addresses,
or it sends with your main address.
Personal Gmail and Workspace on one Hub #
A Hub has one Google OAuth client. An Internal client only accepts accounts from its own
organization, so personal @gmail.com accounts cannot use it. Choose one of:
- the Internal client for Workspace accounts, and app passwords for personal Gmail, or
- an External, In production client for everyone. The 100-account limit and the "unverified app" warning then apply to the Workspace accounts too (see Gmail limits).
Troubleshooting #
| Symptom | Cause | Fix |
|---|---|---|
| Google shows Error 403: org_internal | You signed in with an account outside the client's organization. | Use an account of that organization, or an External client. |
| Google shows This app is blocked or admin_policy_enforced | Your organization restricts third-party apps. | Step 4: mark the client as Trusted. |
| App passwords page not available | App passwords are off for you, or 2-Step Verification is off. | Ask your admin, or use Option A. |
| The sign-in was rejected with an app password | IMAP is off for your account, or the password is wrong. | Check POP and IMAP access in the Admin console; create a new app password. |
| Mail arrives with a delay of a few seconds | IMAP is off, so the Hub checks every 10 seconds instead of waiting for IMAP's notice. | Nothing to do, or turn IMAP on for the account. |
More messages and their fixes are in the Gmail troubleshooting.