2

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.

joidegn
  • 123
  • 5

1 Answers1

1

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.

Yarik Dot
  • 1,583
  • 12
  • 26
  • It looks like this is the solution. How can I easiest have the second postfix instance use the same authentication mechanism that the first one uses? – joidegn Jul 31 '17 at 12:08