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

I'm trying to fetch emails programmatically from Exchange 2003 over POP. As a proof of concept I'm trying to connect using openssl s_client.

I've started the POP service on my Exchange server. Trying to connect using

openssl s_client -connect MYEXCHANGESERVER:995

returns

20303:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:

Trying

openssl s_client -connect MYEXCHANGESERVER:995 -starttls pop3

returns

CONNECTED(00000003)
write:errno=32

[UPDATE] In response to jj33's advice, netcating (originally telneting) onto the server as follows:

nc -v MYEXCHANGESERVER 995

returns

Connection to MYEXCHANGESERVER 995 port [tcp/pop3s] succeeded!

Then the connection automatically closes.

Netcating onto port 110 (insecure pop) returns

+OK Microsoft Exchange Server 2003 POP3 server version 6.5.7638.1 (MYEXCHANGESERVERNAME) ready.

For every command I try I get back

-ERR Protocol error.

[/UPDATE]

Forgive a newb - I'm basically shooting wildly in the dark with no idea on what I'm supposed to be doing. In the past I've read my GMail over openssl s_client, and setting up those certificates was easy and well documented. I would imagine I need to set up some sort of certificate here as well, and I've looked a bit at using a .pfx file. But like I said, I'm completely lost here.

Thankful for any advice,

Andreas

share|improve this question
add comment

2 Answers

Drop the starttls flag -- you're not running TLS over 110, so that flag will break stuff.

share|improve this answer
add comment

As a troubleshooting step, try connecting directly to 995 w/ telnet and see if it's presenting a plaintext banner. You might either not have encryption at all or you might have it set up to upgrade to encryptiono in the protocol (I would say STARTTLS in SMTP, not sure what the verb is in POP)

share|improve this answer
    
Thanks, I've updated the original question accordingly. –  Andreas Jansson May 12 '10 at 16:13
add comment

Your Answer

 
discard

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.