This article shares information about configuring DNS records for setting up DKIM in Kerio Connect by covering adding a DKIM record to your DNS, obtaining DKIM Public Key, creating a short 1024 bit DKIM key, and adding a New Private key to Kerio Connect.
Failed to parse DKIM public key from DNS record: Public key could
not be loaded (invalid DER data) error potentially can be caused by DNS cache issues.
Adding a DKIM Record to Your DNS
The process of adding a DKIM record to your DNS may vary according to your provider. To add your DKIM public key to DNS, you can:
- Ask your provider to add the record for you; or
- Do it yourself in the DNS administration console.
The public key in Kerio Connect includes two parts:
- Record name (or selector), for example:
- TXT value, for example:
v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfl0chtL4siFYCrSPxw43fqc4z Oo3N+Il220oK2Cp+NZw9Kuvg8iu2Ua3zfbUnZWvWK4aEeooliRd7SXIhKpXkgkwn AB3DGAQ6+/7UVXf9xOeupr1DqtNwKt/NngC7ZIZyNRPx1HWKleP13UXCD8macUEb bcBhthrnETKoCg8wOwIDAQAB
Please note the following about the DKIM public key:
- The TXT value consists of a single line of text.
- The DKIM public key is the same for all domains on a single server (in a single Kerio Connect).
- The DKIM public key in Kerio Connect is 2048-bit. Some providers may restrict the length of the key (the TXT value).
Note: If a domain includes aliases, add DNS record for DKIM to all aliases.
Obtaining DKIM Public Key in Kerio Connect
- In the administration interface, go to the section Configuration > Domains.
- Double-click your domain and go to the General tab.
- Click the Show public key button. This opens a dialog with your domain public key.
- Copy the text to create your DNS DKIM record. Make sure that the record contains the whole text.
Creating a Short DKIM Public Key
Note: Kerio Connect includes a 2048-bit DKIM public key. If the public key is too long (some providers may restrict the length of the TXT value), you can use an online DKIM key creator to create a 1024-bit key.
Follow these steps to generate a short DKIM key using the DKIM wizard:
- Go to the DKIM wizard page.
- Enter your Domain name and DomainKey Selector (use mail).
- Click Generate.
- Confirmation: The page displays your public and private keys. You may now add the new private key to Kerio Connect.
Adding a New Private Key to Kerio Connect
- Stop the Kerio Connect server.
- Go to Kerio Connect installation directory folder:
- Copy the generated private key to the private.key file.
Note: It is recommended that you always back up the original private key.
- Start the Kerio Connect server.
Kerio Connect will now show the shorter public key in the domain's configuration. You can now create the DNS DKIM record with the new public key.
Note: If you use distributed domains, make sure the new private key is available on all servers.
BIND DNS Server
If you use a BIND DNS server, you can split the original Kerio Connect DKIM public key (TXT value) by using the following format: TXT (
"part 2" ...
Consider this example: