I was trying to configure Exim in a local KVM host to test mail functionality for the other KVM hosts within the local network. After spending some time I found that there is ‘ignore_target_hosts’ with local addresses by default.
/etc/exim4/exim4.conf.template dnslookup: debug_print = "R: dnslookup for $local_part@$domain" driver = dnslookup domains = ! +local_domains transport = remote_smtp same_domain_copy_routing = yes # ignore private rfc1918 and APIPA addresses ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\ 172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16 :\ 255.255.255.255 no_more .endif
KVM host ‘A’ running main Exim4 mail server where the users are registered. Another local host ‘B’ running an application and generating mails for host ‘A’.
I removed 192.168.0.0/16 from host ‘B’s Exim4 configuration to allow internal mail to host ‘A’.