ETIMEDOUT
communication
network_error
ai_generated
true
SMTPConnectionTimeout: timed out connecting to smtp.example.com on port 587
ID: communication/smtp-connection-timeout-port-587
80%Fix Rate
88%Confidence
1Evidence
2024-01-10First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| Postfix 3.7.0 | active | — | — | — |
| Exim 4.96 | active | — | — | — |
| sendmail 8.17.1 | active | — | — | — |
Root Cause
Firewall or network policy blocks outbound connections to port 587 (STARTTLS) while port 25 or 465 may be open, or the SMTP server is unreachable due to DNS or routing issues.
generic中文
防火墙或网络策略阻止了到端口 587(STARTTLS)的出站连接,而端口 25 或 465 可能开放,或者 SMTP 服务器因 DNS 或路由问题无法访问。
Official Documentation
https://www.rfc-editor.org/rfc/rfc3207Workarounds
-
90% success Switch to port 465 with implicit SSL/TLS: import smtplib; server = smtplib.SMTP_SSL('smtp.example.com', 465); server.login(user, password); server.sendmail(from_addr, to_addrs, msg)
Switch to port 465 with implicit SSL/TLS: import smtplib; server = smtplib.SMTP_SSL('smtp.example.com', 465); server.login(user, password); server.sendmail(from_addr, to_addrs, msg) -
80% success Contact network administrator to open outbound port 587 in firewall rules
Contact network administrator to open outbound port 587 in firewall rules
-
75% success Use a relay server on a different port (e.g., 2525) if provider supports it
Use a relay server on a different port (e.g., 2525) if provider supports it
中文步骤
Switch to port 465 with implicit SSL/TLS: import smtplib; server = smtplib.SMTP_SSL('smtp.example.com', 465); server.login(user, password); server.sendmail(from_addr, to_addrs, msg)Contact network administrator to open outbound port 587 in firewall rules
Use a relay server on a different port (e.g., 2525) if provider supports it
Dead Ends
Common approaches that don't work:
-
90% fail
Port 587 is blocked by firewall; longer timeout doesn't bypass firewall
-
95% fail
Telnet also fails if port is blocked; doesn't solve the underlying issue
-
70% fail
Port 25 may be blocked by ISPs or flagged as spam; also insecure