Fix Exchange Online 5.7.57: Client Not Authenticated to Send Mail

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

Quick answer

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.

  1. Make sure the device actually sends a username and password, and that they are correct. If it never asked for a password, it is trying to send anonymously.
  2. Make sure the device uses TLS (STARTTLS, TLS 1.2 or 1.3) on port 587. TLS is required to authenticate.
  3. Check that SMTP AUTH is allowed for the mailbox: Get-CASMailbox -Identity scanner@contoso.com | Format-List SmtpClientAuthenticationDisabled. If it is True, run Set-CASMailbox -Identity scanner@contoso.com -SmtpClientAuthenticationDisabled $false.
  4. Check security defaults, authentication policies and Conditional Access, which can block Basic authentication for SMTP even when SMTP AUTH is enabled.
  5. If the device can't sign in at all, use SMTP relay (inbound connector) or Direct Send instead (compared below).

Which message do you have?

ErrorWhat Microsoft says it meansFix
5.7.57 Client was not authenticated to send anonymous mail during MAIL FROMThe 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 unsuccessfulThe 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 senderThe 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 senderThe 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.

Check 1: SMTP AUTH at tenant and mailbox level

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:

SettingWhereValues
OrganizationSet-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.
MailboxSet-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.

Check 2: security defaults, authentication policies and Conditional Access

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.

Check 3: the device or application settings

SettingValue for client SMTP submission
Server / smart hostsmtp.office365.com. Don't use an IP address.
Port587 (recommended) or 25. If the device recommends or defaults to port 465, Microsoft says it doesn't support the required TLS versions.
TLS / STARTTLSEnabled, TLS 1.3 or TLS 1.2. Devices without TLS 1.2 can't use client SMTP submission.
Username and passwordThe 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:

  1. Sign in to Outlook on the web with the device's credentials and send a test message, to confirm the mailbox is active and not blocked.
  2. From a computer on the same network, Microsoft's article uses Telnet: 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.
  3. Update the device firmware or application so it supports TLS 1.2 or later.
  4. In the Microsoft 365 admin center, an admin can run the Run Tests: Send email using Microsoft 365 diagnostic for a new setup or an existing one.

SMTP AUTH vs SMTP relay vs Direct Send

From Microsoft's multifunction device article:

Client SMTP submission (SMTP AUTH)SMTP relay (inbound connector)Direct Send
Endpoint and portsmtp.office365.com, 587 (or 25)Your MX endpoint (for example contoso-com.mail.protection.outlook.com), 25Your MX endpoint, 25
AuthenticationMicrosoft 365 username and password (or OAuth)TLS certificate (recommended) or a static public IP that isn't shared with another organizationNone
TLSRequiredOptional (the setup tables enable TLS 1.2 or 1.3)Optional
Send to external recipientsYesYesNo, internal recipients only
Needs a licensed mailboxYesNo (any address in an accepted domain)No (any address in an accepted domain)
Limits10,000 recipients per day, 30 messages per minuteReasonable limits, no spam or bulk mailStandard throttling for anonymous internet mail
Saves to Sent ItemsYesNoNo

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).

Basic authentication retirement for SMTP AUTH

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.

Audit hundreds of domains at once

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).

Related tools and guides

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.

FAQ

What does 5.7.57 Client not authenticated to send mail mean?

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.

How do I enable SMTP AUTH for one 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.

Why does SMTP AUTH still fail after I enabled it?

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.

My scanner has no username or password field. What should I use?

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.

Is Microsoft retiring Basic authentication for SMTP AUTH?

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.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.