Sender Policy Framework or SPF is a mechanism to prevent email spoofing attacks. The system designed to detect email spoofing by providing a mechanism to allow receiving mail exchangers to check that incoming mail from a domain comes from a host authorized by that domain’s administrators. The domain’s owner publishes
SPF record as a
TXT record in domain’s DNS, and receiving mail exchangers use that record to authenticate all emails coming from that exact domain.
For example the following
SPF record for
v=spf1 mx ip4:18.104.22.168/32 include:amazonses.com include:_spf.yandex.net -all
Informs receiving mail servers to check whether the IP of sending mail server is listed in
MX DNS record or is equal to
22.214.171.124 or is an IP of Amazon SES service or an IP of Yandex Service. If nothing is matched, then the receiving mail server will reject the message.
For more on
SPF you could check the spec.