5.7.57 means an application or device connected to Microsoft 365’s smtp.office365.com endpoint and tried to send without logging in first. Microsoft treated it as anonymous mail and refused. The problem is in the sending app’s settings, not in the message or the recipient.
The error message
Microsoft’s NDR reference lists it as:
5.7.57 Client was not authenticated to send anonymous mail during MAIL FROM
Microsoft’s fix page calls it 550 5.7.57. The three-digit reply code and wording in your app’s log can differ, so go by the 5.7.57.
What it means
When you submit mail through smtp.office365.com, Microsoft requires you to authenticate as a user who has an Exchange Online mailbox. The 5.7.57 fix page says the bounce points to a problem in the configuration of the connecting application or device. The code 5.7.57 is Microsoft’s own. It is not in the IANA registry of enhanced status codes, so the meaning is whatever Microsoft says it is.
Why it happens
- No credentials configured, or the “SMTP server requires authentication” box is unticked.
- Wrong username or password, or the password changed and the device still has the old one.
- TLS was not negotiated. Microsoft requires TLS in order to authenticate. Old printers and scanners that only speak older TLS versions, or apps set to “no encryption”, never reach the login step.
- SMTP AUTH is disabled for the mailbox or the whole organization. If security defaults are on in Microsoft Entra ID, SMTP AUTH is already off.
- Basic authentication is blocked by an authentication policy, so a username and password login is refused even with SMTP AUTH enabled.
- The From address is a different mailbox that the login is not allowed to send as.
How to fix it
- Use these settings: server
smtp.office365.com, port 587, encryption STARTTLS (sometimes called TLS), authentication on, username = the full mailbox address. - Re-enter the password for that mailbox. If the account uses multifactor sign-in, a plain password may not work for SMTP.
- Enable SMTP AUTH for the mailbox. In the Microsoft 365 admin center, open the user, Mail, Manage email apps, and tick Authenticated SMTP. Or in Exchange Online PowerShell:
Set-CASMailbox -Identity app@yourdomain.com -SmtpClientAuthenticationDisabled $false - Check security defaults and authentication policies. Microsoft’s SMTP AUTH article explains that security defaults disable SMTP AUTH and that a policy blocking basic authentication overrides the mailbox setting.
- Update old devices whose firmware cannot do modern TLS, or point them at a relay that accepts them.
- Send as the mailbox you log in with, or grant Send As permission for the address in From.
Full settings for apps are in our Outlook and Office 365 SMTP guide. For printers and scanners, see scan to email SMTP setup.
Which server sent it
| Provider | What you see |
|---|---|
| Microsoft 365 / Exchange Online | 5.7.57 with the text above. This code is specific to Microsoft. |
| Gmail | Gmail uses 530 5.7.0 Authentication required and 530 5.7.0 Must issue a STARTTLS command first for the same kind of problem. |
| Yahoo | Not applicable: this is a submission error, not a delivery error. |
| Generic servers | Most return 530 5.7.0 Authentication required or 550 5.7.1 with relay denied text. |
Is it temporary?
No. Retrying with the same settings fails the same way every time. Change the configuration first. Once the app authenticates successfully, the same messages go through.
How Mailcandor handles it
If an app or device keeps fighting Office 365 SMTP, you can point it at Mailcandor’s SMTP relay instead: smtp.mailcandor.com, port 587 with STARTTLS or 465 with TLS, username mailcandor and an API key as the password. Delivery problems after that are explained in plain English by the deliverability coach, and hard bounces are suppressed automatically. Look up other codes with the free bounce code lookup, or see all error codes. More free checks are on the tools page. To make sure your own domain is authenticated, follow the SPF, DKIM and DMARC setup guide.