Skip to content
Coritan Docs

Add a sending domain to SMTP Relay

Add the domain your application sends from, publish its SPF, DKIM and DMARC records, and verify it before you send.

View as Markdown

In the dashboard

An SMTP Relay sends only from domains you have shown are yours. Add the domain your application sends from, publish its records and verify it. The relay adds no MX record, so the domain's inbox stays wherever it is.

  • An SMTP Relay service with the status active. Order one if you have none. While a service is being set up, Add domain… is greyed out.
  • A domain whose DNS you can change. When its zone is on Coritan DNS in the same account, we publish the records for you.
  • Room on the plan. The Sending domains figure on the relay's Overview tab shows how many it has against the plan's limit, or Unlimited on this plan when the plan has none. At the limit, the Add a domain page says what raises it (see Troubleshooting).
  • If the domain is on your Mail Hosting service, a sending subdomain for the relay, such as send.example.com. A domain can be on one mail service at a time, and the relay can still send as @example.com over SMTP.
  1. In the dashboard, go to Mail Services, open the SMTP Relay service, then the Domains tab.
  2. Select Add domain…. The Add a domain page opens, at /dashboard/mail/<id>/domains/new. The older address /dashboard/mail/<id>/domains?add=1 goes to the same page.
  3. In Domain, enter the domain, such as example.com or send.example.com. Names you claimed under coritan.gg are listed beside Your names:.
  4. Leave Make this the primary domain ticked if this is the relay's main domain. The primary domain names the relay in lists.
  5. Select Add domain at the foot of the page. Cancel, or the Domains link above the heading, returns to the Domains tab without adding anything.

The domain's page opens, with its records on the DNS records card. When we refuse the domain, the page keeps what you typed and says why in a Could not add the domain box above the buttons. Needed to send mail lists the ownership record, SPF and, once ownership passes, two DKIM records. Recommended holds DMARC, folded until you open it; the relay sends without it, and it reads Optional until we find it.

When the domain's zone is on Coritan DNS in this account, or the domain is a claimed coritan.gg name, we have already published the records. By setting up SMTP Relay for a domain you agree that the domain's sending records are managed by us, so a record of yours at an SPF, DKIM or DMARC name is replaced, and your other senders stay in the SPF record while it stays within the limit of 10 DNS lookups (Records we publish for you). When the zone is on Coritan DNS but was added to this account after the domain, use the Publish to your zone card on the domain's page. To move the domain's DNS to us, use the Host this domain's DNS with us card, as Move the DNS to Coritan describes.

At any other DNS provider:

  1. Create the ownership record: the TXT record at _mailverify.example.com, first under Needed to send mail. Copy its name and value from the DNS records card.
  2. Create the SPF record. A domain can have only one. If the domain already has one because another service sends for it, replace it with the value on the card: we built it from the record your DNS serves now, so it keeps your other senders and adds ours. The note under the value shows the record it replaces.
  3. On the domain's page, select Verify now. Once we find the ownership record, we make the domain's two DKIM keys.
  4. Reload the page, then create the two DKIM records it now lists.
  5. Open Recommended and create the DMARC record at _dmarc.example.com. It makes your domain harder to fake.

Mail DNS records explains each record and what its check looks for.

  1. On the domain's page, select Verify now.
  2. Read the toast. example.com is verified. means you are done. example.com is still pending: is followed by the first problem the check found.
  3. If it is still pending, fix what the Checks row and the The last check found problems list show, and select Verify now again.

We also check pending domains about every ten minutes, so a domain whose records are right verifies on its own.

  • The domain shows Verified on the Domains tab, with Ownership, SPF and DKIM ticked. DMARC is shown too, but a domain is verified without it.
  • The Send tab and the send API accept From addresses on the domain.
  • The domain's page shows Ready to send, with Open Credentials.

Next, create an SMTP credential. The relay needs one for SMTP and for the send API.

Note

Over SMTP, the relay already accepts a From address on the domain once its ownership check passes. Wait for the domain to be verified anyway: mail sent before SPF and DKIM are published fails those checks at the receiving servers.

