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

Force postfix to send local mail through internet

· 52CE 我爱测

I am testing a setup with gsuite where the desired outcome is that Postfix keeps mailboxes for all accounts (those that use gsuite and some that don't). Postfix should also be able to send out emails. The MX records point to gsui…

问题原文

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

I am testing a setup with gsuite where the desired outcome is that Postfix keeps mailboxes for all accounts (those that use gsuite and some that don't). Postfix should also be able to send out emails.

The MX records point to gsuite and emails are received there. Gsuite is set-up to forward emails to Postfix which works alright for all external emails from other domains. The last remaining issue is that local emails coming from our domain and sent out through the Postfix server get delivered locally which means they will not appear in the Gsuite inbox.

Is there a way to force Postfix to send these mails through the internet as opposed to delivering them to the local mailboxes? I would prefer not having to set Postfix up to relay to Gsuite.

Postfix is set up with virtual mailboxes and I would prefer to keep the se-up as it is as much as possible.

已采纳解答

原帖链接 · Yarik Dot · CC BY-SA 3.0

As far as I know, there is no way to achieve this on single postfix instance. Once postfix receives an email, there is only one possible path for that email to be forwarded/delivered.

You can however workaround this problem.

2 instances of postfix

We use 2 instances of postfix - one listens on port 25 for incoming emails, the second one listens on submission port for relay emails.

Please be aware - once postfix detects it receives an email from itself (the same host) it will reject that - you should have 2 IP addresses for this.

2 servers with postfix instance

Almost the same solution as above, just easier to configure - 2 servers - one for incoming emails, the second one for outgoing.

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

资料来源与适用范围

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

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

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