# Leaving your old provider

Needs the Mailset CLI, signed in: step 1 of `mailset guide onboarding`.

Every sender moved to Mailset, the old records gone from your DNS and the old account closed, in an order that never breaks mail still going out. Replace example.com with your domain.

The order: new records live first, then your code, then the keys, then the old DNS records, then the account.

## Steps

1. List everything that sends as example.com. Search your repositories and secret stores for the provider's name and the names of its keys.
2. Add each sending domain with `mailset domains add example.com`, and wait until `mailset domains check example.com` passes before you touch any old record. Mail staying where it is for now? `mailset domains apply example.com --sending` writes only what sending needs.
3. Switch your code to the Mailset SDK (`mailset guide sending-modes`), deploy it, and watch delivery with `mailset delivery search --sender example.com`.
4. Delete the old API keys at the provider.
5. Check the provider's own dashboard or API for anything sent in the last few days. Zero sends means nothing is left.
6. Run `mailset domains apply example.com --only-mailset`. SPF then names only Mailset, and every other DKIM key on the domain is deleted. It refuses a domain that only sends: mail has to come to Mailset. Without a DNS host Mailset can write to, take the provider's `include:` out of SPF and delete its DKIM records by hand.
7. Run `mailset domains plan example.com`. On a zone Mailset can read, it lists what each old provider left (bounce, DKIM, SPF, verification, MX, tracking) and whether DMARC reports show it still sending. Drop only the providers you left, by the plan's ids: `mailset domains apply example.com --drop-leftovers sparkpost`. Without `--anyway`, it refuses one still sending or one no report can tell about. It keeps the old MX until mail comes to Mailset, and every record of a provider whose MX is still live.
8. Where Mailset can't read your zone, delete what the provider left yourself: CNAMEs that point at its domain (`sparkpostmail.com`, `sendgrid.net`, `mailgun.org`, `mtasv.net`), DKIM keys under `_domainkey` other than Mailset's `ms1` and `ms2`, its `include:` in SPF, verification TXT records such as `mandrill_verify.…`, and MX records that point at it.
9. Close the provider account in its dashboard.

## Check

`mailset domains plan example.com` lists nothing an old provider left, and `mailset domains dmarc example.com` shows no failing source that used to be the provider, a few days after step 6. `mailset domains status example.com` lists this step as manual: Mailset can't see the old account.

## Watch out

- Never delete a sender's records until step 5 shows it stopped. We broke an outreach tool's DKIM by deleting first.
- `--only-mailset` deletes every DKIM key that isn't Mailset's, a help desk's or a billing tool's included. Move those first, or add their records again after.
- Keep any link-tracking host that mail you already sent still points at, or the links in that mail break. That's why `--drop-leftovers` leaves tracking records alone unless you add `--include-tracking`.

---

© 2026 Intenseloop, Inc. Mailset’s site, docs and guides are copyrighted. You may read them and use their code to build with Mailset. Don’t republish them or use them to build a copy of Mailset. Terms: https://mailset.app/terms#content