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.
- Open the Exchange Management Shell on the Mail Server
- Enter the command:
- Check for 'Recipient Filter Agent' to see if it is enabled:
- To install this feature, enter:
- To enable the feature, run:
- Restart the "Microsoft Exchange Transport" service, using command:
& $env:ExchangeInstallPath\Scripts\Install-AntiSpamAgents.ps1
Enable-TransportAgent “Recipient Filter Agent”
Restart-Service MSExchangeTransport
- 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
- Enable the recipient filter:
- Restart the "Microsoft Exchange Transport" service, using command:
- To set the Hub Transport receive connector to receive filtered email, and correctly validate users addresses:
- Issue the command:
- Note the name of the connector with binding ending :2525 (listening on connections from port 2525)
- Set the receive connector to accept unauthenticated SMTP connections using command:
Get-ReceiveConnector | fl name,bindings
Set-ReceiveConnector -identity '<name from step 7b.>' -PermissionGroups 'AnonymousUsers, ExchangeUsers, ExchangeServers, ExchangeLegacyServers'
- Restart the "Microsoft Exchange Transport" service, using command:
- Run the following command:
- Open port 2525 on the firewall on the MTA's public connection
- Edit the route in SpamExperts (Domain Level Control Panel > Incoming > Destinations) to use port 2525 rather than port 25. See Manage Destinations
Get-TransportAgent
Set-RecipientFilterConfig -RecipientValidationEnabled $true
Restart-Service MSExchangeTransport
Restart-Service MSExchangeTransport
Set-RecipientFilterConfig -RecipientValidationEnabled $true