Re: [exim] Filter user variables outside of filters?

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: David S. Madole
Cc: 'exim-users@exim.org'
Asunto: Re: [exim] Filter user variables outside of filters?
On Thu, 31 May 2007, David S. Madole wrote:

> Does anyone know why filter user variables ($n0-$n9) are not allowed
> to be expanded outside of filters to give the last value set to them
> in a filter?


Yes.

If a message has more than one recipient, and each recipient runs a
filter that sets $n0, what value would you like?

OK, I can see that it might make sense for the rest of one recipient's
routing, but there is no mechanism for implementing that.

> I have a system-wide per-user filter run from a router that I would
> like in some way to return a value to the main configuration file. I
> am trying to add headers on a per-user basis based on a filter script.
> If I could set $n7 and then expand that later in a "headers_add" in a
> transport it seems like that would do the trick.


There is also no mechanism for remembering per-user values of variables
from routing so that they can be used in a transport.

> Is there any reasonable way to pass a value back from a filter that
> can be detected in a transport?


I don't know if it's reasonable, but the only way I can think of would
be to redirect to some fake address with a suitable suffix/prefix that
can be detected and removed in a transport.


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