Postfix 将邮件重定向到中继主机进行传输

Postfix 将邮件重定向到中继主机进行传输

我已经用这个设置正确地运行了后缀:

主配置文件

smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_map
transport_maps = hash:/etc/postfix/transport
relayhost = [not.exist.dom]:555

中继主机映射

# postmap hash:/etc/postfix/relayhost_map
@my.sender.exemple1.com [my.reley.hos1]:7454
@my.sender.exemple2.com [my.reley.hos2]:7454
@my.sender.exemple3.com [my.reley.hos3]:7454
@my.sender.exemple4.com [my.reley.hos4]:7454

运输

#   postmap /etc/postfix/transport
[email protected]   emailport4:
[email protected]   emailsport2:
[email protected]   emailtransport1:
# with this sender_dependent_relayhost_maps not work
# *   newtransport:

问题:如何更换目的地中继主机 = [不存在.dom]:555前往新目的地新运输

答案1

1)将 Postfix 从 2.66 更新至 3.1

2)添加到main.cf

sender_dependent_default_transport_maps = hash:/etc/postfix/relaytransport_map
default_transport = newtransport:

3)/etc/postfix/relaytransport_map

# postmap /etc/postfix/relaytransport_map
@exemple133.com smtp:
@exemple12.ua   smtp:
@exemple1.com   smtp:
*   newtransport:

相关内容