[英]How to know that smtp server support ssl or not?
如何知道终端上的smtp服务器是否支持ssl?
You can connect to the mail server on the standard port, send a EHLO
command and see if the response includes the STARTTLS
capability. 您可以连接到标准端口上的邮件服务器,发送EHLO
命令并查看响应是否包含STARTTLS
功能。 This tells you that the mail server will let you run an encrypted session over a standard SMTP connection. 这告诉您邮件服务器将允许您通过标准SMTP连接运行加密会话。 For example: 例如:
$ telnet localhost smtp
Trying 127.0.0.1...
Connected to localhost
220 localhost ESMTP
EHLO localhost
250-localhost
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS <--- here it is
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
QUIT
221 2.0.0 Bye
Alternatively, you can try connecting to the default SMTP-over-SSL port of 465/tcp, and assume that the mail server supports SSL if you get a positive response and a successful SSL handshake followed by a SMTP greeting. 或者,您可以尝试连接到默认的SMTP-over-SSL端口465 / tcp,并假设邮件服务器支持SSL,如果您获得肯定响应并成功进行SSL握手,然后是SMTP问候语。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.