This document describes the configuration steps to integrate Microsoft 365 with Cisco Secure Email for inbound and outbound email delivery.
Cisco recommends that you have knowledge of these topics:
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
This document can be used for either on-premises Gateways or Cisco Cloud Gateways.
If you are a Cisco Secure Email administrator, your welcome letter includes your Cloud Gateway IP addresses and other pertinent information. In addition to the letter you see here, an encrypted email is sent to you that provides you with additional details on the number of Cloud Gateway (also known as ESA) and Cloud Email and Web Manager (also known as SMA) provisioned for your allocation. If you have not received or do not have a copy of the letter, contact ces-activations@cisco.com with your contact information and domain name under service.

Each client has dedicated IPs. You can use the assigned IPs or hostnames in the Microsoft 365 configuration.
Mail flow > Rules.Add a rule to create a new rule.Bypass spam filtering - inbound email from Cisco CES.The sender - IP address is in any of these ranges or exactly matches.
OK.Modify the message properties and choose set the spam confidence level (SCL)using Bypass spam filtering.Next.Enforce and click on Next.Finish.An example of how your rule looks:
Bypass Rule
Mail flow > Connectors.[+ Add a connector] to create a new connector.Partner organizationOffice365Next.Inbound from Cisco CES.Next.By verifying that the IP address of the sending...[+] and add the IP addresses provided in the welcome letter and used in the Bypass Spam filtering rule. Next.Reject email messages if they aren't sent over Transport Layer Security (TLS).Next.Save.An example of how your connector configuration looks:
Connector inbound
Impose a self-throttle to a delivery domain in your Destination Controls. Of course, you can remove the throttle later, but these are new IPs to Microsoft 365, and you do not want any throttling by Microsoft due to its unknown reputation.
Mail Policies > Destination Controls.Add Destination.1020PreferredSubmit.Commit Changes in the upper right-hand of the User Interface (UI) to save your configuration changes.An example of how your Destination Control Table looks:

Next, set the Recipient Access Table (RAT) to accept mail for your domains:
Mail Policies > Recipient Access Table (RAT).Add Recipient.Accept.Submit.Commit Changes in the upper right-hand of the UI to save your configuration changes.An example of how your RAT entry looks:

Set the SMTP route to deliver mail from Cisco Secure Email to your Microsoft 365 domain:
Network > SMTP Routes.Add Route...Submit.Commit Changes in the upper right-hand of the UI to save your configuration changes.An example of how your SMTP Route Settings looks:

You are ready to cut over the domain through a Mail Exchange (MX) record change. Work with your DNS administrator to resolve your MX records to the IP addresses for your Cisco Secure Email Cloud instance, as provided in your Cisco Secure Email welcome letter.
Verify the change to the MX record from your Microsoft 365 console as well:
Home > Settings > Domains.Check Health.This provides the current MX Records of how Microsoft 365 looks up your DNS and MX records associated with your domain:

Test inbound mail to your Microsoft 365 email address. Then, check to see that it arrives in your Microsoft 365 email inbox.
Validate the mail logs in Message Tracking on your Cisco Secure Email and Web Manager (also known as SMA) provided with your instance.
To see mail logs on your SMA:
Tracking.Search;and expect to see these results:
To see mail logs in Microsoft 365:
Mail flow > Message Trace.Messages received by my primary domain in the last day to start your search query.Search and expect to see results similar to:
Refer to your Cisco Secure Email welcome letter. In addition, a secondary interface is specified for outbound messages via your Gateway.
Mail Policies > HAT Overview.
Note: Make sure the Listener is set to Outgoing Listener, OutgoingMail, or MailFlow-Ext, based on the actual name of your Listener for your external/outbound mail flow.
Add Sender Group...Submit and Add Senders..protection.outlook.com.Submit.Commit Changes in the upper right-hand of the UI to save your configuration changes.An example of how your Sender Group Settings looks:

