Gmail Setup
Gmail OAuth is the recommended Gmail setup path. Herald opens a browser authorization flow, validates the selected Google access, then saves a Gmail API mail source so sync, body reads, drafts, mailbox mutations, and send use Google’s API instead of IMAP.
Recommended: Gmail OAuth
Section titled “Recommended: Gmail OAuth”-
Install with Homebrew:
Terminal window brew tap herald-email/heraldbrew install herald -
Run
herald. -
Choose
Gmail OAuthin the setup wizard. -
Complete browser authorization, then return to Herald.
-
Wait for Herald to validate Gmail API access before it continues to optional preferences.
-
Finish the remaining setup steps to save the validated config.
Homebrew and release binaries include the desktop OAuth defaults needed by the wizard.
OAuth stores refresh token data in the Herald config only after validation succeeds and you finish setup so it can refresh access tokens later. Treat the config file like a credential.
If you keep Google Calendar enabled during setup, Herald also creates a Google Calendar source from the same OAuth flow. You can add or remove calendar sources later from Settings > Accounts.
OAuth desktop client secrets are convenience defaults, not a protection boundary. Once a secret is embedded in a distributed binary, users can extract it, so Google account consent and token storage remain the real security controls.
Fallback: Gmail with an App Password
Section titled “Fallback: Gmail with an App Password”Use this path for personal Gmail accounts with 2-Step Verification when you do not want OAuth or cannot use the Gmail API path.
- Make sure 2-Step Verification is enabled for your Google account.
- Create a Google App Password for Herald.
- Run
heraldor./bin/herald. - Choose
Gmail (IMAP + App Password)in the setup wizard. - Enter your Gmail address and the App Password.
- Let Herald validate Gmail IMAP and SMTP before continuing to optional preferences.
The wizard fills:
vendor: gmailserver: host: "imap.gmail.com" port: 993smtp: host: "smtp.gmail.com" port: 587For personal Gmail, IMAP is generally already enabled. Google Workspace accounts may require an admin to allow IMAP or may require OAuth instead of password-based IMAP.
Source builds with OAuth
Section titled “Source builds with OAuth”Plain make build embeds OAuth defaults when both HERALD_GOOGLE_CLIENT_ID and HERALD_GOOGLE_CLIENT_SECRET are available in the environment or .herald-dev.env; otherwise it creates a normal development binary that still builds successfully. If you run make build && ./bin/herald without build-time defaults or exported runtime credentials, the OAuth wizard can fail with Google OAuth credentials are not configured.
For a one-off local run, export credentials in the same shell that launches Herald:
export HERALD_GOOGLE_CLIENT_ID="your-client-id.apps.googleusercontent.com"export HERALD_GOOGLE_CLIENT_SECRET="your-client-secret"./bin/herald -config ~/.herald/conf.yamlFor a local development binary with OAuth defaults built in:
cp .herald-dev.env.example .herald-dev.env$EDITOR .herald-dev.envmake build./bin/herald -config ~/.herald/conf.yamlFor release-style local builds, custom env file paths, and troubleshooting details, see Local OAuth Builds.