This question already has an answer here:

Okay, so I have read a lot around about the issues im having and the solutions people are offering only solve part of the problem.

1) We have a domain

2) The domain points to our VPS with a static IP running FreeBSD

3) The domain has Google Apps configured

4) Our MX Records point to Google

5) If someone sends us an email we get it in our Gmail, fine.

6) Google apps costs 50 dollars per email address, so we want some pop3 accounts just for development of various things

7) Google is forwarding all our mail to our VPS, and our VPS has postfix and accepts mail for the domain.

8) If in PHP on the VPS we send email to our domain and it gets delivered to the local postfix accounts only

What we want is.

A) Postfix on our VPS to "accept" email for our domain and deliver it locally

B) Postfix to deliver email from our box to Google and not the local boxes

So.... the complication is that it must answer to the domain but not deliver mail locally if it originates from itself / e.g. PHP.

Does anyone have any bright ideas? This one has our network admin stumped because its easy to not deliver locally but then we cant accept incoming mail. And its easy to send all email out, but then we cant accept incoming mail.

Cheers,

Madhava Jay