This is more of a general setup question, and I'm looking for information on where to get started.
Basically, I am using google apps to host my domains personal email, BUT I also need to send email from a hosted machine that appears to be from the same domain. The hosted machine never needs to read/get mail, only send it (from various php scripts). So basically, I have
- several users that use gmails [email protected] interface
- several php scripts that are attempting to send email from [email protected]. Note: Sending emails from the PHP scripts to another domain works fine.
Here is where I don't know what to do:
Sending emails from the PHP server to my google app users, who have addresses like [email protected] always FAILS with an error. Postfix detects that I am 'sending an email to myself', and aborts. What I would like it to do is to treat foo.com like any other domain, and look up its MX record and send the email as normal.
Also, i've noticed that it defaults to setting the from address to [email protected]. Is there anyway to change this?
Here is my main.cf file if this helps: myhostname = foo.com mydomain = foo.com
myorigin = $mydomain
relayhost =
inet_interfaces = loopback-only
local_transport = error:local delivery is disabled
Thanks