Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 尝试使用openssl发送邮件时握手失败_Linux_Terminal_Openssl_Smtp - Fatal编程技术网

Linux 尝试使用openssl发送邮件时握手失败

Linux 尝试使用openssl发送邮件时握手失败,linux,terminal,openssl,smtp,Linux,Terminal,Openssl,Smtp,我试图通过使用端口465上的ssl连接到gmail的服务器,使用openssl从终端发送邮件。在我输入地址并进行身份验证之前一切正常。但是当我输入RCPT TO时,我得到以下错误 RCPT TO: <abc@gmail.com> RENEGOTIATING 139815845389984:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshakefailure:s3_pkt.c:59 RCPT至: 重新谈判 13981584

我试图通过使用端口465上的ssl连接到gmail的服务器,使用openssl从终端发送邮件。在我输入地址并进行身份验证之前一切正常。但是当我输入RCPT TO时,我得到以下错误

RCPT TO: <abc@gmail.com>
RENEGOTIATING
139815845389984:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshakefailure:s3_pkt.c:59
RCPT至:
重新谈判
139815845389984:错误:1409E0E5:SSL例程:SSL3_WRITE_字节:SSL握手文件:s3_pkt.c:59

我可以猜出问题可能是由于缺少安全证书。有人能帮我解决这个问题吗?

我偶然发现了同样的问题,最终找到了答案。引用它,以防人们找不到原始答案:

“重新协商”发生在您使用大写字母“R”键入RCPT TO时。这就是s_客户的行为。您可以尝试输入“rcpt to”而不是“rcpt to”


我试过使用“rcpt to”,效果很好。

当执行
openssl s_client
时,没有
-QUEET
-ign_eof

行首:

  • R→ 重新谈判会议
  • Q→ 退出会话

per:

CONNECTED COMMANDS
    If a connection is established with an SSL server then any data
    received from the server is displayed and any key presses will be sent
    to the server. When used interactively (which means neither -quiet nor
    -ign_eof have been given), the session will be renegotiated if the line
    begins with an R, and if the line begins with a Q or if end of file is
    reached, the connection will be closed down.