Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

i am trying to login to microsoft exchange online using openssl

openssl s_client -connect pop.mail.apac.microsoftonline.com:995

however when i pass the USER command it fails

+OK The Microsoft Exchange POP3 service is ready.
user myusername@fomain.com
-ERR Connection is closed. 12

any ideas on how to test this?

more research

i tried

nc -v pop.mail.microsoftonline.com 995
Connection to pop.mail.microsoftonline.com 995 port [tcp/pop3s] succeeded!

user user@fomain.com

but no results...


openssl s_client -crlf -connect pop.mail.apac.microsoftonline.com:995
share|improve this question

1 Answer 1

up vote 3 down vote accepted

You have to actually follow the POP3 protocol:

Commands ... consist of a case-insensitive keyword, possibly followed by one or more arguments. All commands are terminated by a CRLF pair. Keywords and arguments consist of printable ASCII characters. Keywords and arguments are each separated by a single SPACE character. Keywords are three or four characters long. Each argument may be up to 40 characters long.

Try passing -crlf to s_client.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.