Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I wonder if you can help me out... at the moment were using exim to relay our emails to an smtp_relay.

The only problem is if the user exists and has an email address it won't exit the server and send them mail using our relay.

I need it to go to the relay even if it's an internal email address.

Hope that make sense, this is how we have got our relay setup at the moment

smart_route:
driver = manualroute
domains = !+local_domains
transport = remote_smtp_smtpauth
route_list = * smtp.sendgrid.net:587

Thanks

share|improve this question
    
Hey guys, I thought I had managed this but unfortunately this didn't work... I tried removing the domains line... :-( –  user219951 May 20 at 11:31

1 Answer 1

When exim sends mail, it uses /etc/localdomains file to determine the route - either outbound (if the target domain is not in localdomains) or local delivery (if it is). So, the solution would be to remove the target domains from the /etc/localdomains file.

However, don't edit that file by hand - every edit to locally hosted DNS zone (in WHM or cPanel) will overwrite the localdomains with new values.

Instead edit the DNS zone yourself, write down the correct MX records (even if your server doesn't host zone) and pick "Remote Mail Exchanger" option in the "Email Routing" section (at the page bottom) - this way you will force WHM to remove the domain from localdomains and exim will always try to send mail to your relay.

HTH

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.