Re: [exim] using environment ${env {}} for helo_data

Top Page
Delete this message
Reply to this message
Author: Andrew C Aitchison
Date:  
To: Frank Heydlauf
CC: exim-users
Subject: Re: [exim] using environment ${env {}} for helo_data
On Thu, 30 Jul 2020, Frank Heydlauf via Exim-users wrote:

> Hi folx,
>
> solved!
>
> On Thu, Jul 30, 2020 at 04:01:42PM +0200, Frank Heydlauf via Exim-users wrote:
> ...
>>> Can you post the smallest working config that you use to reproduce the
>>> behaviour?
>>
>> uh. Made a minimal config, about 60 lines (instead of nearly 500).
>> And - what could I say - ${env{}} works :-O
>> I'll try to find the section which causes the trouble...
>
>    begin transports
>    ...
>    spamcheck:
>        driver = pipe
>        command = /usr/sbin/exim -oMr spam-scanned -bS -oMa 127.0.0.1
>        ...

>
> is the trouble maker.
>
> The exim is started with plain environment;
> add_environment is not supported with pipe transport.


29.4 Environment variables
--------------------------

    The environment variables listed below are set up when the command is
     invoked.  This list is a compromise for maximum compatibility with
     other MTAs.
*** Note that the environment option can be used to add 
*** additional variables to this environment.
     The environment for the pipe transport is not subject to the
     add_environment and keep_environment main config options.


Stars added by me (ACA).

> A wrapper would work (tested) - but I'd lose the benefits I had
> hoped for, using ${env {}} variables.


Does something like
      environment = EH=${env{EH}}
in the pipe transport (untested) help ?

>From the code it appears to be a list.


-- 
Andrew C. Aitchison                    Kendal, UK
             andrew@???