[Dovecot] Dovecot.1.0.alpha1+mysql+mysql

jigen jigen at indivia.net
Fri Aug 26 16:58:08 EEST 2005


Hi, we are trying to track down the problem that prevents two mysql
password databases from working. Instead of connecting to each database,
it looks like dovecot tries to connect *twice* to the second specified.

Do do this we just inserted some i_warning()s in the code.

We noticed that passdb_sql_init (auth/passdb-sql.c) is called twice,
once per configuration file, with the correct argument (path to config
file). However, as you can see in the following maillog piece, this
function calls sql_connect with the SAME parameters (the parameters of
the second database).
So the first call works and dovecot connects to the host correctly
(lines 7-8), but in the second call dovecot finds the connection already
up and obviously doesn't try again (last line).

Could this be the origin of the problem? Now we are trying to understand
why the argument to sql_connect isn't updated correctly. Maybe a bug in
the linked list of sql_connection's?

[...] dovecot: auth-worker(default):
	passdb_sql_init("/etc/dovecot/dovecot-mysql_django.conf")
[...] dovecot: auth-worker(default):     now calling
	sql_connect(passdb_sql_conn->db):
[...] dovecot: auth-worker(default):       
	passdb_sql_conn->config_path="/etc/dovecot/dovecot-mysql_debord.conf"
[...] dovecot: auth-worker(default):        
	passdb_sql_conn->set.connect="host=debord port=3306
	dbname=posta_debord user=posta password=foobar"
[...] dovecot: auth-worker(default): driver_mysql_connect: host=debord,
	user=posta, password=foobar.
[...] dovecot: auth-worker(default): driver_mysql_connect:
	conn=0x3c00a6b0
[...] dovecot: auth-worker(default):     actually connecting to debord
[...] dovecot: auth-worker(default): mysql: Connected to debord
	(posta_debord)
[...] dovecot: auth-worker(default):
	passdb_sql_init("/etc/dovecot/dovecot-mysql_debord.conf")
[...] dovecot: auth-worker(default):     now calling
	sql_connect(passdb_sql_conn->db):
[...] dovecot: auth-worker(default):        
	passdb_sql_conn->config_path="/etc/dovecot/dovecot-mysql_debord.conf"
[...] dovecot: auth-worker(default):        
	passdb_sql_conn->set.connect="host=debord port=3306
	dbname=posta_debord user=posta password=foobar"
[...] dovecot: auth-worker(default): driver_mysql_connect: host=debord,
	user=posta, password=foobar.
[...] dovecot: auth-worker(default): driver_mysql_connect:
	conn=0x3c00a6b0
[...] dovecot: auth-worker(default):     already connected to debord!!!!


altivec & jigen




More information about the dovecot mailing list