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 [209.85.213.178] 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_eximconfig_configtype='internet'
dc_other_hostnames='domain1.com;localhost'
dc_local_interfaces='IP of eth0;IP of eth1'
dc_readhost='domain1.com'
dc_relay_domains='domain1.com;'
dc_minimaldns='false'
dc_relay_nets='IP of domain1/24'
dc_smarthost='domain1.com:25'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
dc_localdelivery='maildir_home''
Best Answer
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.
dc_relay_domains
in/etc/exim4/update-exim4.conf.conf
on Domain2. Test and verify from a remote server. (Domain1 may work.)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 formatDomain1: mailserver.domain1
to this file. For details see the output ofman exim4-config_files
.You may need to modify how recipients are verified for domain1. Normally, you want this to be a callout.