5.0.350

Enhanced Status Code 5.0.350: Generic Remote Server Error

Permanent failure Medium severity System
What it means

Enhanced Status Code 5.0.350 means “Generic Remote Server Error.” Microsoft's catch-all for an error the recipient organisation returned that Exchange Online could not classify. The useful information is always in the text that follows, never in the code.

At a glance
Code5.0.350
Bounce typeHard (permanent)
SeverityMedium
CategorySystem
What to doSuppress the address; do not retry
What it looks like in your mail logs
550 5.0.350 Remote server returned an error: Requested action not taken: policy violation detected (AS345)

What does 5.0.350 mean?

Microsoft returns 5.0.350 as a generic wrapper for errors from a recipient organisation that Exchange Online cannot map to a more specific code. It is not IANA-registered. Seeing it means the receiving system said something Microsoft is relaying verbatim rather than interpreting.

Because of that, the code carries essentially no diagnostic value on its own and the text is everything. Two documented cases illustrate the range. One is an x-dg-ref header being too long, which relates to Rich Text formatted messages and is fixed by sending in HTML or plain text instead. Another is a policy violation detected with an AS345 reference, which relates to nested attachments, meaning an attached message that itself contains attachments.

The practical approach is to read the remainder of the bounce as though the code were absent. Whatever the recipient's system said is the real error, and it may well be a perfectly ordinary code from a third system that Exchange wrapped on the way through. Treating 5.0.350 as a distinct condition to diagnose leads nowhere.

How 5.0.350 plays out

Your server attempts delivery
The recipient server returns a permanent 5.0.350 rejection
This is a hard bounce: the message will not be accepted as sent
Suppress the address and fix the root cause before resending

Where 5.0.350 sits: soft vs hard bounce

Soft bounce (4xx) Hard bounce (5xx)
NatureTemporaryPermanent
SMTP class4xx5xx
What to doLet it retrySuppress the address
Recoverable?OftenNo
5.0.350 is✓ this code

What each provider means by 5.0.350

A registered code does not oblige a provider to use it that way, and the large ones diverge. Match the wording in your own bounce, not the definition above.

Exchange Online A generic wrapper for an unclassified error returned by the recipient organisation Reference

Common causes of 5.0.350

  • The recipient organisation returned an error Exchange Online could not classify
  • A Rich Text formatted message produced an overlong x-dg-ref header
  • Nested attachments triggered a policy violation at the receiving end
  • A third-party gateway in front of the recipient returned a non-standard error
  • A recipient-side transport rule rejected the message with custom text
  • An intermediate relay produced an error that Exchange wrapped rather than translated

How to fix 5.0.350

  • Read the text after the code, which is the only real diagnosis available
  • For x-dg-ref errors, send as HTML or plain text rather than Rich Text format
  • For nested attachment policy violations, avoid attaching messages that carry their own attachments
  • Ask the recipient administrator what their gateway logged, since they can see the original error
  • Do not retry, since the leading 5 makes it permanent
  • Treat the code as a wrapper and diagnose the wrapped message instead

Frequently asked questions

What does 550 5.0.350 mean?
It is Microsoft's generic catch-all for an error returned by the recipient organisation that Exchange Online could not classify into a specific code. It means very little by itself. The text that accompanies it comes from the receiving system and is where the actual reason lives.
How do I diagnose a 5.0.350?
Ignore the code and read the rest of the bounce. Exchange is relaying somebody else's error verbatim, so the text may contain a completely different status code from a third system, or plain-language text from a security gateway. Whatever it says is the real error.
What is the x-dg-ref header error?
It occurs with Rich Text formatted messages, where Exchange generates an x-dg-ref header that can exceed a length limit at the receiving end. Sending in HTML or plain text instead avoids it entirely. Rich Text format is an Exchange-specific format with little reason to be used for external mail.
What does "policy violation detected (AS345)" mean?
It relates to nested attachments: an attached email that itself contains attachments. Some receiving policies refuse these because the nesting can hide content from scanners. Forward the inner attachments directly rather than attaching the whole message.
Should I retry after 5.0.350?
No. The leading 5 makes it permanent regardless of what the wrapped error said. If the wrapped text indicates something transient, the correct response is still to fix the underlying cause rather than to retry, because Exchange has already classified the outcome as final.
Reviewed by Jennifer Jackson, Email Deliverability Analyst · June 2026 ← All bounce codes