Can exim be configured to send all emails externally?

Posted by Tom Brossman on Ask Ubuntu See other posts from Ask Ubuntu or by Tom Brossman
Published on 2014-06-02T08:04:34Z Indexed on 2014/06/05 9:43 UTC
Read the original article Hit count: 218

Filed under:
|
|

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 [email protected] --> [email protected] works fine, but sending from [email protected] --> [email protected] 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 [email protected] to [email protected] 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?

Very similar questions (but for postfix) here and here.

© Ask Ubuntu or respective owner

Related posts about server

Related posts about email