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

What is difference between using smtp vs relay transport type in postfix?

· 52CE 我爱测

I am trying to setup MTA which should submit different intranet mail gateways based on the recipient's domain. For that I thinks transport_maps in postfix should be setup for selective domains; if recipient domain is not matched …

问题原文

原帖链接 · SUNITA GUPTA · CC BY-SA 4.0

I am trying to setup MTA which should submit different intranet mail gateways based on the recipient's domain. For that I thinks transport_maps in postfix should be setup for selective domains; if recipient domain is not matched with any line in transport_maps than it will do default delivery which is smtp. What I am confused is whether to use relay or use smtp as transport types and what difference will it make.

Based on received answers one difference is MX priortization, but I turn off mx discovery by enclosing ip/domain in big brackets, will both of them be same or is there any other difference which I am missing.

已采纳解答

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

relay tells postfix to deliver emails via a specific mailserver. You can see it as a simplified and faster delivery protocols, which does not obey to things as MX priority specifications.

smtp transport is the full SMTP implementation, which strictly follows the relative RFCs.

To sent emails for a domain via a specific server I would use relay. This is consistent with transport man page:

relay_transport (default: relay:)

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

资料来源与适用范围

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

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

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