Mail → Domains

A mail domain is a domain for which Postfix accepts incoming mail (johnsmith.test). This page lists them, adds and removes them, and for each one shows how…

A mail domain is a domain for which Postfix accepts incoming mail (johnsmith.test). This page lists them, adds and removes them, and for each one shows how the servers that receive your mail see it.

The list

The bar shows «Mail domains» and these icons:

Icon (description) What it does
«Settings» opens System → Settings → Mail server
«Reload» reads the list again
«Add domain» opens the form for a new domain

The search filters by name. Each row shows the domain and, on the right, a small label «Has a signature template» if the domain has one (see below). With a domain open the title becomes «Mail domains / johnsmith.test»; with the form for a new domain, «Mail domains / Add domain».

If the mail server is not configured, the page says «Mail server is not configured yet. Complete the mail setup first.» With no domain selected, there is a short introduction on the right («Manage the domains the mail server is responsible for and check that the mail sent for each one is authentic to the servers receiving it.»).

The list of mail domainsThe list of mail domains
The list of mail domains

Adding a domain

«Add domain» opens the «Add mail domain» form:

Field Meaning Typical value
«Domain» full domain name (FQDN), in lowercase johnsmith.example

Press «Add». Postfix will accept incoming mail for the domain after the SMTP service restarts; the operation takes a few seconds. If Postfix does not restart, the console says so («Domain added, but the SMTP service did not restart: mail for the domain is not accepted yet. Check the mail server’s status.»); if Postfix is not running, the change is not saved («The SMTP service is not running: the change was not saved. Start it from Services and try again.»). Submitting the same domain twice does not create two domains.

Adding a domain:

  • lets Postfix accept mail for @domain;
  • publishes the automatic configuration of mail programs for that domain (autoconfig and autodiscover);
  • routes to the server the DMARC reports sent to dmarc@domain (see “DMARC”).

It does not create mailboxes or addresses, and it does not touch the public DNS: you publish the MX, SPF, DKIM and DMARC records at the domain’s provider.

Removing a domain

With the domain selected, the «Remove» icon in the detail bar asks for confirmation: «Remove the domain johnsmith.example? The server stops accepting its mail. Its client autoconfiguration, its DMARC report routing and its signature template are removed too, and DKIM signing stops (the key is kept, in case the domain comes back). Users, mailboxes and addresses are not touched.»

A domain’s name cannot be changed («Mail domains are immutable. To rename one, remove it and add the new name.»).

Warning Removing the domain from the server does not delete the addresses that use it. Users keep the address name@domain in Active Directory, but mail for that domain is no longer accepted and mail programs lose their automatic configuration. Remove it only when nobody uses it any more.

A domain’s detail

With the domain selected, the detail bar has three icons:

Icon (description) What it does
«Signature template» opens the signature template window. Appears only with the Groupware module
«Check again» repeats the sender authentication check
«Remove» removes the domain from the server

The detail shows the domain name and, below it, the «Sender authentication» panel.

The signature template

This is the signature that the users page proposes for new mail identities with an address in that domain: the fields become the user’s data. The «Signature template — johnsmith.test» window has a rich-text editor with:

  • the «Insert field…» button, which adds display name, first name, last name, title, email, phone, company, organization, department, office, address, postal code, city, province, country;
  • «Default», which replaces the text with the default template;
  • «Import from…», which copies the template of another domain.

«Default» and «Import from…» replace the text in the editor: you save only with «Save». Left empty, the domain stays without a template. A template does not change identities already created.

Sender authentication

The panel checks, with queries to the public DNS, what the receiving servers find for the domain, and proposes the records to publish. Atlas does not modify the public DNS: you enter the records at the domain’s provider. The check takes a few seconds and is redone every time you open a domain or press «Check again».

At the top there is a strip of four boxes, SPF, DKIM, DMARC, PTR, each with an outcome:

Outcome Meaning
«Valid» all in order
«Warning» it works, but something needs fixing
«Problem» an error to correct
«Cannot be checked» the DNS did not answer
«N/A» the check does not apply (for example with a relay)

Below, «Checked at <time>» and the sections. If the domain does not exist on the internet, «Domain not found on the internet» appears. If the check fails: «The check could not be completed.»

Each record to publish is shown with «Name», «Type» and «Value» and two buttons, «Copy the name» and «Copy the value»; a long value can be viewed «split into 255-character strings» (as many DNS panels require) or «as a single value».

The Sender authentication panelThe Sender authentication panel
The Sender authentication panel

SPF

