Viktor Dukhovni:
>
> > On Jan 30, 2017, at 8:57 AM, Jeremy T. Bouse <[email protected]>
> > wrote:
> >
> > I also found when
> > testing with 'postmap -q' I had to include the PGPASSFILE environment
> > variable as it wasn't being read from main.cf apparently.
>
> The "import_environment" setting is used to sanitize the environment
> in master(8) and setgid programs by removing all variables not listed,
> and overriding all variables with explicit assignments. This is not
> appropriate for tools as postmap(1).
There is no need to store the password in a separate file. Just
set those restricted permissions on the postfix-mysql cf files,,
and postmap will pick up the password from there.
That said, postmap and other programs already depend on main.cf
settings, so respecting import_environment might actually help to
make program behavior more consistent. What do you think?
Wietse