How to Resolve Errors with Custom MX Records and Sending Email From VPS
If domain.com is hosted on a VPS.net with Cpanel and has custom MX records (for example, using Google Apps), then emails sent by PHP scripts or emails sent by VPS itself to @domain.com will not be delivered. This happens because domain.com exists in /etc/localdomains.
In order to fix the issue and make Exim resolve real MX records, you can dop the following: