Skip to content

Commit

Permalink
Merge pull request #328 from Snozzberries/exoFix
Browse files Browse the repository at this point in the history
Fixes for EXO 3, 4 in #325
  • Loading branch information
merill authored Jul 13, 2024
2 parents d46a97b + 17112ba commit 0f4108f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,14 @@ Function ConvertFrom-MailAuthenticationRecordDkim {
NameServer = $dkimSplat.Server
ErrorAction = $dkimSplat.ErrorAction
}
$dkimRecord = [DKIMRecord]::new(((Resolve-Dns @dkimSplatAlt).Answers | `
$record = ((Resolve-Dns @dkimSplatAlt).Answers | `
Where-Object {$_.RecordType -eq "TXT"} | `
Where-Object {$_.Text -imatch $matchRecord}).Text)
Where-Object {$_.Text -imatch $matchRecord}).Text
if($record){
$dkimRecord = [DKIMRecord]::new($record)
}else{
return "Failure to obtain record"
}
}else{
Write-Error "`nFor non-Windows platforms, please install DnsClient-PS module."
Write-Host "`n Install-Module DnsClient-PS -Scope CurrentUser`n" -ForegroundColor Yellow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,14 @@ Function ConvertFrom-MailAuthenticationRecordDmarc {
NameServer = $dmarcSplat.Server
ErrorAction = $dmarcSplat.ErrorAction
}
$dmarcRecord = [DMARCRecord]::new(((Resolve-Dns @dmarcSplatAlt).Answers | `
$record = ((Resolve-Dns @dmarcSplatAlt).Answers | `
Where-Object {$_.RecordType -eq "TXT"} | `
Where-Object {$_.Text -imatch $matchRecord}).Text)
Where-Object {$_.Text -imatch $matchRecord}).Text
if($record){
$dmarcRecord = [DMARCRecord]::new($record)
}else{
return "Failure to obtain record"
}
}else{
Write-Error "`nFor non-Windows platforms, please install DnsClient-PS module."
Write-Host "`n Install-Module DnsClient-PS -Scope CurrentUser`n" -ForegroundColor Yellow
Expand Down

0 comments on commit 0f4108f

Please sign in to comment.