This document describes the steps to create Outbound and Inbound Connectors in Exchange Online by using the Exchange Admin Center or via PowerShell. Provisioning all emails via Secure Mail Gateway means for every email sent out of your Exchange, a Trusted Share could be created. The following steps will be reviewed:
PREREQUISITES:
The person performing these steps must have an administrator role assignment of Exchange Administrator in the destination M365 tenant.
Create the Outbound Connector (M365 to eSHARE)
Log in to the Exchange Admin Center and navigate to 'Mail flow' > 'Connectors'.
Select the '+ Add a new connector' button.
In the 'New connector' pane:
In the 'Connection from' section, select 'Office 365'.
In the 'Connection to' section, select 'Partner Connector'.
Select the 'Next' button.

In the 'Connector name' pane:
Enter a 'Name' and 'Description' for the connector (ex. M365 to eShare SCG).
Leave the 'Turn it on' option enabled.
Select the 'Next' button.
.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A08%3A45Z&se=2026-11-18T20%3A21%3A45Z&sr=b&sp=r&sig=5zcAtNqRlf3FQ2f9%2FXeSUZIxvA%2FW%2BFomDdqWIcnPFs8%3D)
In the 'Use of connector' pane:
Select the 'Only when email messages are sent to these domains' option.
Enter a * into the dialog box below and select the + button to add it.
Select the 'Next' button.

In the 'Routing' pane:
Input the IP address or the DNS smart host name provided to you by eSHARE, and select '+' to add it.
Select the 'Next' button.
.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A08%3A45Z&se=2026-11-18T20%3A21%3A45Z&sr=b&sp=r&sig=rK9h5dR%2Bcc8g8cQ7Atc205K2DhCz8jdlTn3Dof3eIOA%3D)
In the 'Security restrictions' pane:
Select the 'Always use Transport Layer Security (TLS) to secure the connection' option.
Select the 'Any digital certificate, including self-signed certificates' option and select 'Next'.
Select the 'Next' button.
.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A08%3A45Z&se=2026-11-18T20%3A21%3A45Z&sr=b&sp=r&sig=5Y2cLTMuZMw71pKwiyWqJcub959I0H7DHfRIitDhPMI%3D)
In the 'Validation email' pane, input an external email address, select the '+' button, then select 'Validate' to allow Exchange Online to validate the newly provisioned connector. After validation is completed, select the 'Next' button.

In the 'Review connector' pane, review the settings, and select 'Create connector' to create & save it. Select 'Done' to close the pane.
.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A08%3A45Z&se=2026-11-18T20%3A21%3A45Z&sr=b&sp=r&sig=KECTrsf4pH8hIZ5vGIU3Fa7%2BF3kKRPHgFA1yzuUh7tA%3D)
Create the Inbound Connector (eSHARE to M365)
Log in to the Exchange Admin Center and navigate to 'Mail flow' > 'Connectors'.
Select the '+ Add a new connector' button.
In the 'New connector' pane:
In the 'Connection from' section, select 'Office 365'.
In the 'Connection to' section, select 'Partner organization'.
Select the 'Next' button.

In the 'Connector name' pane:
Input a 'Name'.
Input a 'Description'.
Leave the 'Turn it on' option enabled.
Select the 'Next' button.

In the 'Authenticating sent email' pane:
Select the second option and input the IP address provided by eSHARE.
Select the '+' button, followed by the 'Next' button.
.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A08%3A45Z&se=2026-11-18T20%3A21%3A45Z&sr=b&sp=r&sig=gtrFlpcqEB1707J6R%2Fv6kT41Tx5lVlanaA4X2TzyEpY%3D)
In the 'Security Restrictions' pane:
Select 'Reject email messages if they aren’t sent over TLS'.
Select the 'Next' button.

In the 'Review connector' pane, review the settings and select the 'Create connector' button.

Select 'Done' to close the pane. The newly created connectors are displayed on the 'Mail flow' > 'Connectors' page.
Create the Connectors with PowerShell
Instead of the Exchange Admin Center, the connectors for eSHARE may be created using Exchange Online PowerShell. Running the PowerShell cmdlets shown below requires the Exchange Online PowerShell V2 module. To install the necessary prerequisites, please visit: https://docs.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps#install-and-maintain-the-exo-v2-module
In PowerShell, run the command below to load the EXO V2 module.
Import-Module ExchangeOnlineManagementConnect to Exchange Online as an Exchange Administrator.
Connect-ExchangeOnline -UserPrincipalName myadminuser@myorgdomain.comRun the command below to verify the connection to Exchange Online.
Get-MailboxRun the command below to create the Outbound Connector (partner connector). Change the values for -Name and -Comment as desired. The value for -SmartHosts will be provided by eSHARE.
New-OutboundConnector -Name "M365 to eShare SCG" -RecipientDomains * -TlsSettings EncryptionOnly -SmartHosts <IP/FQDN> -ConnectorType Partner -IsTransportRuleScoped $false -TestMode $False -Enabled $true -UseMXRecord $FalseRun the command below to create the Inbound Connector. Change the values for -Name and -Comment as desired. The value for -SenderIPAddresses will be provided by eSHARE.
New-InboundConnector -Name "eShare SCG to M365" -SenderDomains * -SenderIPAddresses "insert_ip_address" -ConnectorType Partner -RestrictDomainsToIPAddresses $trueVerify the connectors are created as required by reviewing them in the Exchange Admin Center or by running the following commands. Update the connector names as applicable.
Get-OutboundConnector "M365 to eShare SCG" | Format-list
Get-InboundConnector "eShare SCG to M365" | Format-listRun the following command to validate the Outbound Connector. Update the connector name as applicable.
Validate-OutboundConnector -Identity "M365 to eShare SCG" -Recipients user@externaldomain.com,user@publicemaildomain.comAfter successful validation, disconnect from Exchange Online PowerShell by running the command below.
Disconnect-ExchangeOnline