Re: [exim] Order of Execution in System Filter

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Matthew Byng-Maddick
Dátum:  
Címzett: Exim Mailing List
Tárgy: Re: [exim] Order of Execution in System Filter
On Sat, Feb 05, 2005 at 01:16:42PM -0500, Eli wrote:
> Marc wrote:
>> I'm trying to run this code in the systm filter where I save
>> the message to a file and then run a program on it to add a header.
>>
>> unseen save /var/spool/spam/$message_id.test 777 headers add "X-Spamprobe:
>> ${run {/etc/exim/scripts/spamprobe-test $message_id}{$value}{}}"
>>
>> But - it seems that the program is running first and the save happens later.
>> Is that what is supposed to happen?
> Yes, and you get a cookie if you can figure out why...
>
> I'll give you the answer :P ${...} is an expansion - it runs first, THEN
> does the "unseen save" part.


*BZZZZZZZZZT*

The reason this doesn't work is that the filter sets up some "deliveries".
Unseen save does not process the save at the point it is read, but sets up
extra things that will be run through the routers and transports. The
transport will be the thing that actually determines how the "save" is done.

${run...} must happen during the execution of the system filter, in order to
enable the lookup to complete.

Hopefully this explains it better.

Cheers

MBM

-- 
Matthew Byng-Maddick          <mbm@???>           http://colondot.net/
                      (Please use this address to reply)