Re: [exim] Smarthost condition by h_From header variable

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Jeremy Harris
Fecha:  
A: exim-users
Asunto: Re: [exim] Smarthost condition by h_From header variable
On 06/21/2018 07:34 AM, Gallai János via Exim-users wrote:
> I am trying to create a smarthost manualroute route depending on From:
> header. Here is my router:


1) It's relatively unlikely you really do want to use the
From: header. More likely would be the _envelope_ sender
address. If you don't understand the distinction, please read
up on general email concepts.

>
> smarthost:
>   driver = manualroute
>   domains = ! +local_domains
>   condition = ${if eq{${domain:$h_From:}}{domain.com}}
>   transport = remote_smtp
>   route_data = XXX.XXX.XXX.XXX
>   no_more
>
> What have I done wrong? Why is $h_From: variable empty in manualroute
> driver?


2) If you really do want to deal with a header, you need to
be aware that it contains more than a local-part and a
domain. See the "address" expansion operator.
However, I am not convinced that you do.

3) You've not demonstrated that $h_From: was empty.
--
Cheers,
Jeremy