{{/* Wide so the .split pairs fill the column rather than the 48rem reading measure (same pattern as Status). */}} {{define "wide"}}wide{{end}} {{/* The Host/name ‖ Type field-pair repeats for every DNS record this page shows (DKIM, SPF, DMARC, report authorization) in both the status card and the publishable-record cards below it — only the host and whether it carries a Copy button change. Two variants rather than one templated Copy flag: the DNS status card never offers Copy (its host is derived, not something to paste), the record cards always do. */}} {{define "host_type"}}
{{.}}
TXT
{{end}} {{define "host_type_copy"}}
{{.}}
TXT
{{end}} {{/* Value partials pair with the two host_type variants above: field_values is the DNS status card's raw record dump (no Copy — those values are for comparison, not for pasting), field_value is the single publishable value on the record cards below (always has Copy). Callers still guard the empty case, since "no records yet" and "one blank record" read differently. */}} {{define "field_values"}} {{range .}}{{.}} {{end}} {{end}} {{define "field_value"}}
{{.}}
{{end}} {{define "content"}}

{{.Domain.Name}}

{{template "back_link" (back "/domains" "All domains")}} {{if .Flash}}
{{.Flash}}
{{end}} {{if .RateLimitErr}}
{{.RateLimitErr}}
{{end}} {{if .NewCred}}

New application password

Shown once only and not stored. Copy it now — if it is lost, regenerate a new one.

{{.NewCred.Login}}
{{.NewCred.Password}}
{{end}} {{/* Two rows of two checks (.check-cols). */}}

DNS status {{.DNS.Overall}}

Cached a few minutes — use Re-check after publishing.

{{template "host_type" .Record.Name}} {{if .DNS.DKIM.Records}}{{template "field_values" .DNS.DKIM.Records}}{{end}} {{if ne .DNS.DKIM.Status "ok"}}

{{.DNS.DKIM.Detail}}

{{end}}
{{template "host_type" .Domain.Name}} {{if .DNS.SPF.Records}}{{template "field_values" .DNS.SPF.Records}}{{end}} {{if ne .DNS.SPF.Status "ok"}}

{{.DNS.SPF.Detail}}

{{end}}

Shallow check: literal address only, no include: / redirect=.

{{template "host_type" .DMARCName}} {{if .DNS.DMARC.Records}}{{template "field_values" .DNS.DMARC.Records}}{{end}} {{if ne .DNS.DMARC.Status "ok"}}

{{.DNS.DMARC.Detail}}

{{else}}

{{.DNS.DMARC.Detail}}

{{end}}
{{if .DNS.DMARCReportAuth.Status}} {{template "host_type" .ReportAuthName}} {{if .DNS.DMARCReportAuth.Records}}{{template "field_values" .DNS.DMARCReportAuth.Records}}{{end}}

{{.DNS.DMARCReportAuth.Detail}}

{{else}}

Not required (no external rua=).

{{end}}

DKIM and SPF records

DKIM

{{template "host_type_copy" .Record.Name}} {{template "field_value" .Record.Value}}

Not a secret. Signed with selector {{.Domain.DKIMSelector}}.

SPF

{{template "host_type_copy" .Domain.Name}} {{template "field_value" .SPFExample}}

Merge into an existing SPF if the domain already has one — do not publish a second record.

DMARC record

{{template "host_type_copy" .DMARCName}}
{{.DMARCExample}}
{{if .SameDomainRUA}}

The report address is on this sending domain. SelfPost does not receive inbound mail — use a mailbox on another domain.

{{end}} {{if .NeedsReportAuth}}

Report authorization

{{template "host_type_copy" .ReportAuthName}} {{template "field_value" .ReportAuthValue}} {{end}}

p=none does not affect delivery. Tighten to p=quarantine then p=reject once reports look clean. Report address is set under Domain settings.

Connection settings

Same for every domain. Authenticate with an application login from below.

{{.Hostname}}
465 — SSL/TLS (implicit){{if .SubmissionEnabled}} 587 — STARTTLS (submission){{end}}

Auth required on every port. The password is shown once at create or regenerate.

{{/* Create form beside connection settings, mirroring "Add a sending domain" above the domains list. */}}

Add an application

{{if .Error}}

{{.Error}}

{{end}}

Password shown once. Login unique across domains; letters, digits, '.', '-' and '_'.

Applications

SASL logins for this domain — wildcard (*@domain) or a fixed address list.

{{if .Apps}} {{else}}

No applications yet. Add one above to get started.

{{end}}

Domain settings

DMARC reports

Default comes from Settings; override per domain here.

Level-2 rate limit {{if .DomainHasRL}}active{{else}}inactive{{end}}

Level 1 backstop: {{.L1Messages}} messages / {{.L1Window}}s — Settings.

Applies to every client IP on this domain. Leave the message limit empty to use level 1 only.

{{if .DomainHasRL}}
{{end}}

Export domain

Secret file — transfer securely, or encrypt below as .spde.

{{if .ExportErr}}

{{.ExportErr}}

{{end}}
{{template "encryptfields" .}}

Danger zone

Deletes the DKIM key and every application on this domain.

Delete domain
{{end}}