Checking Exchange 2010 for Open Relay Configuration

There is plenty of information on the web that instructs us how to configure Exchange 2010 (or 2007) to allow for relay of SMTP to external recipients (Open Relay). For example, Microsoft has posted these instructions.

However, I couldn’t easily find any information about how to check if this was already configured. This could be handy in verifying that a recent configuration was successful or with troubleshooting an open relay issue. The following PowerShell command checks all Receive Connectors on all Exchange servers (2007 & 2010) and returns any Receive Connectors that have been granted the ability to relay to external recipients.

[ps light=”1″]
Get-ReceiveConnector | get-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" | Where {$_.ExtendedRights -like "Ms-Exch-SMTP-Accept-Any-Recipient"}

Posted in Exchange 2007, Exchange 2010, PowerShell

Leave a Reply