> ## 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.

# Integrate On-prem Abuse Mailbox

> Route user-reported suspicious mail from a self-hosted mail system into the Abuse Mailbox, with automated replies.

You will be able to view all reported emails in xorlab and send feedback to the reporters.

<Warning>
  **Prerequisites**

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

If you have a hybrid M365 setup and all your mailboxes are hosted in M365, follow [Integrate M365 Reported Emails](/latest/m365-reporting-integration) instead.

## Prepare xorlab

1. Open `shared/guarded_tenants.yml` and add all email address patterns that are allowed to report emails.

   ```yaml guarded_tenants.yml {4-6} theme={null}
   tenants:
     - name: example
       emailReporting:
         authorizedEmailReportRecipients:
           - .*@xorlab\.com
           - .*@xorlab\.net
   ```

2. Choose if you want to enable or disable automatic feedback. If enabled, every reporter will get an immediate feedback email.

   <CardGroup cols={2}>
     <Card title="Automatic feedback" icon="shield">
       ```yaml guarded_tenants.yml {4,5} theme={null}
       tenants:
         - name: example
           ruleProfiles:
             # REMOVE this line
             - no_auto_feedback.properties
       ```
     </Card>

     <Card title="Disabled feedback" icon="xmark">
       ```yaml guarded_tenants.yml {4,5} theme={null}
       tenants:
         - name: example
           ruleProfiles:
             # ADD this line
             - no_auto_feedback.properties
       ```
     </Card>
   </CardGroup>

3. Optional: Change the sender address used for feedback emails: [Change Sender Address](/latest/email-template-sender-addresses#feedback-emails).

4. Click **Publish**. The new configuration becomes active within about one minute.

## Forward reported emails to xorlab

Reported emails need to be forwarded as **EML** attachment to a dedicated email address on xorlab: `suspicious@<templateDomain>`. The `templateDomain` property can be found in `activeguard/core/active_guard.yml`.

The actual implementation of the forwarding depends on your setup. Choose the one that fits your environment.

<Tabs>
  <Tab title="Manual reporting mailbox">
    You have a dedicated mailbox where users in your organization can report emails to. They need to manually forward the reported email as attachment to that mailbox.

    <Note>
      **Forwarding:** In your Exchange, create a mail flow rule that forwards all email from that mailbox to xorlab at `suspicious@<templateDomain>`. If you need the emails still in that mailbox, you can send xorlab just a BCC copy of the emails instead.
    </Note>
  </Tab>

  <Tab title="Third party button">
    You have a third party button in place that your users use for reporting emails.

    <Note>
      **Forwarding:** Most buttons allow you to add an additional recipient to the reported emails. Add `suspicious@<templateDomain>`. If that is not possible, create a mail flow rule on Exchange as described under "Manual reporting mailbox".
    </Note>
  </Tab>

  <Tab title="No reporting mailbox">
    There is no reporting button and no dedicated reporting mailbox available.

    <Note>
      **Forwarding:** We recommend that you acquire a third party reporting button that allows your users to report emails. xorlab partners with multiple reporting button providers. Contact [support@xorlab.com](mailto:support@xorlab.com) for more information.
    </Note>
  </Tab>
</Tabs>

## How to change the reporting address

The default address under which xorlab will listen for reported emails is `suspicious@<templateDomain>`, with `templateDomain` referring to the parameter that's set in `active_guard.yml`.

If you like to customize the sender address, add the following block (if it does not already exist) to the `active_guard.yml` file:

```yaml active_guard.yml {7} theme={null}
scanSources:
  smtp:
    port: 10025
    handler:
      smtpReport:
        # Default. <templateDomain> corresponds to the parameter templateDomain in active_guard.yml
        emailAddress: suspicious@<templateDomain>
```

Afterward, click **Publish**. The `scanSources` handler settings become active within about one minute.

## How to automate reported email handling

For further information about automation, have a look at [Abuse Mailbox](/latest/abuse-mailbox#auto-resolve-cases).

## Multi-Tenancy

Repeat this integration for each tenant. In addition, xorlab needs to know which tenant a reported email belongs to, which is decided by a header on the carrier email and not by the reporting address:

<Card title="Assign Reported Emails to Tenants" icon="building" horizontal href="/latest/multi-tenancy-reported-emails">
  Add the `x-ag-tenant` header so that reported emails end up in the right tenant.
</Card>

## Next steps

The on-premises integration is complete:

* [What to Configure Next](/latest/integration-next-steps)
