{"id":18302414,"url":"https://github.com/rhymeswithmogul/mailpolicyexplainer","last_synced_at":"2025-04-05T14:31:33.029Z","repository":{"id":200088458,"uuid":"704743697","full_name":"rhymeswithmogul/MailPolicyExplainer","owner":"rhymeswithmogul","description":"A PowerShell module to test and explain all facets of a domain's email records.","archived":false,"fork":false,"pushed_at":"2025-03-04T01:02:31.000Z","size":1893,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T06:01:35.929Z","etag":null,"topics":["bimi","dane","dkim","dkim-verifier","dmarc","dmarc-parser","dnssec","email","mail","mta-sts","mx","nullmx","powershell","powershell-module","pwsh","pwsh-module","spf","spf-parse","tlsa","tlsa-records"],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages/MailPolicyExplainer/","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhymeswithmogul.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null},"funding":{"buy_me_a_coffee":"colincogle"}},"created_at":"2023-10-14T01:02:52.000Z","updated_at":"2025-03-04T03:25:29.000Z","dependencies_parsed_at":"2024-04-15T22:42:45.377Z","dependency_job_id":"0a6b5d0a-ea99-49b9-ab2d-8a0b8b54c6d7","html_url":"https://github.com/rhymeswithmogul/MailPolicyExplainer","commit_stats":null,"previous_names":["rhymeswithmogul/mailpolicyexplainer"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhymeswithmogul%2FMailPolicyExplainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhymeswithmogul%2FMailPolicyExplainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhymeswithmogul%2FMailPolicyExplainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhymeswithmogul%2FMailPolicyExplainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhymeswithmogul","download_url":"https://codeload.github.com/rhymeswithmogul/MailPolicyExplainer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247352640,"owners_count":20925309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bimi","dane","dkim","dkim-verifier","dmarc","dmarc-parser","dnssec","email","mail","mta-sts","mx","nullmx","powershell","powershell-module","pwsh","pwsh-module","spf","spf-parse","tlsa","tlsa-records"],"created_at":"2024-11-05T15:19:51.921Z","updated_at":"2025-04-05T14:31:28.942Z","avatar_url":"https://github.com/rhymeswithmogul.png","language":"PowerShell","funding_links":["https://buymeacoffee.com/colincogle"],"categories":[],"sub_categories":[],"readme":"# MailPolicyExplainer\n![GitHub release (with filter)](https://img.shields.io/github/v/release/rhymeswithmogul/MailPolicyExplainer)\n![GitHub](https://img.shields.io/github/license/rhymeswithmogul/MailPolicyExplainer?logo=gnu)\n[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/MailPolicyExplainer?logo=powershell\u0026label=PowerShell%20Gallery%20downloads)](https://www.powershellgallery.com/packages/MailPolicyExplainer/)\n\n![Unofficial logo: email with an info icon](https://raw.githubusercontent.com/rhymeswithmogul/MailPolicyExplainer/main/icon/icon.svg)\n\nA PowerShell module to fetch and analyze a domain's mail-related DNS records.\n\n# SHORT EXAMPLE\n```powershell\nPS C:\\\u003e  Test-MailPolicy contoso.com\n```\n\n# LONG DESCRIPTION\nMailPolicyExplainer is just that: a PowerShell module that will retrieve all of a domain's email-related DNS records, and show them to the user. However, unlike a simple call to `Resolve-DnsName`, this module will actually analyze them and show you what they mean, rather than just what they are.\n\nThis module supports MX, SPF, DKIM ADSP, DMARC, DANE, MTA-STS, and SMTP TLS Reporting; as well as evaluating whether or not records are signed with DNSSEC. In addition, if you provide names of selectors, DKIM and BIMI selector records are also evaluated.\n\n# EXAMPLES\nMost people using this module will want to use the `Test-MailPolicy` cmdlet, which runs every single test in order.  Though it may not be obvious which DKIM and BIMI selector names exist (save for email services like Exchange Online who use well-known DKIM selector names -- selector1 and selector2), the `-DkimSelectorsToCheck` and `-BimiSelectorsToCheck` can be used to test known selectors.\n\nIn its simplest form, `Test-MailPolicy` will review almost every DNS record available.\n```powershell\nPS C:\\\u003e  Test-MailPolicy contoso.com\n```\n\n## Checking DKIM Selectors\nExchange Online always uses DKIM selectors \"selector1\" and \"selector2\".  If a domain doesn't use any other email sending platforms (such as Constant Contact), you can test any Office 365 customer with this command:\n```powershell\nPS C:\\\u003e  Test-MailPolicy fabrikam.com -DkimSelectorsToCheck \"selector1\",\"selector2\"\n```\n![MailPolicyExplainer's output when running:  Test-MailPolicy -DkimSelectorsToCheck 'selector1','selector2' microsoft.com](https://raw.githubusercontent.com/rhymeswithmogul/MailPolicyExplainer/main/man/en-US/Microsoft.com.png)\n\nBut what if they *do* use something like Constant Contact?  Assuming the DKIM selector name is known:\n```powershell\nPS C:\\\u003e  Test-MailPolicy woodgrovebank.com -DkimSelectorsToCheck \"selector1\",\"selector2\",\"constantcontact\"\n```\n\nNote that sometimes emails can come from subdomains, and those subdomains will have their own DNS records.  You will need to run this cmdlet once per domain.\n```powershell\nPS C:\\\u003e  Test-MailPolicy tailspintoys.com -DkimSelectorsToCheck \"selector1\",\"selector2\"\nPS C:\\\u003e  Test-MailPolicy shop.tailspintoys.com -DkimSelectorsToCheck \"shopify\"\n```\n\n## Running Only Some Tests\nOr, if you only want to test one aspect of email, you can test items individually.  For example, if yu're working on MTA-STS, you can skip all the other checks.\n```powershell\nPS C:\\\u003e  Test-MtaStsPolicy adatum.com\n```\n\n![MailPolicyExplainer's output when running:  Test-MaStsPolicy colincogle.name](https://raw.githubusercontent.com/rhymeswithmogul/MailPolicyExplainer/main/man/en-US/MyMtaSts.png)\n\n\n## SPF DNS Lookup Counts\nIt can also count how many DNS lookups are in an SPF record.\n```powershell\nPS C:\\\u003e  Test-MailPolicy northwindtraders.com -CountSpfDnsLookups  # or\nPS C:\\\u003e  Test-SpfRecord  northwindtraders.com -CountDnsLookups     # or\nPS C:\\\u003e  Test-SpfRecord  northwindtraders.com -Recurse\n```\n\n![MailPolicyExplainer's output when running:  Test-SpfRecord -Recurse microsoft.com](https://raw.githubusercontent.com/rhymeswithmogul/MailPolicyExplainer/main/man/en-US/MicrosoftSPF.png)\n\n\n# Further Help\nFor more help, why not start with [the conceptual help](https://github.com/rhymeswithmogul/MailPolicyExplainer/blob/main/man/en-US/about_MailPolicyExplainer.md)?","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhymeswithmogul%2Fmailpolicyexplainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhymeswithmogul%2Fmailpolicyexplainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhymeswithmogul%2Fmailpolicyexplainer/lists"}