Created
September 26, 2020 19:32
-
-
Save seanosullivanuk/af4adeb77214903adbf3e204604914c4 to your computer and use it in GitHub Desktop.
Enable DKIM on a custom domain, with Microsoft 365 Exchange Online
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, create a new DKIM Signing config for your custom domain | |
New-DkimSigningConfig -DomainName novelica.co.uk -Enabled $true | |
# Next, output the necessary CNAME records you need to create | |
Get-DkimSigningConfig -Identity novelica.co.uk | Format-List Selector1CNAME, Selector2CNAME | |
# Once the CNAME records are in your DNS, enable DKIM signing | |
Set-DkimSigningConfig -Identity novelica.co.uk -Enabled $true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's fairly easy to work out the CNAME formatting ahead of time if you have a number of these to do. So long as the right CNAME's are in your DNS ahead of time, you only need to run the New-DkimSigningConfig commandlet, as it will check for the CNAME's and enable the config if they're there.
e.g. for contoso.com:
selector1._domainkey with the Content set to selector1-contoso-com._domainkey.contosocom.onmicrosoft.com
selector2._domainkey with the Content set to selector2-contoso-com._domainkey.contosocom.onmicrosoft.com