Skip to content

Recreate default receive connectors in Exchange Server

There are 5 default Exchange Server receive connectors on Exchange Server 2013/2016/2019. These receive connectors are automatically created when you install Exchange Server. Sometimes, you have to recreate the default receive connectors because you adjusted something, and mail flow isn’t working anymore. In this article, you will learn how to recreate the default receive connectors in Exchange Server.

Exchange Server default receive connectors

Exchange servers use receive connectors to control inbound SMTP connections from:

  1. Messaging servers that are external to the Exchange organization.
  2. Services in the transport pipeline on the local Exchange server or on remote Exchange servers.
  3. Email clients that need to use authenticated SMTP to send messages.

Read more about Exchange Server receive connectors:

Let’s look at the receive connectors in Exchange Server. Sign in to Exchange admin center and navigate to mail flow > receive connectors.

The 5 default Exchange Server receive connectors on Exchange Server are:

  1. Client Frontend
  2. Client Proxy
  3. Default
  4. Default Frontend
  5. Outbound Proxy Frontend
Recreate default receive connectors in Exchange Server list

Recreate default receive connectors

To recreate the default receive connectors in Exchange admin center, go through the below screens and ensure that you configure the same configuration for each receive connector.

Client Frontend receive connector

To recreate the Client Frontend receive connector, go through the below configuration:

General

Client Frontend receive connector general

Security

Client Frontend receive connector security

Scoping

Client Frontend receive connector scoping

Client Proxy receive connector

To recreate the Client Proxy receive connector, go through the below configuration:

General

Client Proxy receive connector general

Security

Client Proxy receive connector security

Scoping

Client Proxy receive connector scoping

Default receive connector

To recreate the Default receive connector, go through the below configuration:

General

Default receive connector general

Security

Default receive connector security

Scoping

Default receive connector scoping

Default Frontend receive connector

To recreate the Default Frontend receive connector, go through the below configuration:

General

Default Frontend receive connector general

Security

Default Frontend receive connector security

Scoping

Default Frontend receive connector scoping

Outbound Proxy Frontend receive connector

To recreate the Outbound Proxy Frontend receive connector, go through the below configuration:

General

Default Outbound Proxy Frontend receive connector general

Security

Default Outbound Proxy Frontend receive connector security

Scoping

Default Outbound Proxy Frontend receive connector scoping

In the next step, we will show how to recreate the default receive connectors with a PowerShell script.

Recreate default receive connectors PowerShell script

To recreate the default receive connectors in Exchange Server with a PowerShell script, follow the below steps.

Step 1. Download Set-ReceiveConnectors PowerShell script

Download and place Set-ReceiveConnectors.ps1 PowerShell script on the Exchange Server C:\scripts folder. If you don’t have a scripts folder, create one.

Ensure the file is unblocked to prevent errors when running the script. Read more in the article Not digitally signed error when running PowerShell script.

Another option is to copy and paste the below code into Notepad. Give it the name Set-ReceiveConnectors.ps1 and place it in the C:\scripts folder.

<#
    .SYNOPSIS
    Set-ReceiveConnectors.ps1

    .DESCRIPTION
    Recreate the default Receive Connectors on the Exchange Server.

    .LINK
    www.alitajran.com/recreate-default-receive-connectors-exchange-server

    .NOTES
    Written by: ALI TAJRAN
    Website:    www.alitajran.com
    LinkedIn:   linkedin.com/in/alitajran

    .CHANGELOG
    V1.00, 09/25/2023 - Initial version
#>

# Specify the target server name
$serverName = "EX01-2019"

# Define IP Range
$range = "0.0.0.0-255.255.255.255", "::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"

# Check if the server with the specified name exists
$targetServer = Get-ExchangeServer -Identity $serverName -ErrorAction SilentlyContinue

