What Is SPF and How Does It Work?
SPF (Sender Policy Framework) is an email authentication standard defined in RFC 7208. It allows domain owners to specify which mail servers are authorized to send email on their behalf by publishing a DNS TXT record.
When a receiving mail server gets a message, it extracts the domain from the envelope sender (MAIL FROM) and looks up the SPF record for that domain. It then checks whether the sending server's IP address matches any of the authorized mechanisms in the SPF record.
SPF results include: • Pass — The sending IP is authorized • Fail — The sending IP is explicitly not authorized • SoftFail — The sending IP is probably not authorized • Neutral — The SPF record makes no assertion • PermError — The SPF record is malformed or exceeds limits • TempError — A temporary DNS error prevented evaluation