I have set up an ubuntu webserver, and need to be able to send email from forms via php. The server hosts multiple websites, and this issue persists for all of them.
When I have a form send to a domain name not hosted on the server (ie gmail, yahoo, etc) the email sends from the form without a problem.
When I have the form send to a email@example.com that is hosted on the local server I receive a "user unknown" error. This is because I have not created the accounts on the server, but I do not plan to... the email is hosted elsewhere [gmail].
This is an example of what I am seeing in /var/mail/www-root...
The original message was received at Sun, 17 Oct 2010 18:39:41 -0700 from www-data@localhost ----- The following addresses had permanent fatal errors ----- firstname.lastname@example.org (reason: 550 5.1.1 <email@example.com>... User unknown) (expanded from: firstname.lastname@example.org)
What is the proper way to set this up?