Re: [exim] MySQL Connection errors – SSL?

Pàgina inicial
Delete this message
Reply to this message
Autor: Phil Pennock
Data:  
A: Kai Bojens
CC: exim-users
Assumpte: Re: [exim] MySQL Connection errors – SSL?
On 2018-05-14 at 14:12 +0200, Kai Bojens via Exim-users wrote:
> 1. Does Exim close the MySQL connection properly? One explanation I
> found suggested that this could pose a problem.


It should be closing it. There might be a leak, that is something we'd
probably fix given sufficient information.

Invoke exim with -d+lookup to get debugging information for lookups,
including MySQL. When Exim closes a MySQL connection it will debug-log:

    close MYSQL connection: <server-name>


When opening a connection it will debug-log:

    MYSQL new connection: host=%s port=%d socket=%s database=%s user=%s


> 2. Is there any other possivle explanation for this behaviour?


Having written wire-protocol handling for MySQL I have many odious
thoughts on the topic, but most are not constructive.

Has Exim been recompiled with client libraries for the newer MySQL?
Exim with debugging enabled will report library versions, including at
compile-time and run-time, which may hint at issues here. MySQL's wire
protocol is ... not sufficiently well structured that I'd be confident
in the handling across major versions here.

> 3. Are there any SSL related configuration options? My new server has
> ssl configured but the Exim documentation shows no options for this.


In the my.cnf file, whatever MySQL-specific options you want can be
given, in an "[exim]" section (by default).

Exim uses the MySQL client libraries, and calls roughly:

    mysql_options(handle, MYSQL_READ_DEFAULT_GROUP, "exim")


so whatever client initialization is done based on that, should happen
automatically. Note that the mysql_servers option can override that
value, in square brackets before the DB name. So you could have
different groups for different purposes.

So you configure MySQL stuff in general with the "[client]" section in
my.cnf (wherever that is on your system), and then override the
all-clients defaults with an "[exim]" section. More details at:

    https://dev.mysql.com/doc/refman/8.0/en/option-files.html


-Phil