Re: [exim] Send by smarthost then failover direct (Jeremy Ha…

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: AC
Fecha:  
A: exim-users
Asunto: Re: [exim] Send by smarthost then failover direct (Jeremy Harris)
Jeremy Harris wrote:
> Option 1:
>
> Typically a smarthost setup uses a manualroute router.
> These take a list of hosts, which unless you specify randomness
> are tried in order.
>
> The list is expanded before use, so you could build
> it using the domain of the mail recipient. You will
> have to do the MX lookups...
>
> http://exim.org/exim-html-current/doc/html/spec_html/ch-the_manualroute_router.html
>
>
> Option 2:
>
> Fiddle with "condition = ${if first_delivery}" on
> the smarthost router and the inverse on the
> backup. Have a shortish initial retry time
> (see both Retry Rules *and* the queue-runner
> repeat time).


I currently have in one of the machines using a smarthost:

smarthost:
debug_print = "R: smarthost for $local_part@$domain"
driver = manualroute
domains = ! +local_domains
transport = remote_smtp_smarthost
route_list = * DCsmarthost byname
host_find_failed = defer
same_domain_copy_routing = yes
no_more

So in the case of Option 1 I should in theory be able to alter the
route_list but I have to perform an MX lookup on the outgoing mail
domain to populate this at each execution.

For option 2, the idea there is to use first_delivery to flag the
message and continue processing via the smarthost but if it's a retry
then fail out of the smarthost and move the message over to the direct
router?