Spam, or junk emails, refers to unsolicited messages often sent in large quantities. Also knowns as “bulk mailings”.

Although some spam emails may be promotional without explicit malice, they can serve as a vector for various types of attacks like phishing, malware spreading or other scam attempts. Therefore, receivers should exercise caution when opening emails and implement measures to minimize the influx of spam.

Why is this important for you as a sender of emails?

As a sender of emails, you need to realise that some emails can be erroneously interpreted as malicious. To avoid this from happening, there are several tools you can implement like DKIM and SPF.

What are DKIM and SPF?

DKIM and SPF are email authentication methods relying on DNS (Domain Name System). Together, they help prevent spammers, phishers, and other unauthorized parties from sending emails on behalf of a domain they do not own.

Domains that have not set up SPF and/or DKIM correctly may find that their emails get quarantined as spam, or are not delivered to their recipients. They are also in danger of having spammers impersonate them.

How does DKIM work?

In DKIM (Domain Keys Identified Mail), the sending server creates a cryptographic signature using a ‘private key’ and adds it to the email in the form of a DKIM header. The receiving mail server sees this signature, looks up the corresponding public key in the DNS, and validates the signature.

If the digital signature is correct, it confirms the sender’s domain, ensuring that the email hasn’t been altered in transit. Spammers don’t know the private key, making it impossible for them to create DKIM-protected emails.

How does SPF work?

In the case of SPF (Sender Policy Framework), a DNS record is included that indicates, among other things, which servers are allowed to send mail for the respective domain. SPF records list all the IP addresses of all the servers that are allowed to send emails from the domain.

Mail servers that receive an email message can check it against the SPF record before passing it on to the recipient’s inbox. If the conditions are not met, the respective email should be considered suspicious by the receiving party.

Where are SPF and DKIM records stored?

SPF and DKIM records are stored in the Domain Name System (DNS), which is publicly available.

The DNS’s main use is matching web addresses to IP addresses, so that computers can find the correct servers for loading content over the Internet without human users having to memorize long alphanumeric addresses.