Custom Receive Connector on Exchange 2019 not working properly

Steege 116 Reputation points
2020-11-17T17:35:51.313+00:00

In Exchange 2019, I recently created a new receive connector in EMS to allow anonymous users to relay. It’s configured only to allow a specific server to send messages. Messages destined for internal users are delivered. However, messages for external email addresses are not delivered. This is the error in the logs: Unable to relay recipient in non-accepted domain.
This hasn’t been working for a while, possibly since we installed Exchange 2019 this past summer. I removed the previous receive connector and created a new one in power shell with no success. These are the commands I used:

 New-ReceiveConnector -Name "Relay Out" -TransportRole FrontendTransport -Custom -Bindings 172.x.x.x:25 -RemoteIpRanges 172.x.x.x

 Set-ReceiveConnector "Relay Out" -PermissionGroups AnonymousUsers

 Get-ADPermission "Relay Out" -User "MS Exchange\Externally Secured Servers" | where {($_.Deny -eq $false) -and ($_.IsInherited -eq $false)} | Format-Table User,ExtendedRights

How do I allow the server to send to anyone?

Exchange | Exchange Server | Management
0 comments No comments
{count} votes

Accepted answer
  1. Steege 116 Reputation points
    2020-11-24T16:48:58.127+00:00

    I tried both the ip of the server and any which didn't work. I contacted a vendor who assisted me. I had to these commands to the new receive connector:

    Set-ReceiveConnector "EXSERVER\Relay Out EXSERVER" -PermissionGroups AnonymousUsers

    and

    Get-ReceiveConnector "EXSERVER\Relay Out EXSERVER" | Add-ADPermission -User 'NT AUTHORITY\Anonymous Logon' -ExtendedRights MS-Exch-SMTP-Accept-Any-Recipient


1 additional answer

Sort by: Most helpful
  1. Kael Yao 37,746 Reputation points Moderator
    2020-11-18T02:45:01.873+00:00

    @Steege
    Hi,

    New-ReceiveConnector -Name "Relay Out" -TransportRole FrontendTransport -Custom -Bindings 172.x.x.x:25 -RemoteIpRanges 172.x.x.x  
    

    Does the ip address in "Bindings" belong to the specific server which you would like to allow to send messages?
    It is supposed to be the ip address of the network adapters on the Exchange server.

    If so,please change it to 0.0.0.0:25 or the ip address of a specific network adapter.
    And see if the problem persists.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.