550 5.0.350: generic error from the recipient's server
Exchange Online wraps a non-specific rejection from the recipient's mail system in 5.0.350. Two variants, x-dg-ref header too long and AS345, have specific fixes.
Requested action not taken: policy violation detected (AS345)
One of the specific variants listed in Microsoft's article on 550 5.0.350.
What 550 5.0.350 means
Microsoft calls 5.0.350 a generic wrapper that Exchange Online uses for a wide variety of non-specific errors, typically returned by the recipient's email organization. The NDR's "Diagnostic information for administrators" section contains the original error from the remote server. That text, not the 5.0.350 code, tells you what really happened.
Two variants have their own fixes. If the NDR also says "x-dg-ref header is too long", the message was sent in Rich Text Format from Outlook, likely with an attached email message that itself has an attachment. Microsoft explains that in Rich Text messages the attachment's data becomes part of the X-MS-TNEF-Correlator header, which can grow too long for the receiving server. The fix is to send in HTML format; admins can also control TNEF settings for remote domains and mail contacts.
If the NDR says "Requested action not taken: policy violation detected (AS345)", the message has an attachment, such as a Word file, with 20 or more embedded files. Remove some embedded files and resend. For every other 5.0.350, Microsoft says there's typically nothing support can do, because the problem lies with the recipient's email system.
Likely causes
- A rejection from the recipient's server that Exchange Online reports with this generic code.
- x-dg-ref header too long: a Rich Text Format message with nested attached messages.
- AS345: an attachment containing 20 or more embedded files.
How to fix it
If you sent the message
- Read the diagnostic section of the NDR for the remote server's original error.
- For x-dg-ref: switch Outlook to HTML format for the message and resend.
- For AS345: remove some of the embedded files from the attachment.
- Otherwise, forward the NDR to your admin or contact the recipient's IT team with the full error.
If you're the recipient or their admin
- Check your own server's logs for the original rejection reason and adjust the policy if the mail is wanted.
Frequently asked questions
What does the generic 550 5.0.350 code actually tell me?
Only that the recipient's system rejected the message for a reason Exchange Online didn't map to a specific code. Look in the NDR's diagnostic information for administrators: it contains the remote server's original error.
How do I fix 'x-dg-ref header is too long'?
Send the message in HTML format instead of Rich Text Format. Microsoft explains that Rich Text attachments are carried in a header that can grow too long for the receiving server, especially with attached messages that have their own attachments.
Sources
- Fix NDR error 550 5.0.350 in Exchange Online (Microsoft Learn)
- Email nondelivery reports (NDRs) and SMTP errors in Exchange Online (Microsoft Learn)
Provider messages are quoted as the provider publishes them. Servers can change their wording, so the bounce you received may differ slightly.
Related codes
- 550 SMTP 550: requested action not taken, mailbox unavailable
- 554 SMTP 554: transaction failed
- 550 5.6.11 550 5.6.11: invalid characters (bare line feeds)
- 550 5.1.0 550 5.1.0: sender denied
- 550 5.1.20 550 5.1.20: multiple From addresses are not allowed without Sender address
- 550 5.7.64 550 5.7.64 TenantAttribution; Relay Access Denied
- 450 4.4.317 450 4.4.317: cannot connect to remote server [Message=UntrustedRoot]
Related guides
Which email attachment types are dangerous, and what should you block?
Which email attachment types are dangerous, from .exe and scripts to macros, HTML, SVG, ISO and OneNote files, and which to block outright versus quarantine.
9 min read Running email day to dayHard bounce vs soft bounce: what's the difference and what should you do?
The difference between hard and soft email bounces, how RFC 3463 status codes classify them, when to retry or remove an address, and how to keep lists clean.
9 min read Running email day to dayHow to read email headers
Read email headers step by step: the Received chain from the bottom up, Authentication-Results, ARC, Return-Path, Message-ID and Microsoft 365 anti-spam fields.
10 min read