Explains a domain's email DNS records, including MX, SPF, DKIM, DMARC, and more.

Minimum PowerShell version


Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name MailPolicyExplainer

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name MailPolicyExplainer

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More


Colin Cogle


(c) 2018, 2020, 2023 Colin Cogle. All rights reserved.

Package Details



email mail SPF DKIM DMARC BIMI DNSSEC DANE MTA-STS MX TLSRPT STARTTLS domainkey TLS TLSA ADSP DNS policy SenderID tester Reporting Test Exchange Office365 Google Network Cloud security audit IPv4 IPv6 SMTP RSA Ed25519 Windows MacOS Linux


Test-MailPolicy Test-MXRecord Test-IPVersions Test-DkimSelector Test-AdspRecord Test-DmarcRecord Test-BimiSelector Test-MtaStsPolicy Test-SmtpTlsReportingPolicy Test-SpfRecord Test-DaneRecord Invoke-GooglePublicDnsApi


Core Desktop


This module has no dependencies.

Release Notes

- Test-SpfRecord can now recursively evaluate SPF records to count how many DNS lookups are performed when evaluating `redirect=` modifiers and `include:` tokens.  Use either `Test-SpfRecord -CountDnsLookups`, `Test-SpfRecord -Recurse`, or `Test-MailPolicy -CountSpfDnsLookups` to use this new mode.
- Fixed grammar in some `Test-SpfRecord` messages.
- RFC documents were supposed to be made available as conceptual help, but were not.  This has been corrected.


Version History

Version Downloads Last updated
1.3.0 (current version) 21 11/7/2023
1.2.0 9 10/20/2023
1.1.0 6 10/19/2023
1.1.0-git 2 10/19/2023
1.0.0 14 10/15/2023