如何通过OpenSSL与Shell中的IMAP服务器通信 [英] How to talk to IMAP server in Shell via OpenSSL

查看:76
本文介绍了如何通过OpenSSL与Shell中的IMAP服务器通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过Mac OS X终端将IMAP命令发送到服务器并获得响应.我可以使用以下线路连接到服务器:

I want to send IMAP commands via Mac OS X Terminal to server and get response. I can connect to the server using this line:

openssl s_client -connect imap.gmail.com:993

我可以成功登录:

? LOGIN m.client2 passwordhere

但是所有其他命令不起作用,服务器未响应.例如,我尝试过:

But all other commands do not work, no response from server. I tried for instance this:

? LIST "" "*"
? SELECT INBOX

推荐答案

在朋友的帮助下发现了一个错误:

Found an error by help of a friend:

openssl s_client -connect imap.gmail.com:993 -crlf

-crlf 很重要

这篇关于如何通过OpenSSL与Shell中的IMAP服务器通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