<<Back to HAT Overview.RELAYED.Security Features section for Encryption and Authentication.Preferred.Submit.Commit Changes in the upper right-hand of the UI to save your configuration changes.An example of how your Mail Flow Policy configuration looks:

Mail flow > Connectors.[+ Add a connetor] to create a new connector.Office365Partner organizationNext.Outbound to Cisco CES.Next.Only when I have a transport rule set up that redirects messages to this connector.Next. Route email through these smart hosts.[+] and enter the outbound IP addresses or hostnames provided in your CES welcome letter.Save.Next.Always use TLS to secure the connection (recommended).Any digital certificate, including self-signed certificates.Next.Next.[+] to enter a valid email address and click OK.Validate and allow the validation to run.Close.Save.An example of how your Outbound Connector looks:

Mail Flow;and be sure you're on the rules tab.[+] to add a new rule.Create a new rule.Outbound to Cisco CES.The sender is located...
Inside the organization.OK.More options...add condition button and insert a second condition:
The recipient...Is external/internal.Outside the organization.OK.Redirect the message to...
Modify the message properties...set the message header.X-OUTBOUND-AUTH.OK.mysecretkey.
mysecretkey is simply a placeholder. Please customize this so it is specific to your environment.OK.Save.An example of how your Microsoft 365 Routing configuration looks:

Warning: This is a crucial step. Securing the Outgoing Listener is essential to prevent unauthorized users from relaying email through the device.
There are two options listed below. It is recommended to use the Message Filter (CLI) or the Content Filter (GUI) for those less familiar with CLI (Command Line Interface).
Create two Content Filters in the GUI:
X-OUTBOUND-AUTH).
X-OUTBOUND-AUTH).
X-OUTBOUND-AUTH).
Tip: After your tests have completed successfully and mail delivery is working as expected, it is recommended to change the action in the Content Filter from "quarantine" to "drop."
Stop_O365_OpenRelay Content Filter
Strip_Secret_Header Content Filter
Access the CLI for your Cisco Secure Email Gateway.
Create a message filter to inspect the presence and value of the x-header and remove the header if it exists. If no header exists, drop the message.
filters command.New command to create a Message Filter, copy, and paste:office365_outbound: if sendergroup == "RELAYLIST" {
if header("X-OUTBOUND-AUTH") == "^mysecretkey$" {
strip-header("X-OUTBOUND-AUTH");
} else {
drop();
}
} [.] on the new line to end your new message filter.return one time to exit the Filters menu.commit command to save the changes to your configuration.
Note: Avoid special characters for the secret key. The ^ and $ shown in the message filter are regex characters and are used as provided in the example.
Note: Please review the name of how your RELAYLIST is configured. It can be configured with an alternative name, or you can have a specific name based on your relay policy or mail provider.
Test outbound mail from your Microsoft 365 email address to an external domain recipient. You can review Message Tracking from your Cisco Secure Email and Web Manager to ensure it is appropriately routed outbound.
HIGH:MEDIUM:@STRENGTH:!aNULL:!eNULL:!LOW:!DES:!MD5:!EXP:!PSK:!DSS:!RC2:!RC4:!SEED:!ECDSA:!ADH:!IDEA:!3DES:!SSLv2:!SSLv3:!TLSv1:-aNULL:-EXPORT:-IDEA
An example of Tracking with successful delivery:

ClickMore Detailsto see the complete message details:

An example of Message Tracking where the x-header do not match:


| Revision | Publish Date | Comments |
|---|---|---|
8.0 |
01-Jun-2026
|
Updated spelling, grammar, spacing. |
7.0 |
13-Dec-2024
|
Updated Machine Translation, and Formatting. |
6.0 |
28-Nov-2023
|
Machine Translation and Formatting. |
5.0 |
01-Dec-2022
|
Product naming updates, screenshot updates |
1.0 |
13-Aug-2021
|
Initial Release |