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

How to override an MX value for a particular domain using a transport_maps but have some form of redundancy

· 52CE 我爱测

I have a postfix mail server and I want to override an MX value for a particular domain. From my understanding this is can be done by the use of transport_maps http://www.postfix.org/postconf.5.html#transport_maps You add a line …

问题原文

原帖链接 · John · CC BY-SA 3.0

I have a postfix mail server and I want to override an MX value for a particular domain.

From my understanding this is can be done by the use of transport_maps

http://www.postfix.org/postconf.5.html#transport_maps

You add a line to /etc/postfix/transport:

example.com smtp:[9.9.9.9]

Generate a postmap file using:

postmap hash:/etc/postfix/transport

add or edit a line in /etc/postfix/main.cf:

transport_maps = hash:/etc/postfix/transport

Restart Postfix

The question I have is when normally using MX address you normally have multiple mail servers for redundancy (in case one go's off line) How can I achieve the same thing with a transport map as it seems to point to a single ip address. Is there any way to set so that it would try multiple ip addresses in the case the first one failed.

社区高分解答

原帖链接 · alxgomz · CC BY-SA 3.0

as far as I can tell the SMTP transport doesn't do that. however you can set a dummy dns domain with MX records pointing to the hosts you want to relay mails to and use it in your transport map without squared brackets:

dest.example.com smtp:dummy.example.net

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

资料来源与适用范围

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

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

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