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 <[email protected]> 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 <[email protected]> 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 "[email protected]" redis:$(pwd)/redis.cf
> >>>> postmap -q "[email protected]" redis:$(pwd)/redis.cf
> >>>> postfix stop
> >>>>
> >>>> Redis only has the key:
> >>>>
> >>>> "TEST:[email protected]" set to "[email protected]"
> >>>>
> >>>> 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 "[email protected]"
> >>> redis:$(pwd)/redis.cf
> >>> valgrind --tool=memcheck postmap -q "[email protected]"
> >>> redis:$(pwd)/redis.cf
> >>>
> >>> One address should exist, and one should not.
> >>>
> >>> Wietse
>