# Ensure Spam confidence level (SCL) is configured in mail transport rules with specific domains

Spam confidence level (SCL) SHOULD NOT be set to -1 in mail transport rules with specific domains

Source: https://maester.dev/docs/tests/MT.1043

<!-- 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/weycc81" title="Stefan Wey · Original author"><img src="https://github.com/weyCC81.png" alt="Stefan Wey" width="28" height="28" loading="lazy" decoding="async" /></a><a class="test-byline-avatar" href="/contributors/bastienperez" title="Bastien Perez · Co-contributor"><img src="https://github.com/bastienperez.png" alt="Bastien Perez" 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/weycc81">Stefan Wey</a> with <a href="/contributors/bastienperez">Bastien Perez</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/maester">Maester</a> · Exchange Online · Mail flow · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId MT.1043
```

## Overview

Spam confidence level (SCL) SHOULD NOT be set to -1 in mail transport rules with specific domains

Rationale: Allow-listing domains in transport rules bypasses regular malware and phishing scanning, which can enable an attacker to launch attacks against your users from a safe haven domain.

#### Remediation action

1. Connect to Exchange Online:

```powershell
Connect-ExchangeOnline
```

1. View your current transport rules:

```powershell
Get-TransportRule | Select-Object Name, SetScl
```

1. For each transport rule that uses `SetScl -1`, modify it to set SCL to 0 or higher:

```powershell
Set-TransportRule -Identity "RuleName" -SetSCL 0
```

1. Verify the changes:

```powershell
Get-TransportRule | Where-Object { $_.SetScl -eq -1 }
```

The result should return no rules.

#### Related links

* [Exchange Transport Rules and SCL values](https://learn.microsoft.com/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules)
* [Spam Confidence Levels (SCL) in Exchange Online](https://learn.microsoft.com/microsoft-365/security/office-365-security/anti-spam-message-headers)
* [Microsoft Secure Score - Set SCL to 0 or higher for domains](https://security.microsoft.com/securescore)

## Details

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

| Field | Value |
| --- | --- |
| Test ID | MT.1043 |
| Severity | Medium |
| Suite | Maester |
| Product | Exchange Online |
| Feature | Mail flow |
| Area | Email and collaboration protection |
| Resource type | MailFlowRule |
| User impact | Low |
| Implementation cost | Medium |
| MITRE ATT&CK | T1566 Phishing |
| Supports controls | nist-800-53-r5:SI-8 |
| PowerShell test | [Test-MtExoSetScl](https://github.com/maester365/maester/blob/main/tests/maester/exchange/Test.MT.1043.ps1) |
| Services | ExchangeOnline |

</details>

## Source

- Test: [`tests/maester/exchange/Test.MT.1043.ps1`](https://github.com/maester365/maester/blob/main/tests/maester/exchange/Test.MT.1043.ps1)
- Documentation: [`tests/maester/exchange/Test.MT.1043.md`](https://github.com/maester365/maester/blob/main/tests/maester/exchange/Test.MT.1043.md)
