# 5.7.800 Bounce: Access Denied, Banned Sender Domain

URL: https://email-validation.org/bounce-codes/5-7-800/
Updated: 2026-11-19

> Documentation index: https://email-validation.org/llms.txt

**Short answer:** Microsoft 365 banned a sender domain in your message because it detected spam from that domain. It is permanent: retrying with the same domain fails until the ban is lifted. Find and stop the source of the spam, then contact Microsoft support to restore the domain.

**At a glance**

- **Type:** permanent failure (class 5, RFC 3463 §2). The sending server does not retry it and reports the failure to the sender: a bounce message, or an error in the mail app.
- **Basic code:** varies; the enhanced code is the part that identifies the problem.
- **Enhanced code 5.7.800:** not in the IANA registry; the group is security or policy status (RFC 3463 §3.8).
- **Who uses it:** Microsoft (Exchange Online): access denied, the EHLO or sender domain of the message was banned for detected spam activity.

A 5.7.800 bounce means Microsoft has banned a domain your mail uses. It can be the name your server greets with, or a domain you send as.

## What it means

This is Microsoft's code, not one from the IANA registry. Microsoft's [Exchange Online NDR reference](https://learn.microsoft.com/en-us/troubleshoot/exchange/email-delivery/ndr/non-delivery-reports-in-exchange-online) shows the text as `Access denied, banned sender`. It names three places where the banned domain can appear: the EHLO, P1 or P2 sender domain.

- **EHLO:** the name your server gives when it greets the receiving server.
- **P1:** the envelope sender, the address in MAIL FROM. Microsoft's [email authentication page](https://learn.microsoft.com/en-us/defender-office-365/email-authentication-about) uses P1 for this address.
- **P2:** the address in the From header, the one people see.

The ban is on the domain, not on one account or one IP address. Those have codes of their own: [5.7.501](https://email-validation.org/bounce-codes/5-7-501/) for a banned account and [5.7.606](https://email-validation.org/bounce-codes/5-7-606/) for a banned IP. Several codes share the text "banned sender", so read the number.

## Common causes

- An account at your domain was taken over and sent spam.
- A website form or script sent mail in your domain's name to people who did not ask for it.
- A bulk mailing went to an old or bought list.
- Someone outside your organization forged your domain in spam. SPF, DKIM and DMARC make that harder.

## How to fix it

1. Find which domain is banned. Compare the bounce with your server's EHLO name, the MAIL FROM address and the From header.
2. Stop the source of the spam. Secure accounts that sent mail they should not have, and turn off forms or scripts you cannot vouch for.
3. Check your domain's SPF record ([SPF checker](https://email-validation.org/tools/spf-checker/)). Set up DKIM and DMARC as well, so forged mail is easier to spot.
4. Contact Microsoft support and ask for the domain's sending to be restored. That is the step Microsoft names for this code.
5. Once it is restored, send at a modest volume and watch your bounces and complaints ([reduce your bounce rate](https://email-validation.org/guides/reduce-email-bounce-rate/)).

## What to do with the address

Keep it. The recipient address is not the problem. Your domain's standing is. If a list with bad addresses helped cause the ban, clean it before you send to it again ([email list cleaning](https://email-validation.org/guides/email-list-cleaning/)).

## Related codes

- [5.7.501](https://email-validation.org/bounce-codes/5-7-501/): Your sending account was banned for spam (Microsoft 365)
- [5.7.606](https://email-validation.org/bounce-codes/5-7-606/): Banned sending IP (Microsoft)
- [5.7.750](https://email-validation.org/bounce-codes/5-7-750/): Sending from unregistered domains is blocked (Microsoft 365)

See [every bounce code](https://email-validation.org/bounce-codes/) in the dictionary.

The address on your list is not what failed here. For the bounces your list does cause, [clean the list before you send](https://email-validation.org/bulk-email-verification/).

_How we wrote this: drafted by the email-validation.org team with the help of AI writing tools, from our product documentation and the sources linked in the text._
