Mail Fetching issue due to Unrecognized SSL exception!

Mail Fetching issue due to Unrecognized SSL exception!

Error Trace: Unrecognized SSL message, plaintext connection?
at Source)

Exception from UI:
FAILURE  :E- mail settings saved successfully. But error occurred while trying to check connection with mail server - Problem connecting to mailbox


Symtoms :

Telnet on Port 993 returns the message "BYE Connection is closed. 14 Connection to host lost"

Cause :

Mail server configured in Admin -> Mail server
Settings -> Incoming does not have a valid SSL certificate assigned to IMAP or POP services even though the mail server has got the SSL certificate installed, therefore when trying to communicate via IMAPS on port 993 it's unable to recognize the SSL certificate from it.

Solution :

1. Go to Exchange Console -> Server Configuration -> Click on the Mail server name -> Select a certificate from the list -> Assign a certificate to IMAP, POP and SMTP services. 

2. Restart the respective services from services.msc

3. Alternatively, the same steps can be performed via PowerShell window, 

To get list of Certificates installed
the server,

[PS] C:\Windows\system32>Get-ExchangeCertificate

Thumbprint Services Subject
---------- -------- -------
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy .P.... CN=exch2010fe1
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx I..W.., OU=Domain Control Validated, O=webmail.ex...

To assign a certificate
IMAP service. Copy the valid certificate's thumbprint from the above output and apply it in the below command.

[PS] C:\Windows\system32>Enable-ExchangeCertificate -ThumbPrint xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -Services IMAP -DoNotRequireSSL

        New to ADManager Plus?

          New to ADSelfService Plus?

            • Related Articles

            • List of mail fetching issues and solutions

              Scenario 1 : Mail fetching issue due to Invalid or No PKIX certificate .   Log traces for Mail Fetching  issues Exception when connecting to store.|javax.mail.MessagingException: PKIX path building failed: ...
            • Fix JAR for Parse Error Exception Raised during Mail Fetching

              Issue : Some mail are fetched and created as ticket without description due to message corruption temporarily. The issue is can be identified with the below trace. Fix : The issue is not recreated when the mail is skipped to next schedule and fetched ...
            • Mail Fetching - Error while processing attachment and inline image.

              Issue During the process of fetching emails, attachments are dropped as a result of the presence of directory traversal characters. Furthermore, an issue arises when processing inline images, this particular error related to inline images results in ...
            • Fix: Mail fetching stops due to invalid characters in the attachment name

              Issue: Mail fetching being stopped due to invalid characters "?" , ":" in the filename. In this case, the eml file's subject contains ":" character and so, while uploading the .eml as attachment, error is thrown (Only in windows server) Trace: ...
            • Mail Fetching Stopped Due to Inline Image Handling

              Issue Cause : While fetching a mail, in certain mail servers, cid of inline image is not parsed correctly. Once inline stream is converted to image, cid in src attr will be replaced with image url. cid for uploaded inline image in mail content is not ...