我有一个(可能不寻常的)情况,使用 Postfix 将邮件中继到另一个 Postfix 邮件服务器,然后需要将电子邮件发送出去。我已经阅读了大量教程,并看到了使用 Postfix 作为电子邮件中继发送到外部提供商(如 Google 等)的说明。但这有所不同,因为我需要发送到另一个 Postfix 服务器并让它充当发件人. 发件人将始终相同(对于两台服务器),但最终收件人可以是任何人。
问题是我缺少一些关键信息:
以下是基本配置参数:
后缀服务器 1:
main.cf:
myhostname = postfix1.com
relayhost = mail.postfix2.com
mydestination = postfix1.com, localhost.postfix1.com, localhost, mail.postfix2.com
inet_interfaces = all
Run Code Online (Sandbox Code Playgroud)
后缀服务器 2:
main.cf:
myhostname = mail.postfix2.com
mydomain = postfix2.com
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
relay_domains = $mydestination
inet_interfaces = all
Run Code Online (Sandbox Code Playgroud)
当我尝试转发到 mail.postfix2.com 时,我得到:
Oct 21 11:04:28 ns3312015 postfix/error[2538]: C016F47E75B5: to=
<user@example.com>, relay=none, delay=25, delays=1.4/24/0/0.1, dsn=4.4.1, …