Repository navigation
mail 4/4: email accounts UI, domain mail, mail-host, settings, docs - #505
Conversation
Split 4/4 of #495. Adds the manager UI and documentation: - Email accounts page with suppressions management - Domain mail enablement section with Check DNS - Agents mail-host badge and claim action - Mail settings on the settings page - Admin and user docs for the email service Merge after the manager backend PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved defects prevent administrators from managing other users’ suppressions and can discard unsaved domain edits, alongside error-handling, clipboard feedback, accessibility, and operator-guidance issues.
7 open issues
Claim release does not prevent mail service reacquisition · New Mail refresh resets unsaved domain form edits · New DNS request failure leaves mail controls stuck loading · New DNS gate badges lack accessible pass/fail text · New Admin account view cannot access other users' accounts · New Clipboard failures incorrectly show copy success · New Domain fetch failure leaves account creation silently disabled · New
What changed in this PR
Adds the manager UI and documentation for the email service, completing the fourth part of the #495 split for #67. The changes connect users and administrators to the mail backend introduced in #502.
Changes:
- Adds email account management, one-time credentials, password rotation, and suppression management.
- Adds domain DNS checks and mail enablement, agent mail-host controls, and mail settings.
- Documents email usage, deployment, DNS configuration, and backups.
| File | Description |
|---|---|
mie-opensource-landing/zensical.toml |
Adds email documentation to navigation. |
mie-opensource-landing/docs/users/email-accounts.md |
Documents accounts, client connections, and suppressions. |
mie-opensource-landing/docs/admins/installation.md |
Adds mail port-forwarding and PTR requirements. |
mie-opensource-landing/docs/admins/email.md |
Documents mail hosting, settings, deployment, and backups. |
mie-opensource-landing/docs/admins/deploying-agents.md |
Documents mail service-group configuration. |
mie-opensource-landing/docs/admins/core-concepts/external-domains.md |
Adds domain mail setup and DNS verification guidance. |
create-a-container/client/src/pages/settings/SettingsPage.tsx |
Adds mail settings and PTR hostname suggestions. |
create-a-container/client/src/pages/mail-accounts/SuppressionsModal.tsx |
Lists suppressions with administrator removal controls. |
create-a-container/client/src/pages/mail-accounts/NewMailAccountForm.tsx |
Adds account creation on eligible domains. |
create-a-container/client/src/pages/mail-accounts/MailCredentialsAlert.tsx |
Displays one-time passwords and connection settings. |
create-a-container/client/src/pages/mail-accounts/MailAccountsListPage.tsx |
Adds account listing and management actions. |
create-a-container/client/src/pages/external-domains/ExternalDomainFormPage.tsx |
Embeds mail controls in domain editing. |
create-a-container/client/src/pages/external-domains/DomainMailSection.tsx |
Adds DNS records, verification results, and enablement controls. |
create-a-container/client/src/pages/agents/MailHostBadge.tsx |
Displays mail-host and standby status. |
create-a-container/client/src/pages/agents/AgentsListPage.tsx |
Adds mail status and agent action columns. |
create-a-container/client/src/pages/agents/AgentRowActions.tsx |
Adds claim-release and API-key-pin controls. |
create-a-container/client/src/lib/types.ts |
Defines mail API types and extends existing models. |
create-a-container/client/src/lib/queries.ts |
Adds mail queries and cache keys. |
create-a-container/client/src/app/Sidebar.tsx |
Adds the Email navigation entry. |
create-a-container/client/src/app/router.tsx |
Registers the email accounts route. |
Review effort: Balanced
| className="cursor-pointer" | ||
| leftIcon={<MailMinus className="size-4" />} | ||
| onClick={() => { | ||
| if (confirm(`Release the mail-host claim held by ${agent.hostname}? Its mail services stop; mailboxes stay in place.`)) { |
| qc.invalidateQueries({ queryKey: keys.mailDns(domain.id) }); | ||
| qc.invalidateQueries({ queryKey: keys.externalDomain(domain.id) }); | ||
| qc.invalidateQueries({ queryKey: keys.externalDomains() }); |
| toast.success('Copied to clipboard'); | ||
| }; | ||
|
|
||
| if (isLoading || !data) { |
| <Badge key={key} variant={check[key]?.pass ? 'success' : 'danger'}> | ||
| {label} | ||
| </Badge> |
| const { data, isLoading, error } = useQuery({ | ||
| queryKey: keys.mailAccounts(), | ||
| queryFn: queries.listMailAccounts, | ||
| }); |
| const copy = (value: string) => { | ||
| navigator.clipboard.writeText(value).catch(() => undefined); | ||
| toast.success('Copied to clipboard'); | ||
| }; |
| onCancel: () => void; | ||
| }) { | ||
| const qc = useQueryClient(); | ||
| const { data: domains } = useQuery({ queryKey: keys.mailDomains(), queryFn: queries.listMailDomains }); |
- Mail-host endpoints moved under agents: GET/DELETE /api/v1/agents/mail-host,
GET /api/v1/agents/mail-host/ptr
- Enable/disable mail is now PATCH /external-domains/:id { mailEnabled }
- One-time password warning copy is owned by the UI, not the API response
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Active defects can silently discard unsaved domain edits, prevent administrators from removing other users’ suppressions, leave mail setup blocked after request failures, and falsely report successful copies of one-time passwords and DNS records.
7 open issues
Domain fetch failure leaves account creation silently disabled Clipboard failures incorrectly show copy success Admin account view cannot access other users' accounts DNS gate badges lack accessible pass/fail text DNS request failure leaves mail controls stuck loading Mail refresh resets unsaved domain form edits Claim release does not prevent mail service reacquisition
Review effort: Balanced
runleveldev
left a comment
There was a problem hiding this comment.
I'm not too concerned about the UI as long as the API is correct (pr 1, already reviewed). Approved.

Part 4 of 4 splitting #495 (feature issue: #67).
Adds the manager UI and documentation:
Merge order: after #502 (manager backend). Together with #503 and #504, this completes the split of #495, which can then be closed.