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
Your MailChannels account ID (the value used inauth=) is shown in the panel footer when you log in to the Host Console. Sub-account IDs are listed on the sub-accounts page.
You can also read both identifiers from the headers of any message that was successfully sent through MailChannels from the domain you want to lock down:
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.
Test a sender ID:
Sender IDs contain the | (pipe) character, which most shells treat as a pipe operator. Wrap the entire --test argument in quotes so the shell passes it to the script unchanged:
zsh or bash splits the value at each | and reports errors such as command not found: x-authuser before the script runs.

