Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

Unable to Start TLS SSL Connect Attempt Failed Error SSL Routines Unexpected eof While Reading

November 28, 2023
in Blog, imapsync
0
ADVERTISEMENT

Table of Contents

SSL routines::unexpected eof while reading

imapsync \
--host1 mail.duybao.me \
--user1 [email protected] \
--password1 $password1 \
\
--host2 mail.duykhang.me \
--user2 [email protected] \
--password2 $password2 \
--justlogin

In some cases, you got this error when trying to migrate emails from Exchange Server using imapsync.

Host1 capability before authentication: IMAP4 IMAP4rev1 LOGINDISABLED STARTTLS UIDPLUS MOVE ID CHILDREN IDLE NAMESPACE LITERAL+
Host1: going to ssl because STARTTLS is in CAPABILITY. Use --notls1 or --notls2 to avoid that behavior
DEBUG: .../IO/Socket/SSL.pm:842: local error: SSL connect attempt failed error:0A000126:SSL routines::unexpected eof while reading
DEBUG: .../IO/Socket/SSL.pm:845: fatal SSL error: SSL connect attempt failed error:0A000126:SSL routines::unexpected eof while reading
Host1 failure: Can not go to tls encryption on host1 [mail.duybao.me]: Unable to start TLS: SSL connect attempt failed error:0A000126:SSL routines::unexpected eof while reading

You got it because the Exchange server doesn’t have a valid certificate or using a self-certificate.

EgDBv3VouPwWq3wKMjV2eEHgTWJjMiMaor8L3TW7C4PUPVeaVsfXUuxNiiRs

To fix it, you need to change the authentication for IMAP protocol to Basic Authentication on your Exchange Server. The steps are shown in the below screenshot.

Tx5aQp1xIwxPUr4o1JzNHlXbBM8qMPz0kIGtPeih0dkpL99WfbpqVonMuwHg

Changing the login method requires restart the IMAP services. You can restart them from services.msc or can do it using PowerShell:

Get-Service *imap* | Restart-Service

Because the Exchange server doesn’t have a valid certificate, so you need to add these options in the migration command.

imapsync \
--host1 mail.duybao.me \
--user1 [email protected] \
--password1 $password1 \
--nosslcheck \
--notls1 \
\
--host2 mail.duykhang.me \
--user2 [email protected] \
--password2 $password2 \
--justlogin

The error should be gone then imapsync can be authenticated for migration.

Host1: IMAP server [mail.duybao.me] port [143] user [[email protected]]
Host2: IMAP server [mail.duykhang.me] port [143] user [[email protected]]
Host1: connecting and login on host1 [mail.duybao.me] port [143] with user [[email protected]]
Host1 IP address: 20.232.97.85 Local IP address: 10.0.0.4
Host1 banner: * OK The Microsoft Exchange IMAP4 service is ready.
Host1 capability before authentication: IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=NTLM AUTH=GSSAPI STARTTLS
Host1: success login on [mail.duybao.me] with user [[email protected]] auth [LOGIN] or [LOGIN]
Host2: connecting and login on host2 [mail.duykhang.me] port [143] with user [[email protected]]
Host2 IP address: 20.127.32.166 Local IP address: 10.0.0.4
Host2 banner: * OK IMAPrev1
Host2 capability before authentication: IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL
Host2: success login on [mail.duykhang.me] with user [[email protected]] auth [LOGIN] or [LOGIN]
Host1: state Authenticated
Host2: state Authenticated

Not a reader? Watch this related video tutorial:

5/5 - (1 vote)
Previous Post

PuTTY Fatal Error No Supported Authentication methods available (server sent: publickey)

Next Post

How to Deploy an EXE File Using Group Policy

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory