Search


print PDF

The SPF Field


The Sender Policy Framework (SPF) allows a receiving mail server to ensure that the email has been sent by a server that has the right. This is designed to limit spam, but only works if the receiving server is configured to inteprete SPF fields. The FPS is created by adding a DNS field type TXT. This field shows the servers authorized to send emails for the domain in question.

Different user options


a:This field shows the name of domains allowed to send emails from this domain

These 2 lines are the same thing:

mon_domaine.fr IN TXT "v=spf1 a ~all"
mon_domaine.fr IN TXT "v=spf1 a:mon_domaine.fr ~all"


mx:This field shows the MX servers authorized to send emails from this domain:

These 2 lines are the same thing, mon_domaine.fr MX servers are allowed to send:

mon_domaine.fr IN TXT "v=spf1 mx ~all"
mon_domaine.fr IN TXT "v=spf1 mx:mon_domaine.fr ~all"


ptr: This field shows the servers with the right to send emails to this domain. This may be the exact reverse or a reverse with the same termination.

These 2 lines are the same thing if monreverse.mon_domaine.fr is the reverse of my mail server:

mon_domaine.fr IN TXT "v=spf1 ptr ~all"
mon_domaine.fr IN TXT "v=spf1 ptr:monreverse.mon_domaine.fr ~all"


This indicates that all servers that have a reverse ending with ovh.net can send emails to this domain:

mon_domaine.fr IN TXT "v=spf1 ptr:ovh.net ~all"


ip4:This field shows the IPv4 classes allowed to send emails to this area.

This indicates that only the IP 213.186.33.20 server can send emails to this domain:
mon_domaine.fr IN TXT "v=spf1 ip4:213.186.33.20 ~all"


include:This field indicates that the field is the same as the SPF field specified in the field include.

mon_domaine.fr IN TXT "v=spf1 include:mon2e_domaine.fr ~all"

All these options can be combined, for example:
domaine.fr IN TXT "v=spf1 a:toto.com mx ptr:ovh.net ~all"

Here the following can send email to domaine.fr:

- The IP of domain toto.com
- The MX servers of domain.fr
- All machines that have a reverse ending with ovh.net


SPF and OVH


OVH offers a default SPF on the hosting server, here is what it is:

domaine.com IN TXT "v=spf1 v=spf1 include:mx.ovh.com ~all"

To use the manager to put a scope up your personalized SPF, you must have the field set to the DNS of OVH:
  • DNS10.OVH.NET
  • NS10.OVH.NET
The establishment in the MANAGER is in Domains & DNS > DNS Zone > Type SPF. An gudie is offered to help you set up your SPF field. If you already know what you want to eneter, expert mode is offered to go directly to the desired FPS.


The tools at your disposal


The MANAGER
Support for the creation of an SPF field: http://old.openspf.org/wizard.html
Validation tools for SPF Fields: http://www.kitterman.com/spf/validate.html