How Domain Lockdown works
You publish a DNS TXT record at_mailchannels.yourdomain.com. MailChannels checks this record when processing outbound messages. If the sending account or sender ID is not listed in the record, the message is rejected. If no record exists, MailChannels applies no additional restriction beyond standard authentication.
Lockdown identifiers
Domain Lockdown supports two identifier types for Outbound Filtering:The
cfid identifier for Cloudflare Workers is deprecated and will be discontinued. If you are using Outbound Filtering via SMTP relay, use auth and senderid only.DNS TXT record syntax
Create a TXT record at_mailchannels.yourdomain.com using the following format:
auth and senderid fields in a single record. Each field must carry exactly one value.
Examples
Allow a single hosting provider to send from your domain:auth or senderid fields instructs MailChannels to reject all messages from your domain, regardless of the sending account.
Find your auth and sender ID
Every message routed through MailChannels includes two headers that carry the identifiers you need:X-MailChannels-Auth-Id— carries theauthvalue (your hosting provider’s account ID)X-MailChannels-Sender-Id— carries thesenderidvalue (the specific sender entity)
Example message headers
auth=goodhost and/or senderid=goodhost|x-authuser|joe@example.com in your _mailchannels TXT record.
Test your lockdown record
MailChannels provides a Python testing script that reads your DNS TXT record and simulates whether a given sender would be accepted or rejected. To use it:- Install the Python DNS library:
- Download the script from the GitHub Gist.
- Run the script against your domain or a test record string.
output
_mailchannels.yourdomain.com and simulates whether the specified auth or senderid value would be accepted.

