Hello.
Please, help me debug connetcing to Windows Server Exchange
2007 via TLS. My e-mail client (Sylpheed 3.7.0) fails with:
* creating IMAP4 connection to
ex-07.git.ru:143 ...
[16:55:42] IMAP4< * OK The Microsoft Exchange IMAP4 service is ready.
[16:55:42] IMAP4> 1 CAPABILITY
[16:55:42] IMAP4< * CAPABILITY IMAP4 IMAP4rev1 LOGINDISABLED STARTTLS IDLE NAMESPACE LITERAL+
[16:55:42] IMAP4< 1 OK CAPABILITY completed.
[16:55:42] IMAP4> 2 STARTTLS
[16:55:42] IMAP4< 2 OK Begin TLS negotiation now.
** LibSylph-WARNING: SSL_connect() failed with error 5, ret = 0 (error:00000000:lib(0):func(0):reason(0))
Testing the connection with:
openssl s_client -tls1_2 -connect
ex-07.git.ru:143 -starttls imap -msg -debug
produces slightly different results (attached) from an in-
domain Windows machine (test-win.txt) and from a Linux
machine in the same local network (test-lin.txt). Both
invocations report:
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 191 bytes and written 238 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Protocol: TLSv1.2
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1792332202
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
Does it mean no TLS 1.2 was detected? The Winows invocation
has:
read from 0000005979D9A280 [0000005979D0D5F0] (16384 bytes => -1)
Connecting to 192.168.0.14
write:errno=10053
at the end, whereas the Linux invocation has:
write:errno=104
write to 0x565291e25b20 [0x565291e32ea0] (212 bytes => 212 (0xD4))
after
>>> TLS 1.2, Handshake [length 00cf], ClientHello
and no write error at the end:
read from 0x565291e25b20 [0x565291cd4880] (16384 bytes => 0)
If I don't specify -tls1_2 (which is certainly supported MS
Exchange 2007), the traces are very similar, with different
binary blocks and with 1.2 replaced with 1.3.
Consequently, when I try to connect via stunnel on Windows,
my client fails with:
** LibSylph-WARNING: fd_recv(): failed with 10054 (errno = 0)
** LibSylph-WARNING: [17:14:03] Cannot get greeting message (2)
** Cannot get greeting message (2)
and the following stunnel log:
2026.10.18 17:14:03 LOG5[0]: Service [exchange-imap] accepted connection from
127.0.0.1:57783
2026.10.18 17:14:03 LOG6[0]: s_connect: connecting
192.168.0.14:143
2026.10.18 17:14:03 LOG5[0]: s_connect: connected
192.168.0.14:143
2026.10.18 17:14:03 LOG5[0]: Service [exchange-imap] connected remote server from
192.168.0.212:57784
2026.10.18 17:14:03 LOG6[0]: SNI: sending servername:
ex-07.git.ru
2026.10.18 17:14:03 LOG6[0]: Peer certificate required
2026.10.18 17:14:03 LOG3[0]: SSL_connect: ssl/record/rec_layer_s3.c:698: error:0A000126:SSL routines::unexpected eof while reading: client
127.0.0.1:57783
2026.10.18 17:14:03 LOG5[0]: Connection closed/reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket
Please, help me undestand the situation, in order (at least)
to ask the admininstrator the right questions.
--
() ascii ribbon campaign -- against html e-mail
/\
www.asciiribbon.org -- against proprietary attachments