Re: [Exim] $thisaddress and pipe commands in filter files?

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Gregory Heinrich
CC: exim-users
Subject: Re: [Exim] $thisaddress and pipe commands in filter files?
On Mon, 14 Oct 2002, Gregory Heinrich wrote:

> Is it just me or is the $thisaddress variable not expanded
> when running a pipe command in a system filter?
> I have a filter that contains a line like:
>
> ***
> if foranyaddress $recipients
> (${lookup{$thisaddress}lsearch{/etc/copy_rules}{$value}{}} is not "")
> then
>                 unseen pipe "/usr/lib/sendmail $thisaddress"
> endif
> ***


Oops! You have discovered an infelicity. The splitting up of the pipe
command and the expansion of its arguments happens at transport time, not
at filter time. I agree that this isn't very clear in the documentation.
The value of $thisaddress has been lost by then.

I have added this to the list of bugs that need fixing. Thank you for
the report.

Philip

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