> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xorlab.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Pages under /latest/ document the current release. Paths that begin with a version number, for example /10.0/, are frozen snapshots of superseded releases kept for reference only — never present their instructions as current. If the reader's version is unknown, answer from /latest/ and say which version the answer describes.
> xorlab is deployed on-premises, hybrid, or as a cloud service, and integrates with either Microsoft 365 or on-premises mail infrastructure. Configuration steps often differ between these. State which deployment and integration mode an instruction applies to instead of presenting one as universal.
> Distinguish inline mode from monitoring mode when describing anything that acts on email. Monitoring mode observes a copy and cannot block or quarantine; inline mode routes mail through xorlab and can.
> Write the product name as lowercase 'xorlab'. Use the documented component names: xorlab Control Center (XCC), xorlab MTA, xorlab Sandbox (DANA), xorlab Natural Language Understanding (NLU). After the first mention, use the short forms XCC, MTA, Sandbox, and NLU. Do not use DANA as a standalone name for the Sandbox, but keep it where it is a literal string in configuration keys, container names, and hostnames.
> Do not invent configuration keys, rule parameters, list names, log properties, or API fields. If a value is not present in this documentation, say that it is not documented rather than guessing.

# Enable M365 Monitoring Mode

> Set up out-of-band observation in Microsoft 365. In this mode xorlab analyzes traffic but cannot block or quarantine.

M365 sends a copy of every incoming and outgoing email to xorlab.

