Re: [exim] retry time and fallback host

Góra strony
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Dla: Mike Cardwell
CC: Exim Users List
Temat: Re: [exim] retry time and fallback host
On Tue, 21 Aug 2007, Mike Cardwell wrote:

> You need two separate routers, only one transport can be referenced in a
> router, and you can only use "condition" once per router. Order is
> important:
>
> dnslookup:
>    driver              = dnslookup
>    domains             = ! +local_domains
>    condition           = ${if <{$message_age}{86400}}
>    transport           = remote_smtp
>    ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
>    no_more

>
> smarthost:
>    driver              = manualroute
>    domains             = ! +local_domains
>    transport           = remote_smtp
>    route_list          = * "192.168.0.1"
>    no_verify

>
> This assumes that the smarthost is at 192.168.0.1. Change the IP
> accordingly.


That is undoubtedly the clearest way of writing it, but for the record,
it is not quite true about one transport per router. Here's another way,
which uses one router, but you need two transports:

dnslookup:
   driver              = dnslookup
   domains             = ! +local_domains
   transport           = ${if <{$message_age}{86400}{remote_smtp}{smarthost}}
   ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
   no_more


In the smarthost transport you would have to have

hosts = 192.168.0.1
hosts_override

There's always more than one way to do it!

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book