นิยาม
An SPF บันทึก (Sender Policy กรอบ บันทึก) is a DNS TXT resource บันทึก published in a โดเมน’s public DNS zone that enumerates the ที่อยู่ IP, IPv6 prefixes, and mail server hostnames authorised to send อีเมล on behalf of that โดเมน. When a receiving mail server accepts an inbound ข้อความ, it queries the sender’s DNS for the SPF บันทึก and compares the connecting ที่อยู่ IP against the policy. If the IP is not listed, the receiving server can mark the ข้อความ as a softfail, reject it outright, or ธง it for further evaluation — depending on the policy qualifier set by the โดเมน owner.
SPF was first formalised as an IETF มาตรฐาน in RFC 4408 (2006) and later อัปเดต to the current authoritative specification in RFC 7208, published by the Internet Engineering Task Force (IETF) in April 2014. It is one of three complementary อีเมล การรับรอง มาตรฐาน alongside DKIM (DomainKeys Identified Mail) and DMARC (โดเมน-based ข้อความ การรับรอง, Reporting, and Conformance).
How It Works
The SPF evaluation กระบวนการ involves several sequential steps performed by the receiving mail server’s SMTP engine during the MAIL FROM phase of the SMTP handshake.
The โดเมน owner publishes an SPF TXT บันทึก in DNS. A typical บันทึก follows this syntax: v=spf1 include:_spf.google.com ip4:203.0.113.5 ~all. The components are: v=spf1 (version identifier), one or more mechanisms (include, ip4, ip6, a, mx, exists), and a final qualifier (+all, -all, ~all, ?all). The -all qualifier means a hard fail — any server not explicitly listed is not authorised. The ~all qualifier (softfail) passes the ข้อความ but notes the policy discrepancy, commonly ใช้ during migration ระยะเวลา.
When a ข้อความ มาถึง, the receiving MTA (Mail Transfer Agent) extracts the envelope sender โดเมน (the MAIL FROM address, also called the RFC5321.MailFrom address) and performs a DNS TXT lookup for _spf.<โดเมน> or directly on the โดเมน root. The SPF library evaluates each mechanism in คำสั่ง until one matches or the ขีดจำกัด of ten DNS lookups is reached (the “SPF PermError” ขีดจำกัด defined in RFC 7208 section 4.6.4). The result — Pass, Fail, SoftFail, Neutral, TempError, or PermError — is inserted into the ข้อความ’s Received-SPF header and passed to the สแปม filter and any DMARC policy engine.
It is critical to note that SPF authenticates the envelope sender (MAIL FROM), not the visible From header in the ข้อความ body. This distinction means SPF alone does not prevent display-name spoofing in อีเมล clients, which is why DMARC การจัดตำแหน่ง — requiring both SPF and/or DKIM results to match the RFC5322.From โดเมน — is necessary for complete protection.
Where You Encounter It
SPF บันทึก ปรากฏ in any context where อีเมล ความสามารถในการจัดส่ง and sender 声誉 matter. Transactional อีเมล infrastructure operated by บริการ such as Amazon SES, SendGrid, Mailgun, Postmark, and SparkPost requires โดเมน owners to add SPF include mechanisms pointing to the ผู้ให้บริการ’s sending infrastructure before ข้อความ will pass การรับรอง checks.
ประกวด แพลตฟอร์ม that send การยืนยันอีเมล โหวต — including Woobox, ShortStack, and custom-built systems ใช้ Mailchimp Transactional (Mandrill) — rely on the โดเมนส่ง having a valid SPF บันทึก. Mailbox ผู้ให้บริการ including Google (Gmail), Microsoft (Outlook / Exchange ออนไลน์ Protection), and Yahoo Mail evaluate SPF as an input into their ความสามารถในการจัดส่ง algorithms. A missing or misconfigured SPF บันทึก substantially increases the probability that การยืนยัน อีเมล are silently delivered to สแปม folders or rejected entirely, causing โหวต to go unconfirmed.
DNS hosting panels from ผู้ให้บริการ such as Cloudflare, AWS Route 53, GoDaddy, and Namecheap expose SPF TXT บันทึก editing through their management interfaces. Diagnostic tools such as MXToolbox SPF Lookup, Google Admin Toolbox, and DMARCIAN’s SPF Surveyor allow โดเมน owners to inspect and validate published บันทึก.
Practical Examples
A ประกวด แพลตฟอร์ม sends โหวต-การยืนยัน อีเมล from noreply@โหวต.example.com. The โดเมน โหวต.example.com has the SPF บันทึก v=spf1 include:sendgrid.net -all. When Gmail receives a การยืนยัน ข้อความ, its inbound SMTP server queries DNS for the SPF บันทึก of โหวต.example.com, expands the sendgrid.net include mechanism, and checks the connecting IP against SendGrid’s authorised server list. If the IP matches, the SPF result is Pass and the ข้อความ proceeds to the กล่องขาเข้า. If the โดเมน had no SPF บันทึก, Gmail’s filter would treat the ข้อความ as unauthenticated, reducing กล่องขาเข้า placement probability.
A regional newspaper ประกวด changes its transactional อีเมล ผู้ให้บริการ from Mailchimp to Amazon SES without updating its SPF บันทึก. การยืนยัน อีเมล begin failing SPF checks at Microsoft Outlook and are bulk-foldered, causing ผู้โหวต to miss the การยืนยัน หน้าต่าง. The ประกวด administrator diagnoses the issue ใช้ MXToolbox, adds include:amazonses.com to the SPF บันทึก, and ความสามารถในการจัดส่ง recovers within the DNS propagation หน้าต่าง (typically 0–48 hours depending on TTL settings).
Related Concepts
SPF is one pillar of the three-มาตรฐาน อีเมล การรับรอง stack: see DKIM for cryptographic ลายเซ็น การยืนยัน and DMARC for the policy layer that acts on SPF and DKIM results. The practical impact on ประกวด operations is described in การยืนยันอีเมล โหวต, where ความสามารถในการจัดส่ง of the การยืนยัน ข้อความ is the single most critical ปฏิบัติการ dependency. BIMI (แบรนด์ Indicators for ข้อความ Identification), a newer มาตรฐาน building on DMARC, allows ยืนยัน senders to display a แบรนด์ logo in supporting mailbox ผู้ให้บริการ — an emerging ความเชื่อถือ สัญญาณ not covered here.