Every email has a return path (the envelope sender). Bounces and complaint reports go there, and SPF is checked against it. Mailcandor uses send.yourdomain by default and asks you to publish two records on it: an MX and an SPF TXT.
When you need a custom return path
Choose another subdomain if send.yourdomain already has MX or SPF records for a different mail service. Two services cannot share the same MX on one name, and the verify check needs Mailcandor’s MX there.
Signs you have this problem:
- At your DNS provider,
sendalready has an MX record pointing somewhere other thanamazonses.com. - On the Mailcandor domain page, the Return path or SPF record shows failed with “We found: …” naming another service.
To add a domain with a custom return path
This is API only. Use a full-access key and pass custom_return_path:
curl https://api.mailcandor.com/v1/domains \
-H "Authorization: Bearer $MAILCANDOR_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "acme.com", "custom_return_path": "bounces" }'
The response lists the records. The SPF and MX now sit on bounces.acme.com:
{ "purpose": "spf", "type": "TXT", "name": "bounces.acme.com", "value": "v=spf1 include:amazonses.com ~all" }
{ "purpose": "return_path_mx", "type": "MX", "name": "bounces.acme.com", "value": "feedback-smtp.us-east-1.amazonses.com", "priority": 10 }
The DKIM and DMARC records are the same as with the default. Publish all of them and verify as usual.
To switch an existing domain to a custom return path
The return path is fixed once a domain is added, so you replace the domain:
- Note the domain’s API keys that are limited to it. Deleting the domain deletes those keys.
- Delete the domain: on its page choose Delete domain, or call
DELETE /v1/domains/{id}. - Add it again with
custom_return_pathas above. - Publish the new records. The DKIM tokens may change, so copy them again rather than reusing the old ones.
- Press Check DNS now.
- Create new domain-limited keys if you had any.
While the domain is deleted and not yet verified again, sends from it fail with domain_not_found or domain_not_verified. Do this at a quiet time.
Rules for the value
- One label only:
bouncesis fine,mail.bouncesis not. - Letters, digits and hyphens, 1 to 63 characters.
- Cannot start or end with a hyphen.
Anything else returns 422 validation_error on custom_return_path.
If it does not work
422“custom_return_path is one label…”: remove dots and other characters.409 domain_taken: the domain still exists on a team. Delete it first.- New MX still fails: the chosen subdomain also has another MX. Pick a name nothing else uses.
See DNS records explained for what the return path records do, and docs.mailcandor.com for the full POST /v1/domains reference.