SPF, Sender Policy Framework
While the DNS data is used to tell what hosts receive mail for any specific domain (by publishing MX records), there was no such thing for sending hosts. SPF works as a reverse "MX record" by defining the IP addresses of hosts where e-mail of a particular domain can originate from. When receiving a message from a domain, the recipient can check those records to make sure mail is coming from where it should be coming from.
An SPF record is represented as a vaule of type TXT. A sample SPF TXT record for a domain looks like this:
Every mailhost should also have an SPF record:
IN TXT "v=spf1 a mx ptr ip4:193.58.255.112/28 ip4:80.254.173.218/32 ~all"mail IN TXT "v=spf1 a -all"- v=
- Version of the SPF specification
- ip4:
- IP networks of the sending hosts in CIDR notation (ip address/netmask)
- ~all
- The SPF record lists all hosts
- ?all
- The SPF record does NOT list all hosts
mike – Sat, 2006 – 01 – 07 17:08











