简体   繁体   English

如何知道smtp服务器是否支持ssl?

[英]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.

相关问题 我怎么知道它是Windows服务器还是unix? - how do I know if it is Windows server or unix? 如何知道服务器中正在运行的所有节点进程 - How to know all nodes process running in the server UNIX:使用SMTP服务器发送邮件 - UNIX: Send Mail using SMTP Server 如何通过 pmcmd 命令从 dev 或 uat 或 Prod Unix 服务器触发工作流 如何提供服务器路径以及如何知道服务器路径 - How to trigger a workflow from dev or uat or Prod Unix server by pmcmd command how to give server path and how to know server path 如何使用shell脚本知道运行代码的当前服务器名称? - How to know current server name where the code is running using shell script? 在TCP / IP套接字中,服务器如何知道客户端正在忙并且没有接收数据? - In TCP/IP sockets, how would the server know that a client is busy and not receiving data ? 使用php从Unix weberver网站使用GMail SMTP服务器发送电子邮件 - Send email using the GMail SMTP server from a Unix weberver website using php 如何知道该进程是否设置为NOHUP? - How to know if the process is set NOHUP? 如何知道是否打开了文件描述符? - How to know if a file descriptor is opened? 如何知道某个进程是父进程还是子进程 - How to know if a process is a parent or a child
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM