शब्दकोश · ईमेल

SPF Flattening

SPF flattening replaces include mechanisms in an SPF record with the underlying IP addresses so the record stays within the 10-lookup limit.

अपडेट: अक्टूबर 28, 2026

SPF flattening is the practice of resolving the include: and other lookup-causing mechanisms in an SPF record into literal ip4: and ip6: entries. The goal is to stay within the limit of 10 DNS lookups that SPF evaluators allow.

Why it matters

Each include, a, mx and redirect counts toward the limit. Exceeding it produces a permanent error (permerror), and receivers may treat the message as failing SPF. Flattening removes the lookups, but IP addresses in third-party ranges change without notice, so a static flattened record silently becomes wrong and legitimate mail starts failing. Record length is also limited: a single TXT string holds 255 characters, though several strings can be concatenated, and the whole DNS response should stay small.

Example

Before:

v=spf1 include:_spf.vendor-a.example include:_spf.vendor-b.example ~all

After, with documentation-range addresses:

v=spf1 ip4:192.0.2.0/24 ip4:198.51.100.17 ~all

Use a service or script that re-flattens automatically, or remove unused includes first.

Common mistakes

  • Flattening once and never refreshing.
  • Not removing vendors you no longer use.
  • Forgetting that vendors may offer a dedicated subdomain for sending.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.