This document describes how to replace the existing DKIM signing key on an ESA and DKIM public key in DNS with no downtime.
You will first need to create a new DKIM signing key on the ESA:
Note: In most cases, it's recommended that you choose a 2048 bits private key size.
Note: This change won't affect DKIM signing or mail flow. We are just adding a DKIM signing key and not applying it to any DKIM signing profile yet.
Next, you will need to create a new DKIM signing profile, generate a DKIM DNS record from that DKIM signing profile and publish that record to DNS:
Note: The selector is an arbitrary string that is used to allow multiple DKIM DNS records for a given domain. We are going to utilize the selector to allow more than one DKIM DNS record in DNS for your domain. It is important to use a new selector that is different from the already existing DKIM signing profile.
Caution: It is important that you add an unused email address as a user for this signing profile. Otherwise, this profile may sign outbound messages before the DKIM TXT record is published causing DKIM verification to fail. Adding an unused email address as a user ensures that this signing profile doesn't sign any outbound messages.
selector2._domainkey.example.com. IN TXT "v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwMaX6wMAk4iQoLNWiEkj0BrIRMDHXQ7743OQUOYZQqEXSs+jMGomOknAZJpjR8TwmYHVPbD+30QRw0qEiRY3hYcmKOCWZ/hTo+NQ8qj1CSc1LTMdV0HWAi2AGsVOT8BdFHkyxg40oyGWgktzc1q7zIgWM8usHfKVWFzYgnattNzyEqHsfI7lGilz5gdHBOvmF8LrDSfN" "KtGrTtvIxJM8pWeJm6pg6TM/cy0FypS2azkrl9riJcWWDvu38JXFL/eeYjGnB1zQeR5Pnbc3sVJd3cGaWx1bWjepyNQZ1PrS6Zwr7ZxSRa316Oxc36uCid5JAq0z+IcH4KkHqUueSGuGhwIDAQAB;"
Once the DKIM TXT record has been submitted to DNS and you ensured that it has been propagated, the next step will be to delete the old signing profile and remove the placeholder user from the new signing profile:
Note: It is highly recommended that you backup the ESA configuration file before proceeding with the following steps. This is because if you delete the old DKIM signing profile and there is a need to revert back to the previous configuration, you will be able to easily load the backed up configuration file.
At this point, you are done with configuring DKIM any further. However, you should test DKIM signing to ensure that it's signing your outbound messages as expected and passing DKIM verification:
Authentication-Results: mx1.example.net; spf=SoftFail smtp.mailfrom=user1@example.net; dkim=pass header.i=none; dmarc=fail (p=none dis=none) d=example.net
DKIM-Signature: a=rsa-sha256; d=example.net; s=selector2;
c=simple; q=dns/txt; i=@example.net;
t=1117574938; x=1118006938;
h=from:to:subject:date;
bh=MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=;
b=dzdVyOfAKCdLXdJOc9G2q8LoXSlEniSbav+yuU4zGeeruD00lszZ
VoG4ZHRNiYzR