Mail setup

SPF, DKIM and DMARC with Mailtrap.

The records Mailtrap needs, where to find them, and the failure specific to this provider.

SPF

Add include:a Mailtrap-provided include to your existing SPF record. Do not create a second record: two SPF records mean neither works, and that is the most common mistake in this whole area.

DKIM

Found in the Mailtrap sending domain settings.

Mailtrap provides DNS records for both SPF and DKIM on the sending domain.

Mailtrap publishes keys under Mailtrap-generated selectors, which is what an external check looks for.

DMARC

DMARC is the same regardless of provider, because it is your instruction rather than theirs. Start at v=DMARC1; p=none; rua=mailto:you@yourdomain.com, read the reports, authorise everything legitimate, and only then tighten. The DMARC guide covers the order, and the order is what stops you blocking your own invoices.

Worth knowing with Mailtrap

Mailtrap is used for testing as well as sending, which means development environments sometimes get authorised to send as your production domain. Worth checking that is still intended.

Watch the lookup count

Every include costs one of your ten SPF lookups, and so does every include inside it. Adding a third or fourth sender is where domains typically cross the limit, after which the whole record fails silently. See the lookup guide before adding another.

Check yours

Check whether your mail is actually passing.

Plain answers rather than policy strings. Free, no account.

Using a different mail provider?

The records differ per provider, and so do the mistakes.

Google Workspace · MailerLite · Microsoft 365 · Salesforce and Marketing Cloud · Proton Mail · Klaviyo

All 20 in this set