[Exim] Re: $home in filter when check_local_user is not set

Etusivu
Poista viesti
Vastaa
Lähettäjä: Miquel van Smoorenburg
Päiväys:  
Vastaanottaja: exim-users
Aihe: [Exim] Re: $home in filter when check_local_user is not set
In article <3D346095.5090504@???>,
Nico Erfurth <masta@???> wrote:
>Miquel van Smoorenburg wrote:
>> However when I execute a filter, $home is not set, and I
>> would like it to be (for logging, for example).
>>
>The trick is, we read the whole filterfile, and "preprocess", by using
>${sg} we search for    save (RELATIVE-PATH) and replace it with save
>USERHOME/RELATIVE-PATH


What an evil idea! But it works. The level of quoting required
does give me an headache, however:

  data = ${sg \
    {#Exim filter\n${readfile{${extract{home}{$address_data}}/.eximfilter}}} \
    {([^\\\\])\\\$(home|\\\{home\\\})} {\$1${extract{home}{$address_data}}} }


Mike.