ip4 — SPF Mechanism
The SPF ip4 mechanism explicitly authorises an IPv4 address or CIDR range to send email. No DNS lookup required — the most efficient SPF mechanism.
Type
Mechanism
Mechanism
Syntax
ip4:<ip-address>[/prefix-length]
DNS Lookup
No — no extra lookup
No — no extra lookup
Example
ip4:203.0.113.0/24
💬 What This Mechanism Does
The ip4 mechanism directly authorises an IPv4 address or CIDR subnet. It requires no DNS lookup, so it doesn't count against the 10-lookup limit. Use it for dedicated servers or static SMTP relay IPs that you control.
When to Use This
- A dedicated outbound SMTP relay with a static IP (ip4:198.51.100.5)
- An on-premise mail server subnet (ip4:192.0.2.0/24)
- A transactional email service that provides a fixed IP range
⚠️ Watch Out For
- Does not count toward the 10-lookup limit — use ip4/ip6 over include where possible.
- Avoid ranges larger than /24 unless you genuinely own the whole subnet.
📚 RFC References
🔗 Related SPF Elements
🔧 Validate Your SPF Record
Check whether your current SPF record is valid and covers all your senders.