Sending local mail via relay

1 post / 0 new
#1 Tue, 03/01/2016 - 05:38
gdi2k

Sending local mail via relay

We use virtualmin for email for most of the users in our company, but a few would like to start using Google Apps instead (due to available CRM tools). This configuration is supported by Google Apps - it's called "Split Delivery" and is documented here: https://support.google.com/a/answer/173534?hl=en

Inbound mail destined for a user on our domain that is configured on Google Apps has the mail delivered via Google Apps. If the user is not on Google apps, it gets forwarded to our Virtualmin server for delivery. It works, so far so good.

When sending mail to local users (on the same domain), we need to send ALL mail via Google's relay so they can route to Google Apps users if they exist, and route to Virtualmin if not. This can be done by setting the relay host option in virtualmin's postfix settings, and is described here: https://support.google.com/a/answer/2956491?hl=en

Although this works when users send mail destined for users outside our domain, the problem is that virtualmin seems to ignore the relay host setting if the mail is destined to a local user (within the same domain). This means that the users on Google Apps do not receive mail from other users on the same domain. How can we force ALL mail (including mail destined to local users) to go through Google's relay?