How to Fix IMAP SSL Handshake Errors in Microsoft 365
Question details
The user needs to resolve an issue where connecting applications encounter SSL handshake failures due to inactive proxy components on the server.

- Product
- Microsoft 365 / Exchange Server
- Device & OS
- not provided
- Scenario
- Connecting JavaMail or Tomcat applications to Microsoft 365 or Exchange using IMAP or POP protocols.
- Observed behavior
- The system reports 'Remote host terminated the handshake' and 'SSLHandshakeException' errors intermittently when the IMAP or POP proxy components become inactive.
Ensure you have Exchange Server administrative privileges to run PowerShell commands and verify the exact names of your Exchange servers before altering component states.
Reactivate POPProxy and IMAPProxy Components in Exchange Server
Use the Exchange Management Shell to identify the inactive proxy components and restore them to an active state, which resolves the SSL handshake exception.
This connection issue typically happens when the POPProxy and IMAPProxy components on the Exchange server are unexpectedly placed in an inactive state, blocking the secure connection handshake from JavaMail or Tomcat applications.
Open the Exchange Management Shell and check the overall status of the server components by executing the command: Get-ServerComponentState <ServerName>
Determine which requester made the proxy component inactive by running: Get-ServerComponentState -Identity <ServerName> -Component PopProxy | Select-Object -ExpandProperty LocalStates
Reactivate the POPProxy component using the requester identified in the previous step (for example, HealthAPI) by running: Set-ServerComponentState -Identity <ServerName> -Component PopProxy -State Active -Requester HealthAPI
Repeat the same activation process for the IMAPProxy component if necessary, simply replacing 'PopProxy' with 'IMAPProxy' in the commands above.

Try WPS Office as Your Reliable Office Suite Alternative
While troubleshooting complex Exchange server and Microsoft 365 connection issues requires specialized IT administration, managing your daily documents shouldn't be complicated. WPS Office provides a lightweight, highly compatible, and completely free alternative to Microsoft Office for your productivity needs.
- 1. Download the Installer: Visit the official WPS website and download the free installer for your operating system.
- 2. Install WPS Office: Run the installation file and follow the on-screen instructions to set up the suite on your device.
- 3. Open and Edit Your Files: Launch WPS Office and instantly open your existing Microsoft Office documents without losing any formatting.

Frequently Asked Questions
What causes the 'Remote host terminated the handshake' error?
This error occurs because the background services handling the connection protocols (IMAPProxy and POPProxy) have been placed in an inactive state on the Exchange server, preventing the server from completing the secure SSL connection with your application.
Which tool is needed to fix the proxy component issue?
You will need to use the Exchange Management Shell, which allows administrators to run specialized PowerShell cmdlets to check and modify the server's component states.
Do I need to restart the Exchange server after changing the component state?
Usually, changing the component state to active via the Set-ServerComponentState command applies immediately without requiring a full server restart, though restarting the specific IMAP/POP services can help if the application still fails to connect.
Can I use WPS Office to open Microsoft Office attachments from my email?
Yes, WPS Office is fully compatible with Microsoft Office formats, making it easy to open, edit, and securely save email attachments like DOCX, XLSX, and PPTX without formatting loss.