Warning

Removing a domain stops the relay sending from it at once. If you add it again later, it gets a new ownership token and new DKIM keys, so you publish and verify it from the start.

  1. Delete the SMTP credentials on the domain first. See Send over SMTP with credentials.
  2. On the Domains tab, select the domain.
  3. In the Remove this domain card, select Remove domain….
  4. Type the domain name to confirm, then select Remove domain.

We delete the records we published into your DNS zone. Records at another DNS provider are yours to delete.

Add domain… is greyed out
The service is not active yet. The button turns on once we have set the service up. An address that opens the Add a domain page for such a service shows Add a domain once this service is active in place of the form.
The Add a domain page opens with a box titled This plan allows 2 domains
The relay already has as many sending domains as its plan allows, so Add domain… is greyed out. Remove a domain, or select Open Billing in the box to move to a bigger plan.
The Add a domain page opens with a box titled This plan allows 2 domains and the button See what raises it
On the SMTP Relay your account plan includes, its sending domains are all used. See what raises it opens a short prompt titled Your plan allows 2 mail domains. It offers the next account plan, such as Upgrade to Pro, and a free trial of it while you can still start one. Each opens its own page: the one that orders the plan, or the one that starts the trial (Change your account plan). Select Not now to close the prompt and stay on the page.
example.com receives mail on your Mail Hosting service. Add a sending subdomain here instead, such as send.example.com. Your relay can still send as @example.com.
Add send.example.com instead. Over SMTP, the relay may still write @example.com in From, because the same account has proved that domain on Mail Hosting.
example.com is already on another of your mail services
Remove it from your other SMTP Relay service first, or use a different sending subdomain.
That domain is already attached to a mail service
Someone else's mail service has it. If the domain is yours, contact support.
This plan allows 2 domain(s) or A mail service may hold at most 1000 domains
The plan, or the limit for a plan with no domain limit, is reached. Remove a domain or move to a bigger plan.
MX points to followed by other hosts
The relay does not use MX records, so this is information only: the domain can be verified with it. It shows when the domain receives its mail somewhere else.
DKIM selector cor202609r not published
The DKIM record with that selector is missing or holds a different key. Copy the whole value from the card again.
No DKIM keys yet: the mail engine has not made them
We have not finished making the domain's keys. Select Verify now again in a minute.
DMARC publishes p=reject, expected p=none
The DMARC record in your DNS holds a different stage from the domain's. Replace it with the value on the card, or set the same stage on the domain's DMARC policy card. In a zone on Coritan DNS we replace the record with ours, and the domain's stage never gets weaker. See DMARC.
The zone is busy with another change. Check the domain again in a minute.
Another change to the same zone was being saved. Select Verify now again.
Remove the mailboxes and aliases on this domain first
On a relay, this means the domain still has SMTP credentials. Delete them, then remove the domain.

Add a domain to Mail Hosting lists the messages both products share, such as an invalid name or a platform domain.

Add a sending domain:

Shell
curl -X POST https://api.coritan.com/api/v1/client/smtp-relay/4812/domains \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domain": "send.example.com"}'

domain is the name (3–253 characters) and primary defaults to false. The answer is 201 with the domain and its records. A name the service refuses answers 400 with one of the messages above, and a service that is not active answers 409 Service is not active.

The other domain operations work as they do for Mail Hosting, with /client/smtp-relay/ in the path:

Operation What it does
GET /client/smtp-relay/{service_id}/domains Lists the relay's domains as {"items": [...]}.
GET /client/smtp-relay/{service_id}/domains/{domain_id}/records The records to publish. See Mail DNS records.
POST /client/smtp-relay/{service_id}/domains/{domain_id}/verify Checks the domain now and answers {"domain": {...}, "result": {...}}. See the example.
PATCH /client/smtp-relay/{service_id}/domains/{domain_id}/dmarc Sets or holds the DMARC stage. See DMARC.
DELETE /client/smtp-relay/{service_id}/domains/{domain_id} Removes the domain and answers {"ok": true}.

A domain that is not on the service answers 404 Domain not found.

API operations on this page