Re: [exim] lsearch vs IPv6

Góra strony
Delete this message
Reply to this message
Autor: Jeremy Harris
Data:  
Dla: exim-users
Temat: Re: [exim] lsearch vs IPv6
On 10/04/15 17:29, Paul Warren wrote:
> Anyway, this is fixable if you can figure out just the right combination
> of quotes and backslashes to actually get double quotes into the file:
>
>  continue = ${run{SHELL -c 'echo  \\\"$sender_host_address\\\"
>        >>$spool_directory/blocked_relay_ips; \


You could change to using a DB lookup rather than an lsearch;
then the insert could be done without involving a shell, too.


Would another means, for the future, be a variant of lsearch
which specified an alternate key-terminator?


By analogy with list separators this ought to involve
(less-than)(char). Possible syntaxes:

${lookup {$sender_host_address}lsearch,<;{/some/file}}

domains = lsearch,<;/some/file

Note that the latter would make filenames starting with
either comma or less-than character awkward to use;
probably no too much of a problem.

Specifying a space would effectively mean the same
as specifying no terminator, given that spaces (and
hashes) are also special in lsearch files. But this
raises the question what to do about them. Maybe
lsearch just isn't the tool for all jobs.
--
Cheers,
Jeremy