configurationpostfix以使用smarthost

我有一个应用程序在centOS 7上运行,需要configuration为将邮件(后缀)发送到第三方SMTP服务器。 我发现实现这一点的方法是使用relayhost参数configuration智能主机。 但是,如何设置从这个服务器发送的邮件的特定地址?

您可以使用sender_canonical_maps重写发件人地址。

例如:

 sender_canonical_maps = hash:/etc/postfix/canonical 

哪个文件将包含所需的规范映射,例如:

 root [email protected] @example.net [email protected] 

然后按照通常的方式生成哈希值:

 postmap /etc/postfix/canonical 

请参阅文档了解更多。