Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Filtering and Relaying Inbound Mail to Two Locations for One Domain

51 views
Skip to first unread message

Marisa Rea

unread,
Aug 3, 2022, 12:06:43 PM8/3/22
to
Hello Postfix Community!

I have several email addresses @mydomain.com that are hosted by Google. They were initially set up as the primary G-Suite domain. I now need to route some emails addressed to this domain to another mail service, the proposal being a self-hosted mail server with Postfix that my team administers and maintains.

There will be new users receiving mail at the self-hosted mail server, but I wish to relay mail for the existing set of users back to Google and point the final delivery to the Google MX records. I believe that I can relay these emails through Postfix, but because the DNS MX records for the domain will be pointing at the new Postfix server, I am unsure of how to handle filtering and delivering emails for this set of users back to Gmail without looking up DNS MX records. I would also like to maintain the from address of the original sender.

So, my questions are ultimately:
1. How would I go about filtering inbound mail and then delivering to either the local mailboxes or Google, dependent on the user (or perhaps dependent on whether a local user exists or not)?
2. How do I deliver to Gmail when the DNS MX records for the domain are already pointing to the private mail server?

As a side note, once I understand how to set up this filtering and relaying of inbound emails to Google, I will need to add another relay pointing to Microsoft Online for another set of users.

I apologize if this is already covered in the documentation, I am new to Postfix so I did not recognize what features could be used to accomplish this. Thank you for any guidance.
-Marisa
0 new messages