Skip to content
iBlockSpam
SMTP error code · Microsoft 365 / Outlook.com

5.7.512: access denied, message must be RFC 5322 section 3.6.2 compliant

550 5.7.512 Permanent failure (5xx): the message bounced
By iBlockSpam Team Checked against sources 2 sources How we check our content
What it means

Microsoft 365 rejected the message because it was sent without a valid email address in the From header, which RFC 5322 section 3.6.2 requires.

What the bounce says
Access denied, message must be RFC 5322 section 3.6.2 compliant

Microsoft's text for 5.7.512, as listed in its Exchange Online NDR reference.

What 550 5.7.512 means

Microsoft's NDR reference lists 5.7.512 "Access denied, message must be RFC 5322 section 3.6.2 compliant": the message was sent without a valid From email address. Microsoft notes it applies to Office 365 only, that each message must contain a valid email address in the From header field, and that proper formatting includes angle brackets around the address, for example security@contoso.com. Without an address in that format, Microsoft 365 rejects the message.

RFC 5322 section 3.6.2 defines the originator fields, From, Sender and Reply-To. The From field names the author of the message. A display name on its own, an address with no domain, or a From header that's missing entirely all fail the check.

The usual sources are homemade scripts, website forms, monitoring tools and old devices that build headers themselves. A common pattern is a From value such as "Website" or "root" with no address at all. Set a full sender address in the application, or send through a mail library that formats the header for you, then send a test.

Likely causes

  • The From header is missing from the message.
  • From contains only a display name, or an address without a domain.
  • A script or device formats the From address incorrectly.
  • An app builds raw headers instead of using a mail library.

How to fix it

If you sent the message

  1. Set a complete From address in the application, form or device, such as Website <noreply@yourdomain.com>.
  2. Use a maintained mail library or SMTP plugin that formats headers for you.
  3. Send a test to a Microsoft 365 mailbox and check the From header in the received message.

If you're the recipient or their admin

  1. No action needed by recipients: the sending system must include a valid From address.

Frequently asked questions

What does 'RFC 5322 section 3.6.2 compliant' mean in a Microsoft 365 bounce?

Section 3.6.2 of RFC 5322 defines the From header. Microsoft requires every message to include a valid email address in From, formatted with angle brackets, for example security@contoso.com.

Why does my scanner or script get 5.7.512 from Microsoft 365?

It is probably sending a From value without a real address, such as just a device name. Set a full sender address in the device or script settings, then send a test.

Sources

  1. Email nondelivery reports (NDRs) and SMTP errors in Exchange Online (Microsoft Learn)
  2. RFC 5322, section 3.6.2: Originator fields

Provider messages are quoted as the provider publishes them. Servers can change their wording, so the bounce you received may differ slightly.