We receive mail directly from the internet, but not for this particular domain.
This postfix also handles virtual mail for domains that aren't on Google apps, this is the only time it's listed as the MX. The only time it receives mail from outside our networks on this domain is if Google Apps is relaying it to us because it didn't have a match there. As for looping, can we somehow configure it so that while we relay via MX for unknown addresses from internal network, attempts to relay to unknown address from external fails (thus causing Google to see a bounce instead of looping) ? Internal src > Postfix unknown address, relay via MX > Google unknown address, relay to Postfix > Postfix unknown, bounce as unknown ? Of course mail unknown to Google would just startat being relayed to Postfix and either bounce there or it exists in Postfix and is delivered via Postfix... I will check on recipient_delimiter - that will get us down to an acceptable level of maintenance at least, since we don't add/remove accounts that often on Google side, and I won't have to add everyone's various +extensions. On Thu, Mar 26, 2015 at 5:41 AM, Wietse Venema <wie...@porcupine.org> wrote: > Jonathan Vaughn: > > Google Apps handles our mail, and relays any non-existant accounts to our > > Postfix server. This works fine, and we can then use virtual accounts on > > our Postfix server to do whatever we wish. > > > > However, we have a problem with relaying mail from inside our LAN through > > our Postfix server to addresses at our domain - it determines it's the > > local server, tries to check if the user exists (it doesn't, it's only in > > Google Apps), and then bounces the mail. > > Does your machine receive mail directly from the Internet, or does > mail from the Internet go through Google first? Your text below > suggests that it is the latter. > > Whatever the solution, there will at the very least need to be a > table that says what users are delivered locally, and probably a > table that says what users are hosted elsewhere. > > Wietse > > > Currently we are working around this by adding every single GApps account > > to the virtual mailboxes and putting in an override in > > /etc/postfix/transport to force it to send mail to GApps for those > > accounts, which is a pain. Also, email addresses like > > someone+someth...@example.com have to be entered specifically, Postfix > > won't just send all someone+*@example.com to some...@example.com. > > > > It seems like we should be able to say instead "use MX record for entire > > domain" as a default, and then override just the accounts that should be > on > > the Postfix server to be locally delivered. Alternatively, have some way > in > > which if it doesn't exist locally it tries to deliver via MX, making even > > simpler configuration? >