DKIM

Overview of DKIM

DomainKeys Identified MailClosed DomainKeys Identified Mail (DKIM) is an email authentication method designed to detect forged sender addresses in email (email spoofing), a technique often used in phishing and email spam. DKIM allows the receiver to check that an email that claimed to have come from a specific domain was indeed authorized by the owner of that domain. It achieves this by affixing a digital signature, linked to a domain name, to each outgoing email message. The recipient system can verify this by looking up the sender's public key published in the DNS. A valid signature also guarantees that some parts of the email (possibly including attachments) have not been modified since the signature was affixed. (DKIM) is an email authentication method designed to detect email spoofing. It allows the receiver to check that an email claiming to come from a specific domain was indeed authorized by the owner of that domain. DKIM uses a digital signature, which is added to the email's header and verified by the recipient's mail server using the sender's public key.

Features and Benefits of DKIM

  1. Email Authentication: DKIM helps verify that the email was sent by an authorized mail server, reducing the risk of email spoofing.
  2. Integrity Check: It ensures that the email content has not been altered during transit.
  3. Improved Deliverability: Emails signed with DKIM are less likely to be marked as spam, improving deliverability rates.
  4. Enhanced Security: By preventing email spoofing, DKIM helps protect against phishing attacks and email fraud.
  5. Brand Protection: It helps maintain the sender's reputation by ensuring that only legitimate emails are sent from their domain.

How DKIM Works

DKIM uses asynchronous encryption to secure emails. This means it uses a pair of keys:

  1. A private key to create a unique signature for each outbound email, and
  2. A public key to which is later used to verify that signature.

Creating a DKIM Signature via Private Key

A private key resides on the mail server, and is used by the server to generate a special code (the DKIM signature) by combining each outbound email's content with the private key. The sender's email server generates a unique DKIM signature for each email.

Adding the DKIM Signature

The generated DKIM signature is added to the email's header as a DKIM-Signature field.

Example header fields in a DKIM-signed email:

DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=webnames.ca; s=mail; bh=bM4geswjXk4vOyViSCxnTzo1KW2mpVshmtFpcIqOcK0=; h=Content-Language:Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; b=GwCP05tBA6Jv0Q0hsMQng/L95OsYbeLW2jREx5NYA18DY1nJy8OnV8q2ut2EFvXxkMSTextOSK WyePaViZOseux5PC/xvD/gza34Zfkj09A2ILlfpF8lE06+CLPIeYXPlUWzEzAUMyStNzDgGiDEhr4 oCccX27pNpwPr3K9MyLKrlwX1qUEDMyJgHwnTCdLyWqwEX2j0t47TPTDsk2nty+XnEUf88poQOrln dKrSwkPntZpki5Yho29LRvRKa9q6JWKMCxmCUVTY0ULCN6wegoWYQOseoSrrp7U+CPH+vxjNCojMv tTwNbd7g5wgsQp+Ule9GCQEM9fJ586KkIkBtA==

Sending the Email

The email, now containing the DKIM signature, is sent to the recipient.

Verifying the DKIM Signature via Public Key

The public key, published in the domain's DNS records, allows the email recipient's server to check this signature and confirm the email's authenticity and integrity. Upon receiving the email, the recipient's mail server retrieves the sender's public key from the sender's domain's DNS records.

Example TXT Record in a sender's DNS:

mail._domainkey.domain.ca. 21600 IN TXT "v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3k4A5sEyZVVCMAz7MMXS/IxX+epN0RPPVJpgSYVslzwKwQQCgaIeeemUcWUbWcxi7h6Y9rxpawpoNDd0GnSSjFj4rTtmlygTRveltRgfuEvef/P09Yoihh2XtvxTm0lcBAeLnQrZLrLc2iqRh1kBOACCnnP1c2lG4re9WJoCM2EseRTq0gYTG4CXhUsV7vJCRv0G64Dr" "lnQtgGax1KnZUocqtB4+VHExIjeGgnBmOEU6ugytYdoANCAPPwoXKvhzMkFveCCnDXO3Cw6DGU2ha5fDD5Fr9CQQAv66jMf6NxMOLSWp8948HD9R3e4Idl49YaoVqlWKqFyywQapFQX99wIDAQAB"mail._domainkey.saundry.ca. 21600 IN TXT "v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3k4A5sEyZVVCMAz7MMXS/IxX+epN0RPPVJpgSYVslzwKwQQCgaIeeemUcWUbWcxi7h6Y9rxpawpoNDd0GnSSjFj4rTtmlygTRveltRgfuEvef/P09Yoihh2XtvxTm0lcBAeLnQrZLrLc2iqRh1kBOACCnnP1c2lG4re9WJoCM2EseRTq0gYTG4CXhUsV7vJCRv0G64Dr" "lnQtgGax1KnZUocqtB4+VHExIjeGgnBmOEU6ugytYdoANCAPPwoXKvhzMkFveCCnDXO3Cw6DGU2ha5fDD5Fr9CQQAv66jMf6NxMOLSWp8948HD9R3e4Idl49YaoVqlWKqFyywQapFQX99wIDAQAB"

The server uses this public key to decrypt the DKIM signature and compares the decrypted hash with a newly generated hash of the email's content.

If the hashes match, it confirms that the email has not been altered and is indeed from the claimed sender.

This process helps ensure that the email is genuinely from the claimed sender and hasn't been tampered with.

Implementing DKIM

Webnames.ca email customer can enable DKIM signing for their email services via their Webnames.ca account.

Prerequisites for DKIM

  1. Sender email must be hosted by Webnames.ca
  2. Sender must be able to add a TXT record to their domain's DNS
  3. Since all legitimate sources of email must be signed with the proper DKIM signature, at this time Webnames must be the only source of legitimate email for the sender's domain. No other mail systems/platforms can be in use*.

*This limitation is subject to change over time. Technically speaking, in order to allow multiple sources/platforms to all be considered legitimate sources of DKIM-signed email, each mail provider/platform must sign all outbound email using the same private key.

Process for enabling DKIM

Ensure that all the aforementioned prerequisites are met.

Click the link below to access the domain(s) that have Webnames.ca email services, and if necessary click on the specific domain you'd like to apply DKIM to.

CLICK HERE TO ACCESS YOUR WEBNAMES.CA EMAIL SERVICES

Click the Email tab, and then scroll down to the Manage DKIM Settings and click the Manage button.

Click the Enable DKIM button.

Provisioning

If Webnames hosts the domain's DNS, the required TXT record will be applied to the domain automatically. After a waiting period to check that this new DNS record has propagated globally, DKIM signing will be enabled on the domain's email service. No further steps or action is required. You will receive a confirmation email once DKIM is active.

If a third-party hosts the domain's DNS, the required DNS TXT record will be provided on-screen. This TXT record need to be applied to the domain's DNS zone at the third-party DNS provider. Webnames' systems will check periodically for the existence and global propagation of this TXT record, and once confirmed, DKIM signing will be enabled on the domain's email service. Once this step has been completed, no further steps or action is required. You will receive a confirmation email once DKIM is active.


DKIM Key Rotation

You can optionally enable DKIM Key Rotation, which:

See also: DMARC Wizard

See also: SPF