At first: Exchange on premises does not support DKIM signing and verifying out of the box. Microsoft hasn´t added that yet and might also not do that. So you need a plugin.
But if you wish to go forward here, then Microsoft has a great tutorial here which explains how to setup DKIM on an on-premises Exchange environment.
In general the following steps are needed:
- Create your signing key. You can use the dkimcore.org site to generate a key pair. This should be used for testing purposes only, since the key pair is generated and stored on this website (maybe only temporary but who knows). A better way would be to generate a own set of keys with OPENSSL or PUTTYGEN.
- Publish your DKIM DNS record for your domain (example for contoso.com here):
1490088847.contoso._domainkey.contoso.com. IN TXT (
- Enable the DKIM signing and encrypting option for all outbound emails. This is basically done via a transport rule. So you need to download a 3rd party software (e.g. dkim-exchange, DkimX, ...) and install that on the Exchange 2016 Edge Transport Server) and then configure the DKIM signing module (which is basically a transport rule as mentioned).
Onced added to DNS you can use the dkimcore.org site to test the public DKIM Core key. You can enter the selector and domain name, or you can enter the record that was found in the previous step. Or you can use mxtoolbox.com.
You might also wish to check SPF but thats offtopic here as its not related to DKIM. Its mostly easier to implement.