My mail server (VPS) was setup using VestaCP and has multiple domains -- it's only a mail server, not used for web. The server is running bind9 but all domains namservers are set to CloudFlare.
Some domains are used to send outgoing email only -- these domains MX records in CloudFlare are set to a third party provider like Google Apps/G Suites.
Some domains are used to send and receive email (as a real mailbox) -- these domains MX records in CloudFlare are set to the VPS.
- [url removed, login to view] is using CloudFlare nameservers. It's MX records set to Google Apps/G Suite.
- In G Suite we have 2 email accounts: james@[url removed, login to view] and email@example.com.
- On the VPS, we have an email account firstname.lastname@example.org.
- When email is sent from notifications@[url removed, login to view] to james@[url removed, login to view] using the VPS SMTP, exim will try to deliver email to the local mailbox email@example.com.
All I want Exim to do is check/honour the MX records for domains its sending email to and deliver using the MX records set by DNS.
The ability to send and receive email should not be impaired. The servers security should not be put at risk (i.e. open relay).
Server access will not be provided. I will provide Exim's configuration files for you to edit and send back. Please only offer if you know what you are doing and not if you rely on Google (I could just do that myself).