Skip to content

docs(cloud): Bring Your Own Mail Server guide for organization administrators - #1235

Merged
miacycle merged 2 commits into
masterfrom
fm/docs-org-smtp-guide
Sep 8, 2026
Merged

docs(cloud): Bring Your Own Mail Server guide for organization administrators#1235
miacycle merged 2 commits into
masterfrom
fm/docs-org-smtp-guide

Conversation

@miacycle

@miacycle miacycle commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Adds the user-facing guide for an Organization Administrator configuring their organization's own outbound mail server (BYO SMTP) in Layer5 Cloud.

Do not merge until both of these have shipped

  1. meshery-cloud v1.0.253 is published. The routing leg (mail actually leaving through the organization's own server) is on layer5io/meshery-cloud branch fm/mc-org-smtp-routing-leg and ships in v1.0.253. On the current release (v1.0.252) mail still leaves through the shared relay whatever the Email tab shows. Releases: https://github.com/layer5io/meshery-cloud/releases
  2. layer5io/meshery-cloud#6064 has shipped. https://github.com/layer5io/meshery-cloud/issues/6064 - on master plus the routing branch the Email tab has no working "Turn on" control. The fix is in flight separately and v1.0.253 waits on it.

This guide is written to the behaviour after both land, with no provisional markers in the text. The sections that depend on #6064's exact outcome, and that need a targeted re-verification before merge, are:

  • Turning the Server On - the "Turn on" button, its gating on a verified domain and a passed test, and the confirmation toast.
  • Reading the status - the four chip labels, and in particular how a configuration nobody has turned on yet reads ("Turned off" is the schema's word for it; the fix may choose a distinct presentation).
  • Fallback - the fallback line beneath the chip, which the tab renders per status.
  • Changing settings and Replacing the password - both say the server is turned off and must be turned on again, which depends on "Turn on" being reachable.

What is added

  • content/en/cloud/guides/organizations/org-management/bring-your-own-mail-server.md - the guide (new page, weight 3, beside Navigating Organizations). Covers what the feature does, prerequisites, the mail-server requirements the product enforces, configuring on the Email tab, proving the domain with the DNS TXT record and all three verification outcomes, what the connection test does and does not prove, turning the server on, reading delivery health, fallback and the "(via Layer5)" rewrite, changing settings, rotating the password, turning off and removing, a Google Workspace section with both supported paths, and a troubleshooting table keyed on the exact strings the tab shows.
  • content/en/cloud/guides/organizations/org-management/_index.md - adds the Email tab to the Edit Organization list and a short section at the anchor #configuring-your-own-mail-server, which is the URL every "Learn more" link on the Email tab hardcodes (MAIL_DOCS_URL in org-smtp-tab.tsx). The section points to the full guide.
  • content/en/cloud/guides/self-hosted/white-labeling/_index.md - one paragraph under Contact Information in Email Notifications pointing to the guide, since a fully branded email still arrives from a Layer5 address until a mail server is configured.
  • AGENTS.md - records that anchor dependency for future editors.

How every claim was verified

Read-only against meshery-cloud master (post #6063) and origin/fm/mc-org-smtp-routing-leg, the organization_smtp contract in meshery/schemas, and the Email tab source. In particular:

  • The test is a probe (organization_smtp_prober.go): connect, encryption, greeting, AUTH, QUIT. No MAIL FROM, no message. The guide says exactly that, and notes the tab's "Test message delivered." wording (layer5io/meshery-cloud#6065).
  • Domain proof: record name _meshery-mail.<domain>, value meshery-mail-verification=<token>, three outcomes from organization_smtp_domain_resolver.go. The custom-domain shortcut in the contract is never produced by the code, so it is not documented.
  • Routing decision table, fallback rewrite and drop behaviour from mail_route.go on the routing branch. No circuit exists (#6057), so "Failing" is documented as "the last attempt failed" and not as "dialling stopped".
  • Constraints: port allowlist and cleartext-credential refusal in mail_transport.go; address screen in internal_address_guard.go; the allowlist is applied at test time, not at save, and the guide says so.
  • Google Workspace: menu paths, option names, hostnames, ports, limits, app-password and DKIM statements taken from Google's current pages and linked. Google's pages do not state that smtp.gmail.com rewrites an unregistered From address; the guide says so explicitly and presents it as observed behaviour, with Google's "Send mail as" page linked for the remedy and the relay service recommended for a white-labelled sender because it has no such constraint.
  • Identity mail (account verification, password recovery) is deliberately not described, per the brief. The fallback section quotes the product's own confirmation dialog, which mentions it, without elaborating.

What still blocks

Found while verifying, filed in meshery-cloud:

  • #6064 - on master plus the routing branch, the Email tab has no working way to turn a relay on: the server serves the withdrawn verified/unverified/failing status vocabulary (#6054), the tab keys on the contract vocabulary, so the chip always reads "Not yet proven" and the "Turn on" button never renders. The routing leg reads metadata.enabled, which only that button sets. Until it is fixed, "Turning the Server On" and "Reading the status" in this guide describe the intended behaviour, not the staged one.
  • #6065 - tab copy that contradicts behaviour ("Test message delivered." for a probe; "Failing" claiming dialling stopped). The guide documents the truth either way.

Supersedes #1232

#1232 adds a shorter section on the same page. This PR supersedes it. The claims there that are false against the code, and where this text differs:

  • "Send a test message ... Once a message is delivered successfully, your Organization's email starts going out through your own server." The test is a probe that sends nothing (organization_smtp_prober.go), and routing starts when the server is turned on, not on a test. This guide says both.
  • "Failing: Repeated failures stopped your server being contacted." No circuit exists (#6057); every message is still attempted. This guide describes "Failing" as the last attempt having failed.
  • "If it matches your Organization's registered custom domain, it is verified immediately with no DNS record." The server never produces the custom-domain method; every domain needs the TXT record. Not documented here.
  • "Bringing your own mail server ... aligns with your own SPF and DMARC policy." CodeRabbit flagged this on docs(cloud): document configuring an organization's own mail server #1232 too; alignment depends on the domain's own DNS. This guide says that only in the Google Workspace section, where the domain's SPF and DKIM are Google's, and recommends confirming DKIM is on.
  • The sign-in-mail framing ("this carries your sign-in email too") is left out entirely per the brief; the fallback section quotes the product's own confirmation dialog without elaborating.

Salvaged from #1232: the white-labeling page cross-link, rewritten to state when custom delivery actually becomes active (verified domain, passed test, turned on, subject to fallback), which is the qualification CodeRabbit asked for there. The alert #1232 added to the self-hosted SMTP troubleshooting guide is not carried; that guide is for a different audience and the brief asks not to extend it.

Test plan

  • npm install then PATH="$PWD/node_modules/.bin:$PATH" hugo -d <outdir> builds cleanly.
  • Built org-management/index.html carries id="configuring-your-own-mail-server" and links to the new page.
  • Every in-page anchor the guide links to exists in the built HTML; no link renders with the bare /# prefix that relative links inside alert shortcodes produce.
  • No em dashes; all alerts, tables and the blockquote render.

Summary by CodeRabbit

  • Documentation
    • Added guidance for configuring an organization’s own mail server and domain for application email.
    • Documented setup requirements, DNS verification, connection testing, delivery health, fallback behavior, and ongoing management.
    • Added provider-specific guidance and troubleshooting information, including Google Workspace setup.
    • Clarified the distinction between email sender settings and footer contact links.
    • Documented heading-anchor considerations for links to cloud guides.

Adds a dedicated guide for an Organization Administrator configuring
their organization's own outbound mail server on the Email tab of Edit
Organization, and a short anchored section on the Organization
Management page at the anchor the product's "Learn more" links target.

Every product claim was verified against meshery-cloud master plus the
fm/mc-org-smtp-routing-leg branch and the organization_smtp contract in
meshery/schemas, and against Google's current help pages for the
Workspace paths. The connection test is described as the probe it is,
domain verification with all three failure outcomes, fallback with the
"(via Layer5)" rewrite, and a troubleshooting table keyed on the exact
strings the tab shows.

AGENTS.md records that the Cloud UI hardcodes the org-management anchor.

Signed-off-by: Mia Grenell <184569369+miacycle@users.noreply.github.com>
… the guide from white-labeling

The Gmail SMTP server paragraph now says plainly that Google's pages do
not state the From rewrite and presents it as what happens in practice,
with the relay service recommended for a white-labelled sender because
it has no such constraint.

The white-labeling page gains one paragraph pointing to the guide, since
a fully branded email still arrives from a Layer5 address until an
organization configures its own mail server. It states when custom
delivery actually becomes active.

Signed-off-by: Mia Grenell <184569369+miacycle@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 947b9d40-5fdd-4fd0-ad5b-5d6cbfeb8044

📥 Commits

Reviewing files that changed from the base of the PR and between 0bbc5a2 and 34f9bd4.

📒 Files selected for processing (4)
  • AGENTS.md
  • content/en/cloud/guides/organizations/org-management/_index.md
  • content/en/cloud/guides/organizations/org-management/bring-your-own-mail-server.md
  • content/en/cloud/guides/self-hosted/white-labeling/_index.md

📝 Walkthrough

Walkthrough

The documentation adds a Bring Your Own Mail Server guide. It covers SMTP configuration, DNS verification, connection testing, delivery health, fallback behavior, provider-specific setup, troubleshooting, and related organization-management references.

Changes

Custom Mail Server Documentation

Layer / File(s) Summary
Feature overview and navigation
AGENTS.md, content/en/cloud/guides/organizations/org-management/_index.md, content/en/cloud/guides/organizations/org-management/bring-your-own-mail-server.md
The organization-management documentation introduces the Email option, access requirements, custom SMTP behavior, and the new guide.
Configuration and delivery lifecycle
content/en/cloud/guides/organizations/org-management/bring-your-own-mail-server.md
The guide documents SMTP requirements, form fields, DNS TXT verification, connection testing, enablement, delivery health, fallback behavior, and configuration management.
Provider guidance and related documentation
content/en/cloud/guides/organizations/org-management/bring-your-own-mail-server.md, content/en/cloud/guides/self-hosted/white-labeling/_index.md
The guide adds Google Workspace paths, troubleshooting guidance, related links, and custom sender-address guidance for white-labeling.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: leecalcote

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fm/docs-org-smtp-guide

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview deployment: https://docs.layer5.io/pr-preview/pr-1235/

Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment here

@miacycle
miacycle marked this pull request as ready for review September 8, 2026 15:44
Copilot AI lite review requested due to automatic review settings September 8, 2026 15:44
@miacycle
miacycle merged commit 38a0160 into master Sep 8, 2026
5 of 6 checks passed
@miacycle
miacycle deleted the fm/docs-org-smtp-guide branch September 8, 2026 15:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are documentation-only and coherent, with only minor fixable nits identified (spelling and a self-link that can be made more robust).

Pull request overview

Adds a new Layer5 Cloud documentation guide for Organization Administrators to configure a per-organization outbound SMTP server (“Bring Your Own Mail Server”), and wires it into existing Organization Management and white-labeling docs (plus a note in AGENTS.md about an externally hardcoded anchor).

Changes:

  • Added a new BYO SMTP guide page covering setup, domain verification, connection testing, status/health interpretation, fallback behavior, Google Workspace options, and troubleshooting.
  • Updated the Organization Management guide to mention the Email tab and added a short anchored section (#configuring-your-own-mail-server) that points to the full guide.
  • Added a cross-link from the white-labeling guide and recorded the anchor dependency in AGENTS.md.
File summaries
File Description
content/en/cloud/guides/organizations/org-management/bring-your-own-mail-server.md New end-to-end BYO SMTP guide for org admins (setup, verification, testing, operations, troubleshooting).
content/en/cloud/guides/organizations/org-management/_index.md Adds Email tab to the Edit Organization overview and introduces the anchored entrypoint section that links to the new guide.
content/en/cloud/guides/self-hosted/white-labeling/_index.md Cross-links white-labeling email branding to the BYO SMTP guide and clarifies when mail originates from the org’s domain.
AGENTS.md Documents the external dependency on the #configuring-your-own-mail-server anchor.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

- **SMTP Host**: your server's hostname.
- **Port (587 for STARTTLS, 465 for TLS)**: the submission port. The port and the encryption mode must agree.
- **Encryption**: `starttls`, `tls` or `none`.
- **Authentication (None only for a relay that authorises by IP)**: `plain`, `cram-md5` or `none`. Any method other than `none` requires both a username and a password.
Understand exactly what the test does. It opens a connection to your server, negotiates the encryption mode you chose, greets the server, presents your username and password, and hangs up. It verifies that the server accepts the connection and the credentials. **It does not deliver a message**, even though the field asks for an address, and no message arrives anywhere. On success the tab reports "Test message delivered." Read that as "the connection and credentials were accepted": the API's own result for the same outcome is "The mail server accepted the connection and the credentials. No test message was sent."

{{< alert title="What a passing test does not prove" type="warning" >}}
Because the test hangs up before naming a sender or a recipient, it cannot detect a server that accepts your credentials but refuses to send as your from address. Google's Gmail SMTP server is the common case: in practice it accepts the login and then sends from the signed-in account's address instead. A passing test followed by mail arriving from the wrong address is that situation, and the fix is on the provider's side. See [Google Workspace](/cloud/guides/organizations/org-management/bring-your-own-mail-server/#google-workspace).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants