Configure the on-premises mail gateway to deliver incoming mail to Exchange Online and relay outgoing mail through the tenant’s Exchange Online service.
| Domain | klientas.lt |
|---|---|
| Exchange Online endpoint | kientas-lt.mail.protection.outlook.com |
| SMTP port | 25 |
| Connection security | STARTTLS |
| Gateway public IP | 2.59.170.190 |
Confirm that 2.59.170.190 is the public IP address that Exchange Online sees when the gateway connects.
1. Find the Exchange Online endpoint
- Sign in to the Microsoft 365 admin center at
admin.microsoft.com. - Open Show all → Settings → Domains and select
klientas.lt. - Open the DNS records tab. Under Microsoft Exchange, select the MX record.
- Copy its Points to address or value. Use that exact hostname as the Exchange Online endpoint and gateway smart host.
The endpoint shown in the table above is kientas-lt.mail.protection.outlook.com. Confirm that it matches the value displayed for your domain before configuring the gateway.
2. Configure the gateway
Set the gateway’s smart host to kientas-lt.mail.protection.outlook.com on port 25, with STARTTLS enabled. Ensure the gateway can make outbound TCP connections on port 25.
3. Create the SMTP relay connector
In the Exchange admin center, open Mail flow → Connectors → Add a connector.
- Set Connection from to Your organization’s email server and Connection to to Office 365.
- Name the connector
Gateway SMTP relayand turn it on. - Select authentication by the sending server’s IP address.
- Enter
2.59.170.190and save.
This connector allows the gateway to send mail through Exchange Online to external recipients. The SMTP envelope sender domain must be an accepted domain in the tenant.
4. Create the incoming mail restriction connector
Add a second connector in Mail flow → Connectors.
- Set Connection from to Partner organization and Connection to to Office 365.
- Name the connector
Accept mail only via gatewayand turn it on. - Apply the connector to all sender domains (
*). - Restrict accepted connections to
2.59.170.190. - Require TLS if the gateway is configured to use it, then save.
If all incoming internet mail must pass through the gateway, point the domain’s public MX record to the gateway. The gateway then forwards the mail to the Exchange Online endpoint. Add every public IP the gateway may use to the connector.
5. 4logist configuration
- Use the tenant’s Exchange Online service as the SMTP relay. For example, set the SMTP server to
kientas-lt.mail.protection.outlook.comforklientas.lt. - Connect on port 25 with STARTTLS enabled.
Was this helpful?
0 / 0