[exim] Escaping colon in colon-separated lists (environment)

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Bob Johannessen
Dátum:  
Címzett: exim-users
Tárgy: [exim] Escaping colon in colon-separated lists (environment)
Consider the following fragment from a pipe transport:

------------------------------------------------------------------------
        environment =AUTH=$authenticated_id           \
                    :SUBJECT=$header_subject:         \
                    :TO=$header_to:
------------------------------------------------------------------------


And the following from the Exim specification:

------------------------------------------------------------------------
environment
Use: pipe
Type: string, expanded
Default: unset

This option is used to add additional variables to the environment
in which the command runs (see section 29.4 for the default list).
Its value is a string which is expanded, and then interpreted as a
colon-separated list of environment settings of the form
“<name>=<value>”.
------------------------------------------------------------------------

Question:

Is it possible to get all the contents of the Subject: header field
into the SUBJECT environment variable even if it contains a colon?

So far I've tried I have tried:

:"SUBJECT=$header_subject:"
":SUBJECT=$header_subject:"
:SUBJECT=$sg{{$header_subject:}{:}{\\:}}
:SUBJECT=${quote{$header_subject:}}

and probably a few other things, but with no luck. The only way I've
found so far to even get anything *past* the first colon into the
environment variable is something like this

:SUBJECT=${tr{$header_subject:}{:}{_}}

which is far from ideal.

Am I trying to do the impossible here?


    Bob