DomainKeys Identified Mail (DKIM)

What is a DKIM Signature?

A DKIM signature is an encrypted header that is added to emails. This header provides details that enable a recipient mail server to validate an email by looking up the sender’s public DKIM key and verifying the encrypted signature with it. Here is an example of a DKIM signature:

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=sparkpost.com; s=google;
h=from:content-transfer-encoding:subject:message-id:date:to:mime-version;
bh=ZkwViLQ8B7I9vFIen3+/FXErUlKv33PmCuZAwpemGco=;
b=kF31DkXsbP5bMGzOwivNE4fmMKX5W2/Yq0YqXD4Og1fPT6ViqB35uLxLGGhHv2lqXBWwFhODPVPauUXaRYEpMsuisdU5TgYmbwSJYYrFLFj5ZWqZ7VGgw6/nI1hoPWbzDaL9qh

 Read more on DKIM Signature

How is DKIM Related to SPF and DMARC?

The following points describe the DKIM’s relationship with SPF and DMARC:

  • Through SPF, senders can specify which IP addresses are allowed to send emails using a specific domain.
  • DKIM provides an encryption key as well as a digital signature that ensures that an email message is not forged or tampered with.
  • DMARC combines SPF and DKIM authentication procedures and allows domain owners to specify how an email from their domain should be handled if it fails authentication.

Advantages of DKIM

For email receivers, the key benefit is that DKIM allows the signing domain to accurately identify a stream of legitimate emails, making domain-based blacklists and whitelists more effective. It also makes it easier to identify certain types of phishing attacks:

  • Spam filtering
    DKIM can help identify mail that isn’t known to be spam and does not need to be filtered. If a receiving system maintains a whitelist of authentic sending domains that can be kept locally or obtained from third-party certifiers, it can skip the filtering of signed emails from those domains and filter the remaining emails more aggressively.
  • Compatibility
    DKIM is compatible with existing email infrastructure because it is implemented using DNS records and an extra RFC 5322 header field. It is especially apparent to existing email systems that do not support DKIM.
  • Anti-phishing
    DKIM can be used to defend against phishing attacks. Mailers in intensively phished domains can sign their emails to prove their authenticity. The absence of a valid signature on an email from these domains can be interpreted by recipients as a clue that the email is most likely forged.
  • Non-repudiation
    The non-repudiation feature of DKIM does not let senders deny that they have sent an email. This has been essential to news organizations as they have been able to use DKIM body signatures to confirm that leaked emails were authentic and untampered with.

Limitations of DKIM

Nothing is ever flawless, and nothing can genuinely guarantee total security. DKIM records, too, have a few drawbacks.

  • The message envelope that contains the return path and message recipients is not covered by DKIM signatures.
  • Because DKIM does not sign all sections of the message and only authorizes certain headers, malicious actors can forge the email by adding more header fields.
  • The information validated by DKIM is only on the server-side. End users do not benefit much from the fact that an email is validated by DKIM.

Top 5 Myths about DKIM

Despite the popularity DKIM has gained over the years, there still exists some misunderstanding about what DKIM does and does not do. Following are the top 3 myths regarding DKIM:

  • A DKIM signed email can never be a spam
    Any mail system can sign incoming emails, which means that spammers, too, can sign their emails. In its most basic form, a DKIM signature contains the signer’s domain and the message’s checksum. If you get a message with a valid DKIM signature, all that can be interpreted from it is that the incoming email was the same as the one signed by the signer. This is because the checksum verifies that the domain’s masked email is legitimate. When you have a stream of emails signed by the same domain, DKIM becomes useful.
  • A DKIM signature guarantees that the information in the header is authentic
    No, a DKIM signature just signifies that the incoming email is the same as the one signed by the sender. Signers can sign whatever they wish. Even if the signing domain matches the domain component of the ‘From:’ address, which is referred to as a ‘first party’ signature, there’s no guarantee that the ‘From:’ line you see is the one they signed.

  • DKIM provides email encryption
    No, DKIM does not encrypt emails. It simply uses digital signatures to confirm whether the email was sent by an authentic domain. The private key used by DKIM is saved either on the sender’s own server or with their ESP. The public key, on the other hand, is added to the DNS records of the sender’s domain and broadcasted to the world to help verify all emails.

  • A message with an invalid DKIM signature is always forged.
    A message that fails DKIM validation is not always forged. There can be many other reasons, such as the sender does not have DKIM configured or some of your email filtering systems might be blocking it. One of the most common scenarios is when the message comes from a legitimate third-party system that does not have DKIM configured.

  • Because DKIM details are published in the DNS, they can be forged.
    DKIM cannot be forged. The entire DKIM validation process is made possible by a pair of private and public keys. The private key must be kept confidential and is saved either on the sender’s own server or with their ESP. The public key, on the other hand, is added to the DNS records of the sender’s domain and broadcasted to the world to help verify all emails.

Steps to set up DKIM

DKIM configuration has three simple yet major steps.

  • Generate a public domain key for the concerned domain.
  • Add the public key to the DNS entries for that domain. This key can be used by email servers to validate DKIM signatures in your messages.
  • To begin applying a DKIM signature to all outgoing messages, enable DKIM signing.

 For detailed information check DKIM Setup Guide

 To validate your DKIM signature, head to EmailAuth’s DKIM Record Checker

Why Does DKIM Validation Fail?

A DKIM check fails when the DKIM authentication fails. A DKIM check failure occurs when:

  • The sender’s domain and the DKIM signature domain do not match.
  • The DKIM public key entry in DNS is either inaccurate or non-existent.
  • The DNS zone for the sender’s domain is unavailable for lookup.
  • The DKIM key, which is used for signing, is too short.
  • The email body is altered during the auto-forward process.

Ready to get started?

Request demo