From a63442492d25b3ab12d0bce2a8b879e32855aa72 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 16 May 2020 19:38:59 +0100 Subject: [PATCH] Docs: options on lookups --- doc/doc-docbook/spec.xfpt | 14 ++++++++++++++ src/src/lookups/README | 2 ++ 2 files changed, 16 insertions(+) diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 6d8582528..12c03df64 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -6663,6 +6663,13 @@ If the value of &$sender_host_address$& is 192.168.5.6, expansion of the first &%domains%& setting above generates the second setting, which therefore causes a second lookup to occur. +.new +The lookup type may optionally be followed by a comma +and a comma-separated list of options. +Each option is a &"name=value"& pair. +Whether an option is meaningful depands on the lookup type. +.wen + The rest of this chapter describes the different lookup types that are available. Any of them can be used in any part of the configuration where a lookup is permitted. @@ -6680,6 +6687,13 @@ lookup to succeed. The lookup type determines how the file is searched. .new .cindex "tainted data" "single-key lookups" The file string may not be tainted + +.cindex "tainted data" "de-tainting" +All single-key lookups support the option &"ret=key"&. +If this is given and the lookup +(either underlying implementation or cached value) +returns data, the result is replaced with a non-tainted +version of the lookup key. .wen .next .cindex "query-style lookup" "definition of" diff --git a/src/src/lookups/README b/src/src/lookups/README index dad69dcc0..2e87edadd 100644 --- a/src/src/lookups/README +++ b/src/src/lookups/README @@ -135,6 +135,8 @@ DEFER. The arguments are: If set to a nonzero number of seconds, the cached value becomes unusable after this time. Currently the dnsdb lookup uses this to support the TTL value. + uschar *opts options, a comma-separated list of tagged values for + modifying the search operation Even though the key is zero-terminated, the length is passed because in the common case it has been computed already and is often needed. -- 2.30.2