# Ensure Direct Send is set to be rejected

Ensure Direct Send is set to be rejected. A Maester check for Exchange Online, Mail flow.

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

<!-- 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/bastienperez" title="Bastien Perez · Original author"><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/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.1062
```

## Overview

Direct Send SHOULD be configured to `Reject` in Exchange Online

Rationale: Attackers can exploit direct send to send spam or phishing emails without authentication. Direct Send covers anonymous messages (unauthenticated messages) sent from your own domain to your organization's mailboxes using the tenant MX.

#### Remediation action

1. Connect to Exchange Online:

```powershell
Connect-ExchangeOnline
```

1. Configure the setting to reject direct send:

```powershell
Set-OrganizationConfig -RejectDirectSend $true
```

1. Verify the policy:

```powershell
(Get-OrganizationConfig).RejectDirectSend
```

The result should be `True`.

#### Related links

* [Introducing more control over Direct Send in Exchange Online](https://techcommunity.microsoft.com/blog/exchange/introducing-more-control-over-direct-send-in-exchange-online/4408790)
* [Direct Send: Send mail directly from your device or application to Microsoft 365](https://learn.microsoft.com/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365#direct-send-send-mail-directly-from-your-device-or-application-to-microsoft-365-or-office-365)

## Details

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

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

</details>

## Source

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