Re: [Exim] Filter-question

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Patrick von der Hagen
CC: exim-users
Assumpte: Re: [Exim] Filter-question
On Wed, 19 Sep 2001, Patrick von der Hagen wrote:

> Testing Exim filter file .forward
>
> Testprint: Sub=statlog_i10s1
> Pipe message to: /opt/bin/gawk 'BEGIN {x=0} x==1 {print $0} NF==0 {x=1}
> ' >> /var/pp/logs.bak/$h_subject: .`/bin/date +%y-%m`
> Filter processing ended:
> Filtering set up at least one significant delivery or other action.
> No other deliveries will occur.
>
> Any hints why $h_subject isn't expanded?


Because the testing code outputs the "pipe message to" with the literal
string, without expanding it. In a real delivery, expansion happens
later, as Exim sets up the arguments for the pipe command.

Note that, unless you have set use_shell on your pipe transport, that
command isn't going to work.


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.