# Notify ntfy when a domain has no mail DNS records

Watch a domain that should have mail configured. Notify the operator when Cloudflare finds none of the expected MX, SPF or DMARC records.

[Use template](https://dashboard.fasthook.io/workflow/new?templateKey=cloudflare-dns-empty-mail-check-to-ntfy&templateName=Notify+ntfy+when+a+domain+has+no+mail+DNS+records)

**Required accounts**

- Cloudflare DNS
- ntfy

## Notify ntfy when a domain has no mail DNS records

### 1. Trigger · Daily schedule

**Schedule**. Run automatically on the configured schedule.

### 2. Action · Read MX, SPF and DMARC records

**Cloudflare DNS**. Collect and sort the domain’s MX, SPF and DMARC records for comparison with an earlier snapshot.

### 3. Action · Send the missing-records alert

**ntfy**. Run the Send the missing-records alert action in ntfy.

## Set up your workflow

1. **Choose a mail-enabled domain** Select the Cloudflare zone and a full domain where you expect at least one mail record. The check reads MX and SPF at that name and DMARC at its \_dmarc name.
2. **Configure the notification topic** Connect ntfy, select the topic and subscribe on your receiving device. Set a schedule that matches how often you want a reminder.
3. **Verify the alert boundary** Try an empty test subdomain. A successful empty lookup sends an alert. Any matching record skips the notification, so this check alone does not certify that mail is deliverable.

## Related integrations

- [Schedule trigger](https://www.fasthook.io/docs/triggers/schedule)
- [Cloudflare DNS integrations](https://www.fasthook.io/apps/cloudflare-dns/integrations)
- [ntfy integrations](https://www.fasthook.io/apps/ntfy/integrations)

## Related workflow templates

- [Alert Discord when DNSSEC is not active](https://www.fasthook.io/templates/cloudflare-dnssec-status-to-discord.md): Check the signing status Cloudflare reports for one zone.
- [Keep dated mail DNS snapshots in Google Drive](https://www.fasthook.io/templates/cloudflare-dns-mail-snapshots-to-google-drive.md): Give your mail administrator a dated text file listing the domain’s MX, SPF and DMARC records, including days when the configuration stays the same.
- [Back up a DNS zone to Dropbox](https://www.fasthook.io/templates/cloudflare-dns-zone-backups-to-dropbox.md): Save a BIND zone file to a private Dropbox folder each day.
- [Archive DNS records to R2 on a schedule](https://www.fasthook.io/templates/cloudflare-dns-zone-exports-to-r2.md): Save a dated BIND zone file in a private R2 bucket.
