Recently I updated the MX records on a domain1.com to point to domain2.com. Domain two is currently running exim4 and I would like it to relay mail for domain1. The problem is every time I send an email from say user@gmail.com to user@domain1.com I receive the following message:

Note: I am not using split config files

2015-01-12 14:49:42 H=mail-ig0-f178.google.com [] F=<user@gmail.com> rejected RCPT <user@domain1.com>: Unrouteable address

I've tried following several online guides from people who had the same issue to no avail. Could someone point me in the right direction? I've been working on this for a while now and have made no progress.

Edit: I'm still fairly new to exim4 so I'm not quite sure what you mean by adding an IP address router on Domain2 to connect to Domain1. However I did manage to add domain1 to dc_relay_domains as wells in dc_relay_nets. My current /etc/exim4/update-exim4.conf.conf is as follows:

dc_local_interfaces='IP of eth0;IP of eth1'
dc_relay_nets='IP of domain1/24'

1 Answer 1


Check your logs on Domain2. Also check Domain1 logs to see if they are rejecting messages. They should tell you why traffic is being rejected. Here are a few steps to get things working.

  • Add an IP address router on Domain2 to connect to Domain1. Test and verify.
  • Add Domain1 to the dc_relay_domains in /etc/exim4/update-exim4.conf.conf on Domain2. Test and verify from a remote server. (Domain1 may work.)
  • This is the point at which it makes sense to move the MX records.
  • Possibly configure domain1 to use domain2 as its smart host.
  • Add domain1 to dc_relay_nets in /etc/exim4/update-exim4.conf.conf on Domain2. Test from Domain1.

After changing values in update-exim4.conf.conf1 you will need to reload the Exim4 configuration.

IP Routing or even name based routing can be done with the file /etc/exim4/hubbed_hosts. Add line of the format Domain1: mailserver.domain1 to this file. For details see the output of man exim4-config_files.

You may need to modify how recipients are verified for domain1. Normally, you want this to be a callout.

  • Could you elaborate on "Add an IP address router on Domain2 to connect to Domain1?
    – Jukodan
    Jan 13, 2015 at 4:52
  • @Jukodan I've added details to my response. The hubbed_hosts file should be able do the routing for you.
    – BillThor
    Jan 13, 2015 at 5:06
  • I'm not using split config files so I assume these changes are made to /etc/exim4/exim.conf.template? hubbed_hosts: debug_print = "R: hubbed_hosts for $domain" driver = manualroute domains = "${if exists{CONFDIR/hubbed_hosts}\ {partial-lsearch;CONFDIR/hubbed_hosts}\ fail}" same_domain_copy_routing = yes route_data = ${lookup{$domain}partial-lsearch{CONFDIR/hubbed_hosts}} transport = remote_smtp
    – Jukodan
    Jan 13, 2015 at 5:44
  • @Jukodan You should need no changes to the template. Just add an entry to /etc/exim4/hubbed_hosts. This file may not exist yet, so you would need to created it.
    – BillThor
    Jan 14, 2015 at 0:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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