SPF vs DKIM
People think SPF and DKIM do the same check, and they do not. SPF asks if the server that sent the email is on the domain's list of allowed senders. DKIM checks a hidden signature on the email itself. It proves the email came from the domain and was not changed. Forwarding often breaks SPF but leaves DKIM whole.
Sender Policy Framework (SPF)
A public list of who may send email for a domain.
SPF is a list of the mail servers allowed to send email for a domain. The list is kept in the domain's DNS records, where anyone can read it. A mail server that gets an email checks the list. Mail from any other server looks fake. It stops people faking your domain on an email.
DomainKeys Identified Mail (DKIM)
A hidden mark on each email. It proves who sent it and that nobody changed it.
DKIM adds a hidden signature to each email a domain sends. The sending server signs the email with a secret key. The matching public key sits in the domain's DNS records. The server that gets the email uses it to check two things. The email really came from that domain, and nobody changed it on the way.
In one line
- Sender Policy Framework (SPF)
- A public list of who may send email for a domain.
- DomainKeys Identified Mail (DKIM)
- A hidden mark on each email. It proves who sent it and that nobody changed it.