Unable to sync with server and missing some emails

I am getting this error code from the logs.

System.IO.IOException: The handshake failed due to an unexpected packet format