> ## 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 ESA Monitoring with BCC

> Configure Cisco ESA message filters to BCC a copy of every email to xorlab for out-of-band monitoring.

<Warning>
  **Prerequisites**

  * Complete [Before You Begin](/latest/before-begin-integration) and [Set Up Email Routing in xorlab](/latest/on-prem-smtp)
</Warning>

## Message Filter

The first step is to create a message filter that sends a BCC copy of all incoming and outgoing emails to xorlab. The following snippet shows such a message filter, assuming the ESA has different receive listeners for incoming and outgoing emails:

```text theme={null}
ActiveGuardBCCEmails:
if recv-listener == "<incoming Listener>" {
    insert-header("X-Original-Envelope-From","$EnvelopeFrom");
    bcc-scan("<xorlab Security Platform Email>");
} else {
    if recv-listener == "<outgoing Listener>" {
        bcc-scan("<xorlab Security Platform Email>");
    }
}
```

“xorlab Security Platform Email” corresponds to any email address with a domain that resolves to the xorlab MTAs. You can set it to `monitor@mx.xyz.activeguard.cloud`, for example. See the [DNS registration](/latest/vm-setup-guide#register-required-dns-records) section for details on how to set and configure your DNS records.

Note that this rule adds the original envelope `FROM` to the BCC email, which is required by xorlab.

If the BCC emails should be sent through a specific network interface, add an additional content filter like this (where `<NIC>` corresponds to the desired network interface):

<img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/esa1.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=392bc23bf68ad630dc116af10dcbc80d" alt="ESA Content Filter" width="937" height="410" data-path="latest/assets/esa1.png" />

*Content Filter to specify a network interface for the BCC emails*

## Bounce Profile

Now, we need to create a bounce profile so that no bounce or warning messages are sent to the sender if a BCC email could not be delivered to xorlab:

<img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/esa2.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=239897a78397a8952a18909856469ff4" alt="Bounce Profile" width="1095" height="1015" data-path="latest/assets/esa2.png" />

*Bounce profile to disable bounce and warning messages*

This bounce profile should be applied whenever an email is sent to xorlab. To this end, add a Destination Control for the domain used above in the xorlab Security Platform email address:

<img src="https://mintcdn.com/xorlab/O_O2TUa6eRBR54aI/latest/assets/esa3.png?fit=max&auto=format&n=O_O2TUa6eRBR54aI&q=85&s=b6bb88802d7d7d0958bd2fb326edfa21" alt="Destination Controls" width="1000" height="668" data-path="latest/assets/esa3.png" />

*Apply the new Bounce Profile only to emails sent to xorlab Security Platform*

## Next steps

* [Add Your Trusted Infrastructure](/latest/on-prem-add-trusted-mtas)
