服务器有时会发现发送不了邮件,除了可能是如sendmail没安装配置好的情况,还可能是端口被禁,为了防止服务器用户发送垃圾邮件,大多数服务器商会把邮件端口禁用。这样的结果是导致我们使用服务器的时候无法发送邮件,自然给我们带来一定的烦恼。如何测试邮件端口是否被禁?默认情况下,人们发邮件的端口是25端口,以下通过命令来测试:
telnet smtp.163.com 25
1、如果连接成功,会有如以下结果:
Trying 123.125.50.133…
Connected to smtp.163.com.
Escape character is ‘^]’.
220 163.com Anti-spam GT for Coremail System (163com[20141201])
这种情况如果发不出邮件,就有可能是服务器没有配置好了。
2、连接不成功的话,就会如以下结果:
Trying 123.125.50.134…
telnet: connect to address 123.125.50.134: Connection timed out
Trying 123.125.50.135…
telnet: connect to address 123.125.50.135: Connection timed out
Trying 123.125.50.138…
telnet: connect to address 123.125.50.138: Connection timed out
Trying 123.125.50.132…
telnet: connect to address 123.125.50.132: Connection timed out
Trying 123.125.50.133…
telnet: connect to address 123.125.50.133: Connection timed out
说明25端口被禁,赶快联系服务商解除25端口的限制吧!