How do I configure exim4 to route all emails via a third-party SMTP server when the sender's domain, recipient's domain, and server hostname all match?
I followed this great answer and have
exim4 sending emails to addresses at other domains tested and working from an Ubuntu server. My only issue is that emails where both the sender and recipient share the same domain as the server hostname, they never leave the server (and this is the expected behavior).
For example, sending from firstname.lastname@example.org --> email@example.com works fine, but sending from firstname.lastname@example.org --> email@example.com just routes the mail locally to
/var/mail/account2, without passing through the third-party SMTP server.
I'm using Google Apps at my own domain and want to send emails from firstname.lastname@example.org to email@example.com from a machine with the hostname example.com.
I want to route them through Google's SMTP server so I see them in my other email clients. Is this possible?