This is normal; it's exactly the same that happens, if you try to telnet HTTPS 443
; the port 993
is for IMAPS, which uses TLS. In TLS connection (from RFC 5246, 7.4.1.2 Client Hello):
When a client first connects to a server, it is required to send the
ClientHello as its first message. The client can also send a
ClientHello in response to a HelloRequest or on its own initiative in
order to renegotiate the security parameters in an existing
connection.
The server doesn't greet you because you are supposed to greet it first!
The IMAP port 143
works differently, because it doesn't start the connection with TLS. The connection starts as plain text, and the client request for TLS with (RFC 3501, 6.2.1) STARTTLS
:
A [TLS] negotiation begins immediately after the CRLF
at the end of
the tagged OK
response from the server. Once a client issues a
STARTTLS
command, it MUST NOT issue further commands until a server
response is seen and the [TLS] negotiation is complete.
Example:
C: a001 CAPABILITY
S: * CAPABILITY IMAP4rev1 STARTTLS LOGINDISABLED
S: a001 OK CAPABILITY completed
C: a002 STARTTLS
S: a002 OK Begin TLS negotiation now
<TLS negotiation, further commands are under [TLS] layer>
C: a003 CAPABILITY
S: * CAPABILITY IMAP4rev1 AUTH=PLAIN
S: a003 OK CAPABILITY completed
C: a004 LOGIN joe password
S: a004 OK LOGIN completed
In other words, both CAN be secure, but 143
isn't necessarily as it's also used for plain IMAP.
If you need to debug connection over TLS, you cannot use the telnet
command, originally designed for the telnet protocol, for that. However, there are several other tools, e.g.
OpenSSL
openssl s_client -connect imap-mail.outlook.com:993
openssl s_client -starttls imap -connect imap-mail.outlook.com:143
GnuTLS
gnutls-cli imap-mail.outlook.com -p 993
gnutls-cli imap-mail.outlook.com -s -p 143
ncat
and socat
(no support for STARTTLS
)
ncat --ssl imap-mail.outlook.com 993
socat openssl:imap-mail.outlook.com:993 stdio
socat ssl:imap-mail.outlool.com:993 readline
On Debian, telnet-ssl -z ssl imap-mail.outlook.com 993