Dunk: > Thanks, I have tested in on a low volume email server. The code is pretty clean, so I expect no surprises. I noticed that the hiredis API is robust against untrusted data that contains special characters: it splits the query into fields before interpolating the untrusted data. So I anticipate no 'little Bobby tables' problems as described in https://xkcd.com/327/.
If you need to handle large query volume, try using proxy:redis:/path/to/file. Wietse > > > On 11 Mar 2021, at 22:32, Wietse Venema <wie...@porcupine.org> wrote: > > > > ?Dunk: > >> Hi, > >> Okay, attached is output from test.sh that calls valgrind twice. > >> > >> Duncan > > > > Thanks, this looks good. > > > > Wietse > > > >> > >>>> On 11 Mar 2021, at 20:29, Wietse Venema <wie...@porcupine.org> wrote: > >>> > >>> ?Dunk: > >>>> ?Hi, > >>>> I tried > >>>> > >>>> sh postfix-env.sh valgrind --tool=memcheck src/global/mail_dict > >>>> redis:$(pwd)/redis.cf read<<'EOF' > >>>> > >>>> With redis.cf > >>>> > >>>> host = 127.0.0.1 > >>>> port = 6379 > >>>> prefix = TEST: > >>>> > >>>> With ?get foo?, or any command like postmap I get segmentation fault > >>>> (see attached output) > >>>> > >>>> > >>>> So I created test.sh with: > >>>> > >>>> #!/bin/sh > >>>> postfix start > >>>> postmap -q "postmas...@example.com" redis:$(pwd)/redis.cf > >>>> postmap -q "postmas...@test.com" redis:$(pwd)/redis.cf > >>>> postfix stop > >>>> > >>>> Redis only has the key: > >>>> > >>>> "TEST:postmas...@test.com" set to "u...@test.com" > >>>> > >>>> Run with valgrind --tool=memcheck ./test.sh > >>> > >>> That traces the shell process that runs the test.sh script, > >>> not the postmap processes. > >>> > >>> Can you do instead: > >>> > >>> #!/bin/sh > >>> valgrind --tool=memcheck postmap -q "postmas...@example.com" > >>> redis:$(pwd)/redis.cf > >>> valgrind --tool=memcheck postmap -q "postmas...@test.com" > >>> redis:$(pwd)/redis.cf > >>> > >>> One address should exist, and one should not. > >>> > >>> Wietse >