Why a printer, scanner or app sending through smtp.office365.com on port 587 gets 5.7.57 Client not authenticated to send mail, how to check SMTP AUTH at tenant and mailbox level, security defaults and TLS, and when to switch to SMTP relay or Direct Send.
Home › Guides › Exchange Online 5.7.57
Last updated 17 November 2026
Microsoft documents two wordings for this code. The Exchange Online NDR reference lists it as:
5.7.57 Client was not authenticated to send anonymous mail during MAIL FROM
and its printer and application troubleshooting article lists it next to 535 5.7.3 Authentication unsuccessful as:
5.7.57 Client not authenticated to send mail
Both mean a device or application connected to smtp.office365.com to submit (relay) mail through Microsoft 365 and did not sign in with the credentials of a user who has an Exchange Online mailbox. Microsoft says the problem lies in the configuration of the connecting device or application, so the end user and the admin fix it in the same place.
Get-CASMailbox -Identity scanner@contoso.com | Format-List SmtpClientAuthenticationDisabled. If it is True, run Set-CASMailbox -Identity scanner@contoso.com -SmtpClientAuthenticationDisabled $false.| Error | What Microsoft says it means | Fix |
|---|---|---|
| 5.7.57 Client was not authenticated to send anonymous mail during MAIL FROM | The printer connected to the client submission endpoint (smtp.office365.com) but didn't log on to a mailbox. Usually no credentials are entered in the device. | Enter mailbox credentials. If the device has no place for them, it doesn't support client SMTP submission: use Direct Send or SMTP relay. |
| 5.7.57 Client not authenticated to send mail, or 535 5.7.3 Authentication unsuccessful | The sign-in was attempted and failed. | Check SMTP AUTH on the mailbox, MFA on that account, security defaults and Conditional Access that blocks legacy authentication. |
| 5.7.60 SMTP; Client does not have permissions to send as this sender | The device signs in as one mailbox and sends from another address. | Give the sign-in account Send As permission on the From address, or use SMTP relay. |
| 550 5.1.8 Bad outbound sender | The mailbox the device uses was blocked for sending spam. | Secure the account, then remove it from the Restricted entities (restricted users) page. |
Direct Send devices that are pointed at smtp.office365.com also get the "anonymous mail during MAIL FROM" error. Direct Send must use your MX endpoint, which ends in mail.protection.outlook.com.
Microsoft recommends disabling SMTP AUTH for the organization and enabling it only for the mailboxes that still need it. Two settings control it, and they only apply to mailboxes hosted in Exchange Online:
| Setting | Where | Values |
|---|---|---|
| Organization | Set-TransportConfig -SmtpClientAuthenticationDisabled $true (or $false to enable). In the Exchange admin center: Settings > Mail flow, "Turn off SMTP AUTH protocol for your organization". | $true = disabled for the org, $false = enabled. |
| Mailbox | Set-CASMailbox -Identity <mailbox> -SmtpClientAuthenticationDisabled. In the Microsoft 365 admin center: Users > Active users > select the user > Mail > Manage email apps > Authenticated SMTP. | $false = enabled, $true = disabled, $null (blank, the default) = follow the organization setting. The mailbox setting takes precedence. |
Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled Get-CASMailbox -Identity scanner@contoso.com | Format-List SmtpClientAuthenticationDisabled Set-CASMailbox -Identity scanner@contoso.com -SmtpClientAuthenticationDisabled $false
To keep the organization locked down, set the organization value to $true, set $false only on the device mailboxes, and leave everyone else at $null. Microsoft notes that SMTP AUTH is disabled for organizations created after January 2020 (you enable it per mailbox), and that as part of Basic authentication deprecation it also disabled SMTP AUTH in tenants where it wasn't being used. More cmdlets are in the PowerShell Cheat Sheet.
Weakening sign-in protection for one printer is a poor trade. Microsoft recommends Modern authentication (OAuth) for SMTP AUTH. If the device can't do OAuth, the SMTP relay or Direct Send options below avoid account sign-in altogether.
| Setting | Value for client SMTP submission |
|---|---|
| Server / smart host | smtp.office365.com. Don't use an IP address. |
| Port | 587 (recommended) or 25. If the device recommends or defaults to port 465, Microsoft says it doesn't support the required TLS versions. |
| TLS / STARTTLS | Enabled, TLS 1.3 or TLS 1.2. Devices without TLS 1.2 can't use client SMTP submission. |
| Username and password | The sign-in of a licensed Exchange Online mailbox. The device should send from that same address unless the account has Send As permission. |
Then test the account and the network:
open smtp.office365.com 587. You should get a 220 ... Microsoft ESMTP MAIL Service ready banner. If you can't connect, a firewall or ISP is blocking port 587 or 25.From Microsoft's multifunction device article:
| Client SMTP submission (SMTP AUTH) | SMTP relay (inbound connector) | Direct Send | |
|---|---|---|---|
| Endpoint and port | smtp.office365.com, 587 (or 25) | Your MX endpoint (for example contoso-com.mail.protection.outlook.com), 25 | Your MX endpoint, 25 |
| Authentication | Microsoft 365 username and password (or OAuth) | TLS certificate (recommended) or a static public IP that isn't shared with another organization | None |
| TLS | Required | Optional (the setup tables enable TLS 1.2 or 1.3) | Optional |
| Send to external recipients | Yes | Yes | No, internal recipients only |
| Needs a licensed mailbox | Yes | No (any address in an accepted domain) | No (any address in an accepted domain) |
| Limits | 10,000 recipients per day, 30 messages per minute | Reasonable limits, no spam or bulk mail | Standard throttling for anonymous internet mail |
| Saves to Sent Items | Yes | No | No |
Notes from the same article: SMTP relay can't be used to send from a third-party hosted service such as Microsoft Azure. Direct Send is for advanced admins, needs SPF (and DKIM and DMARC) for the sending domain, and Microsoft says it is working on an option to disable Direct Send by default. For both connector-based options, add the static IP to your SPF record so messages don't land in Junk. Check the result with the SPF Record Checker and find your MX endpoint with the MX Record Lookup.
For new setups Microsoft also points to High Volume Email for Microsoft 365 (internal recipients only) and Azure Communication Services Email (internal and external recipients).
The Microsoft Learn pages checked for this guide say client SMTP submission with Basic authentication is scheduled for deprecation and that the retirement timeline has been updated. They point to a Microsoft Tech Community announcement for the current dates instead of stating them, so this guide doesn't list dates. Plan the move now: use OAuth where the device or app supports it, or move devices to SMTP relay or one of the alternatives above.
Need SPF, DMARC and MX checks across a whole client list? Run the Bulk SPF / DMARC / MX Auditor on Apify ($2 per 1,000 domains).
Find your MX endpoint with the MX Record Lookup, add relay IPs to SPF with the SPF Record Builder and verify it with the SPF Record Checker, confirm the tenant with the M365 Tenant Lookup, read test-message headers in the Email Header Analyzer and keep cmdlets in the PowerShell Cheat Sheet. Related guides: Exchange Online 550 5.7.708, Exchange Online 550 5.4.1, Exchange Online 550 5.1.10, Exchange Online 5.2.2 submission quota, Exchange Online 535 5.7.139 (SMTP AUTH blocked) and SPF for Microsoft 365.
A device or application connected to smtp.office365.com to send through Microsoft 365 and did not authenticate with the credentials of a user who has an Exchange Online mailbox. Microsoft says the cause is in the device or application configuration: wrong or missing credentials, no TLS, or SMTP AUTH blocked for that mailbox.
Run Set-CASMailbox -Identity scanner@contoso.com -SmtpClientAuthenticationDisabled $false in Exchange Online PowerShell, or tick Authenticated SMTP in the Microsoft 365 admin center (Active users, select the user, Mail tab, Manage email apps). The mailbox setting overrides the organization setting from Set-TransportConfig.
Security defaults disable SMTP AUTH, and an authentication policy that blocks Basic authentication for SMTP or a Conditional Access policy that blocks legacy authentication will also stop it. The device also needs TLS 1.2 or later on port 587, the correct password, and an active, unblocked mailbox.
It cannot do client SMTP submission. Use SMTP relay with an inbound connector authenticated by a certificate or a static public IP, or Direct Send to your MX endpoint if it only needs to email people in your own organization.
Microsoft Learn says Basic authentication for SMTP AUTH is scheduled for deprecation and that the timeline has been updated, and points to a Tech Community announcement for the current milestones. Check that announcement for dates, and move devices to OAuth, SMTP relay or another supported method.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.