Why does Postfix deliver mails locally instead of relaying them to Google Apps?
Set the fallback_transport variable to relay , that way it'll send it to Google or whatever server it should, if doesn't find the user locally.
If you never want the mail to be sent to a local user change the mydestination variable to localhost , that way it'll only forward locally email addresses ending in .localhost
It would look like that in your main.cf
file:
mydestination = localhost.localdomain, localhost
fallback_transport = relay
Yes you can. Don't use admin
as the recipient. Use something that is "outside" like [email protected]
.
This only works if mydomain.com
is not the domain configured in Postfix. Because Postfix thinks everything is local when you configured it to be local.
You should provide WAY more information than "it doesn't work". What are your configured domains, relay hosts, transport maps, MX records and the like?