Re: [exim] pipe command in user filter - pleas help!

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: Swantje & Michael Ludwig
Cc: exim-users
Asunto: Re: [exim] pipe command in user filter - pleas help!
On Fri, 10 Sep 2004, Swantje & Michael Ludwig wrote:

> I have a problem running a pipe command within a user filter.


You can't. A user filter can *set up* a pipe delivery, but it does not
run till later, along with all the other deliveries.

> As described in the filter spec in 3.13,


Exim 4 was released in February 2002. Exim 3 is dead. Most Exim experts
can no longer remember much about it (I certainly can't).

> I thought I could use $message_id as a variable which is expanded
> whilst the pipe is being executed.


You should be able to do that.

> Here is what I have in my user .forward file:


[snip]>

> pipe "/admin/work/myscript.sh $message_id"


[snip]

> This is what exim filter testing gives me:


[snip]

> Pipe message to: /admin/work/myscript.sh $message_id


[snip]

So what is the problem? That is what will happen.

> So why does the pipe command don't use the "message_id" - or
> doesn't it show up correctly displayed while testing a filter?


The filter shows the unexpanded pipe command. Expansion doesn't happen
till the pipe delivery happens, and that never happens while testing.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book