Courier / Postfix - tweaking settings to send mail outside the server all the time
This should be an easy one i hope. I have a dedicated web server running Fedora Core 3 - it hosts multiple websites.
There is an issue with the Courier / Postfix configuration where email is routed internally before any attempt is made to send it externally. One of the sites I host has an MX record on the domain to send mail straight to the companies server - hence no email accounts are setup for it. Therefore when I send email from PHP scripts and the like, Postfix tries to route the mail internally (as the website domain is hosted on the same server, so it thinks its internal), finds no email addresses to send it to, and returns a "Mail cannot be delivered" error.
In the postfix config in /etc/postfix/main.cf, I have found the following:
Should this be changed to:
mydestination= $myhostname, localhost.$mydomain
mydestination= $myhostname, mail.$mydomain