CIS Control 1.6.4: Assess and Remediate /etc/motd Permissions over SSH
Assess CIS control 1.6.4 on /etc/motd over SSH against a KV-stored baseline and optionally auto-remediate ownership and permissions.
Audit Resend sending domain DNS verification and DKIM records on a schedule to detect delivery drop risks before sender reputation is damaged.
Transactional and marketing email infrastructure like Resend powers critical customer authentication flows, password resets, and product notifications. Modern email inbox providers (Google, Yahoo, Microsoft) enforce strict sender authentication standards, requiring valid DKIM, SPF, and DMARC alignment. When nameserver migrations, DNS provider changes, or domain renewals inadvertently drop or invalidate TXT and CNAME records, transactional emails are silently dropped or routed to spam folders without application-level HTTP errors.
This blueprint implements an automated Day 2 operations sentinel for Resend sending domains. Operating on a periodic daily schedule, it directly queries the Resend Domains REST API, inspects domain verification states, detects missing or failing DKIM/SPF DNS records, and dispatches rich Slack incident alert cards with actionable nameserver remediation instructions.
0 8 * * *, daily at 08:00 UTC, shipped disabled for initial configuration) or on demand.fetch_resend_domains executes an HTTP GET request to https://api.resend.com/domains via io.kestra.plugin.core.http.Request, authenticating with the bearer token secret RESEND_API_KEY.parse_domain_reputation executes inside an isolated python:3.11-slim container, parsing the domains response. It cross-references status and individual DKIM/SPF record verification states against target_domain.evaluate_domain_health utilizes io.kestra.plugin.core.flow.Switch to evaluate the classified status:io.kestra.plugin.slack.notifications.SlackIncomingWebhook to dispatch a formatted alert card to #messaging-ops detailing the domain name, status, and recommended DNS verification actions.log_audit_completion records the overall audit summary and degraded domain counts.errors handler catches HTTP connection timeouts or authentication failures, ensuring on-call teams are alerted if the health check itself cannot reach the API.Writing custom cron jobs or Lambda functions to poll email APIs creates unmonitored scripts, unmasked secrets, and brittle alert plumbing. Kestra provides:
Switch branching and containerized Python scripts provide robust error recovery without external microservice dependencies.Configure the following secrets in your Kestra namespace or instance settings:
| Secret Name | Description | Example |
|---|---|---|
RESEND_API_KEY |
Resend API authentication token | re_•••••••••••• |
SLACK_WEBHOOK |
Incoming webhook URL for destination Slack channel | https://hooks.slack.com/services/T00/B00/X00 |
company.messaging).RESEND_API_KEY and SLACK_WEBHOOK into Settings > Secrets.target_domain to test the audit pass.disabled: false on periodic_resend_audit to activate the automated daily monitoring schedule.io.kestra.plugin.core.http.Request to Cloudflare's API to re-add dropped DKIM records when remediation_mode == 'AUTO_REPAIR'.io.kestra.plugin.pagerduty.Incident task within the DOMAIN_DEGRADED branch to escalate persistent deliverability drops to on-call engineers.io.kestra.plugin.core.flow.ForEach to audit all organization domains in parallel.