--- title: "Configure SCG for Exchange Online (Route all Emails)" slug: "configure-scg-for-exchange-online-route-all-emails" tags: ["Secure Mail", "Exchange Online"] updated: 2026-10-16T20:08:32Z published: 2026-10-16T20:08:32Z canonical: "docs.eshare.com/configure-scg-for-exchange-online-route-all-emails" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.eshare.com/llms.txt > Use this file to discover all available pages before exploring further. # Configure SCG for Exchange Online (Route all Emails) 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: - [Create the Outbound Connector (M365 to eSHARE)](/collaborate/docs/configure-scg-for-exchange-online-route-all-emails#outbound-connector-m365-to-eshare) - [Create the Inbound Connector (eSHARE to M365)](/collaborate/docs/configure-scg-for-exchange-online-route-all-emails#inbound-connector-eshare-to-m365) - [Create the Connectors with PowerShell](/collaborate/docs/configure-scg-for-exchange-online-route-all-emails#create-connectors-powershell) > **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)** 1. Log in to the Exchange Admin Center and navigate to '**Mail flow**' > '**Connectors**'. 2. Select the '**+ Add a new connector**' button. 3. In the '**New connector**' pane: 1. In the '**Connection from**' section, select '**Office 365**'. 2. In the '**Connection to**' section, select '**Partner Connector**'. 3. Select the '**Next**' button. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 09.18.50@2x.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=zYKpnzX85O8%2BDQxk2v04sKfSYpbI%2FCS2%2FT6FS7%2BqAbs%3D) 1. In the '**Connector name**' pane: 1. Enter a '**Name**' and '**Description**' for the connector (ex. **M365 to eShare SCG**). 2. Leave the '**Turn it on**' option enabled. 3. Select the '**Next**' button. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 10.04.22@2x(1).png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=Zj5MrCxsxsWL7qQLRfywOiT2TfAv2jkMa1JoHWSC00w%3D) 1. In the '**Use of connector**' pane: 1. Select the '**Only when email messages are sent to these domains**' option. 2. Enter a ***** into the dialog box below and select the **+** button to add it. 3. Select the '**Next**' button. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 09.27.43@2x.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=eCcqkXU98IdIVyCshGQCLgpQvJJVMU5%2FatN3e973BCo%3D) 1. In the '**Routing**' pane: 1. Input the IP address or the DNS smart host name provided to you by eSHARE, and select '**+**' to add it. 2. Select the '**Next**' button. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 09.30.39@2x(1).png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=uvuoyQYelLF6CnFb8zjMkBqd%2FXkYh5Tdj3gpbb2gFQw%3D) 1. In the '**Security restrictions**' pane: 1. Select the '**Always use Transport Layer Security (TLS) to secure the connection**' option. 2. Select the '**Any digital certificate, including self-signed certificates**' option and select '**Next**'. 3. Select the '**Next**' button. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 09.33.47@2x(1).png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=svY%2FLqJg6cSA%2FL1Gx23huywTVp4aXxMDyMj0m9f80Fk%3D) 1. 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. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 09.35.54@2x.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=HbcXJT0U3cSuXvHLmUkP6%2Bkz1A4L%2F8X0%2BcxRSYR0xKA%3D) 1. In the '**Review connector**' pane, review the settings, and select '**Create connector**' to create & save it. Select '**Done**' to close the pane. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 09.54.36@2x(1).png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=02q6x%2FV1w7KRRV28Fks%2Fbcvor01UqHL6Y5KyvGm%2BINQ%3D) ### **Create the Inbound Connector (eSHARE to M365)** 1. Log in to the Exchange Admin Center and navigate to '**Mail flow**' > '**Connectors**'. 2. Select the '**+ Add a new connector**' button. 3. In the '**New connector**' pane: 1. In the '**Connection from**' section, select '**Office 365**'. 2. In the '**Connection to**' section, select '**Partner organization**'. 3. Select the '**Next**' button. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 10.19.18@2x.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=2mK8J5LH6iw%2FC0tNaqWMPb5bR6PMBrCEK6Ymy9rTmV0%3D) 1. In the '**Connector name**' pane: 1. Input a '**Name**'. 2. Input a '**Description**'. 3. Leave the '**Turn it on**' option enabled. 4. Select the '**Next**' button. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 10.21.45@2x.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=NnHmmb0qq9xedq5DX1EgCbS7cQXJ5QNbMtNRDRx2a%2BU%3D) 1. In the '**Authenticating sent email**' pane: 1. Select the second option and input the IP address provided by eSHARE. 2. Select the '**+**' button, followed by the '**Next**' button. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 10.24.59@2x(1).png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=zX99dhNZJobMgMXLLK3I46bnihBf10TgPS2pj0SOGEk%3D) 1. In the '**Security Restrictions**' pane: 1. Select '**Reject email messages if they aren’t sent over TLS**'. 2. Select the '**Next**' button. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 10.30.56@2x.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=ZE%2BfMD6pZozPMCFdNrWpd1Xwwf1Ynx2Uq7BHR6x155o%3D) 1. In the '**Review connector**' pane, review the settings and select the '**Create connector**' button. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2025-11-16 at 10.32.08@2x.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A17%3A00Z&se=2026-11-18T21%3A17%3A00Z&sr=b&sp=r&sig=%2F8fDfHVidsSN7pgIEVyKYqIoDA7eMv1B1n8IlAnPpe8%3D) 1. 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](https://docs.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps#install-and-maintain-the-exo-v2-module) 1. In PowerShell, run the command below to load the EXO V2 module. ```powershell Import-Module ExchangeOnlineManagement ``` 1. Connect to Exchange Online as an Exchange Administrator. ```powershell Connect-ExchangeOnline -UserPrincipalName myadminuser@myorgdomain.com ``` 1. Run the command below to verify the connection to Exchange Online. ```powershell Get-Mailbox ``` 1. Run 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. ```powershell New-OutboundConnector -Name "M365 to eShare SCG" -RecipientDomains * -TlsSettings EncryptionOnly -SmartHosts -ConnectorType Partner -IsTransportRuleScoped $false -TestMode $False -Enabled $true -UseMXRecord $False ``` 1. Run 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. ```powershell New-InboundConnector -Name "eShare SCG to M365" -SenderDomains * -SenderIPAddresses "insert_ip_address" -ConnectorType Partner -RestrictDomainsToIPAddresses $true ``` 1. Verify 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. ```powershell Get-OutboundConnector "M365 to eShare SCG" | Format-list Get-InboundConnector "eShare SCG to M365" | Format-list ``` 1. Run the following command to validate the Outbound Connector. Update the connector name as applicable. ```powershell Validate-OutboundConnector -Identity "M365 to eShare SCG" -Recipients user@externaldomain.com,user@publicemaildomain.com ``` 1. After successful validation, disconnect from Exchange Online PowerShell by running the command below. ```powershell Disconnect-ExchangeOnline ```