使用 openssl s_client 命令连接 google 邮件
Connection with google mail using openssl s_client command
objective 使用以下命令发送电子邮件:
openssl s_client \
-connect smtp.gmail.com:587 \
-starttls smtp
为此,连接后我提交必要的命令,使用 base64 中的用户名和密码:
EHLO smtp.gmail.com
AUTH LOGIN
MAIL FROM: <noreply@example.com>
RCPT TO: <*****@gmail.com>
DATA
Subject: Sending an email using telnet
Hello,
This is an email sent by using the telnet command.
Your friend,
Me!
.
QUIT
我正在尝试了解并搜索以下问题的解决方案:
RENEGOTIATING
4707790444:error:1400444C:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert no renegotiation:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/ssl/ssl_pkt.c:1200:SSL alert number 100
4707790444:error:140040E5:SSL routines:CONNECT_CR_SRVR_HELLO:ssl handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/ssl/ssl_pkt.c:585:
openssl s_client
是一个用于测试 SSL/TLS 连接的工具。因此,它为您提供了各种 "commands",这些 "commands" 对任何已建立的 SSL/TLS 连接都有特殊影响。您键入的大多数文本只会发送给对等方。但如果它看到一个命令,它就会执行它。命令从一行的开头开始,一个这样的命令是单个字母 "R"。这会导致 s_client 请求与服务器重新协商。您以 "RCPT TO" 开头的行导致执行此命令。服务器配置为不接受重新协商请求 - 因此出现您所看到的错误。
尝试将“-ign_eof”标志用于 s_client。这具有禁用这些命令的效果。
objective 使用以下命令发送电子邮件:
openssl s_client \
-connect smtp.gmail.com:587 \
-starttls smtp
为此,连接后我提交必要的命令,使用 base64 中的用户名和密码:
EHLO smtp.gmail.com
AUTH LOGIN
MAIL FROM: <noreply@example.com>
RCPT TO: <*****@gmail.com>
DATA
Subject: Sending an email using telnet
Hello,
This is an email sent by using the telnet command.
Your friend,
Me!
.
QUIT
我正在尝试了解并搜索以下问题的解决方案:
RENEGOTIATING
4707790444:error:1400444C:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert no renegotiation:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/ssl/ssl_pkt.c:1200:SSL alert number 100
4707790444:error:140040E5:SSL routines:CONNECT_CR_SRVR_HELLO:ssl handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/ssl/ssl_pkt.c:585:
openssl s_client
是一个用于测试 SSL/TLS 连接的工具。因此,它为您提供了各种 "commands",这些 "commands" 对任何已建立的 SSL/TLS 连接都有特殊影响。您键入的大多数文本只会发送给对等方。但如果它看到一个命令,它就会执行它。命令从一行的开头开始,一个这样的命令是单个字母 "R"。这会导致 s_client 请求与服务器重新协商。您以 "RCPT TO" 开头的行导致执行此命令。服务器配置为不接受重新协商请求 - 因此出现您所看到的错误。
尝试将“-ign_eof”标志用于 s_client。这具有禁用这些命令的效果。