dotBATmanNO / PSGet-Domain-MailInfo

PowerShell script to get domain mail info and control status such as MX, SPF, DKIM, DMARC and StartTLS.
GNU General Public License v3.0
12 stars 2 forks source link

Validate NullMX record as per RFC7505 #7

Closed dotBATmanNO closed 4 years ago

dotBATmanNO commented 4 years ago

Add verification that the . (dot) MX record has a preference of 0.

dotBATmanNO commented 4 years ago

` If ( $MXRec -eq "." )
{

. (dot) as MX record indicates Null MX

  If ($MXRecord.Preference -eq 0)
 {
  # With a preference of 0 this is a valid NullMX record
  $MXRec = "Null MX (RFC7505)"
 }
 else 
 {
  $MXRec = "[Invalid:] Null MX (RFC7505) should have Preference=0, was $($MXRecord.Preference)."
 }
}

`