Mail routing or authentication changed
Start when the observed MX, SPF or DMARC records differ from the previous check. The first check saves a baseline.
Workflow template
Watch a domain’s MX, SPF and DMARC records. Save each observed change in D1 and send the previous and current settings to a Slack channel.
How it works
Start when the observed MX, SPF or DMARC records differ from the previous check. The first check saves a baseline.
Run a statement with bound values, or send a batch. Each row in the results uses the column names from your query.
Send text, Block Kit content, attachments, or a thread reply to a channel.
Before activation
Connect Cloudflare, enter the zone ID and the full mail domain in the trigger. Allow the first poll to establish a baseline of the MX, SPF and DMARC settings.
Run this statement once in the selected D1 database: CREATE TABLE IF NOT EXISTS dns_mail_changes (change_id TEXT PRIMARY KEY, domain TEXT NOT NULL, previous TEXT, current TEXT NOT NULL, observed_at TEXT NOT NULL). Select the same database in the workflow. Each change ID can be inserted once.
Connect Slack, select your channel and invite the bot if the channel is private. Alerts include both sets of observed values.
Use a test subdomain and edit one mail record after the baseline. Compare the Slack notification with the D1 row and let an unchanged poll pass. Changes between polls can be missed.