8000 MS.EXO.4.1 false matches for domain names · Issue #946 · maester365/maester · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
MS.EXO.4.1 false matches for domain names #946
Open
@cstaubli

Description

@cstaubli

Hello @soulemike

The current regex in test Test-MtCisaDmarcRecordExist.ps1

$matchDomain = "(?:^|\.)(?'second'\w+.\w+$)"

has incorrect matches if the domain name has a dash (-) and a three-letter tld in it. For example, for domain 'test-domain.com' it matches and capture group 'second' is '.com', which obviously leads to errors in dmarc check.

If I understand this correctly it tries to get the top-level domain if a second-level domain is provided: test.domain.com -> domain.com.

Given there is an abundance of tlds available it is almost impossible to have a correct regex for all scenarios -> https://stackoverflow.com/a/21173813

Wouldn't it be better just to remove the regex and test dmarc records as is? In my example the two second-level domains are [tenantname].onmicrosoft.com and [tenantname].mail.onmicrosoft.com which both end up as skipped with dmarc check without regex.

Environment

Maester-Version: 1.1.2
PS-Version: 7.5.1

Kind regards
Christian

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0