MailSenpai DNS Check: manual SPF, DKIM, DMARC and MX
A manual, read-only SPF, DKIM, DMARC and MX diagnostic using the free MailSenpai DNS Check API. Published by MailSenpai, the service provider.
Use
Import the flow and edit the demonstration domain (example.com) in the Inject node. Supply your actual DKIM selector when needed. Deploy, then trigger the Inject node manually. It does not run at startup, send email, alter DNS or need an account/API key. Only core Node-RED nodes are used.
The output separates checked results, rejected input, rate limits and request failures. The API allows 30 requests/hour/source IP, with a 15-minute cache. A successful DNS result does not prove inbox placement, a valid signature on a message or the success of an actual email send.
Tested scope
Node-RED 4.1.7 / Node.js 20.20.2. Verified real API HTTP 200 and 422 cases; controlled loopback fixtures for HTTP 429 with Retry-After, incomplete JSON, refused TCP and untrusted TLS. These error fixtures are not a claim that a public quota was exhausted. Certificate validation remains enabled. No SMTP credentials are included.
API reference · Reproduction guide and limitations · Versioned flow source
The hosted MailSenpai MCP server is a separate, OAuth-authorised service; it is not required by this flow.
[{"id":"msp-dns-example","type":"tab","label":"MailSenpai: read-only DNS diagnostic","disabled":false,"info":"Manual demonstration using public example.com. No email sending, no credentials, no DNS changes. 30 requests/hour/source IP;15-minute cache. DNS results do not establish inbox delivery."},{"id":"check-example","type":"inject","z":"msp-dns-example","name":"Check example.com","props":[{"p":"domain","v":"example.com","vt":"str"},{"p":"selector","v":"default","vt":"str"},{"p":"demoCase","v":"success","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.5,"topic":"","x":160,"y":100,"wires":[["prepare-url"]]},{"id":"check-invalid","type":"inject","z":"msp-dns-example","name":"Check validation error","props":[{"p":"domain","v":"","vt":"str"},{"p":"selector","v":"default","vt":"str"},{"p":"demoCase","v":"validation","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.5,"topic":"","x":160,"y":180,"wires":[["prepare-url"]]},{"id":"prepare-url","type":"function","z":"msp-dns-example","name":"Build fixed-origin DNS request","func":"msg.url = 'https://app.mailsenpai.com/tools/dns-check?domain=' + encodeURIComponent(msg.domain || '') + '&selector=' + encodeURIComponent(msg.selector || 'default');\nmsg.headers = {Accept: 'application/json'};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":120,"wires":[["dns-request"]]},{"id":"dns-request","type":"http request","z":"msp-dns-example","name":"GET DNS JSON, no key","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":true,"headers":[],"x":740,"y":120,"wires":[["normalise-result"]]},{"id":"normalise-result","type":"function","z":"msp-dns-example","name":"Keep HTTP/error/diagnosis distinct","func":"const code = Number(msg.statusCode);\nconst p = msg.payload;\nconst rawChecks = p && typeof p === 'object' && p.checks;\nconst checks = rawChecks && typeof rawChecks === 'object' && ['spf','dkim','dmarc','mx'].every(k => rawChecks[k] && typeof rawChecks[k] === 'object' && typeof rawChecks[k].result === 'string') ? rawChecks : null;\nlet state = code === 422 ? 'validation_error' : code === 429 ? 'rate_limited' : code === 200 && checks ? 'checked' : 'http_or_schema_error';\nmsg.payload = {state, httpStatus: code || null, domain: msg.domain || '', cached: p && p.cached === true, checks: checks || null, retryAfter: msg.headers && (msg.headers['retry-after'] || null), message: p && (p.message || p.error) || null, note: 'Read-only diagnostic. A DNS check does not prove inbox delivery. Do not automatically retry rate-limited calls.'};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1040,"y":120,"wires":[["show-result"]]},{"id":"catch-request","type":"catch","z":"msp-dns-example","name":"Network/TLS errors","scope":["dns-request"],"uncaught":false,"x":730,"y":220,"wires":[["network-result"]]},{"id":"network-result","type":"function","z":"msp-dns-example","name":"Report connection error","func":"msg.payload = {state:'connection_error',message:msg.error && msg.error.message || 'Request failed',note:'Keep TLS verification enabled; inspect the connection before retrying.'}; return msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1040,"y":220,"wires":[["show-result"]]},{"id":"show-result","type":"debug","z":"msp-dns-example","name":"Read result and limits","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1340,"y":120,"wires":[]},{"id":"notes","type":"comment","z":"msp-dns-example","name":"Manual DNS only:30/hour/IP,cache15min,no email action","info":"Use an owned demonstration domain. default is only a demonstration DKIM selector: provide the real selector to check a real sender. No valid SPF/DKIM/DMARC result proves email acceptance or delivery. Null MX means the domain does not accept mail. Use a separate explicit sending decision for any email action. API docs:https://en.mailsenpai.com/dns-check-api/","x":440,"y":40,"wires":[]}]