It seems that port 993 was blocked. You can check it in the Windows Firewall(Advanced Security). Besides, make sure the Microsoft Exchange IMAP/IMAPBE services are running, and make sure your certificate is assigned the IMAP service(You could check that by running the command "Get-ExchangeCertificate | fl Subject, Services).
Testing Exchange 2019 / Imap connectivity

FDVA
1
Reputation point
We've enabled the IMAP4 services, and set the External Connection Settings
Confirmed the Exchange Certificate has IMAP enabled
I tried testing the connection from https://testconnectivity.microsoft.com/tests/Imap/input
it shows port 993 is opened, but fails on the certificate
error
The Microsoft Connectivity Analyzer is probing the TCP endpoint [X.X.X.X ] on port 993 to detect which SSL/TLS protocols and cipher suites are enabled.
We were unable to determine which SSL and TLS protocols are enabled. This is usually because we couldn't connect.
{count} votes
Hi @FDVA ,
It has been a few days and I am checking in to see how things are going on with this issue.
Does this issue have any updates? If you need further help, please provide more detailed information, so that we can give more appropriate suggestions.
I look forward to hearing from you.