> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.postnuvia.com/llms.txt.

# Google Workspace

> Configure your Google Workspace domain to route emails for unrecognized addresses to PostNuvia.

## Shared domains

Custom domains help establish trust with your recipients. We recommend configuring a dedicated domain or subdomain with PostNuvia. However, sometimes you need to use your primary domain, which may already be managed by another email provider.

It is possible to use the same domain with both Google Workspace and PostNuvia. This guide walks you through that configuration.

> **Note**
>
> If your agents only need to send from the domain, register it with `"inbound_enabled": false` instead. A send-only domain needs no MX change and no routing rule: Google Workspace keeps receiving all of the domain's mail.

## Register the shared domain

Register your domain with [`POST /v0/domains`](/api-reference/domains/create), setting `allow_conflicting_provider` to `true`:

```bash
curl --request POST 'https://api.postnuvia.com/v0/domains' \
  --header "Authorization: Bearer $POSTNUVIA_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"domain": "example.com", "allow_conflicting_provider": true}'
```

Replace `example.com` with your domain and set `POSTNUVIA_API_KEY` to your API key. Use the API base URL for your account's region.

The flag defaults to `false`. Without it, registration returns `422` when Google Workspace MX records are detected, even if you have already configured Google's routing rule or validated TLS for the PostNuvia host. Setting it to `true` allows registration alongside your existing provider; it does not configure DNS or Google Workspace routing.

## DNS records

Add the DNS records returned by registration manually, preserving your existing Google Workspace MX records. Publish the PostNuvia DKIM and `mail` subdomain records, and preserve your existing DMARC policy if one is already configured.

Google should remain the preferred mail server for your domain: Google's MX record is typically priority `1`, while PostNuvia's receiving MX record is priority `10` (lower numbers take higher priority). MX priority alone does not route unrecognized addresses to PostNuvia; configure the Google Workspace routing rule below.

For a US-region domain named `example.com`, the MX records look like this. Use the exact names and regional targets returned in your domain's `records`:

| DNS name           | Priority | Mail server                             |
| ------------------ | -------- | --------------------------------------- |
| `example.com`      | `1`      | `smtp.google.com`                       |
| `example.com`      | `10`     | `inbound-smtp.us-east-1.amazonaws.com`  |
| `mail.example.com` | `10`     | `feedback-smtp.us-east-1.amazonses.com` |

If you already use Google's legacy MX records, keep those records and their priorities, with Google preferred over PostNuvia.

> **Warning**
>
> `feedback-smtp` handles bounces for the custom MAIL FROM subdomain (`mail.example.com`). It belongs on that subdomain, not at the root domain or in Google's mail host configuration. Incoming messages use `inbound-smtp`.

## Google Workspace configuration

Next, navigate to the [Google Workspace admin console](https://admin.google.com). You will configure Gmail to route emails for unrecognized addresses to PostNuvia.

In the left menu, navigate to **Apps → Google Workspace → Gmail**.

![Google Workspace admin menu](/_fern-img/e7ba0071e16d690a5128ada4472707b2d0e731f01d33750af32f02bb9b88fa2c.webp)![Gmail settings page](/_fern-img/09ad8da811489ed9e7383263698097958dc88527e250116fe2b53b5735be9fb2.webp)

### Configure host

First, add PostNuvia as a mail host. This tells Gmail which server to route emails to.

In the **Hosts** section, click **Add Route**.

![Hosts settings](/_fern-img/7625d270b17d12c2a3918dc33da8d3096adc144cb9c4144b0702e281841d7c5d.webp)

Configure the route with the following settings:

1. Set the name to **PostNuvia**
2. Select **Single host**
3. Enter `inbound-smtp.us-east-1.amazonaws.com` for the host name
4. Enter `25` for the port
5. Check the recommended options
6. Click **Save**

![Route configuration](/_fern-img/0a9177b577d56f193d2ac27f0a36576a360b14f61808ba44ded528ae2dd79f02.webp)

### Configure routing rule

Navigate back to the **Gmail** settings page and scroll to the **Routing** section at the bottom.

![Gmail settings routing section](/_fern-img/cdd9027199967a00a17ef71f914623d64241ea0f2577260c1974fa5cf3de6912.webp)

In the routing settings, click **Add another rule**.

Check **Inbound** and **Internal - Receiving**, then set the action to **Modify message**.

![Routing rule scope](/_fern-img/85ac9bf77fa6750430c8b2b8ce37c0a51a85cc6260e223ff46ac7faa371605b2.webp)

Scroll down and check **All inactive and unrecognized accounts**. Check **Change route** and select the **PostNuvia** route from the dropdown.

![Routing rule configuration](/_fern-img/307d42c9b04fbe9ecb30aec4aad652418328f8eef14055ddf5ae22590182b82c.webp)

Click **Save** to apply the rule. Emails sent to addresses that don't belong to existing Gmail accounts will now be routed to PostNuvia.

## Inboxes and catch-all behavior

Use an PostNuvia inbox address that is not already used by a Google Workspace user, alias, or group. With this routing rule, Google handles recognized addresses, so creating the same address in PostNuvia will not cause messages to be forwarded there.

Google's routing rule forwards unrecognized addresses to PostNuvia. By default, each destination address must already have an PostNuvia inbox; the rule does not create inboxes or collect unknown recipients into a single catch-all inbox. Create the inboxes you intend to receive mail at before using those addresses.