if ($targetServer) {
    # Define connector names
    $clientProxyConnectorName = "Client Proxy $serverName"
    $defaultFrontendConnectorName = "Default Frontend $serverName"
    $outboundProxyFrontendConnectorName = "Outbound Proxy Frontend $serverName"
    $clientFrontendConnectorName = "Client Frontend $serverName"
    $defaultConnectorName = "Default $serverName"

    # Check if each connector already exists
    $clientProxyConnectorExists = Get-ReceiveConnector | Where-Object { $_.Name -eq $clientProxyConnectorName -and $_.Server -eq $serverName }
    $defaultFrontendConnectorExists = Get-ReceiveConnector | Where-Object { $_.Name -eq $defaultFrontendConnectorName -and $_.Server -eq $serverName }
    $outboundProxyFrontendConnectorExists = Get-ReceiveConnector | Where-Object { $_.Name -eq $outboundProxyFrontendConnectorName -and $_.Server -eq $serverName }
    $clientFrontendConnectorExists = Get-ReceiveConnector | Where-Object { $_.Name -eq $clientFrontendConnectorName -and $_.Server -eq $serverName }
    $defaultConnectorExists = Get-ReceiveConnector | Where-Object { $_.Name -eq $defaultConnectorName -and $_.Server -eq $serverName }

    # Create connectors that do not already exist
    if (!$clientProxyConnectorExists) {
        New-ReceiveConnector -Name $clientProxyConnectorName `
            -Bindings 0.0.0.0:465, [::]:465 `
            -AuthMechanism Tls, Integrated, BasicAuth, BasicAuthRequireTLS, ExchangeServer `
            -RemoteIPRanges $range `
            -TransportRole HubTransport `
            -PermissionGroups ExchangeUsers, ExchangeServers `
            -MaxMessageSize 35MB -MessageRateLimit 5 -MessageRateSource User -EnableAuthGSSAPI $True `
            -Server $serverName
        Write-Host "Client Proxy Connector created successfully." -ForegroundColor Cyan
    }
    else {
        Write-Host "Client Proxy Connector already exists." -ForegroundColor Yellow
    }

    if (!$defaultFrontendConnectorExists) {
        New-ReceiveConnector -Name $defaultFrontendConnectorName `
            -Bindings 0.0.0.0:25, [::]:25 `
            -AuthMechanism Tls, Integrated, BasicAuth, BasicAuthRequireTLS, ExchangeServer `
            -RemoteIPRanges $range `
            -TransportRole FrontendTransport `
            -PermissionGroups AnonymousUsers, ExchangeServers, ExchangeLegacyServers `
            -MaxMessageSize 36MB -DomainSecureEnabled $True -ProtocolLoggingLevel Verbose `
            -Server $serverName
        Write-Host "Default Frontend Connector created successfully." -ForegroundColor Cyan
    }
    else {
        Write-Host "Default Frontend Connector already exists." -ForegroundColor Yellow
    }

    if (!$outboundProxyFrontendConnectorExists) {
        New-ReceiveConnector -Name $outboundProxyFrontendConnectorName `
            -Bindings 0.0.0.0:717, [::]:717 `
            -AuthMechanism Tls, Integrated, BasicAuth, BasicAuthRequireTLS, ExchangeServer `
            -RemoteIPRanges $range `
            -TransportRole FrontendTransport `
            -PermissionGroups ExchangeServers `
            -MaxMessageSize 36MB -DomainSecureEnabled $True -ProtocolLoggingLevel Verbose `
            -Server $serverName
        Write-Host "Outbound Proxy Frontend Connector created successfully." -ForegroundColor Cyan
    }
    else {
        Write-Host "Outbound Proxy Frontend Connector already exists." -ForegroundColor Yellow
    }

    if (!$clientFrontendConnectorExists) {
        New-ReceiveConnector -Name $clientFrontendConnectorName `
            -Bindings 0.0.0.0:587, [::]:587 `
            -AuthMechanism Tls, Integrated, BasicAuth, BasicAuthRequireTLS `
            -RemoteIPRanges $range `
            -TransportRole FrontendTransport `
            -PermissionGroups ExchangeUsers `
            -MaxMessageSize 35MB -MessageRateLimit 5 -MessageRateSource User -EnableAuthGSSAPI $True `
            -Server $serverName
        Write-Host "Client Frontend Connector created successfully." -ForegroundColor Cyan
    }
    else {
        Write-Host "Client Frontend Connector already exists." -ForegroundColor Yellow
    }

    if (!$defaultConnectorExists) {
        New-ReceiveConnector -Name $defaultConnectorName `
            -Bindings [::]:2525, 0.0.0.0:2525 `
            -AuthMechanism Tls, Integrated, BasicAuth, BasicAuthRequireTLS, ExchangeServer `
            -RemoteIPRanges $range `
            -TransportRole HubTransport `
            -PermissionGroups ExchangeUsers, ExchangeServers, ExchangeLegacyServers `
            -MaxMessageSize 35MB -MaxInboundConnectionPerSource Unlimited `
            -MaxInboundConnectionPercentagePerSource 100 -MaxRecipientsPerMessage 5000 `
            -SizeEnabled EnabledWithoutValue -Server $serverName
        Write-Host "Default Connector created successfully." -ForegroundColor Cyan
    }
    else {
        Write-Host "Default Connector already exists." -ForegroundColor Yellow
    }

}
else {
    Write-Host "Server '$serverName' not found. Please provide a valid Exchange Server name." -ForegroundColor Red
}
  • Line 21: Change to your Exchange Server name.

Step 2. Remove the default receive connectors

It’s important to remove the default receive connector you want to recreate. Suppose you only want to recreate one of them, then only remove that specific default receive connector.

In our example, we will remove all the default receive connectors because we like to recreate them all.

Recreate default receive connectors in Exchange Server remove

Step 3. Run the Set-ReceiveConnector PowerShell script

Start Exchange Management Shell as administrator. Change the path to the scripts folder. Run the PowerShell script to recreate the default receive connectors.

[PS] C:\> cd c:\scripts
[PS] C:\scripts> .\Set-ReceiveConnectors.ps1

The script will show if:

  1. If the default receive connector already exists, it will move on to the next default receive connector.
  2. If the default receive connector does not exist, it will create a new default receive connector with the correct settings.
  3. If the wrong Exchange Server name is set, the script will show that you need to enter a valid Exchange Server name.
Client Proxy Connector created successfully.
Default Frontend Connector created successfully.
Outbound Proxy Frontend Connector created successfully.
Client Frontend Connector created successfully.
Default Connector created successfully.

Step 4. Verify default receive connectors

Verify that the default receive connectors are successfully created in Exchange Server.

Recreate default receive connectors in Exchange Server verify

That’s it!

Read more: Configure postmaster address in Exchange Server »

Conclusion

You learned how to recreate default receive connectors in Exchange Server. If you have issues with inbound mail flow or made changes to the default Exchange Server receive connectors and want to set it back to its original configuration, recreate them. Recreate the receive connectors in Exchange admin center or with the PowerShell script.

Did you enjoy this article? You may also like Find IP addresses using Exchange SMTP relay. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *