Outlook uses IMAP to connect to a Microsoft 365 account and reports a mistake

Copper Contributor

 

The connection configuration is as follows

allenlin_2-1658822286513.png

 

The error message is as follows

 

The connection test failed
 
Test details
Collapse all
 
Testing IMAP for a user email address removed for privacy reasons on host outlook.office365.com:995:SSL.
The IMAP test failed.
Test the steps
An attempt is being made to resolve the host name outlook.office365.com in DNS.
The host name was successfully resolved.
Additional details
Testing TCP port 995 on host outlook.office365.com to ensure that it is listening/opening.
The port was opened successfully.
The SSL certificate is being tested to ensure that it is valid.
The certificate meets all validation requirements.
Test the steps
Testing the IMAP service.
An error occurred while testing the IMAP service
Additional details
Protocol Log: C: 1 CAPABILITY S: +OK The Microsoft Exchange POP3 service is ready. [UwBZAEEAUABSADAAMQBDAEEAMAAwADAAOAAuAGEAdQBzAHAAcgBkADAAMQAuAAcgBvBvQALgBvAHuAdABsAG8AbwBrAC4AYwBvAG0A] Exception Details: Mail: IMAP Server Response Error Status "+OK The Microsoft Exchange POP3 service is ready. [UwBZAEEAUABSADAAMQBDAEEAMAAwADAAOAAuAGEAdQBzAHAAcgBkADAAMQAuAHAAcgBvAGQALgBvAHUAdABsAG8AbwBrAC4AYwBvAG0A]”。 Type: Microsoft.M365.RCA.Services.Protocols.Imap.ImapServerErrorException Stack Trace: In Microsoft.M365.RCA.Services.Protocols.Imap.ImapCommand'1.CheckForOk (IList'1 response) in Microsoft.M365.RCA.Services.Protocols.Imap.CapabilityCommand.ProcessResponse (IList'1 response) is < microsoft.M365.RCA.Services.Protocols.ProtocolClient. SendCommandAsync>d__17'1.MoveNext() --- Throw exception at the end of the stack trace at the end of the --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) is < at Microsoft.M365.RCA.Services.Protocols.Imap.ImapProtocolClient. Capability>d__3.MoveNext() --- Throw exception at the end of the stack trace at the previous location --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter. HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.M365.RCA.ConnectivityTests.ImapPop.BaseProtocolTest.<PerformTestInternalAsync>d__12.MoveNext()

allenlin_1-1658822195229.png

Can someone help me analyze the reason for the error?

 

1 Reply
Ran into this issue while setting up IMAP on Exchange 2019.
Need to configure is the LoginType. This can be achieved by running a command in the Exchange Management Shell (elevated). Default is set to SecureLogin.
Сommand:
Set-IMAPSettings -Server <SERVER> -LoginType PlainTextLogin

The LoginType parameter specifies the authentication method for IMAP4 connections. Valid values are:
1 or PlainTextLogin.
2 or PlainTextAuthentication.
3 or SecureLogin. This is the default value.