Re: [Exim] Routing to smart host based on _sender_ domain

Góra strony
Delete this message
Reply to this message
Autor: Tamas TEVESZ
Data:  
Dla: Iain Donaldson
CC: Exim-Users (E-mail)
Temat: Re: [Exim] Routing to smart host based on _sender_ domain
On Fri, 30 Nov 2001, Iain Donaldson wrote:

> Is there a way in which I can create a rule to route mail _from_ a
> particular domain to a specific smart host ? I have some domains I need to
> use DNS or domainlist (based on destination) routers, but some that I need
> to send to a specific mail relay based on their origin.



like this:

srcroute:
driver = domainlist
condition = ${if !eq{}{${lookup{$sender_address_domain}lsearch{/etc/exim/srcroutetab}}}{yes}{no}}
transport = remote_smtp
route_list = "* ${lookup{$sender_address_domain}lsearch{/etc/exim/srcroutetab}} byname"

then have an /etc/exim/srcroutetab looking like:

domain1.com:smarthost1
domain2.com:smarthost2

etc.

be warned, i'm using this based on sender_host_address, so
sender_address_domain might not be what you need, check the docs. the
method works fine here, though.


--
[-]