# (L1) Ensure Exchange Online Spam Policies are set to notify administrators

2.1.6 (L1) Ensure Exchange Online Spam Policies are set to notify administrators

Source: https://maester.dev/docs/tests/CIS.M365.2.1.6

<!-- This file is generated by website/scripts/generate-test-docs.mjs. Do not edit manually. -->

<div class="test-byline"><div class="test-byline-avatars"><a class="test-byline-avatar test-byline-avatar--author" href="/contributors/nzlostboy" title="Ben Miles · Original author"><img src="https://github.com/NZLostboy.png" alt="Ben Miles" width="28" height="28" loading="lazy" decoding="async" /></a><a class="test-byline-avatar" href="/contributors/thomas-s-schmidt" title="Thomas Schmidt · Co-contributor"><img src="https://github.com/thomas-s-schmidt.png" alt="Thomas Schmidt" width="28" height="28" loading="lazy" decoding="async" /></a></div><div class="test-byline-meta"><span class="test-byline-text">Contributed by <a href="/contributors/nzlostboy">Ben Miles</a> with <a href="/contributors/thomas-s-schmidt">Thomas Schmidt</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/cis">CIS</a> · Defender · Anti-spam · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId CIS.M365.2.1.6
```

## Overview

2.1.6 (L1) Ensure Exchange Online Spam Policies are set to notify administrators

In Microsoft 365 organizations with mailboxes in Exchange Online or standalone Exchange Online Protection (EOP) organizations without Exchange Online mailboxes, email messages are automatically protected against spam (junk email) by EOP. Configure Exchange Online Spam Policies to copy emails and notify someone when a sender in the organization has been blocked for sending spam emails.

The check evaluates the policy associated with the highest-priority enabled custom outbound spam rule when one exists; otherwise it evaluates the Default policy. Both recipient fields must contain at least one address.

#### Rationale

A blocked account is a good indication that the account in question has been breached, and an attacker is using it to send spam emails to other people.

#### Impact

Notification of users that have been blocked should not cause an impact to the user.

#### Remediation action

To set the Exchange Online Spam Policies:

1. Navigate to Microsoft 365 Defender [https://security.microsoft.com](https://security.microsoft.com)
2. Under **Email & collaboration** select **Policies & rules**
3. Select **Threat policies** then **Anti-spam**
4. Open the **Anti-spam outbound policy (default)**, unless the check identifies a higher-priority enabled custom policy.
5. Select **Edit protection settings** then under **Notifications**
6. Check **Send a copy of suspicious outbound messages or messages that exceed these limits to these users and groups** then enter the desired email addresses
7. Check **Notify these users and groups if a sender is blocked due to sending outbound spam** then enter the desired email addresses.
8. Click **Save**.

##### PowerShell

1. Connect to Exchange Online using `Connect-ExchangeOnline`.
2. Run the following PowerShell command:

```powershell
$BccEmailAddress = @("<INSERT-EMAIL>")
$NotifyEmailAddress = @("<INSERT-EMAIL>")
Set-HostedOutboundSpamFilterPolicy -Identity Default -BccSuspiciousOutboundAdditionalRecipients $BccEmailAddress -BccSuspiciousOutboundMail $true -NotifyOutboundSpam $true -NotifyOutboundSpamRecipients $NotifyEmailAddress
```

>Note: If the check identifies a custom policy, use that policy's identity in the PowerShell command. Review the reported addresses to confirm they are correct and monitored.

#### Related links

* [Microsoft 365 Defender](https://security.microsoft.com)
* [Outbound spam protection for cloud mailboxes](https://learn.microsoft.com/defender-office-365/outbound-spam-protection-about)
* [CIS Microsoft 365 Foundations Benchmark v7.0.0 - Page 99](https://www.cisecurity.org/benchmark/microsoft_365)

## Details

<details>
<summary>Every attribute of this check</summary>

| Field | Value |
| --- | --- |
| Test ID | CIS.M365.2.1.6 |
| Severity | Medium |
| Suite | CIS |
| Product | Defender |
| Related products | Exchange Online |
| Feature | Anti-spam |
| Area | Email and collaboration protection |
| Resource type | Policy |
| User impact | Low |
| Implementation cost | Low |
| MITRE ATT&CK | T1078.004 Cloud Accounts |
| Supports benchmark | CIS Microsoft 365 Foundations Benchmark (version 7.0.0), requirement 2.1.6 |
| Benchmark level | L1 |
| Benchmark profiles | E3 Level 1 |
| Supports controls | cis-m365:2.1.6, nist-800-53-r5:SI-4(5) |
| PowerShell test | [Test-MtCisOutboundSpamFilterPolicy](https://github.com/maester365/maester/blob/main/tests/cis/Test.CIS.M365.2.1.6.ps1) |
| Services | ExchangeOnline |

</details>

## Source

- Test: [`tests/cis/Test.CIS.M365.2.1.6.ps1`](https://github.com/maester365/maester/blob/main/tests/cis/Test.CIS.M365.2.1.6.ps1)
- Documentation: [`tests/cis/Test.CIS.M365.2.1.6.md`](https://github.com/maester365/maester/blob/main/tests/cis/Test.CIS.M365.2.1.6.md)
