有没有办法可以判断 SMTP 服务器是否期望客户端使用“隐式"连接?SSL 与“显式"SSL? [英] Is there a way I can tell whether an SMTP server is expecting a client to connect using "implicit" SSL versus "explicit" SSL?

查看:30
本文介绍了有没有办法可以判断 SMTP 服务器是否期望客户端使用“隐式"连接?SSL 与“显式"SSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SSL 可以是显式"或隐式",如此链接所述:

SSL can either be "explicit" or "implicit" as explained by this link:

http://help.globalscape.com/help/secureserver2/Explicit_versus_implicit_SS.htm

System.Net.Mail 仅支持显式"SSL,如下所述:

System.Net.Mail only support "explicit" SSL, as explained here:

http://blogs.msdn.com/webdav_101/archive/2008/06/02/system-net-mail-with-ssl-to-authenticate-against-port-465.aspx

所以,我正在尝试使用 System.Net.Mail 连接到我无法控制的 SMTP 服务器,但它失败了.我怎么能确定它失败了,因为服务器想要一个隐式"SSL 连接?我可以从客户端进行哪些测试?

So, I'm trying to use System.Net.Mail to connect to an SMTP server that I don't have any control over, and it's failing. How can I know for sure that it's failing because the server wants an "implicit" SSL connection? What test can I do from the client side?

推荐答案

通常这是由约定管理的.在端口 25(正常情况)上运行的 SMTP 使用显式 SSL.在端口 465 上运行的 SMTPS 使用隐式 SSL.在端口 587 上运行的邮件提交使用显式 SSL.

Ordinarily this is governed by convention. SMTP running on port 25 (the normal case) uses explicit SSL. SMTPS running on port 465 uses implicit SSL. Mail submission running on port 587 uses explicit SSL.

为了确定,telnet 到端口,如telnet mail.example.com 25".如果您看到服务器标识自己的纯文本横幅,那么您正在处理显式 SSL.如果您连接成功但什么也看不到,那么您正在处理隐式 SSL.

To tell for sure, telnet to the port, as in "telnet mail.example.com 25". If you see a plain text banner where the server identifies itself, then you are dealing with explicit SSL. If you connect successfully and see nothing, then you are dealing with implicit SSL.

这篇关于有没有办法可以判断 SMTP 服务器是否期望客户端使用“隐式"连接?SSL 与“显式"SSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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