Sender Policy Framework (SPF) DNS records can be created to help prevent spammers from disguising themselves as you. This is a method called spoofing where a spammer alters the message header details to show the message coming ‘From’ a different email address than the one actually sending it. This results in replies and rejections that are sent to your email address for mail you never actually sent.
For more details regarding the message spoofing, please refer to the following article:
How does SPF work?
Mail servers that receive an email for delivery can check SPF by comparing the sending server's IP address against the email's envelope sender's SPF DNS record. If the email was sent from a server that is not included in that SPF record, the email is more likely to be spoofed or untrustworthy. The receiving mail server may handle the email differently because of the SPF failure, such as marking the email as spam or rejecting the email.
By default, your domain is not set up with an SPF record. Since you can choose to host your domain’s mail hosting with any mail provider you wish, you’d need to configure that host’s SPF record to your domain. Each domain can only have one SPF record, and you may need to include information from many different servers, such as mail servers, your web server, a marketing company that sends out newsletters to your customers – any server that you want to allow to send mail from your domain.
When is basic SPF not enough?
There are a few cases when a basic SPF record is not enough:
- If you send email from your website and don't use SMTP, you should add your webserver's IP address to the SPF record.
- If you use a mass-mailing service, you should add that provider's servers to your SPF record.
Remember that a domain can only have one SPF record, so you'll need to combine all of the information into a single record. The following article has some information on how to build an SPF record and what each part of the record means.
- Sender domain policy and spoofing overview
- How do I add an SPF record?
- Basic DNS records
- DNS propagation overview
- DreamHost DNS overview
- How do I add custom DNS records?