I'm attempting to connect to our exchange server using Mail::IMAPClient but a script that was working is having issues when I moved it from a temp dev desktop running ubuntu to a new dev env running centos. During that time I found out the exchange server was upgraded I think to 2010. Is there a setting in exchange that would allow commands to be processed with just linefeeds instead of requiring crlf or could this be a local system (running the script issue)?
This just times out after a while.
$openssl s_client -connect myhost.mydomain.net:993
...
* OK The Microsoft Exchange IMAP4 service is ready - 'myhost'
? login username password
* BYE Connection is closed. 13
read:errno=0
Commands would function correctly.
$openssl s_client -crlf -connect myhost.mydomain.net:993
...
* OK The Microsoft Exchange IMAP4 service is ready - 'myhost'
? login username password
? OK LOGIN completed.
? select inbox
* 4 EXISTS
* 0 RECENT
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
* OK [UNSEEN 3] Is the first unseen message
* OK [UIDVALIDITY 169533] UIDVALIDITY value
* OK [UIDNEXT 132] The next unique identifier value
? OK [READ-WRITE] SELECT completed.
1 logout
* BYE Microsoft Exchange Server 2010 IMAP4 server signing off.
1 OK LOGOUT completed.
read:errno=0
[Solution:]
Tried to make a manual ssl connection to the server using openssl.
I had to include the -crlf option so that exchange could recognize the IMAP commands terminating.