{
  "id": 20339203,
  "title": "SPF, DKIM, DMARC Done Right: A Practical Email Authentication Checklist Before Your OTP Emails Land in Spam",
  "url": "https://urgent.news/2026/11/16/spf-dkim-dmarc-done-right-a-practical-email-authentication-checklist",
  "topic": "world",
  "section": "World",
  "published": "2026-11-16T22:20:03.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/eme_gug_0821b41b948be6516/spf-dkim-dmarc-done-right-a-practical-email-authentication-checklist-before-your-otp-emails-land-7kc"
  },
  "original_language": "en",
  "account": "As of November, Spamhaus has been requesting email senders to implement SPF, DKIM and DMARC. Major email providers like Gmail, Yahoo and Outlook have mandated these authentication protocols for bulk senders since February 2024 and May 2025 respectively. Many Vietnamese startups using Amazon SES or self-hosted Postfix to send OTP, invoices and password reset emails have encountered issues where OTPs fail to reach users' inboxes. Upon reviewing server logs, SMTP returns a \"250 OK\" response, but emails end up in spam folders or are rejected entirely.\n\nThe objective of this article is to provide a practical checklist for auditing an email sending domain, complete with a Python script for automated checks. The receiving server actually verifies three mechanisms: SPF checks the IP address against the domain's authorized list in the envelope sender (MAIL FROM / Return-Path), DKIM adds a digital signature to the email header and body, and DMARC combines SPF and DKIM results while aligning the email's From: address with the domain in the record.\n\nA common mistake is using an ESP provider's \"no-reply@shopabc.vn\" header while setting the Return-Path to bounce@amazonses.com. SPF will pass in this case, but the domain alignment fails. DMARC will fail if the email is signed by the ESP's domain rather than the sender's. To resolve this, configure a custom MAIL FROM domain (e.g., bounce.shopabc.vn) and use Easy DKIM or custom DKIM with the domain as the selector.\n\nA minimum DNS record set for sending domains through SES or Google Workspace should include:\n1. SPF: v=spf1 include:_spf.google.com include:amazonses.com -all (only one SPF record per domain)\n2. DKIM: 2048-bit key, selector set by the ESP (e.g., s1._domainkey.shopabc.vn)\n3. DMARC: p=none, rua=mailto:dmarc@shopabc.vn, adkim=r, aspf=r, pct=100\n\nQuick verification can be done with dig commands, such as:\n- dig +short TXT shopabc.vn\n- dig +short TXT _dmarc.shopabc.vn\n- dig +short TXT s1._domainkey.shopabc.vn\n- dig +short -x 203.0.113.10 (replacing with your IP)\n\nCommon pitfalls include having two or more SPF records, which results in PermError, or using outdated 1024-bit DKIM keys from 2015. It's recommended to rotate to 2048-bit keys and host your own PTR records if using a self-hosted SMTP server.",
  "summary": "Tuần này trên HN có tin Spamhaus siết yêu cầu với email sender từ tháng 11. Nếu bạn để ý thì đây không phải chuyện mới: Gmail và Yahoo đã bắt bulk sender phải có SPF, DKIM, DMARC từ tháng 2/2024, và Outlook cũng làm tương tự từ tháng 5/2025. Mình đã thấy khá nhiều startup Việt Nam gửi OTP, hóa đơn, email reset password qua Amazon SES hoặc Postfix tự dựng. Mọi thứ vẫn chạy ổn cho đến một ngày CS…",
  "key_points": [
    "Implement SPF, DKIM, DMARC for email authentication",
    "Configure custom MAIL FROM domain for proper alignment",
    "Use 2048-bit DKIM keys and host own PTR records"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}