I've installed Exim4 and have mail routing working based on destination. I also have relay_from_hosts working based on a the contents of a file.
The purpose of the installation is to route email from internal devices to specific relay hosts based on where the email is going to either internal or external. We also want to force email sent from photocopiers to our internal Exchange server. I'd like to be able to do this based on sender IP address. I can't do this based on sender email address as this can be changed at the copier.
Can anyone tell me how I can route traffic based on sender IP address while not messing up my current configuration, I can't find any reference to exim processing and holding the IP address in a variable.
Please feel free to make the instructions as idiot proof as possible.
Current configuration changes are:
hostlist relay_from_hosts = /etc/exim4/conf.d/tmc-config/relay_from_host
smarthost_servertask:
debug_print = "R: smarthost routing for server scheduled tasks"
driver = manualroute
domains = ! +local_domains
transport = remote_smtp_smarthost
route_list = \
DestinationDomain EmailServer1 ; \
DestinationDomain2 EmailServer2 ; \
host_find_failed = ignore
same_domain_copy_routing = yes
no_more
Thanks.
Peter L
******** The Moray Council: Internet E-mail Notice ********
Moray Council Web address:
http://www.moray.gov.uk
Main switchboard: 01343 543451
The contents of this e-mail and any attachments ('this e-mail') are confidential and intended solely for the addressee.
If this e-mail has been sent to you by mistake, please notify postmaster@??? as soon as possible; you should then delete this e-mail from your computer.