Is there a way I can tell whether an SMTP server is expecting a client to connect using “implicit” SSL versus “explicit” SSL?

泄露秘密 提交于 2019-12-03 08:51:59

问题


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 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

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?


回答1:


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.

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.



来源:https://stackoverflow.com/questions/172811/is-there-a-way-i-can-tell-whether-an-smtp-server-is-expecting-a-client-to-connec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!