Fix Error 554 5.4.0 When Sending from a Microsoft 365 Shared Mailbox
Question details
Resolve a 554 5.4.0 bounce-back when a Microsoft 365 shared mailbox sends email to internal recipients.

- Product
- Microsoft 365 shared mailbox
- Device & OS
- not provided
- Scenario
- A user sends email from a shared mailbox to recipients within the organization.
- Observed behavior
- The message bounces back with error 554 5.4.0. A domain DNS or mail-routing issue may be involved.
Save the full bounce-back message and identify the affected sender and recipient domains. Make sure a Microsoft 365 administrator and someone with access to the domain's DNS provider are available.
Check the Domain's DNS and MX Records
Use this approach when DNS or an outdated MX record may be directing mail to the wrong service.
Open the non-delivery report and note the recipient address, diagnostic details, and any server or domain named in the error.
In the Microsoft 365 admin center, go to Settings > Domains, select the relevant domain, and review its DNS records and any reported issues.
At the domain's DNS hosting provider, compare the published MX record with the value shown in Microsoft 365. Check the recipient domain as well as the shared mailbox domain if they differ.
Update an invalid or outdated MX record at the DNS provider using Microsoft's domain DNS guidance. If the organization uses a third-party gateway or hybrid mail routing, confirm the intended configuration before changing it.
Allow time for DNS changes to propagate, then send a new message from the shared mailbox to an affected internal recipient.

Inspect Microsoft 365 Mail Routing
Use message trace and Exchange routing settings if correcting DNS does not resolve the bounce.
Work with Email Attachments in WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface and support for common Microsoft Office formats, making it easy to move existing documents into your workflow. It does not fix Microsoft 365 mailbox or DNS errors.

Frequently Asked Questions
Does error 554 5.4.0 always mean the MX record is wrong?
No. It can also indicate another mail-routing problem. Review the non-delivery report and use Exchange admin center > Mail flow > Message trace to investigate.
Where can I find the Microsoft 365 DNS settings for my domain?
In the Microsoft 365 admin center, go to Settings > Domains, select your domain, and review the DNS records. Make any necessary changes at your DNS hosting provider.
Should I replace the MX record if my organization uses a mail gateway?
Not without confirming the intended mail flow. A third-party gateway or hybrid setup may require an MX record different from the standard Microsoft 365 value.
What should I do after correcting a DNS record?
Allow time for the change to propagate, then send a new test message from the shared mailbox. If it still bounces, review the new non-delivery report and run a message trace.