SPF says which servers may send mail for the domain. The section shows:

  • «Outbound»: how mail leaves, «direct, from <ip>» or through a relay (see “SMTP relay”);
  • «Relay addresses», if any;
  • «Result»: whether the record authorizes the outgoing address («Authorised», «Not authorised (fail)», «Not authorised (softfail)», «Not stated (neutral)», «No record», «Invalid record», «Temporary error»);
  • the published SPF records («Published record» / «Published records», or «No record published»);
  • the reports, for example «The domain has no SPF record: many servers refuse its mail or mark it as spam.», «There are 2 SPF records: receiving servers treat that as an error. Keep a single record.» (one record is correct), «The record ends with +all, which does not protect the domain: use ~all or -all.», «The record needs more than 10 DNS lookups: receivers treat it as invalid. Reduce the includes.»;
  • «Record to publish», when needed.

With an outbound relay, SPF is the relay provider’s concern: the console says so («Mail leaves through <relay>: these checks are the relay provider’s concern.») and the mechanism to add (usually an include:) is given by the provider.

DKIM

DKIM signs outgoing mail with a private key that stays on the server; the public part lives in the domain’s DNS.

The section shows «Signature» («Enabled» / «Off»), the «Selector», «Created on», the state of the DNS record («DNS record»: «Published», «Not found», «Holds another key», «Key revoked», «Cannot be checked») and the record to publish. The actions are the buttons in the section header:

Button When it is there What it does
«Generate» the domain has no key yet creates the key: publish the record shown
«Enable» signing is off turns signing on. It is disabled until the DNS contains the key (the description says «Publish the record first: signing turns on only once DNS carries this key.»)
«Disable» signing is on turns signing off, asks for confirmation; the key stays saved
«Regenerate» there is a key and no rotation creates a new key, pending; the current one keeps signing
«Complete rotation» a rotation is in progress switches to the new key. Disabled until the new key’s record is in the DNS
«Cancel rotation» a rotation is in progress deletes the new key, asks for confirmation

The «New key waiting to be published» box appears during a rotation with its record. After completion the «Retired keys» appear: for each one the console says whether to leave the old record in the DNS a while longer («keep it published until <date>, it still verifies mail already sent») or whether you can remove it.

When the key is published and correct, the record can be reviewed with «Show the published record».

For the technician DKIM signing is done by rspamd (the Antispam module must be installed: otherwise the console answers «The spam filter (rspamd) is not installed.»). A DKIM change is applied to rspamd and, if applying fails, rolled back («The configuration could not be applied to rspamd: the change was rolled back.»). The keys stay on the server even if you remove the domain.

DMARC

DMARC tells the receiving servers what to do with mail that fails SPF and DKIM, and where to send reports. The section shows:

  • the policy ladder: «No policy», «Monitoring (p=none)», «Quarantine», «Reject», with «Current level» and the «Next step» (or «Not yet», when the conditions are missing);
  • the published DMARC records, or «Inherited from <domain>» if the domain has no record of its own and the parent domain’s applies;
  • the reports («The domain has no DMARC record: publish one in monitoring mode.», «There are 2 DMARC records: receivers ignore them all. Keep a single record.», «The policy applies to 50% of messages only.», «The policy is reject but the domain does not sign with DKIM: forwarded mail, Sieve rules included, will fail DMARC.»…);
  • «Record to publish», with the rua reports address (dmarc@domain);
  • if the policy cannot go up yet: «The move to p=<policy> will be proposed when:» with the conditions: DKIM signing is on and the record is published; SPF authorizes the address mail leaves from; there are at least 14 days of verified reports; the sources that fail DMARC are sorted out or marked as unauthorized.

The console proposes the next step only when the conditions are met: you go up from monitoring to quarantine to reject, never all at once.

The address dmarc@domain must exist as a mailbox or alias to receive reports; for the server’s domains, the reports sent there reach Atlas, which reads them. If dmarc@domain belongs to a directory user or group, the reports go there and Atlas does not read them.

The DMARC reports received

Below the ladder you find «DMARC reports received (last <n> days)»:

Item Meaning
«Period covered» how many days of reports, out of how many requested
«Messages» how many messages, and what percentage passes DMARC
«Sent by» the providers that sent reports
«Reports» from the first to the last
table for each source (IP address): messages, DKIM / SPF alignment, outcome («Passes DMARC», «Fail DMARC: n», «quarantined», «rejected»)

For each source that fails DMARC you can mark a classification, with two buttons: «Legitimate» (a service that sends on behalf of the domain, such as a management system or a newsletter, and must be fixed: until it passes DMARC the policy does not go up) or «Unauthorised» (someone using the domain without permission, which is exactly what DMARC is meant to stop). Pressing again removes the classification. If the table is long, «Show all (n)» / «Show fewer».

The reports are “aggregate”: each provider sends one a day, only if it received mail from your domain. Those without a valid DKIM signature are not counted («Reports received without a valid DKIM signature, not counted»). How many days they are kept is decided in Mail server (see further on, “DMARC reports”).

PTR

The block, titled «PTR» but valid for all domains, checks the server itself: the «Host name (HELO)» it introduces itself with, the «Reverse DNS (PTR)» of its public address and the SPF of that name. It reports, for example, «<ip> has no reverse DNS (PTR): Gmail and Microsoft refuse the mail. Ask the connectivity provider for one.», or that the PTR and the host name do not match.

