Send local mails to external server
My domain name (MyDomain.com) registrar sends all MyDomain.com requests to my hosting company(hosting.com). URL's ending in MyDomain.com are sent to my linux server using my IP. Emails from everyone are sent to hosting company mail server mail.hosting.com where I manage my email accounts via control panel. My client mail is set for in and outgoing to mail.hosting.com
At this time I prefer not to use my own mail server to manage my (our) own emails
The problem is that mails sent from my web pages www.MyDomain.com using php forms, mail() or phpmailer, all with sendmail to someone@MyDomain.com are considerated as local, so they are not sent because there are not accounts set here.
I want that emails sent from web pages www.MyDomain.com to someone@MyDomain.com do not stay local but forwarded to mail.hosting.com where I've set my email accounts.
I've been trying a couple of settings creating mailertable, restarting sendmail, but the same in log file: "someone: user unknown".
# File: /etc/mail/mailertable