Hi
First, thank you very much for the fast answer.
> $ echo '*@b.de: field="value" pass="abcd" key="foo" pass_key="bar me"' >
> TEST
> $ exim -be
> > ${lookup{[email protected]}lsearch*@{TEST}{$value}fail}
> field="value" pass="abcd" key="foo" pass_key="bar me"
> > ${extract{pass_key}{${lookup{[email protected]}lsearch*@{TEST}{$value}fail}}}
> bar me
While this is no answer to my question, it is yet way better.
I didn't know that I could test it so easily, I thought I would have to use
log_write and restart exim every time..
I must have missed -be when reading the man page.
> What you need to escape depends upon how you plan to use the value. Is
> it to be a key in a database lookup, in which case there are various
> quote_* expansion operators? Or is it to be passed directly to an
> authenticator?
I am passing these values to a lot of things, but the only ones that could
contain any special characters are used like this:
1) address_data = ${lookup{$local_part@$domain}lsearch*@{FILE }{$value}fail}
2) server_secret = ${extract{pass}{${lookup{$1}lsearch{FILE}{$value}fail}}}
3) server_condition = "${if
eq{$2}{${extract{pass}{${lookup{$1}lsearch{FILE}{$value}fail}}}}{1}{0}}"
4) driver = redirect data = ${expand:${extract{forward}{$address_data}}}
Now I did some testing with -be and it seems that neither lookup nor extract
seems to expand the results:
> $primary_hostname
mx.sh-solutions.de
> ${lookup{[email protected]}lsearch*@{FILE}{$value}fail}
pass="$primary_hostname" forward="[email protected]"
> ${extract{pass}{${lookup{[email protected]}lsearch*@{FILE}{$value}fail}}}
$primary_hostname
Which is good, because it seems to indicate that 1) 2) and 3) will work as
expected.
However, I am now confused why 4) ever worked:
For example:
*@c.de: forward="[email protected]"
Incoming mail for [email protected] was correctly redirected to [email protected], yet -be tells
me the expansion yielded "[email protected]".
Why is this working?
BTW: So it seems the only 2 characters I need to escape in my files are "
and \. I can simple prefix both with \. Right? (Assuming no #0, #10, #13 are
used...)
Best regards,
Steffen
smime.p7s
Description: S/MIME cryptographic signature
-- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
