What is an SPF Record?
An SPF Record or Sender Policy Framework Record is a method of validating that an email came from an authorised domain. In other words, it is a way of saying that server1 is allowed to send mail on behalf of server2.
SPF Record Workflow
1. A server with IP address of 188.8.131.52 sends a message FROM email@example.com TO firstname.lastname@example.org
2. The customer.com mail server gets the DNS records of type TXT for website.com, looking for the SPF record
3. The customer.com mail server compares the 184.108.40.206 IP address against the parts of the website.com SPF record
4. The message is accepted or rejected based on which part of the SPF record it matches
What does the SPF Record mean?
v=spf1 a mx include:spf.example.net ~all
To break that down:
The "version" perimeter is a way to let mail parser's know that this is the record to be used, since there can be multiple TXT records associated with a domain.
The mechanism itself runs from left to right and is used to specify different rules on how a domain should check SPF.
You can read in more detail the various mechanisms which are available here.
You can also use the following wizard to create an SPF record https://www.spfwizard.net/