Publishing SPF Records

Setting up your domain to support SPF records is as simple as setting up a DNS TXT record. Let’s say you have the domain mydomain.com, and it originates all email from mydomain.com users from the netblock 1.2.3.4/24. The SPF TXT record for this domain is

mydomain.com    IN    TXT    "v=spf1 ip4:1.2.3.4/24 -all"

If the owner of mydomain.com has MX machines that originate messages but that are not in the 1.2.3.4 netblock, those can be added with the mx keyword. If the owner of mydomain.com wants to allow any host that ends in mydomain.com to be authorized to send email, then those can be added with the ptr keyword. The complete SPF record is

mydomain.com    IN    TXT    "v=spf1 mx ptr ip4:1.2.3.4/24 -all"

The SPF web site (http://spf.pobox.com/ ...

Get Slamming Spam: A Guide for System Administrators now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.