[Exim] condition to check for MX in local class C block

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Andy Rabagliati
Data:  
Para: exim-users
CC: edward van kuik
Asunto: [Exim] condition to check for MX in local class C block
Folks,

We have a wired building with >60 companies used the same infrastructure.

We have several connections to rest-of-world, and a big proxy server
that we ask everyone to use as a mail relay.

From there we smart_host it to UUnet, our main connectivity provider.

However, we would like it if mail for building tenants (who have
mailservers in our DMZ) is sent directly, not smarthosted.

The relevant section of the exim4 config is as follows :-

-----------------------------------------------------
smart_route:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
route_list = "* smtp.uunet.co.za"
host_find_failed = defer
same_domain_copy_routing = yes
no_more

dnslookup_relay_to_domains:
driver = dnslookup
domains = ! +local_domains : +relay_to_domains
transport = remote_smtp
same_domain_copy_routing = yes
no_more

dnslookup:
  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
  no_more
-----------------------------------------------------



I would like to add this condition to smart_route :-

"If the MX record resolves to an address 196.7.14.* , do not smart_route".

How would I do this ?

There are /lots/ of mail domains here, so I would rather not list all
the relevant domains - people come and go, etc.

Cheers,    Andy!