Bounce code · Permanent

5.7.800: Your sending domain was banned for spam (Microsoft 365)

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.

How to fix itEvery bounce code

PermanentSecurity or policy status

5.7.800

What happens
Not retried
Registry name
Not in the IANA registry
Who uses it
Microsoft (Exchange Online)

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 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 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 for a banned account and 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). 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).

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

The address on your list is not what failed here. For the bounces your list does cause, clean the list before you send.

Get up to 500 free credits. No card needed.

Fewer bounces start with a clean list: check addresses before you send.

Updated · Maintained by: Email Validation LLC