On 15/09/2016 16:47, Viktor Dukhovni wrote:
On Thu, Sep 15, 2016 at 09:51:11AM -0400, Wietse Venema wrote:
Stephan Seitz:
On Thu, Sep 15, 2016 at 06:49:08AM -0400, Wietse Venema wrote:
FYI, Postfix uses libmysqlclient. So what's up with not reading
the default config file?
Can it be the usual chroot problem?
Postfix normally opens tables before chroot() and before dropping
root privileges. I would expect that libmysqlclient reads my.cnf
during intialization, not at the time of the first query, but this
can be verified by running a Postfix process under strace or
equivalent (see http://www.postfix.org/DEBUG_README.html).
With both LDAP and MySQL (and likely also Postgres), Postfix does
not open connections at table initialization time. Connection
start is delayed until the first lookup. This gets the associated
latency out of the critical path (as does using proxymap). So
there are no pre-jail calls into the MySQL libraries, all that
happens with the first query.
So chroot can be a problem, but in this case the OP had reproducible
issues on the command-line with "postmap -q", no chroot there.
In can confirm that, no chroot issue there. The my.cnf file is not
available inside the chroot so changing the path in map files wouldn't
have any effect.
Could it simply be a libmysqlclient packaging issue ? Wrong compilation
options ?
Antoine