{{define "content"}}

{{.Domain.Name}}

← All domains {{if .Flash}}
{{.Flash}}
{{end}} {{if .RateLimitErr}}
{{.RateLimitErr}}
{{end}} {{if .NewCred}}

New application password

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

{{.NewCred.Login}}
{{.NewCred.Password}}
{{end}}

DKIM DNS record

Publish this TXT record in the DNS for {{.Domain.Name}}. It is not a secret and can be viewed at any time.

{{.Record.Name}}
TXT
{{.Record.Value}}

Mail is signed with selector {{.Domain.DKIMSelector}}.

SPF and DMARC records

These two are not generated the way the DKIM record above is — they are policy, and the domain may already publish an SPF record for other senders. What follows is what this server expects to see and what the checks below look for. Publish both as TXT records.

{{.Domain.Name}}
{{.SPFExample}}

A domain may have only one SPF record. If it already has one, do not add a second — add this server's mechanism to the existing record instead, before its all term. -all at the end means nothing else may send as the domain; use ~all while other senders are still being sorted out.

{{.DMARCName}}
{{.DMARCExample}}

Point rua= at a mailbox that is actually read — the aggregate reports are how you find out who else sends as the domain. p=none changes nothing about delivery, so it is safe to publish straight away; tighten it to p=quarantine and then p=reject once the reports come back clean.

DNS status {{.DNS.Overall}}

What DNS publishes for {{.Domain.Name}} right now, checked against the key this server signs with. Results are cached for a few minutes — after publishing a record, use Re-check.

{{.DNS.DKIM.Detail}}

{{if .DNS.DKIM.Records}}{{range .DNS.DKIM.Records}}{{.}} {{end}}{{end}}

{{.DNS.SPF.Detail}}

{{if .DNS.SPF.Records}}{{range .DNS.SPF.Records}}{{.}} {{end}}{{end}}

The SPF check is deliberately shallow: it looks for a mechanism that literally covers this server's address and does not follow include: or redirect=, so a record that authorises the server through an include is reported as “cannot tell”, not as a failure.

{{.DNS.DMARC.Detail}}

{{if .DNS.DMARC.Records}}{{range .DNS.DMARC.Records}}{{.}} {{end}}{{end}}

Sending server settings

Point the mail client or script at these settings and authenticate with an application login and password from the Applications section below. They are the same for every domain on this server.

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

Authentication is required on every port. The username is the application's login (see the table below) and the password is the one shown once when that application was created or its password regenerated — if it was lost, generate a new one.

{{/* Create form above the list, the same order the domains page uses for "Add a sending domain" above "Domains". */}}

Add an application

{{if .Error}}

{{.Error}}

{{end}}

A strong password is generated and shown once. The login must be unique across all domains and may contain letters, digits, '.', '-' and '_'.

Applications

Each application is a SASL login/password an app or script uses to send mail as this domain. A login may send from any address of the domain (wildcard) or only from a fixed list of addresses.

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

No applications yet. Add one above to get started.

{{end}}

Sending rate limit (domain)

Optional level-2 limit (spec 7.4): cap how many messages this domain may send from its expected client IP(s) within a time window, summed across all its applications. It counts messages — one message to many recipients counts once. Leave the IP list empty to disable it and rely only on the global level-1 limit. Applications that send from changing IPs should be left unbound here.

Status: {{if .DomainHasRL}}active{{else}}inactive (level-1 only){{end}}.

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

Export domain

Download this domain to move it to another SelfPost instance: its DKIM key, selector and every application with its working password. On import the DNS record stays the same, so no DNS change is needed.

The export file is a secret — it contains the private DKIM key and application passwords. Transfer it securely and delete it after the import, or encrypt it below and move a .spde file (SelfPost domain export) instead; the import form asks for the password.

{{if .ExportErr}}

{{.ExportErr}}

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

Danger zone

Deleting this domain also deletes its DKIM key and every application bound to it.

Delete domain
{{end}} {{/* The domain page's section index, shown in the navigation column (see the "sections" block in layout.html). This is the panel's longest page — the DNS records to publish, the checks on them, the applications and two rate limits — and setting a domain up means going back and forth between them. The freshly generated password is only listed while it is on the page: it is the one card that is not always there, and the one nothing should scroll away from silently. */}} {{define "sections"}}

On this page

{{if .NewCred}}New application password{{end}} DKIM DNS record SPF and DMARC records DNS status Sending server settings Add an application Applications Sending rate limit Export domain Danger zone
{{end}}