Autor: Mike Tubby Data: A: exim-users Assumpte: Re: [exim] Exim 4.94.0.4 works where Exim 4.94 fails with tainted
path 'not permitted'
On 08/11/2020 12:12, Andrew C Aitchison via Exim-users wrote: > On Sun, 8 Nov 2020, Mike Tubby via Exim-users wrote:
>
>> Now it looks like I have to use additional look-ups, perhaps
>> something like this:
>>
>> $domain_data = ${lookup mysql{SELECT domains.domain AS domain FROM \
>> users LEFT JOIN domains ON users.domain_id=domains.id
>> WHERE \
>> users.username='${quote_mysql:$local_part}' AND \
>> domains.domain='${quote_mysql:$domain}' AND \
>> users.active=1 AND \
>> domains.active=1}}
>>
>> $local_part_data = ${lookup mysql{SELECT users.username AS
>> username FROM \
>> users LEFT JOIN domains ON users.domain_id=domains.id
>> WHERE \
>> users.username='${quote_mysql:$local_part}' AND \
>> domains.domain='${quote_mysql:$domain}' AND \
>> users.active=1 AND \
>> domains.active=1}}
>>
>> to simply send my 'already known good' keys $local_part and $domain
>> round in circles and get the duplicate data (same values) from the
>> database rather than use them, directly?
>
> If you do it the way Jeremy suggests, exim will set $local_part_data
> and $domain_data for you as side effects of successfully looking up
> $local_part and $domain.
>
Maybe I'm have a mental block with this one but to me doing it "do it
the way Jeremy suggests" is unclear - I may be suffering from the "I've
done it this way for 20 years" and can't see the wood for for the trees
with this one. Jeremy also said I was 'fighting the design' but nowhere
can I see or visualise the design in a meaningful way.
Perhaps you, or someone, could re-write my local_delivery router by way
of an example for how it should work with the new design:
local_delivery:
driver = accept
condition = ${lookup mysql{SELECT
CONCAT(users.username,'@',domains.domain) AS email FROM \
users LEFT JOIN domains ON users.domain_id=domains.id
WHERE \
users.username='${quote_mysql:$local_part}' AND \
domains.domain='${quote_mysql:$domain}' AND \
users.active=1 AND \
domains.active=1}{yes}{no}}
transport = local_delivery
user = mail
group = mail