Enable Recipient Filtering, for Recipient Verification in Exchange Server 2016 and 2019

Versions 2013 and earlier of exchange have reached the official End-of-Life (EOL) with Microsoft and Microsoft has ceased support for these products. The following instructions were correct at time of writing, however, as these versions are no longer officially supported, we cannot guarantee the success of configuration.

  1. Open the Exchange Management Shell on the Mail Server
  2. Enter the command:
  3. Get-TransportAgent

  4. Check for 'Recipient Filter Agent' to see if it is enabled:
    1. To install this feature, enter:
    2. & $env:ExchangeInstallPath\Scripts\Install-AntiSpamAgents.ps1

    3. To enable the feature, run:
    4. Enable-TransportAgent “Recipient Filter Agent”

    5. Restart the "Microsoft Exchange Transport" service, using command:
    6. Restart-Service MSExchangeTransport

  5. Ensure your accepted domains are using Address Book to check for valid recipients. By default, this should be enabled when Exchange is an authoritative Mailbox Server for the domain
  6. Enable the recipient filter:
  7. Set-RecipientFilterConfig -RecipientValidationEnabled $true

  8. Restart the "Microsoft Exchange Transport" service, using command:
  9. Restart-Service MSExchangeTransport

  10. To set the Hub Transport receive connector to receive filtered email, and correctly validate users addresses:
    1. Issue the command:
    2. Get-ReceiveConnector | fl name,bindings

    3. Note the name of the connector with binding ending :2525 (listening on connections from port 2525)
    4. Set the receive connector to accept unauthenticated SMTP connections using command:
    5. Set-ReceiveConnector -identity '<name from step 7b.>' -PermissionGroups 'AnonymousUsers, ExchangeUsers, ExchangeServers, ExchangeLegacyServers'

  11. Restart the "Microsoft Exchange Transport" service, using command:
  12. Restart-Service MSExchangeTransport

  13. Run the following command:
  14. Set-RecipientFilterConfig -RecipientValidationEnabled $true

  15. Open port 2525 on the firewall on the MTA's public connection
  16.  
  17. Edit the route in Mail Assure (Domain Level Control Panel > Incoming > Destinations) to use port 2525 rather than port 25. See Manage Destinations