What is SPF?
Sender Policy Framework (SPF) is the anti-forgery solution for email. An SPF record is a one-line entry in your DNS record that indicates which mail servers are permitted to send email with a given "From" address. This record combats possible forged return addresses which makes it easier to identify 'spoofed' emails. SPF is an attempt to counter email address spoofing, in which a sender uses someone else's email address as the apparent sender of an email.
How SPF Works:
SPF policy data is published on a DNS server in a TXT record. DNS resolvers typically cache SPF data to reduce lookup traffic. Sender domains do not have to run new servers to advertise SPF information; instead, SPF uses the connecting client's IP address and information from the SMTP envelope to evaluate the SPF policy document published via DNS. After the policy is evaluated, the message is classified and handled accordingly.
How to setup an SPF record:
For every domain you send mail for you will need to create a TXT record in your domain's DNS with the following line:
v=spf1 mx ip4:126.96.36.199/27 ip4:188.8.131.52/27 ip4:184.108.40.206/26 ip4:220.127.116.11/26 ip4:18.104.22.168/24 ip4:22.214.171.124/24 ip4:126.96.36.199/20 ip4:188.8.131.52/21 ip4:184.108.40.206/21 –all