updated: 2019-06-22 Sat 00:00

Exim local mail

To allow Exim to send email within the local network, you need to remove local IP series from ‘ignore_target_hosts‘


/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

Host A running main Exim4 mail server where the users are registered.
Another host B in the same network running an application and generating mails for host A.

Remove 192.168.0.0/16 from host B's Exim4 configuration to allow internal mail to host A.