# 5.7.512 Bounce: Message Must Be RFC 5322 §3.6.2 Compliant

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

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

**Short answer:** Microsoft 365 refused the message because its From header holds no valid email address. It is permanent: retrying the same message fails again. Fix the app or script that builds the message, so the From line carries a full address such as `Support <support@example.com>`.

**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.512:** 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 message must be RFC 5322 section 3.6.2 compliant (a valid From address).

A 5.7.512 bounce means the From line of your message has no usable email address in it. Microsoft 365 refuses such a message outright.

## 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 it as `Access denied, message must be RFC 5322 section 3.6.2 compliant`. Microsoft says the message was sent without a valid From address. It adds that every message must have a valid address in the From header, with angle brackets around it, and gives `<security@contoso.com>` as its example.

RFC 5322 is the standard for the format of a message. Section 3.6.2 covers the originator fields: From, Sender and Reply-To.

The From header is the sender people see in their inbox. It is separate from the envelope sender your server gives in MAIL FROM. A message can have a valid envelope sender and still fail here.

## Common causes

- The From header is empty, or holds only a name with no address.
- A script builds the From line from a setting or variable that was empty.
- The address is missing the @ or the domain.
- A display name with a comma, such as `Smith, Jan`, is not in quotes. The comma splits the line into two broken entries.
- An app writes a bare address. RFC 5322 allows that, but Microsoft's text asks for angle brackets.

## How to fix it

If you are the sender:
1. Open a copy of a message that bounced and read its From line.
2. Write it as a display name followed by the address in angle brackets: `From: Support <support@example.com>`.
3. Put a display name that contains a comma or other punctuation in double quotes: `From: "Smith, Jan" <jan@example.com>`.
4. In an app or script, set the From address in its settings and check that the value is not empty.
5. Send a test to a Microsoft 365 address and check that it arrives.

A From line with several addresses and no Sender line gets a different Microsoft code, [550 5.1.20](https://email-validation.org/bounce-codes/550-5-1-20/). A badly formed envelope sender can get [553 5.1.7](https://email-validation.org/bounce-codes/553-5-1-7/).

## What to do with the address

Keep it. The recipient address is not the problem. The From line of your message is. Resend once it is fixed.

## Related codes

- [550 5.1.20](https://email-validation.org/bounce-codes/550-5-1-20/): Several From addresses, no Sender (Microsoft 365)
- [554 5.6.0](https://email-validation.org/bounce-codes/554-5-6-0/): The message is malformed
- [553 5.1.7](https://email-validation.org/bounce-codes/553-5-1-7/): The sender's address is not valid syntax

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