大网数据广告活动
服务器运维问答

Postfix combinations of TLS/STARTTLS and ports 465/587

· 52CE 我爱测

I'm setting up a barebones Postfix mail server and have this observation: TLS works on port 465 STARTTLS works on port 587 TLS does NOT work on port 587 STARTTLS does NOT work on port 465 Is this normal SMTP behavior or is it spe…

问题原文

原帖链接 · Brian · CC BY-SA 4.0

I'm setting up a barebones Postfix mail server and have this observation:

  • TLS works on port 465
  • STARTTLS works on port 587
  • TLS does NOT work on port 587
  • STARTTLS does NOT work on port 465

Is this normal SMTP behavior or is it specific to Postfix? I was reading that using port 465 was discouraged and not RFC compliant.

https://www.mailgun.com/blog/which-smtp-port-understanding-ports-25-465-587

Is it then not possible to be RFC compliant on port 587, AND use TLS instead of STARTTLS?

已采纳解答

原帖链接 · Steffen Ullrich · CC BY-SA 4.0

Is this normal SMTP behavior or is it specific to Postfix?

This is normal behavior.
Port 25 (smtp) and port 587 (submission) are reserved for SMTP with explicit TLS, i.e. plain connect and upgrade to TLS with the STARTTLS command. Port 465 (smtps) is reserved for SMTP with implicit TLS, i.e. TLS right after the TCP connect without any special SMTP command.

Port 25 is always used for MTA to MTA communication, i.e. for the delivery of a mail from one mail server to the next. This is because the server is found using a DNS MX lookup and there is no support for specifying a port using MX records.

Port 465 and 587 are used by mail clients to submit a mail to the mail server for delivery (in some setups they might also use port 25). These ports usually require also authentication of the client.

I was reading that using port 465 was discouraged and not RFC compliant.

Explicit TLS is defined in RFC 3207. Implicit TLS was defined in RFC 8314 in 2018, which was only after the article you refer to was published.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-06-14)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。