1 # Exim test configuration 2620
3 PARTIAL=localhost::PORT_N
4 SERVERS=PARTIAL/test/CALLER/
6 .include DIR/aux-var/std_conf_prefix
8 primary_hostname = myhost.test.ex
10 # ----- Main settings -----
12 domainlist local_domains = @
13 hostlist relay_hosts = net-pgsql;select * from them where \
14 id='$sender_host_address'
16 acl_smtp_rcpt = check_recipient
18 pgsql_servers = SERVERS
28 # taint only in lookup string, properly quoted
29 set acl_m0 = ok: ${lookup pgsql {select name from them where id = '${quote_pgsql:$local_part}'}}
30 # taint only in lookup string, but not quoted
31 set acl_m0 = FAIL: ${lookup pgsql,cache=no_rd {select name from them where id = '$local_part'}}
33 # option on lookup type unaffected
34 set acl_m0 = ok: ${lookup pgsql,servers=SERVERS {select name from them where id = '${quote_pgsql:$local_part}'}}
35 # partial server-spec, indexing main-option, works
36 set acl_m0 = ok: ${lookup pgsql,servers=PARTIAL {select name from them where id = '${quote_pgsql:$local_part}'}}
37 # oldstyle server spec, prepended to lookup string, fails with taint
38 set acl_m0 = FAIL: ${lookup pgsql {servers=SERVERS; select name from them where id = '${quote_pgsql:$local_part}'}}
40 # In list-style lookup, tainted lookup string is ok if server spec comes from main-option
41 warn set acl_m0 = ok: hostlist
42 hosts = net-pgsql;select * from them where id='${quote_pgsql:$local_part}'
43 # ... but setting a per-query servers spec fails due to the taint
44 warn set acl_m0 = FAIL: hostlist
45 hosts = <& net-pgsql;servers=SERVERS; select * from them where id='${quote_pgsql:$local_part}'
47 # The newer server-list-as-option-to-lookup-type is not a solution to tainted data in the lookup, because
48 # string-expansion is done before list-expansion so the taint contaminates the entire list.
49 warn set acl_m0 = FAIL: hostlist
50 hosts = <& net-pgsql,servers=SERVERS; select * from them where id='${quote_pgsql:$local_part}'
52 accept domains = +local_domains
53 accept hosts = +relay_hosts
54 deny message = relay not permitted
63 address_data = ${lookup pgsql{select name from them where id='ph10'}}
67 # ----- Transports -----
73 file = DIR/test-mail/\
74 ${lookup pgsql{select id from them where id='ph10'}{$value}fail}