<Warning>
  **Prerequisites**

  * Complete [Before You Begin](/latest/before-begin-integration) and [Set Up Email Routing in xorlab](/latest/m365-smtp)
  * Have access to [Exchange Admin Center](https://admin.exchange.microsoft.com/)
  * Know your customer ID `xyz`, e.g. `xyz.activeguard.cloud`
</Warning>

<Info>
  * Using BCC monitoring sends an additional copy of each email to xorlab, which can lead to hitting the external recipients rate limit (tenant ERRL) of Microsoft Exchange.
  * You can monitor how close you are to the limit under: **Reports → Mail flow → Outbound external recipients**
</Info>

## Create mail flow rule

1. Go to [Exchange Admin Center](https://admin.exchange.microsoft.com/) → **Mail flow** → **Rules** and create a new rule:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/create-new-rule.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=f3454ae9bbe95351d75bcbc667a81d23" alt="Creating a new rule" style={{border: '1px solid #ddd'}} width="1916" height="1540" data-path="latest/assets/create-new-rule.png" />

2. Configure the rule like this:

   * **Name:** `IncomingBCCxorlab`
   * **Apply this rule if** → **The sender** → **is external/internal** → **Outside the organization**
   * Click the plus icon (`+`) to add another condition
   * **And** → **The recipient** → **is external/internal** → **Inside the organization**
   * **Do the following** → **Add Recipients** → **to the Bcc box** → enter `monitor@mx.xyz.activeguard.cloud`, where `xyz` is your customer ID

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/monitor-incoming.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=7aa2e6cbf704cc9732ad80adf42465db" alt="Rule settings for incoming emails" style={{border: '1px solid #ddd'}} width="1978" height="1524" data-path="latest/assets/monitor-incoming.png" />

3. Click through **Next** → **Finish** and leave all settings at their defaults.

4. Repeat steps #2-3 to add another rule but this time set:

   * **Name:** `OutgoingBCCxorlab`
   * **The sender** → **Inside the organization**
   * **The recipient** → **Outside the organization**

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/monitor-outgoing.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=43b6f97c116f53e2f5bc659d95c6b88c" alt="Rule settings for outgoing emails" style={{border: '1px solid #ddd'}} width="1962" height="1458" data-path="latest/assets/monitor-outgoing.png" />

5. Enable both rules in the **Rules** page.

Now, a copy of every incoming and outgoing email will be sent to xorlab.

## Create a connector

In addition to the mail flow rule above, we need to create a connector to make sure the emails are sent directly to xorlab.

<Accordion title="Additional information">
  We recommend to always create a connector to ensure proper email delivery. However, you can omit the connector if the following two conditions are met:

  * You do not have any other connectors that might interfere with the BCC emails sent to xorlab.
  * You do not have a hybrid MS setup with an on-prem-only email delivery (*Centralized Mail Transport*).
</Accordion>

1. Go to [Exchange Admin Center](https://admin.exchange.microsoft.com/) → **Connectors** → add a connector:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/add-connector.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=5b135507ff9db7ba83e94abca10cc8f3" alt="Add a connector" style={{border: '1px solid #ddd'}} width="2304" height="1196" data-path="latest/assets/add-connector.png" />

2. **Connection from** → **Office 365**, and **Connection to** → **Your organization’s email server**:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/new-connector-from-o365.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=fbdd26693cf3199cf848e6b9b5192298" alt="New connector from O365" style={{border: '1px solid #ddd'}} width="2022" height="1642" data-path="latest/assets/new-connector-from-o365.png" />

3. Set the name to `Microsoft365Toxorlab` and enable **Retain internal Exchange email headers**:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/connector-name-m365.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=5caa342398d9a3f39f09b5ea880425d3" alt="Connector name from M365" style={{border: '1px solid #ddd'}} width="2400" height="1576" data-path="latest/assets/connector-name-m365.png" />

4. Choose the third option and enter `mx.xyz.activeguard.cloud`, where `xyz` is your customer ID. Click the plus (`+`) icon:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/use-of-connector-domains.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=ab1ba8f2306c17d2fd4e5f4258b768c5" alt="Use of connector" style={{border: '1px solid #ddd'}} width="1182" height="794" data-path="latest/assets/use-of-connector-domains.png" />

5. Add a new smart host with the value `mx.xyz.activeguard.cloud`, where `xyz` is your customer ID:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/routing.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=920677950ca3ac403e7408c7b61bc644" alt="Routing" style={{border: '1px solid #ddd'}} width="2024" height="1644" data-path="latest/assets/routing.png" />

6. Activate **Always use Transport Layer Security…** and select **Issued by a trusted certificate authority (CA)**:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/security-restrictions.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=af0649578cd2b36ba4192ee4b6701d8a" alt="Security restrictions" style={{border: '1px solid #ddd'}} width="2022" height="1642" data-path="latest/assets/security-restrictions.png" />

   *Security restrictions*

7. Enter a company mailbox where a validation email should be sent to:

   <img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/validation-email.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=9eded4b48ed107f782f9f9396d0e99e1" alt="Validation email" style={{border: '1px solid #ddd'}} width="2024" height="1644" data-path="latest/assets/validation-email.png" />

   <Note>
     **Unsuccessful validation**

     The connector validation might fail at this point. If this happens, save the connector without validation, and then validate the connector again.
   </Note>

8. Review the connector and click **Create** when it’s OK.

## Optional: Include internal emails

Per default, xorlab only processes incoming and outgoing emails. However, if you want to include also internal emails, do the following:

* Remove one of the two mail flow rules from above
* Rename the existing one to `BCCxorlab`
* Change **Apply this rule if** to **Apply to all messages** and remove the **And** condition

<img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/monitor-rule.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=62303da6a700d3526fc43cc2202180a9" alt="Configuring the monitor rule" style={{border: '1px solid #ddd'}} width="2044" height="1470" data-path="latest/assets/monitor-rule.png" />

Now, a copy of every email will be sent to xorlab.

## Next steps

Optionally continue with:

* [Activate Case Isolation](/latest/m365-case-isolation)
* [Move M365 Quarantine to xorlab](/latest/m365-move-quarantine)
* [Integrate M365 Reported Emails](/latest/m365-reporting-integration)

Once the integration is complete, continue with [What to Configure Next](/latest/integration-next-steps).
