Bounce code · Permanent

5.7.512: The message has no valid From address (Microsoft 365)

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

How to fix itEvery bounce code

PermanentSecurity or policy status

5.7.512

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.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 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. A badly formed envelope sender can get 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.

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