On 28/05/2020 11:54, Jürgen Edner via Exim-users wrote:
> set = r_dir = ${extract{folder}{${lookup{$local_part}
> lsearch{/etc/pubfolders}}}{$value}}
> condition = ${if exists{/home/imappublic/.$r_dir/cur}}
> condition = ${if exists{/home/imappublic/.$r_dir/new}}
> ...
>
> I'm not sure if I'm using the correct set-syntax. I've read the
> documentation and searched the internet but couldn't find an
> example which shows the correct command usage. It would be nice
> if someone can shed some light on the syntax and maybe can
> provide and example.
An example of use in the Exim testsuite:
alias:
driver = redirect
debug_print = DEBUG: $r_r1 $r_r2
data = b
# r_r1 checks that a variable with tainted data is ok
# that the default list-sep ":" is not used for
this list
# that an '=' on the RHS is ok
set = r_r1 = <$local_part> aaa:bbb bar=baz
# r_local checks that a variable is immediately usable
set = r_local = check
errors_to = bad_$r_local
user:
driver = accept
debug_print = DEBUG: $r_r1 $r_r2
# r_r1 vs. r_r2 checks we can have multiple "set" options
set = r_r1 = $local_part
set = r_r2 = $local_part \
2a00:1940:100::ff:0:1 \
foo=bar \
# check we can get a newline into content
newline=initial\n\tcont \
# check we can get a list-sep into content (by
doubling)
semicolon=initial;;cont \
; \
# r_r3 checks we can have a list as arg for a "set" option
r_r3 = bletch
transport = local_delivery
--
Cheers,
Jeremy