email:spf
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| email:spf [2026/07/21 18:05] – external edit 127.0.0.1 | email:spf [2026/08/11 04:05] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== SPF — Sender Policy Framework ====== | ||
| - | SPF (Sender Policy Framework) is an email authentication method that prevents spammers from sending emails using your domain. | ||
| - | |||
| - | ----- | ||
| - | |||
| - | ===== What is SPF? ===== | ||
| - | |||
| - | SPF allows domain owners to specify which mail servers are authorized to send emails on their behalf. | ||
| - | |||
| - | When a receiving mail server gets an email, it checks: | ||
| - | |||
| - | 1. The envelope sender domain (Return-Path) | ||
| - | 2. The IP address of the sending server | ||
| - | 3. The SPF record published by the domain owner | ||
| - | 4. If the IP is authorized, SPF passes; otherwise, it fails | ||
| - | |||
| - | ----- | ||
| - | |||
| - | ===== SPF Record Format ===== | ||
| - | |||
| - | An SPF record is a TXT record published in the domain' | ||
| - | |||
| - | example.com. TXT " | ||
| - | |||
| - | |||
| - | **Components: | ||
| - | |||
| - | ^ Component ^ Description ^ | ||
| - | | **v=spf1** | Version (must be exactly this) | | ||
| - | | **Mechanisms** | Who is allowed to send | | ||
| - | | **Qualifier** | What to do with unauthorized senders | | ||
| - | |||
| - | ----- | ||
| - | |||
| - | ===== SPF Mechanisms ===== | ||
| - | |||
| - | ^ Mechanism ^ Meaning ^ | ||
| - | | `a` | The domain' | ||
| - | | `mx` | The domain' | ||
| - | | `include` | Include SPF records from another domain | | ||
| - | | `ip4` | A specific IPv4 address | | ||
| - | | `ip6` | A specific IPv6 address | | ||
| - | | `ptr` | PTR record (reverse lookup) | | ||
| - | | `exists` | Check if a domain exists | | ||
| - | | `all` | Everything else (catch-all) | | ||
| - | |||
| - | ----- | ||
| - | |||
| - | ===== SPF Qualifiers ===== | ||
| - | |||
| - | ^ Qualifier ^ Meaning ^ | ||
| - | | **+** | Pass — authorized (default) | | ||
| - | | **-** | Fail — hard fail (reject) | | ||
| - | | **~** | Soft Fail — mark as spam | | ||
| - | | **?** | Neutral — no policy | | ||
| - | |||
| - | ----- | ||
| - | |||
| - | ===== Common SPF Examples ===== | ||
| - | |||
| - | **Google Workspace (Gmail):** | ||
| - | |||
| - | v=spf1 include: | ||
| - | |||
| - | **Microsoft 365:** | ||
| - | |||
| - | v=spf1 include: | ||
| - | |||
| - | **Custom (self-hosted): | ||
| - | |||
| - | v=spf1 a mx ip4: | ||
| - | |||
| - | ----- | ||
| - | |||
| - | ===== SPF Lookup Limits ===== | ||
| - | |||
| - | SPF has a hard limit of **10 DNS lookups**. If you exceed this, receivers may reject your email. | ||
| - | |||
| - | **Lookup mechanisms: | ||
| - | * include | ||
| - | * a | ||
| - | * mx | ||
| - | * ptr | ||
| - | * exists | ||
| - | * redirect | ||
| - | |||
| - | ----- | ||
| - | |||
| - | ===== SPF Policy Levels ===== | ||
| - | |||
| - | ^ Level ^ Policy ^ Description ^ | ||
| - | | **Strong** | `-all` | Hard fail — unlisted senders are rejected | | ||
| - | | **Moderate** | `~all` | Soft fail — unlisted senders go to spam | | ||
| - | | **Weak** | `?all` | Neutral — no policy applied | | ||
| - | | **Dangerous** | `+all` | Pass all — effectively no protection | | ||
| - | |||
| - | ----- | ||
| - | |||
| - | ===== Test Your SPF ===== | ||
| - | |||
| - | Use our [[https:// | ||
| - | |||
| - | ----- | ||
| - | |||
| - | {{tag> | ||
email/spf.1784657119.txt.gz · Last modified: by 127.0.0.1
