简体   繁体   English

CDO无法在端口465和587上连接,但可在25上工作

[英]CDO failed to connect on ports 465 and 587 but works on 25

We have a legacy FoxPro application that uses CDO for NTS to send STMP email through our Exchange server. 我们有一个旧版FoxPro应用程序,它使用CDO for NTS通过我们的Exchange服务器发送STMP电子邮件。 We have 3 locations: Local (app run on same domain as Exchange server), VPN (app run on external network connected to domain via VPN), External (app run on external network and connects via Internet). 我们有3个位置:本地(应用程序与Exchange服务器在同一域上运行),VPN(应用程序在通过VPN连接到域的外部网络上运行),外部(应用程序在外部网络上运行并通过Internet连接)。

Up to now, Local has been configured to use port 25 with SSL. 到目前为止,本地已配置为使用端口25和SSL。 VPN and External have been configured to use port 465 with SSL. VPN和外部已配置为使用端口465和SSL。 (My understanding from our network admin was that Exchange couldn't be configured to do SMTPS on 465 and we had to use STunnel). (根据网络管理员的了解,Exchange无法配置为在465上执行SMTPS,因此我们必须使用STunnel)。

Recently, we made changes to our Exchange server to disable SSL and only allow TLS. 最近,我们对Exchange服务器进行了更改,以禁用SSL并仅允许TLS。 We opened up port 587. So according to my network admin, we now have Port 25 & 587 using the same Exchange Receive Connector and are set to use STARTTLS. 我们打开了端口587。据我的网络管理员说,我们现在使用相同的Exchange接收连接器来设置端口25和587,并设置为使用STARTTLS。 Port 465 has also been configured to use STARTTLS and uses a different Exchange Receive Connector; 端口465也已配置为使用STARTTLS并使用其他Exchange接收连接器; however, the properties are all configured the same as the one used for 25 & 587. 但是,所有属性的配置都与25和587使用的属性相同。

After this change was made, our VPN and External sites were no longer able to send email through the application. 进行此更改后,我们的VPN和外部站点不再能够通过该应用程序发送电子邮件。 The error message they get is: 他们得到的错误信息是:

OLE IDispatch exception code 0 from CDO.Message.1: The transport failed to connect to the server.

So, here is the current state of things: 因此,这是当前的状态:

Local - can send on 25 but not on 465 or 587 VPN - can not send on any of these ports External - can not send on any of these ports 本地-可以在25个VPN上发送,但不能在465或587 VPN上发送-不能在这些端口中的任何一个上发送外部-不能在这些端口中的任何一个上发送

I also tried using the same code and was able to send SMTP from our system through gmail on port 465 and port 25 but not 587. 我也尝试使用相同的代码,并且能够通过465端口和25端口上的gmail通过gmail从我们的系统发送SMTP,但不能发送587。

This is getting way beyond me at this point and I really don't know where to go from here. 在这一点上,这已经超出了我的范围,我真的不知道从这里出发。 Does anyone have any ideas as to what may be going on? 是否有人对可能发生的事情有任何想法?

I used WireShark to try to figure out what was being communicated between my client and the server (this would be for the Local scenario). 我使用WireShark尝试找出客户端和服务器之间正在通信的内容(这适用于Local场景)。 Here are some the results: 结果如下:

Exchange on port 25 (Worked) 在端口25上交换(工作)

Exchange on port 465 (Fail) 在端口465上交换(失败)

Exchange on port 587 (Fail) 在端口587上交换(失败)

Gmail on port 465 (Worked) Gmail在端口465上(有效)

Gmail on port 587 (Fail) Gmail在端口587上(失败)

We finally found a workaround in case anyone is interested. 我们终于找到了解决方法,以防有人感兴趣。 Our Network Admin installed STunnel on our Exchange server and configured it to watch port 465. This got everything working again. 我们的网络管理员在我们的Exchange服务器上安装了STunnel,并将其配置为监视端口465。这使一切再次正常运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM