Re: [exim] Router condition to send to different mail server…

Góra strony
Delete this message
Reply to this message
Autor: Brian Candler
Data:  
Dla: Customer Support
CC: exim-users
Temat: Re: [exim] Router condition to send to different mail servers
On Thu, Apr 14, 2005 at 11:48:14AM +0100, Customer Support wrote:
> > exchange_route:
> > driver = manualroute
> > local_parts = /etc/exim/exchange.list
> > route_data = 172.16.110.81
> > transport = remote_smtp
> >
>
> I like that setup, can anyone explain how that could be developed further so
> that we could take say
>
> domain.com to 1.2.3.4 port 25
> another.com to 5.6.7.8 port 2525
> ....... etc
>
> I'm guessing the route_data would be a set of searches?


Here's one from my laptop:

mailertable:
driver = manualroute
route_data = ${lookup {$domain} lsearch {/usr/local/etc/exim/mailertable} }
transport = remote_smtp

(but note that this routes based on the domain of the recipient as your
table wants, not the local-part as the original poster wanted)

To deliver to different ports, as long as there's a fixed set, then define
extra transports:

port_2525:
driver = smtp
port = 2525

port_1234:
driver = smtp
port = 1234

Since the route_data can include a transport name at the end, you can say

domain.com 1.2.3.4
another.com 5.6.7.8 port_2525

Regards,

Brian.