Back to results for “ES Modules”
Node.js › Email & Notifications

What are SPF, DKIM, and DMARC, and why do they matter for a Node.js application's transactional emails actually reaching users' inboxes?

Advanced

Answer

SPF (Sender Policy Framework) publishes a DNS record listing which mail servers are authorized to send email on behalf of a domain, letting receiving servers verify a message wasn't spoofed. DKIM (DomainKeys Identified Mail) cryptographically signs outgoing messages, letting receivers verify the message wasn't altered in transit and genuinely originated from the claimed domain. DMARC builds on both, publishing a policy telling receiving servers what to do (quarantine, reject) with messages that fail SPF or DKIM checks -- without properly configured SPF/DKIM/DMARC records, legitimate transactional emails are significantly more likely to be marked as spam or rejected outright.
; Example SPF DNS TXT record
v=spf1 include:sendgrid.net ~all

; Example DMARC DNS TXT record
v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.com
Real-world example A company's password-reset emails were landing in users' spam folders at an alarmingly high rate until they properly configured SPF and DKIM records for their sending domain through their email provider's setup process, dramatically improving inbox placement.

Common follow-ups: How does DKIM signing actually work cryptographically to verify a message wasn't tampered with?;What's the difference between DMARC's 'none', 'quarantine', and 'reject' policy modes?