T13nn3s / Invoke-SpfDkimDmarc

PowerShell Module for checking SPF, DKIM and DMARC-record.
https://binsec.nl/powershell-script-for-spf-dmarc-and-dkim-validation/
MIT License
44 stars 8 forks source link

Include $Server in $Splat to enable using -Server #28

Closed mortenmw closed 1 year ago

mortenmw commented 1 year ago

When running Invoke-SpfDkimDmarc with -Server specified as anything the server is not provided to any function. Whatever DNS server is configured on the computer running the script will be used, this causes issues in split-brain scenarioes where the internal DNS is different from the external.

I've included the specified server in $Splat and provided that to Get-SPFRecord and Get-DMARCRecord. Get-DKIMRecord is already provided this due to the selector.