MX

It lists the «MX servers» that receive the domain’s mail. If the domain has no MX: «The domain has no MX records: senders fall back to its A record, if any.»

Example: adding the second domain johnsmith.example

Situation. John Smith Ltd has registered johnsmith.example and wants info@johnsmith.example to reach the same people.

What you need. Access to the domain’s DNS panel; one (or more) address to make answer.

Steps.

  1. Mail → Domains, «Add domain» icon.
  2. «Domain»: johnsmith.example. Press «Add».
  3. Wait for it to finish (a few seconds): the domain appears in the list and is selected.
  4. In the domain’s public DNS create the MX record pointing to the appliance’s internet name. The «Sender authentication» panel tells you what is missing: at first it reports SPF and DKIM absent and the MX to check.
  5. For each user who must receive mail on that domain, assign the address name@johnsmith.example from their detail in Active Directory → Users; for an alias such as info@, see Active Directory.

Check. Press «Check again»: the MX section lists the right server. Send a test email from an external address to info@johnsmith.example and check that it arrives (if it does not, see Mail → Logs).

If something goes wrong. «Domain added, but the SMTP service did not restart»: open System → Status, check the mail service and repeat.

Example: turning on DKIM signing

Situation. Mail from johnsmith.test ends up in the recipients’ spam: the signature is missing.

Steps.

  1. Mail → Domains, select johnsmith.test.
  2. In the «DKIM» section press «Generate». «Key created: publish the record shown.» appears and, below, the record with «Name», «Type» (TXT) and «Value».
  3. Press «Copy the name» and «Copy the value» and, in the domain’s public DNS panel, create the TXT record with that name and value. If the panel rejects a long value, use «Show split into 255-character strings».
  4. Wait a few minutes and press «Check again». When «DNS record» says «Published», the «Enable» button lights up.
  5. Press «Enable». «DKIM signing turned on.» appears.

Check. «Signature» says «Enabled», the DKIM box turns «Valid». Send an email to one of your external addresses and look for dkim=pass in the headers.

If something goes wrong. «The published record holds a different key: copy the value shown again.»: you copied the wrong value or an old record is still there. «The record is not visible in public DNS yet. It can take a few minutes after publishing.»: wait and try again.

Example: changing the DKIM key without interruption

Situation. The key has been in use for years and you prefer to change it every so often.

Steps.

  1. In the detail of johnsmith.test, «DKIM» section, press «Regenerate» and confirm («Regenerate the key: the current one keeps signing until you complete the rotation.»).
  2. The «New key waiting to be published» box appears with its record: publish it in the DNS (it has a different name from the current one, so the two coexist).
  3. Wait for the new key’s «DNS record» to say «Published» and press «Complete rotation».
  4. Mail is now signed with the new key. The old record appears among the «Retired keys»: leave it in the DNS for the period shown (it is used to verify mail already sent) and remove it after the date.

If something goes wrong. If you got something wrong in the DNS, «Cancel rotation» deletes the new key and the old one keeps signing.

Example: raising the DMARC policy to quarantine

Situation. The domain johnsmith.test has had a DMARC in monitoring (p=none) for more than two weeks. Laura White wants to know whether she can take a stricter step.

Steps.

  1. Open the domain’s «DMARC» section and look at the ladder: the current level is «Monitoring (p=none)».
  2. Read «DMARC reports received»: «Period covered» says for example «21 days out of 14 requested»; the table shows the sources.
  3. If a source fails DMARC (for example the management system’s server, which sends on behalf of the domain), mark it «Legitimate» and fix the management system (DKIM signing or inclusion in SPF). If it is an address you do not know, mark it «Unauthorised».
  4. When all the sources are sorted out or marked as unauthorized, the «Next step» changes to «Quarantine» and the console proposes the new «Record to publish». Copy it and replace the DMARC record in the DNS.

Check. After a few minutes, «Check again»: the current level is «Quarantine».

If something goes wrong. If the «Next step» says «Not yet», read the lines under «The move to p=quarantine will be proposed when:».

Example: a signature template for all users of johnsmith.test

Steps.

  1. With johnsmith.test selected, press the «Signature template» icon.
  2. Press «Default» to start from the standard template.
  3. Where the phone number is needed, type «Tel.» and press «Insert field…» > «Phone».
  4. Press «Save». In the list the domain’s row has the label «Has a signature template».

Check. Create a new identity for a user with an @johnsmith.test address (from the Users page): the proposed signature contains their data.

Limits

  • A domain’s name cannot be modified; Atlas does not publish the DNS records.
  • The signature template applies to new identities, not existing ones.
  • The SPF check depends on the public outgoing address detected: behind NAT with a relay or with an address not detected it says «direct, public address not detected».
LET’S TALK INFRASTRUCTURE

Control starts with a conversation.

Tell us about your infrastructure. Let’s start with what you actually need.

Talk to an engineer